what dos that mean and how can fix it??????
thanks
thanks
this is the log
17:51:04 dayTime started for testing 17:51:04 2005.08.12 03:00 dayTime EURUSD,H1: open #1 buy 0.10 EURUSD at 1.2459 sl: 1.2439 tp: 1.2484 ok 17:51:04 2005.08.12 10:00 dayTime EURUSD,H1: 131Close Long 1 Error 17:51:04 2005.08.12 10:49 Tester: take profit #1 at 1.2484 (1.2484 / 1.2487) 17:51:04 2005.08.12 14:00 dayTime EURUSD,H1: open #2 sell 0.10 EURUSD at 1.2457 sl: 1.2477 tp: 1.2435 ok 17:51:04 2005.08.12 14:44 Tester: take profit #2 at 1.2435 (1.2432 / 1.2435) 17:51:04 2005.08.12 18:00 dayTime EURUSD,H1: open #3 buy 0.10 EURUSD at 1.2424 sl: 1.2404 tp: 1.2449 ok 17:51:04 2005.08.12 20:00 dayTime EURUSD,H1: 131Close Long 3 Error 17:51:04 2005.08.12 22:59 Tester: order #3 is closed
expose please source code for orders close. then your question can be answered
I think, you set wrong Lots parameter in
bool OrderClose( int ticket, double lots, double price, int slippage, color Color=CLR_NONE)
It should be equal to position size or less.
Rafael
bool OrderClose( int ticket, double lots, double price, int slippage, color Color=CLR_NONE)
It should be equal to position size or less.
Rafael
thanks man it was the lots size , coz i copy the line from other expert
I got same error ERR_INVALID_TRADE_VOLUME: it is not Order Close Error it is OrderSend Error . because there is invalid LotVolume for ordersend function. that's why.
Where is the code
You should share it with us
I used many codes to solve this issue but not solve yet. i have no problem with mt4 plateform and i did not see this error but on mql5 i got this error .when i solve this then i share the code here. but if any other expert know how to solve this error then please must share with us. Thanks
Error 131 means the lot size is incorrect. Each broker sets their own parameters.
- There is a minimum lot size (SYMBOL_VOLUME_MIN) e.g. 0.1
- If you try to trade 0.01 your lot size is invalid
- There is a maximum lot size (SYMBOL_VOLUME_MAX) e.g. 100
- If you try to trade 150 your lot size is invalid
- There is a lot step (SYMBOL_VOLUME_STEP) which your lot size must be an increment of e.g. 0.1
- If you try to trade 0.15 your lot size is invalid.
So, before placing any trade you must check these values using SymbolInfoDouble() and adjust your lot size accordingly.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
thanks