Download MetaTrader 5
To add comments, please log in or register
Do you want to know about the MQL5.community development? Have a look at the Wall!
max05
47
max05 2014.06.13 10:53 

hello,

 i have created an indicator which use lines to send notification when crossed with specific conditions. the indicator alerts me for 4 different type of crossing. It's working for 3 of them, but this one never trigger, can't find why, if someone could give me a hand it would be great , here is the code :

{
    if (iOpen(NULL,0,1) <= line && iClose(NULL,0,1) > line && Linecolor == Purple && BUYCOLOR != DarkSlateGray)
    {
                if (Time0 != Time[0])
            {
    if( ObjectFind("BSL") != -1 )
    ObjectSet ("BSL",OBJPROP_COLOR,Aqua);
    if( ObjectFind("BUY") != -1 )
    ObjectSet ("BUY",OBJPROP_COLOR,Aqua);
    if( ObjectFind("B") != -1 )
    ObjectSet ("B",OBJPROP_COLOR,Aqua);
    Alert(Symbol() + "Push Thru");
    SendMail("Push Thru", "Push Thru");
    SendNotification( Symbol() + "Push Thru"); 
                   Time0 = Time[0];
         }
    }
}

 Linecolor, line and BUYCOLOR are already defined and work on the others functions, so it doesn't come from that.

As you can see it's suppose to change some lines color and send alerts. The other functions are built the same way and work.

Thanks 

/
To add comments, please log in or register