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 Padan, Today, 02:02 AM
|
0 responses
6 views
0 likes
|
Last Post
by Padan
Today, 02:02 AM
|
||
Started by bukowa, 11-09-2023, 06:07 PM
|
20 responses
406 views
0 likes
|
Last Post
by Adfra
Today, 01:36 AM
|
||
Started by yertle, Yesterday, 05:49 PM
|
2 responses
11 views
0 likes
|
Last Post
by yertle
Today, 12:12 AM
|
||
Started by kaywai, Today, 12:06 AM
|
0 responses
9 views
0 likes
|
Last Post
by kaywai
Today, 12:06 AM
|
||
Started by kaywai, 03-25-2024, 10:04 PM
|
3 responses
37 views
0 likes
|
Last Post
by kaywai
Yesterday, 11:57 PM
|
Comment