I have “Add(PeriodType.Minute, 10);” in the “Initialize()” section.
If I just write the following in “OnBarUpdate()”
“if (BarsInProgress == 0)
Plot0.Set(1);“
It works and outputs a 1. But if I just have
“if(BarsInProgress == 1)
Plot0.Set(2);”
It outputs a 0.
My data feed is TD Ameritrade.
I feel like I must be missing something basic. Any ideas why I'm having trouble? Thanks in advance.

? Do you see the correct plot after one bar update? Are both conditions detailed in your post used at the same time in the code?
Comment