Download MetaTrader 5

MA Signals

To add comments, please log in or register
Have you discovered something really important? Write an article and receive 200 USD!
Bill Henry
21
Bill Henry 2014.09.29 22:53 

Hello,

Is there anything in the code base, a signal or alert that will send an alert via email or text when two moving averages cross. EX: when EMA(4) crosses SMA(8) from below send alert... Where the MA parameters can be set to anything... For any pair and any time frame? Trying to avoid a lot of searching through the code base and trial and error..

Tan Phan Ngoc
1332
Tan Phan Ngoc 2014.09.30 08:01  
530021775:

Hello,

Is there anything in the code base, a signal or alert that will send an alert via email or text when two moving averages cross. EX: when EMA(4) crosses SMA(8) from below send alert... Where the MA parameters can be set to anything... For any pair and any time frame? Trying to avoid a lot of searching through the code base and trial and error..

extern int     Fastema = 4;
extern int     Slowema =4;

double ma1 = iMA(NULL, 0, Fastema, 0, MODE_EMA, PRICE_CLOSE, 0);

double ma2 = iMA(NULL, 0, Slowema, 0, MODE_EMA, PRICE_CLOSE, 0);

if (ma1>ma2  ) Order = SIGNAL_BUY;

To add comments, please log in or register