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
Error on calling 'OnBarUpdate' method on bar 0
Collapse
X
-
Hello everington_f,
I am not experiencing any out of range run-time errors with the updated script that you have provided me.
Please completely remove the strategy and then re-add it. Once the strategy has been re-added, test once more.
If you are still running into this run-time error:
Can you please provide additional details on how you are testing this script on your end?
Are you adding this strategy on a chart or through the Strategies tab of the Control Center?
If on a chart, what are the settings that you have set in the Data Series window? You can access this by right-clicking the chart and selecting Data Series.
Can you provide what instrument you are testing on? Can you provide the parameters that you are using for your strategy?Zachary G.NinjaTrader Customer Service
Comment
-
Added on a chart JPM daily 390 minutes US Equities RTH.... this time looked like it was going to work but then gave the error again after about a 20 second pause - parameters are .
on price change
lookback 256
bars required 50
immediate submit
entries per direction 1
unique entries
Comment
-
Hello everington_f,
I am not seeing any run-time errors occur when testing the strategy on a chart.
What I would suggest is adding a print statement before each of your conditional statements. This way, we can narrow down what conditional statement is causing the run-time error as the print will be able to print out first before the line of code that causes the error to occur executes.
As an example, you can place
Code:Print("About to run line 125");
Make sure that the NinjaScript Output window (New -> NinjaScript Output) is open before testing.Zachary G.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by DanielSanMartin, Yesterday, 02:37 PM
|
2 responses
12 views
0 likes
|
Last Post Today, 05:26 PM | ||
Started by DJ888, 04-16-2024, 06:09 PM
|
4 responses
12 views
0 likes
|
Last Post
by DJ888
Today, 04:28 PM
|
||
Started by terofs, Today, 04:18 PM
|
0 responses
11 views
0 likes
|
Last Post
by terofs
Today, 04:18 PM
|
||
Started by nandhumca, Today, 03:41 PM
|
0 responses
7 views
0 likes
|
Last Post
by nandhumca
Today, 03:41 PM
|
||
Started by The_Sec, Today, 03:37 PM
|
0 responses
3 views
0 likes
|
Last Post
by The_Sec
Today, 03:37 PM
|
Comment