Is this possible??? Indicator x Indicator (Bar shift +1)

 

Hello....

Please can anybody help answer my question for the basis of a working EA.


I want to have two types of moving average within the EA, when crossing over create either Buy or Sell signals.

The first MA I would like to be working on real time.

The second MA I would like to be working one bar shift later (like a displacement or shift to the right).


Is it possible for MQL5 programming to recognise this shift to create the signals?


Thank you for any information and help, plus any ideas on a developer that can help if it's possible

 
Razza:

Hello....

Please can anybody help answer my question for the basis of a working EA.


I want to have two types of moving average within the EA, when crossing over create either Buy or Sell signals.

The first MA I would like to be working on real time.

The second MA I would like to be working one bar shift later (like a displacement or shift to the right).


Is it possible for MQL5 programming to recognise this shift to create the signals?


Thank you for any information and help, plus any ideas on a developer that can help if it's possible

Yes, it is very easy:


You need to call IMA for mql4 "https://docs.mql4.com/indicators/ima" or mql5 "https://www.mql5.com/en/docs/indicators/ima" and use the shift to get whatever displacement you want and then use the number, which is returned as a double to do your further calculations.

iMA - MQL4 Documentation
  • docs.mql4.com
iMA - MQL4 Documentation
 

Hi NoCool14 thank you for your reply, I will take a look