OrderSend
Hi,
I create an EA and i use Strategy tester to test it.
I use Alpari Demo account.
Unfortunately, when i want send order, i recieve an error "invalid request 10013", but when i run EA manually, a same order is sent, without error "Request completed 10009".
Please help.
hereafter, the send order function
Your SL/TP cannot be the same for BUY and SELL :
request.sl=request.price - stoploss*_Point; request.tp=request.price + takepro*_Point;
This code is only valid for a BUY order. For a SELL tp should be lower than current price and sl higher.
HI angevoyageur,
Thank you for your help, the order was sent successufly.
regards
Hamid
Hi,
I create an EA and i use Strategy tester to test it.
I use Alpari Demo account.
Unfortunately, when i want send order, i recieve an error "invalid request 10013", but when i run EA manually, a same order is sent, without error "Request completed 10009".
Please help.
hereafter, the send order function