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
strategy analyzer stops when testing a strategy
Collapse
X
-
strategy analyzer stops when testing a strategy
strategy analyzer stops when testing a strategy...only happens with this strategy, will show no results it stops testing 5 seconds inTags: None
-
Hello rickyblah12,
Thank you for your post.
Do you receive any errors either on screen or in the log tab of the Control Center when this occurs? If so, what is the text of the error?
Generally if other strategies work, it would likely be an error in the strategy you are testing that would cause a backtest to stop. Is the strategy one you created yourself?
Thanks in advance; I look forward to assisting you further.Kate W.NinjaTrader Customer Service
-
Yes.
3/16/2020 7:36:26 PM Default Strategy 'BEMATUNES/-1': A BuyToCover stop order placed at '3/8/2020 6:35:32 PM' has been ignored since the stop price is less than or equal to the close price of the current bar. This is an invalid order and subsequent orders may also be ignored. Please fix your strategy. 3/16/2020 7:36:27 PM Default Indicator 'ATR': Error on calling 'OnBarUpdate' method on bar 0: You are accessing an index with a value that is invalid since it is out-of-range. I.E. accessing a series [barsAgo] with a value of 5 when there are only 4 bars on the chart.
Comment
-
Hello rickyblah12,
Thank you for your reply.
Does your strategy use an ATR in it? If so, that would be the first thing I would look at - whether you've checked to see if you have enough bars to calculate that ATR. As far as the initial error, this is occurring because the strategy is either trying to place or modify a stop order to at or below the current bar close price. What I would recommend with that error is to add some prints so you can see in the NinjaScript Output window what the prices of stops are being modified to, and then take action to adjust your logic for placing stops based on that.
This forum post goes into great detail on how to use prints to help figure out where issues may stem from — this should get you going in the correct direction. You can even add these using the Strategy Builder.
If you run into issues like we saw here, the above information will allow you to print out all values that may be evaluating differently than you may expect. With the printout information you can assess what is different between the two.
Please let us know if we may be of further assistance to you.Kate W.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by cyberpete76, 03-27-2023, 12:29 AM
|
7 responses
267 views
1 like
|
Last Post
by slightly
Today, 01:47 AM
|
||
Started by renewsaltwater, Today, 01:15 AM
|
0 responses
2 views
0 likes
|
Last Post Today, 01:15 AM | ||
Started by slightly, Today, 12:49 AM
|
0 responses
4 views
0 likes
|
Last Post
by slightly
Today, 12:49 AM
|
||
Started by sdauteuil, 09-23-2021, 10:16 AM
|
4 responses
1,210 views
0 likes
|
Last Post Yesterday, 11:41 PM | ||
Started by agclub, 04-21-2024, 08:57 PM
|
5 responses
37 views
0 likes
|
Last Post
by agclub
Yesterday, 09:47 PM
|
Comment