Slope Direction Line, alert needed

 

Hi Guys and Gals

I have been to this site over 200 times and i love every bit....I have a really simple but complex question/request (to me...lol)

I trade a very simple strategy mainly using the SLOPE DIRECTION LINE..Now ma Problem is that i have to stay in front of the computer almost all day and it getting depressing....

Now ma Request to all who can help...

Attached is a Basic SDL Indicator...can any of you place an alert system..

Sound, arrows, Dialogue boxes anything to get ma attention...

The alert should appear/sound when the slope line changes color, from blue to red...etc

Thanks you guys and gals and keep up the good work...

Alex

Files:
 

Post mq4 file. ex4 cannot be edited.

 

I'd love to have an alert for it, too

I have an alert file for it, but it doesn't work, no sound and no alert message. Attached the original slope direction line mq4 file and the non-working slope direction line alert file.

thanks

 

The one you posted with the alert should be working...

 

Did you try it? I just tried it again... re-added the mq4 file to my indi folder and restarted mt4. I am watching the charts, the line has changed color, waited for candle close to verify color change, still no alert, no sound, no popup. (I have a new laptop and fresh install of mt4, everything else works)

 

Maybe there is a prob in the code then.. I have not tried it yet..

 
bossxero:
Maybe there is a prob in the code then.. I have not tried it yet..

Yeah, I've played around with the code, but I only know a little about it. Couldn't get it to work.

 
celticheart:
I'd love to have an alert for it, too I have an alert file for it, but it doesn't work, no sound and no alert message. Attached the original slope direction line mq4 file and the non-working slope direction line alert file. thanks

there are some mistakes in source code

1) bool isNewBar() - written to be called once, any future calls gives same result - false in original function called in all if operators - it's not good

so just create a new variable and call function once bool bNewBar = isNewBar();

2) this indicator is overwriting itself - so comparing neighboring elements of array - not good idea (once new bar have been created - last 3 or 4 bars could be changed) - it cause that some times signal won't appear (sample code doesn't solve this problem)

//-----------------------------------


bool bNewBar = isNewBar();
if ( (Uptrend[0] == EMPTY_VALUE) && (Uptrend[1] != EMPTY_VALUE) && bNewBar )
{
Alert("SELL signal at Ask=",Ask,", Bid=",Bid,", Date=",TimeToStr(CurTime(),TIME_DATE)," ",TimeHour(CurTime()),":",TimeMinute(CurTime())," Symbol=",Symbol()," Period=",Period());
}
if ( (Dntrend[0] == EMPTY_VALUE) && (Dntrend[1] != EMPTY_VALUE) && bNewBar )
{
Alert("BUY signal at Ask=",Ask,", Bid=",Bid,", Time=",TimeToStr(CurTime(),TIME_DATE)," ",TimeHour(CurTime()),":",TimeMinute(CurTime())," Symbol=",Symbol()," Period=",Period());
}

//-----------------------------------

_______________

Best regards

FiboLab Team

 

Awesome!! Thank you!!

This seems to work now (don't know what to do about the problem of a signal not appearing sometimes, but so far as I've been using it, it seems to be ok)

File attached of working indi

 

can u guys not fix it so it always works ?

 

Is there any chance that it can made to show arrows on a new colour?

Reason: