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
Add data function
Collapse
X
-
Add data function
One of my strategies do use a lot of symbols. For each symbol the data is added by using the Add function in the Initialize section. Is there a way to detect if the Initialize section or the Startup section if a symbol added by the add function has no data available in NT, so I could write a message to the log file? I could not find any documentaion on that or any documention if the Add function has a return value? Kind regards, ReneTags: None
-
Hello,
Thank you for the post.
In general, there is no suggested way to check if data was loaded for a specific series through code. Generally, if a data request fails, it could hold the script from continuing in processing.
The best suggestion I could propose for this situation would be to ensure that you have data for the instruments being accessed, both live and historical for the time being requested. If you are unsure if an instrument does or does not have data, you may need to address that before trying to request data from that instrument.
I look forward to being of further assistance.JesseNinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Padan, Today, 02:02 AM
|
1 response
8 views
0 likes
|
Last Post Today, 07:56 AM | ||
Started by Mestor, Today, 03:15 AM
|
1 response
8 views
0 likes
|
Last Post Today, 07:41 AM | ||
Started by RaygunWizzle, Yesterday, 08:52 PM
|
1 response
9 views
0 likes
|
Last Post Today, 07:40 AM | ||
Started by Mestor, 03-10-2023, 01:50 AM
|
13 responses
314 views
0 likes
|
Last Post Today, 07:29 AM | ||
Started by Lele2k24, Yesterday, 11:24 AM
|
7 responses
25 views
0 likes
|
Last Post Today, 07:25 AM |
Comment