NexusFi: Find Your Edge


Home Menu

 





Ninjatrader 8, NT8, autotrading strategy stability


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one StickRustler with 3 posts (0 thanks)
    2. looks_two loantelligence with 1 posts (0 thanks)
    3. looks_3 userque with 1 posts (0 thanks)
    4. looks_4 JonnyBoy with 1 posts (0 thanks)
    1. trending_up 3,849 views
    2. thumb_up 0 thanks given
    3. group 6 followers
    1. forum 5 posts
    2. attach_file 1 attachments




 
Search this Thread
  #1 (permalink)
 StickRustler 
Melbourne, FL
 
Experience: Advanced
Platform: NinjaTrader, ThinkOrSwim
Trading: Futures, Options, Stocks
Posts: 19 since Jul 2020
Thanks Given: 4
Thanks Received: 2

I've been working with NT8 for about 3 months now. Have also played with Sierra Charts and Thinkorswim.

I have a base strategy which I've developed two working strategies from, both sharing the same code.

One is full autotrade, the other hands off entries to existing ATM strats.

On stress-testing these two (by running them on MES with low tick setting of 50 ticks, so they make many trades while I watch), I'm running into many problems, including:

- auto-trailing stop orders that trip over themselves and generate errors for trying to place stop orders above the market price

- severe crashes that put up dozens of error dialogs and take the whole program down

- Strat generating orders that enter > 1 position (which should never happen, as 'EntriesPerDirection = 1' is set in State.SetDefaults);



Just to note: the logic of the strategies is working perfectly when it does work--entries are executing correctly; exits are executing correctly.

And, I've so far had no issues trading live (with the exception of the trailing stop issues noted above).

It's quite possible some of these issues may stem from coding errors on my part. But before I proceed further in development, I wanted to get other's advice regarding their experience with autotrading strats and stability in NT. And how NT compares to any other platforms you've used.

Just trying to gauge if it's worth continuing. I want to spend my time on improving my strategy profitability, rather than chasing down bugs, which may or may not be mine.


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Powell in 48 Hours: Word Markets Give 78% on Inflation, …
Prediction Markets & Event Contracts
Day 96 Missiles Hit Kuwait and Bahrain: June 15 Peace at …
Prediction Markets & Event Contracts
Zytrade: Devin Brady, CEO - Ask Me Anything (AMA)
Brokers
UMA Votes Tonight: Polymarkets $80M Strategy Bitcoin Bat …
Prediction Markets & Event Contracts
Wood Mackenzie Drops $200 Oil Forecast -- Airspace Expir …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
24 thanks
2026 Jlab journal
10 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Lady Vols Primer: Trading Volatility Journal
6 thanks
2026 Fire Horse
5 thanks
  #2 (permalink)
 loantelligence 
Syracuse, NY
 
Experience: Intermediate
Platform: Ninja Trader
Broker: Mirus Futures/Zen-Fire
Trading: NQ
Posts: 218 since Jan 2011
Thanks Given: 31
Thanks Received: 192

one of the things i would recommend is using an indicator sending a mkt order rather than auto trailing.... a lot depends on the bar types you are using....unirenko, ticks, minutes. I think you may have said 50 tick....has to be a responsive indicator...maybe lbr310 crossing below or above 0....just a thought....the 50 ticks looks a little herky jerky.....tough to latch onto a trend....I can see why you would get a lot of errors using autotrailing....I used 200 with and SMA 50....got some good exits...but lots of chop....maybe a bollinger would be better...had better success with a 2/4/8 unirenko....


Reply With Quote
  #3 (permalink)
 
JonnyBoy's Avatar
 JonnyBoy 
Montreal, Quebec
 
Experience: Advanced
Platform: NinjaTrader 8
Broker: Kinetick
Trading: ES
Posts: 1,561 since Apr 2012
Thanks Given: 706
Thanks Received: 3,871



StickRustler View Post
I've been working with NT8 for about 3 months now. Have also played with Sierra Charts and Thinkorswim.

I have a base strategy which I've developed two working strategies from, both sharing the same code.

One is full autotrade, the other hands off entries to existing ATM strats.

On stress-testing these two (by running them on MES with low tick setting of 50 ticks, so they make many trades while I watch), I'm running into many problems, including:

- auto-trailing stop orders that trip over themselves and generate errors for trying to place stop orders above the market price

- severe crashes that put up dozens of error dialogs and take the whole program down

- Strat generating orders that enter > 1 position (which should never happen, as 'EntriesPerDirection = 1' is set in State.SetDefaults);



Just to note: the logic of the strategies is working perfectly when it does work--entries are executing correctly; exits are executing correctly.

And, I've so far had no issues trading live (with the exception of the trailing stop issues noted above).

