can't make trade
sergeyrar:
any idea why no trades are made ?
any idea why no trades are made ?
- No mind readers here. Why don't you PRINT out the error code to find out WHY
int ticket = OrderSend(... if (ticket < 0) Alert("OrderSend failed: ", GetLastError()); else if (!OrderSelect(ticket, SELECT_BY_TICKET)) Alert("OrderSelect failed: ", GetLastError()); else if (!OrderModify(OrderTicket()...) Alert("OrderModify failed: ", GetLastError());
- EA's must adjust for 4/5 digit brokers tp, sl, AND SLIPPAGE
ticket1 = OrderSend(Symbol() , OP_BUY , 0.01*M , Ask , 2*pips2points , 0 , 0);
bool price_above= ( Ask > SMA_10day ); : if ( ( Bid- SMA_10day < buffer* pips2dbl ) && ( price_above==true)
You wouldn't ever say if ( (2==2) == true) would you? You would only say if (2==2). So don't say if ( BOOL == true) just say if (BOOL)while (MarketInfo(Symbol(),MODE_ASK)-MarketInfo(Symbol(),MODE_BID)<max_spread* pips2dbl) //spread < 4
Why use function calls when the simplier variables are the samewhile (Ask-Bid<max_spread* pips2dbl) //spread < 4
Im a noob sorry :P
thanks alot !!
it works !! thank u !!
however the program makes only short trades.
-----------------
bool price_above= ( Ask > SMA_10day );
if I switch "Ask" to "Bid" it makes only long trades...
----------------
is there a way to work this out ?
any idea why no trades are made ?
THANKS