Thank you!
Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Auto Reset StopCancelClose?
Collapse
X
-
Auto Reset StopCancelClose?
Hi, So I was wondering if there was a way to auto restart my strategy after being stopcancelclose due to an error. The error in particular that I'm facing is that sometimes the commodity (NASDAQ/ES) moves so fast that I'm not able to place my stop loss due to it being relatively low currency based stoploss. Which I'm personally fine with but I was hoping you would have a script or example code of something like 'if stopcancelclose happens then restart strategy'
Thank you!Tags: None
-
Hello knbop12,
Thank you for your post.
StopCancelClose will stop the strategy, cancel any remaining working orders, and then close any open positions managed by the strategy by submitting one "Close" order for each unique position. There is no way to have the strategy automatically re-start/re-enable itself after it has stopped. You will need to re-enable the strategy manually.
If you want the strategy to not stop after receiving an order rejection, consider using RealtimeErrorHandling.StopCancelCloseIgnoreRejects , which will perform default behavior (StopCancelClose is the default behavior) on all errors except order rejections.
Please see the Help Guide page below on RealtimeErrorHandling:
If you have any further questions, please let me know.Gaby V.NinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by AaronKoRn, Today, 09:49 PM
|
0 responses
11 views
0 likes
|
Last Post
by AaronKoRn
Today, 09:49 PM
|
||
Started by carnitron, Today, 08:42 PM
|
0 responses
10 views
0 likes
|
Last Post
by carnitron
Today, 08:42 PM
|
||
Started by strategist007, Today, 07:51 PM
|
0 responses
11 views
0 likes
|
Last Post Today, 07:51 PM | ||
Started by StockTrader88, 03-06-2021, 08:58 AM
|
44 responses
3,980 views
3 likes
|
Last Post
by jhudas88
Today, 06:59 PM
|
||
Started by rbeckmann05, Today, 06:48 PM
|
0 responses
9 views
0 likes
|
Last Post
by rbeckmann05
Today, 06:48 PM
|
Comment