I am developing a strategy that uses Renko bars, but I've also added a secondary 1 tick data series for more granularity. However, when I backtest and view the associated tick data, as well as the values of indicators included in the strategy (all of which are based on the primary data series), the values of the indicators are changing prior to a bar of the primary data series closing. In other words, as intra bar ticks occur, the indicator value will sometimes change (but not always) even though the associated bar has not closed. Is this normal behaviour? To clarify, the Calculate setting is "OnBarClose".
Frequently, when I run a backtest, trades will be reflected in the back test which were not taken while the strategy was running in real time. I am trying to understand why this is the case. I think it may be because indicator values appear to be changing intrabar, which is affecting whether or not a condition is met on bar close.
If this is normal behaviour, is there a way to code the strategy so that the indicator values don't change until the actual bar closes (while still including the 1 tick series)?
Any help would be appreciated.
Comment