MA Signals

 

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

 
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;