Forum

profit value is not right

if ( MathAbs (Ask - OrderOpenPrice()) >= 100 * Point ){ Alert (Ask, " " , Bid); res = OrderClose(ticket, lots, Bid, 3 ); } if ( MathAbs (Bid - OrderOpenPrice()) >= 100 * Point ) { Alert (Ask, " " , Bid); res = OrderClose(ticket, lots, Ask, 3 ); } I have been using

Ordersend error 130

ticket = OrderSend ( Symbol (), OP_SELL, lots, Bid, 3 , Ask - 100 * Point , Ask + 100 * Point , NULL ); I have been using the above code to send order (USD/JP) when the RSI is above 70, but I always get error 130 . It seems like I might be violating the Bid - Stoplevel >= 40, but I also have a line

Pause after a trade

I am currently implementing an EA that pauses after it has closed a position, and the code is down below: if ( OrdersTotal () == 0 && TimeCurrent () >= OrderCloseTime() + 1200 ) { if ( iRSI ( Symbol (), 0 , 14 , PRICE_CLOSE , 0 ) <= 30 ) ticket = OrderSend ( Symbol ()