Create multi timeframe indicators..

 

I tried creating use different timeframes within my code but when I run on meta trader the display arrows are all over the place. 

Basically I want to work such that if 'condition' (M5) = x and Condition (M15) = x,  then do 'this'....

Can anyone point me in the right direction or offer insight as having a lot of trouble with this.


Thanks

 
iHigh(_Symbol,PERIOD_M5,shift);
iLow(_Symbol,PERIOD_M15,shift);
iOpen(_Symbol,_Period,shift);
iClose(...);
iTime(...);

iCustom(...)


for MT5

CopyHigh(...);
CopyLow(...);
...