It's quite possible some of these issues may stem from coding errors on my part. But before I proceed further in development, I wanted to get other's advice regarding their experience with autotrading strats and stability in NT. And how NT compares to any other platforms you've used.

Just trying to gauge if it's worth continuing. I want to spend my time on improving my strategy profitability, rather than chasing down bugs, which may or may not be mine.

Without seeing your strategy, it would be difficult to diagnose what the issue is.

I have coded both types of strategies. One which uses the ATM to handle the order once executed and the other is a fully hard coded strategy that manages quantity, entries, exists and a trailing stop.

As you are getting the errors in both the ATM and the hard coded strategy tells me there is likely something wrong globally.

It is puzzling you are having an issue with the strategy running the ATM. Once the strategy has passed over the handling of the position to the ATM that should be it, other than perhaps a circle back to prevent another order from executing if a position is already open.

So, unless I can see your strategy code/working I can't really help you that much.


--------------------------------------------------------
- Trade what you see. Invest in what you believe -
--------------------------------------------------------
Reply With Quote
  #4 (permalink)
 StickRustler 
Melbourne, FL
 
Experience: Advanced
Platform: NinjaTrader, ThinkOrSwim
Trading: Futures, Options, Stocks
Posts: 19 since Jul 2020
Thanks Given: 4
Thanks Received: 2


loantelligence View Post
one of the things i would recommend is using an indicator sending a mkt order rather than auto trailing....

I use both types, but was using an ATM strategy that had auto-trailing stops.


Quoting 
the 50 ticks looks a little herky jerky.....tough to latch onto a trend....I can see why you would get a lot of errors using autotrailing

As I said, it was for testing: so I could see a lot of trades while I watched, and to see if the Strat created any errors/problems.


Started this thread Reply With Quote
  #5 (permalink)
 StickRustler 
Melbourne, FL
 
Experience: Advanced
Platform: NinjaTrader, ThinkOrSwim
Trading: Futures, Options, Stocks
Posts: 19 since Jul 2020
Thanks Given: 4
Thanks Received: 2


JonnyBoy View Post
Without seeing your strategy, it would be difficult to diagnose what the issue is.

I have coded both types of strategies. One which uses the ATM to handle the order once executed and the other is a fully hard coded strategy that manages quantity, entries, exists and a trailing stop.

As you are getting the errors in both the ATM and the hard coded strategy tells me there is likely something wrong globally.

It is puzzling you are having an issue with the strategy running the ATM. Once the strategy has passed over the handling of the position to the ATM that should be it, other than perhaps a circle back to prevent another order from executing if a position is already open.

So, unless I can see your strategy code/working I can't really help you that much.


Still not sure what's happening with the Strats, except to say that NT doesn't fail gracefully when there's a problem (and maybe this is a Windows / C# issue, and not related to NT).

For now, I'm not going to attempt to autotrade at all--just going to backtest and optimize my strats, then trade them live.


Started this thread Reply With Quote
  #6 (permalink)
userque
Chicago IL
 
Posts: 180 since Apr 2016
Thanks Given: 573
Thanks Received: 130


StickRustler View Post
I've been working with NT8 for about 3 months now. Have also played with Sierra Charts and Thinkorswim.

I have a base strategy which I've developed two working strategies from, both sharing the same code.

One is full autotrade, the other hands off entries to existing ATM strats.

On stress-testing these two (by running them on MES with low tick setting of 50 ticks, so they make many trades while I watch), I'm running into many problems, including:

- auto-trailing stop orders that trip over themselves and generate errors for trying to place stop orders above the market price

- severe crashes that put up dozens of error dialogs and take the whole program down

- Strat generating orders that enter > 1 position (which should never happen, as 'EntriesPerDirection = 1' is set in State.SetDefaults);



Just to note: the logic of the strategies is working perfectly when it does work--entries are executing correctly; exits are executing correctly.

And, I've so far had no issues trading live (with the exception of the trailing stop issues noted above).

It's quite possible some of these issues may stem from coding errors on my part. But before I proceed further in development, I wanted to get other's advice regarding their experience with autotrading strats and stability in NT. And how NT compares to any other platforms you've used.

Just trying to gauge if it's worth continuing. I want to spend my time on improving my strategy profitability, rather than chasing down bugs, which may or may not be mine.

Here's the technique I'd use.

Convert the ATM strategy into a standard strategy.

If the standard strategy behaves differently than the ATM, and they should behave exactly the same, then that tells you something about NT.

Either way ...

Use Print(), and/or "pseudo break points," and/or try/catch, and/or Visual Studio to debug the standard strategy.
If you can get the standard strategy to work correctly, use that instead of ATM.

Note: My understanding is that you can run a standard strategy via market replay. I've never confirmed this.


Reply With Quote




Last Updated on September 28, 2020


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts