Download MetaTrader 5

hello i need help how to enter this parameter in mouving avrge

To add comments, please log in or register
Use searching on MQL5.community. It is easy!
Mahfoud Allali
324
Mahfoud Allali 2015.10.07 15:43 

name of indicateur is Custom Moving Averages.mq4

 

use this commend to add EMA but is alwayse true :(

bool ma()

{

double ema= iCustom(NULL,20,0,0,0);

if (ema<Ask)

return(true);

else if (ema>Ask)

return(false);

else return (EMPTY_VALUE);

 i need to add this paramtre in ma ea 

Period 20 /// Shift 0 // Method Exponential

 

 sorry for my bad english 

Stuart Browne
5801
Stuart Browne 2015.10.08 01:18  

Read the iCustom documentation again. Your code isn't calling any indicator. 

If it's just a standard Moving Average you want, use iMA instead of iCustom.

iCustom - MQL4 Documentation
  • docs.mql4.com
iCustom - MQL4 Documentation
Mahfoud Allali
324
Mahfoud Allali 2015.10.09 16:23  
Stuart Browne:

Read the iCustom documentation again. Your code isn't calling any indicator. 

If it's just a standard Moving Average you want, use iMA instead of iCustom.                        

 


tnx man :D  
To add comments, please log in or register