Download MetaTrader 5

issue gettint fibo value

To add comments, please log in or register
joe
63
joe  

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
18004
Simon Gniadkowski  
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  

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

Alain Verleyen
Moderator
31203
Alain Verleyen  
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
18004
Simon Gniadkowski  
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  
alright it works. thanks
To add comments, please log in or register