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
limit a study to 2 days, today and yesterday
Collapse
X
-
You can work with ToDay() for this check - http://www.ninjatrader-support.com/H...eV6/ToDay.htmlBertrandNinjaTrader Customer Service
-
thanks,
I have;
if (Bars.GetSessionBar(1) != null) // yesterday processing
{ check yesterday data, draw an arrow at 4:15 PM }
if (Bars.GetSessionBar(0) != null) // today processing
{ check today data, draw an arrow at 9:30 AM }
and it should be no arrow for any other day but arrows shows up on all of the days I load.
Comment
-
nkhoi,
That would not work. Processing of data goes from the very oldest to the very newest. As each new day is processed you have a keep rolling forward and your conditions are true for every single day moving forward. The only way you can limit it to the last two days is if you knew definite dates for the last two days you want to process and limit it that way with DateTime checks.Josh P.NinjaTrader Customer Service
Comment
-
you manual is terrible there is no example for getting today date or yesterday date, a search on key word yesterday or prior day return zero hit. But you also have a cs file that shows some related example that just enough to keep me going so thanks. I upload 2 versions of open range with overnight session, one plots continuously and one doesn't in case anybody interests.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by mly916, Today, 09:48 PM
|
0 responses
4 views
0 likes
|
Last Post
by mly916
Today, 09:48 PM
|
||
Started by Mikey_, Today, 09:21 PM
|
0 responses
10 views
0 likes
|
Last Post
by Mikey_
Today, 09:21 PM
|
||
Started by cre8able, Today, 05:53 PM
|
3 responses
13 views
0 likes
|
Last Post
by cre8able
Today, 09:20 PM
|
||
Started by Aryan Kumar, Today, 09:04 PM
|
0 responses
4 views
0 likes
|
Last Post
by Aryan Kumar
Today, 09:04 PM
|
||
Started by yertle, Yesterday, 05:49 PM
|
3 responses
16 views
0 likes
|
Last Post
by Mindset
Today, 08:38 PM
|
Comment