Download MetaTrader 5

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

To add comments, please log in or register
Mahfoud Allali
350
Mahfoud Allali  

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
6786
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.

iCustom - MQL4 Documentation
  • docs.mql4.com
iCustom - MQL4 Documentation
Mahfoud Allali
350
Mahfoud Allali  
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