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 FrancisMorro, Today, 03:24 AM
|
0 responses
2 views
0 likes
|
Last Post
by FrancisMorro
Today, 03:24 AM
|
||
Net Change
by Segwin
Started by Segwin, 05-07-2018, 02:15 PM
|
10 responses
1,770 views
0 likes
|
Last Post
by Leafcutter
Today, 03:01 AM
|
||
Change colour of Stop market and limit orders to red and green via indicator script
by Rapine Heihei
Started by Rapine Heihei, 04-23-2024, 07:51 PM
|
2 responses
31 views
0 likes
|
Last Post
by Max238
Today, 02:25 AM
|
||
Started by Shansen, 08-30-2019, 10:18 PM
|
24 responses
945 views
0 likes
|
Last Post
by spwizard
Today, 01:29 AM
|
||
Started by Max238, Today, 01:28 AM
|
0 responses
11 views
0 likes
|
Last Post
by Max238
Today, 01:28 AM
|
Comment