r/algorithmictrading • u/frosty123454321 • Mar 18 '26
Question Looking For Guidance Going From Trading View Strategy Tester to Ninja Script Strategy
I created a strategy with Claude code for trading view and got really good results. Roughly $182,00 over the last year trading just 2 MNQ. Like $400k over the last 5-6 years
Obviously insanely good results for just 2 micros with a 70% win rate and minimal drawdown, but how do I transfer this to ninja trader to just get a fraction of these results?
I had Claude transfer it to ninja script with all of my settings and I went from $180k gain on trading view strategy tester to $55k loss over the last 365 days on ninja trader strategy analyzer. I eventually got ninja trader to make like $12k over the last year backtesting, but then I got back to like 5-6 years and it’s way negative again.
I know trading view is notorious for inaccurate fills, but I forward tested it a bit with an indicator I made based on the algo, and I made a few hundred bucks today just trading the system the algo is based on.
I know there has to be some potential, but what am I missing to where my results are so drastically different from trading view to Ninja trader?
I’m new to algo trading, so open to all advice and criticism. Even if I could get it to produce 10% of the gains I got on trading view I’d be happy.
1
u/Guarado Mar 18 '26
Did your trading view testing account for fees and slippage? Did your win rate change drastically on ninja script?
Ill be honest it does look like your original testing is overfit. Stuff like waiting for a bar to close for confirmation but then pnl calcs are based on opening of that bar can seriously compound the error over thousands of trades.
1
u/Maniacal-Maniac Mar 18 '26
Even strategy analyzer on NT is not that accurate, and any results you should scale back expectations as results are usually worse even if you have slippage/commission on. Accuracy is a complete guess up if you are using non-standard candles like Heikan-Ashi or Renko, so wouldn’t even bother using SA and go straight to replay.
More realistic test is to test it in Market Replay - takes a lot longer, and can generally do only 1 contract at a time, maybe 2-3 hours on 1m chart for 3 months for me.
I use SA as a filter for what I will test in replay. If a strategy is profitable in analyzer then I will spend some time to see how it performs in replay. If a strategy is unprofitable in SA then it’s not even worth wasting time in replay, in my experience.
1
u/ionone777 Mar 18 '26
intra candle trading is notoriously bad on TV. might be the issue. when do you take profits ? same candle ?
1
u/yayita2500 Mar 19 '26
the best way to test in Ninja as in real life would be in market replay
1
u/the_ict_bb Mar 20 '26
This doesn’t look realistic as it stands. A 6-year backtest with ~18k trades, ~77% win rate, a very smooth equity curve and only ~1.6% max drawdown is already extremely unusual, but the biggest red flag is the Sortino ratio above 60. In practice, Sortino measures downside volatility, so to reach that level you would need almost no negative returns at all relative to the average return, meaning losses are either extremely rare, extremely small, or not properly accounted for. Even top-tier hedge funds typically operate between 1 and 5, sometimes higher in exceptional cases, but anything above 10 is already extraordinary, so 60+ strongly suggests that the downside deviation is being underestimated, often due to issues like return calculation on the wrong timeframe, equity smoothing, or trades being evaluated in a way that removes or compresses drawdowns. Your stats also show a negative RR (avg win ~$54 vs avg loss ~$121), which means the system depends heavily on maintaining a high win rate, and that type of strategy is very sensitive to real execution conditions like slippage and spread, which are never perfectly modeled in backtests. Combined with the Sortino anomaly, this points more toward a biased or overfitted backtest than a robust edge. The forward test is the only thing that matters now, but one day is not statistically meaningful, you’ll need a much larger sample to confirm whether anything here actually holds in real conditions.
When I saw your equity curve and stats I was like “holy shit this is insane, I want this too” 🤣 As long as you’re confident it’s truly paper trading you’re not risking anything, and on a prop firm you’ve already paid anyway, so if you actually found the strategy that wins you a Nobel Prize just keep going, who knows, maybe you’ll come back and tell us how it went with a martini in hand, sunglasses on, chilling in the sun 😄
1
u/Algorithm0007 Mar 21 '26
I can help, check DM thank you
1
u/Candlestick_Future Mar 21 '26
Side question, why MNQ (where you have bigger spreads/costs) and not QQQ?