In the strategy code the primary bars (BIP ==0) are 20 tick bars and BIP ==1 are 1 day bars.
The indicator in the code below, TDmean, is calculated off of BIP ==1 (1 day bars).
When I set the statement below with BIP ==1 (1 day bars) then I get the same output in both real-time and backtest mode - which is what I would expect.
When I set the statement below with BIP ==0 (20 tick bars) for backtest mode, the daily value repeats itself with every 20-tick bar as expected. However, when I run the exact same code in real-time mode my indicator values = 0. I've tried this with about a dozen indicators and the same problem occurs.
I'm looking for confirmation of each indicator value on each 20-tick bar, not 1x per day. Why isn't the output window picking this up?
if (BarsInProgress == 0)
{
Print( " S!: Time " + Time[0].ToString("MM-dd-yyyy HH:mm:ss") +
" Bar " + BarsArray[1].CurrentBar.ToString() +
" TDmean " + trendMean.ToString());
}
Comment