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
days to load
Collapse
X
-
Hello,
Thank you for the post.
In this situation, there would not be a supported way to change the DataSeries properties like DaysToLoad as this would be inherited by the indicator when applied.
Could you tell me, is this for the purpose of making sure the end user has enough data loaded prior to the indicator running?
I look forward to being of further assistance.JesseNinjaTrader Customer Service
-
It is just for user friendlyness.
I need at least of 7 days of data in order for my indicator to work.
if I have less than 7 days my indicator doesn't work.
I just wanted the user when to load to check if there is at least a minumum of 7 days and if not change it so it will load a minumum of 7 days.
If it is not possible is there an alert box I can use to see if it is under the 7 day bench mark?
Comment
-
Hello,
Yes, in this case, you could check the amount of data loaded to ensure the amount is met. If not, you could Draw text or open a message box as an example.
One way to do this would be to subtract the To date from the From date:
Code:Print(Bars.ToDate.Subtract(Bars.FromDate).Days);
Code:if(Bars.ToDate.Subtract(Bars.FromDate).Days < 7){ Draw.TextFixed(this, "myText", "You need to load more than 7 days of data", TextPosition.BottomRight); }
JesseNinjaTrader Customer Service
Comment
-
Hello,
Yes, in this case, you could check the amount of data loaded to ensure the amount is met. If not, you could Draw text or open a message box as an example.
One way to do this would be to subtract the To date from the From date:
Code:Print(Bars.ToDate.Subtract(Bars.FromDate).Days);
Code:if(Bars.ToDate.Subtract(Bars.FromDate).Days < 7){ Draw.TextFixed(this, "myText", "You need to load more than 7 days of data", TextPosition.BottomRight); }
JesseNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by wzgy0920, 04-20-2024, 06:09 PM
|
2 responses
26 views
0 likes
|
Last Post
by wzgy0920
Today, 10:43 PM
|
||
Started by wzgy0920, 02-22-2024, 01:11 AM
|
5 responses
32 views
0 likes
|
Last Post
by wzgy0920
Today, 10:33 PM
|
||
Started by wzgy0920, Yesterday, 09:53 PM
|
2 responses
49 views
0 likes
|
Last Post
by wzgy0920
Today, 10:29 PM
|
||
Started by Kensonprib, 04-28-2021, 10:11 AM
|
5 responses
191 views
0 likes
|
Last Post
by Hasadafa
Today, 10:19 PM
|
||
Started by GussJ, 03-04-2020, 03:11 PM
|
11 responses
3,230 views
0 likes
|
Last Post Today, 08:07 PM |
Comment