OrderSend error 3 when backtesting

Moderator: admin

OrderSend error 3 when backtesting

Postby sjailliard » Thu Feb 02, 2017 7:00 pm


I'm new with MT4 and I have a problem that appear only when backtesting.

I try to open orders with this line :

OrderSend(Symbol(), OP_BUYSTOP, volume, prix, slippage, (prix - Pts_Stop), (prix + Pts_Limit), "Rebond haussier", iMagic, (TimeLocal()+OrderTimeout), Green);

When I run it "live" it works but when I backtest it with historical datas I've got "OrderSend error 3"

I have localised the problem : if I replace (TimeLocal()+OrderTimeout) with 0 it works.

Actually OrderTimeout is initialized by "input int OrderTimeout = 60;"

Any idea how to fix this ?

Thank you.
Posts: 1
Joined: Fri Nov 25, 2016 8:01 pm

Return to Indicator Development

Who is online

Users browsing this forum: No registered users and 2 guests