Download MetaTrader 5

My EA spams notifications. Any way to block the spam?

To add comments, please log in or register
Publish your application in Cobe Base. Millions of traders will see it!
Arielro2
47
Arielro2 2015.03.10 04:20 

Hello,

I managed to make an EA to alert me when stochastic crossovers are being taken at oversold and overbought states.

I made it by the following rules if the moving line is higher than the signal line and is below the 20 line its going to alert me through push notification.

same concept for overbought state.

Its working great with my strategy as it saves me from waisting time in front of the computer and missing opportunities while browsing through different pairs.

The only thing I need is a method to block notifications after the first one till the moving line crosses to the 21-69 area or a way to send only one instead of trying blocking the spam if possible. 

Files:
test2.mq4 107 kb
Snelle Moda
602
Snelle Moda 2015.03.10 11:53  
Arielro2:

Hello,

I managed to make an EA to alert me when stochastic crossovers are being taken at oversold and overbought states.

I made it by the following rules if the moving line is higher than the signal line and is below the 20 line its going to alert me through push notification.

same concept for overbought state.

Its working great with my strategy as it saves me from waisting time in front of the computer and missing opportunities while browsing through different pairs.

The only thing I need is a method to block notifications after the first one till the moving line crosses to the 21-69 area or a way to send only one instead of trying blocking the spam if possible. 


Hi try something like this.

After you receive the first valid signal confirmation (alert), a static Boolean blocks the alert notifications after the first one.

When the signal falls between the extreme area's, the Boolean resets.


See this simple example.


static bool bNotification_Confirmation = false; double dYour_Variable = 0; /* Your code. */ if(dYour_Variable > 70)       { // Check only if false.             if(bNotification_Confirmation == false)             {             Alert("Signal is above 70 ", dYour_Variable)             bNotification_Confirmation = true; // Activate the notification block check                         }             }        if(dYour_Variable < 20)       {

// Check only if false.             if(bNotification_Confirmation == false)             {             Alert("Signal is below 20 ", dYour_Variable)             bNotification_Confirmation = true; // Activate the notification block check                         }             }        if(dYour_Variable < 70 && dYour_Variable > 20)       {       bNotification_Confirmation = false;       }  

To add comments, please log in or register