Add(PeriodType.Day,1); ...... if (BarsInProgress == 0) { Print("bars in progress == 0 " + Time[0]); // this works } if (BarsInProgress == 1) { // for daily data Print("Bars in progress == 1 " + Time[0]); // this doesnt work }
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
BarsinProgress with Daily
Collapse
X
-
BarsinProgress with Daily
I am trying to add a daily time frame to my indicator (probably running on 5-15min bars) but for some reason whenever I call barsinprogress ==1, I never get any results. I am loading 20 days of data on the chart. here is the code
Code:Tags: None
-
Hello,
Most indicators will not start calculating until after 20 bars have been calculated. Try expanding the number of days back to see if you get it to run then.
Also, the indicator will not run until all data is loaded.
Who is your data feed provider and also what is the primary data series?
I look forward to assisting you further.
-
its weird b/c I can get the 2nd time series to work if I change it to 60 mins 60, or 1440, but not a daily series.
I but in the contion
if (CurrentBar > 60)
but still I get 0.
I tried multiple instruemnts/data series and nothing. Load 50days worth of data.
Does it have anything to do with calling the
Add(PeriodType.Day,1);
is that the right notation
Comment
-
snap... I didnt have daily bars loaded. I thought that ninja made daily bars from min but I guess not. Problem solved thanks to kinetic. My data is on the other computer.. bah!
Thanks for the help though
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by algospoke, 04-17-2024, 06:40 PM
|
6 responses
49 views
0 likes
|
Last Post
by algospoke
Today, 06:18 PM
|
||
Started by arvidvanstaey, Today, 02:19 PM
|
4 responses
11 views
0 likes
|
Last Post Today, 04:08 PM | ||
Started by samish18, 04-17-2024, 08:57 AM
|
16 responses
61 views
0 likes
|
Last Post
by samish18
Today, 03:30 PM
|
||
Started by jordanq2, Today, 03:10 PM
|
2 responses
9 views
0 likes
|
Last Post
by jordanq2
Today, 03:23 PM
|
||
Started by traderqz, Today, 12:06 AM
|
10 responses
21 views
0 likes
|
Last Post
by traderqz
Today, 02:49 PM
|
Comment