Indicators with alerts/signal - page 68

MrPip
546
MrPip  
AstroGlide:
Hello guys

I am looking for an alert/signal for every time the price touch a single moving average.

Thanks in advance

You could use 2MA CrossoverWithPrice. Just set the first one to have a period of 1 on the close. That is the same as the close price.

Robert

MrPip
546
MrPip  
Mano:
Thanks A lot MrPip !

+ i want the stoch to play those waves for every cross side so i added those lines:

PlaySound("Stochastic Crossing Up.wav");

PlaySound("Stochastic Crossing Down.wav");

and now its looks like this:

// Alert

if ((BufferK BufferD)) {

if (AlertOn && NewBar()) {

Alert(AlertPrefix + "Crosses UP ");

PlaySound("Stochastic Crossing Up.wav");

}

}

else if ((BufferK BufferD)) {

if (AlertOn && NewBar()) {

Alert(AlertPrefix+"crosses DOWN ");

PlaySound("Stochastic Crossing Down.wav");

}

}

}

return(0);

}

and its working, but only when i restart my MT and for 1 time only, any idea what could be wrong?

Thanks

If Alert is already playing a sound the PlaySound might not work correctly. I have had this problem before and do not remember how I fixed it.

Robert

MrPip
546
MrPip  
bassfisher74133:
has anyone made a EMA crossover with constant signal??? i was wanting this to ring until i shut it off... if possible

Added input for ContinuousSound.

Have not tested.

Robert

MrPip
546
MrPip  
orion7:
Stoch indicator seems to work fine but the 2MA Crossover is not sending emails. Test emails work fine so I don't think there is a config problem.

I did not make any changes to that code. Make sure the input setting for SendAnEmail is true.

Robert

MrPip
546
MrPip  
orion7:
It is set to true and I have not received an email yet but I see several alerts on the screen.

Found the problem. There were two calls to the NewBar function. One for alert and one for email. Because of the first call the second returns false.

I modified the code to check NewBar only once so it will now work.

Robert

MrPip
546
MrPip  

New EMA_Crossover Signal + Email

Found the problem and fixed it. Was comparing the arrows instead of MAs.

Robert

MrPip
546
MrPip  
bassfisher74133:
hmm it's working but... it's not shutting off after i click ok, it keeps ringing every time the price moves. which is ok if thats how it has to be but i was hoping it would ring and when i click ok it would shut off.

Someone asked for a continuous sound version.

I will modify to have two versions, one for continuous, one for once.

It was not possible in this version to have both because the new bar filter would be triggered if sound once and then no email.

Even as I type this I might find a way to have both in one indicator as my mind is already giving me ideas.

For now you would need to set AlertOn to false to stop the alerts.

Then after the bar is over you can turn the alerts back on.

Robert

MrPip
546
MrPip  
bassfisher74133:
please can someone help me with this.

You will need to open the indicator input window and turn off Sound by setting SoundOn to false.

I removed email but still plots arrows. The alert will continue until you turn sound off.

Robert

MrPip
546
MrPip  

How do you determine that the alert is really on the last turning point?

I have looked at this before and stopped trying for the following reasons.

Looking at your code it looks like it will repaint just like zigzag. It is the nature of the indicator to find when there is a new higher high or lower low. When there are a series of new higher highs each will redraw the zigzag line and possibly the arrow. Each new high will also pop of an alert as there is no way of knowing when the final high is reached before the trend goes from long to short until after the fact. The same is true going from short to long.

Robert

MrPip
546
MrPip  

macd alert

amir_rad:
Hello, can anyone please help me?

try this one.

It alerts at many levels including crossing 0 line and change of histogram from rising to falling or falling to rising. I have other versions if this is not what you want.

Robert