i am trying to build a multi-time frame strategy processing in real-time with setting
'CalculateOnBarClose = false'
The primary bars are 10min while secondary bars object is Add(PeriodType.Tick, 10);
My question is the following:
If I would like to initiate something on the secondary bars object with condition examined on the primary bars, can I reference the MACD on the primary bar to trigger conditional action on the secondary bar with...
if( MACD(BarsArray[0],8, 21, 10).Diff[0]) > 0 )
{
if(Highs[1][0] > Highs[1][1])
{
EnterLong("","")
}
}
...or the 'if (BarsInProgress == 0)' and 'if (BarsInProgress == 1)' conditions are necessary to reference the correct bars object?
Thank you
Comment