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 GLFX005, Today, 03:23 AM
|
0 responses
1 view
0 likes
|
Last Post
by GLFX005
Today, 03:23 AM
|
||
Started by XXtrader, Yesterday, 11:30 PM
|
2 responses
11 views
0 likes
|
Last Post
by XXtrader
Today, 03:07 AM
|
||
Started by Waxavi, Today, 02:10 AM
|
0 responses
6 views
0 likes
|
Last Post
by Waxavi
Today, 02:10 AM
|
||
Started by TradeForge, Today, 02:09 AM
|
0 responses
14 views
0 likes
|
Last Post
by TradeForge
Today, 02:09 AM
|
||
Started by Waxavi, Today, 02:00 AM
|
0 responses
3 views
0 likes
|
Last Post
by Waxavi
Today, 02:00 AM
|
Comment