Use different timeframes in one mt4 EA possible?

 

Hello!

I am new to coding but trying to create and indicator that alerts me when specific stuff happens.


I want A to happen at timeframe H4 while B to happen at timeframe M30.


Is there a way to specify timeframes in the EA? I have searched google and this forum but didn't manage to find anything.


Kind regards,

Ben

 
  1. Why did you post your MT4 question in the Root / MT5 EA section instead of the MQL4 section, (bottom of the Root page?)
              General rules and best pratices of the Forum. - General - MQL5 programming forum
    Next time post in the correct place. The moderators will likely move this thread there soon.

  2. normt4trader: I have searched google and this forum but didn't manage to find anything.
    Perhaps you should read the manual.
    Parameters

    symbol [in] Symbol name. NULL means the current symbol.

    timeframe [in] Timeframe. It can be any of ENUM_TIMEFRAMES enumeration values. 0 means the current chart timeframe.

    shift [in] Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).

              Timeseries and Indicators Access - MQL4 Reference