Download MetaTrader 5
To add comments, please log in or register
Publish your article. Millions of traders are looking for good ideas!
joe
63
joe 2014.03.05 14:56 

hello,

i m trying to get fibo level value, the ea compile well but don't give any signals :

void sellalert()
{
    double Fib0.236 = ObjectGet("Fibo",OBJPROP_PRICE2) + ((ObjectGet("Fibo",OBJPROP_PRICE1) - ObjectGet("Fibo",OBJPROP_PRICE2))*0.236);
    double Fib0.618 = ObjectGet("Fibo",OBJPROP_PRICE2) + ((ObjectGet("Fibo",OBJPROP_PRICE1) - ObjectGet("Fibo",OBJPROP_PRICE2))*0.618);
    double Fib100 = ObjectGet("Fibo",OBJPROP_PRICE1);
    double Down = (High[t+1] + Low[t+1]) / 2.0 - (High[t+1] - Low[t+1]) / 6;
 
    if (iClose(NULL,NULL,1) <= Fib0.236 && iClose(NULL,NULL,1) >= Fib100 && Volume[t+1] == Volume[iHighest(NULL,0,MODE_VOLUME,Speriod, t+1)] && Close[t+1] <= Down)   
    {
    SendNotification(Symbol() + " Sell"); 
    SendMail("Sell", "Sell");
    Alert(Symbol() + "Sell");
    
    }
}

can anyone give a hand here?

thanks

Simon Gniadkowski
Moderator
17963
Simon Gniadkowski 2014.03.05 15:03  
jopopo:

hello,

i m trying to get fibo level value, the ea compile well but don't give any signals :

can anyone give a hand here?

thanks

You can't use a period/full stop in variable names ( Fib0.236 ) in the "new" MT4/mql4 . . . what build are you using ?
joe
63
joe 2014.03.05 15:23  

i m using a build 509. ok so just name changing should do the trick..

Alain Verleyen
Moderator
28670
Alain Verleyen 2014.03.05 15:25  
jopopo:

i m using a build 509. ok so just name changing should do the trick..

Probably not if your are using build 509.

I suggest you to print your values and then check why your conditions are not meet.

Simon Gniadkowski
Moderator
17963
Simon Gniadkowski 2014.03.05 16:06  
jopopo:

hello,

i m trying to get fibo level value, the ea compile well but don't give any signals :

can anyone give a hand here?

thanks

Also this is wrong . . . even though it may work . . .

iClose(NULL,NULL,1)

iClose() uses 0 for the current timeframe . . .

joe
63
joe 2014.03.05 16:32  
alright it works. thanks
/
To add comments, please log in or register