Referencing multiple time period CI in EA

 

I am working on an EA that needs to look for a cross on one time period and then wait for a cross on another signal from a different time period. I need to reference a cross on the MACD on one time period and the Stochastic cross on a shorter period.

Can someone please advise the best approach to doing this?

Would I need to utilize a period conversion script or is it possible to incorporate both of my indicators into one CI?

Thanks in advance.

 

iCustom() can get custom indicator data for any pair any common timeframe any bar.

or

iMACD() and iStochastic() can create indicator values for any pair any common timeframe any bar.

Reason: