Download MetaTrader 5

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

To add comments, please log in or register
The entire MQL5.community history on a single page!
Razza
239
Razza 2015.09.02 21:48 

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

NoCool14
239
NoCool14 2015.09.03 06:54  
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
Razza
239
Razza 2015.09.07 09:33  

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



To add comments, please log in or register