EA using two indicators with different timeframes

 

If I were to develop an expert advisor using indicators with different timeframes, would it work only being installed in one chart on MT4?

For example: I'll use EMA on H4, and then MACD on M15 

   double MA = iMA(Symbol(), PERIOD_H4, 26, 0, 1, 0, 1);

   double MACDBase = iMACD(Symbol(), PERIOD_M15, 12, 26, 9, 0, 0, 0);
   double MACDSignal = iMACD(Symbol(), PERIOD_M15, 12, 26, 9, 0, 1, 0);

Would it work?

 
Austin John Villarico Salvador:

If I were to develop an expert advisor using indicators with different timeframes, would it work only being installed in one chart on MT4?

For example: I'll use EMA on H4, and then MACD on M15 

Would it work? iBarShift 

iBarShift 

 
I had a similar question/issue while coding an Indicator not so long ago.
Please check the discussion here:

https://www.mql5.com/en/forum/375989

Like Mr. Roeder said, I was mixing Apples and Oranges.
Read his links and explanations; helped me a lot.
Confusion about the TimeFrame Parameter in Predefined Indicator Functions
Confusion about the TimeFrame Parameter in Predefined Indicator Functions
  • 2021.08.20
  • www.mql5.com
Hi everyone! I trying to code a type of " Envelope " that would use ATR to adjust its "deviation" from the Base SMA...
 
Jeremie Courchesne #:
I had a similar question/issue while coding an Indicator not so long ago.
Please check the discussion here:

https://www.mql5.com/en/forum/375989

Like Mr. Roeder said, I was mixing Apples and Oranges.
Read his links and explanations; helped me a lot.

Thanks! It helped me a lot.