r/Trading • u/Late-Mail-1509 • Sep 18 '26
Strategy I feel like I've finally cracked the matrix
I just want to plant a flag here and keep myself accountable for whats to come.
I've been grinding on automating a discretionary setup for a long time, every obvious version of it either fell apart the second real fills touched it, or looked incredible in backtest and bled in sim. Anyone in the automation game knows the specific flavor of pain, lucly AI these days, does it faster.
Something finally clicked, I had a working strategy on my TV Pine Script for a long time but I was wasting so much time trying to automate this script within trading tools such as Ritmic, Interactive Brokers, MotiveWave and NinjaTrader, neither tools produced the same numbers and trades as TV. Then I came across a very simple solution - OCR Python Script (Google it for those who dont know). This opened the gate for me to have a fully automated, hands off engine, the script reads the position box at the bottom left, and places market order, sets TP and SL by clicking buy/sell buttons in TV, Ninja fires the orders, manages the exits, and I watch. Dont get me wrong I still have to put loads of gatekeeping on the OCR script, because its exiting and entering trades sometimes unnecessarily, which cost me commissions and sometimes lost trades, but today was the first day I did let ir run 100% alone, and it did quite well.
Will let this run for a month or at least 2 weeks to see if Ninjatrader Demo account can achieve at least close numbers shown in pinescript tally window. I know I know, it is a lot of trades, but I dont mind paying 2k commisions if it makes me 20k.
Your comments for improvements and ideas are more than welcome!
Here is the export analysis from TV Pinescript what makes up the numbers
https://claude.ai/artifact/YPL9AV8VFYEfnwpKy8USx7
TV signals and Data Screen

NinjaTrader Demo Acc Today

View all comments
Show parent comment
1
u/Late-Mail-1509 Sep 26 '26
Actually found a way to make this works faster than it should open browser tab with TV and JS reads the signals, and fires via API, less than 200ms more than enough for this strategy, but thanks, I keep your role in mind