help - is my if / else statement correct ?

 

the code section below:

it does not execute:

store_ind3="blank";

store1_ind3="blank";


am I doing something wrong ????

...

string store_ind3;
string store1_ind3;
...

RefreshRates();

ticket=OrderSend(Symbol(),OP_SELL,(lot_size),Bid,slippage*Point,Ask+(maxSL*Point),Ask-(maxTP*Point),"uma-final-3",0,0,Green);
PlaySound ("tick.wav");

int gle = GetLastError();
if (gle > 1) {
Sleep (30000);
RefreshRates();
}
else
{
store_ind3="blank";
store1_ind3="blank";
}

 

Replace

{
store_ind3="blank";
store1_ind3="blank";
}
to

{
store_ind3="blank";
store1_ind3="blank";

Print("1 - ",store_ind3," 2 - ",store1_ind3);
}
 and check logs.

 
Roger:

Replace

{
store_ind3="blank";
store1_ind3="blank";
}
to

{
store_ind3="blank";
store1_ind3="blank";

Print("1 - ",store_ind3," 2 - ",store1_ind3);
}
and check logs.


thanks, good idea, but i already got this :


Comment(
"\n uma-double-3",
"\n store_ind1 ",store_ind1," ",store_p1,
"\n store_ind2 ",store_ind2," ",store_p2,
"\n store_ind3 ",store_ind3," ",store_p3,
"\n -----------------------",
"\n store_ind1 ",store1_ind1,

"\n store_ind2 ",store1_ind2,

"\n store_ind3 ",store1_ind3,

);

and it does not change ......??????

 

  1. ticket=OrderSend(Symbol(),OP_SELL,(lot_size),Bid,slippage*Point,Ask+(maxSL*Point),
    Ask-(maxTP*Point),"uma-final-3",0,0,Green);
    PlaySound ("tick.wav");
    
    int gle = GetLastError();
    if (gle > 1) {
    You must capture the error code immediately, After the PlaySound it's too late. Test the ticket number for an error:
    ticket=OrderSend(Symbol(), OP_SELL, (lot_size), Bid, slippage*Point,Ask+(maxSL*Point), 
                     Ask-(maxTP*Point), "uma-final-3", 0, 0, Green);
    int gle = GetLastError();
    PlaySound ("tick.wav");
    if (ticket <= 0) { ...

 
buju:

thanks, good idea, but i already got this :







Wrong, use Print and check logs.
 
We are one of the worlds MOST popular Jerseys trading companies on the world. Learn more about [URL=http://www.jerseysusa.com]replica jerseys[/URL] or [URL=http://www.jerseysusa.com]cheap nfl jerseys[/URL] for Sports Fans,please feel free to click my site.thanks.
Reason: