In my indicator I use two data series. The main dataseries is a "mini" market instrument and the additional dataseries is the "normal" market instrument..
In all the code I use BarsArray[x] , Closes[x][x], Opens[x][x], etc to guarantee the data comes from the right dataseries.
The problem we found and confirmed repeatedly is that for some reason the main dataseries ("mini" market instrument) first tick arrives with substantial delays in comparation with the addtional dataseries ("normal" market instrument) first tick, even though both show the same timestamp.
This delays cause problems in calculations under IsFirstTickOfBar because seems that IsFirstTickOfBar does not discriminate if the first tick comes from the main dataseries or from the additional dataseries.
For example, suposing main dataseries last bar number is 100 and we have a new first tick:
if (IsFirstTickOfBar)
{
variableX = CurrentBars[0]
}
variableX should be = 101, but as the the main dataseries instrument first tick still does not arrived variableX will be = 100 again.
This problem was tested in real time and in market replay with same results.
Please could you give me some idea to solve this?
Kind Regards,
Marcos
Comment