I need help with a custom alert...

 

I am in need of alert based on two moving averages. I trade on a H1 chart (multiple currencies...).

3 EMA
5 SMA (Shift:1)

I need notification of the 3 EMA crossing the 5 SMA (Shift:1) the INSTANT they cross (in either direction). I would like a pop-up window (alway on top) with sound, and an email alert as well.

I need this based on (Each Tick) but I only want ONE notification per MA cross, not each time there is a price movement. I've tried to program this myself using simple MQL programs, but I don't have the skills to program this alert to only have ONE alert per cross. My computer beeps constantly (I'm sure glad that I didn't turn on Email Notification...).

I am willing to pay something to the right programmer that can deliver a quality product.

Please let me know ASAP. I have been working on this for weeks now with no results.

Thanks in advance for your efforts and support.

Chris C Berg

 
You can do this.

Simply use a bool variable as a flag - bShouldAlertBeSent and set it to true.
Check it prior to alert generation. Only generate the alert if its set to true.
Set it to false once you've thrown the alert.

CB
 
cloudbreaker wrote >>
You can do this.

Simply use a bool variable as a flag - bShouldAlertBeSent and set it to true.
Check it prior to alert generation. Only generate the alert if its set to true.
Set it to false once you've thrown the alert.

CB


I appreciate the quick response. One problem though - I"M NOT A PROGRAMMER!!! I know enough to be extremely dangerous. I can only create something with a tool like Molanis or a FREE mql PROGRAM. I have no actual idea what I'm doing, I just know what i want. Could definitely use your help - can make it worth your while!!!

CB (as well)
 
datetime lastAlert;

if(lastAlert!=Time[0]){
        if(             ((ema(3)<sma(5) && (ema.old(3) >sma.old(5)) 
                ||      ((ema(3)>sma(5) && (ema.old(3) <sma.old(5))     )
        {
                Alert("Cross");
                lastAlert=Time[0];
        } 

}
Reason: