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 StockTrader88, 03-06-2021, 08:58 AM
|
44 responses
3,967 views
3 likes
|
Last Post
by jhudas88
Today, 06:59 PM
|
||
Started by rbeckmann05, Today, 06:48 PM
|
0 responses
4 views
0 likes
|
Last Post
by rbeckmann05
Today, 06:48 PM
|
||
Started by rhyminkevin, Today, 04:58 PM
|
4 responses
55 views
0 likes
|
Last Post
by dp8282
Today, 06:13 PM
|
||
Started by iceman2018, Today, 05:07 PM
|
0 responses
6 views
0 likes
|
Last Post
by iceman2018
Today, 05:07 PM
|
||
Started by lightsun47, Today, 03:51 PM
|
0 responses
8 views
0 likes
|
Last Post
by lightsun47
Today, 03:51 PM
|
Comment