Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 58
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
Here's
{
Comment( cLot(100)," | ",AccountFreeMarginCheck(_Symbol,OP_BUY,cLot(100)) );
}
Good luck to you. I'm getting an error.
And so, a more or less working version of the previous EA is ready
Here's the gist of it.
for example, you have 50 orders
at the command "close all", maximum 15 of them are closed; all the rest ones have timeouts and requotes
The rest require repeated passes and during sharp movements the number of passes increases considerably.
Is it possible to put this on my account?
As far as I know such appeals to the server chef is not welcome, but I could be wrong.
And so, a more or less working version of the previous EA is ready
Here's the gist of it.
for example, you have 50 orders
at the command "close all", maximum 15 of them are closed; all the rest ones have timeouts and requotes
The rest require repeated passes and during sharp movements the number of passes increases considerably.
Is it possible to put this on my account?
As far as I know such appeals to the server chef is not welcome, but I could be wrong.
In order not to psycho chef should not stupidly repeat, and to analyze the errors and make a competent decision, to try again or skip.
Alternatively, if the cycle is built from 0 to ... then skipping is inevitable. Use an inverse loop
To prevent the chef from freaking out, you should not stupidly repeat, but analyse the mistakes and make an intelligent decision whether to try again or skip it.
Alternatively, if the cycle is built from 0 to ... then skipping is inevitable. Use an inverse loop
OrdersTotal()-1
To prevent the chef from freaking out, you should not stupidly repeat, but analyse the mistakes and make an intelligent decision whether to try again or skip it.
Alternatively, if the cycle is built from 0 to ... then skipping is inevitable. Use the reverse loop
here is a piece of log during the current processing, a part of it is modified, and, regardless of the command, not all orders are triggered, if there are more than 20 orders, this is repeated for all at each command, and only the tester
2017.01.05 18:31:44.919 2016.12.14 23:03:00 Tester: stop loss #716 at 1.05321 (1.05297 / 1.05347)
2017.01.05 18:31:44.919 2016.12.14 23:03:00 Tester: stop loss #715 at 1.05321 (1.05297 / 1.05347)
2017.01.05 18:31:44.919 2016.12.14 23:03:00 Tester: stop loss #714 at 1.05321 (1.05297 / 1.05347)
2017.01.05 18:31:44.919 2016.12.14 23:03:00 Tester: stop loss #713 at 1.05321 (1.05297 / 1.05347)
2017.01.05 18:31:44.919 2016.12.14 23:03:00 Tester: stop loss #712 at 1.05321 (1.05297 / 1.05347)
2017.01.05 18:31:44.919 2016.12.14 23:03:00 Tester: stop loss #711 at 1.05321 (1.05297 / 1.05347)
2017.01.05 18:31:44.919 2016.12.14 23:01:00 Moving tral-martin EURUSD,M1: OrderClose error 138
2017.01.05 18:31:44.919 2016.12.14 23:01:00 Moving tral-martin EURUSD,M1: OrderClose error 138
2017.01.05 18:31:44.919 2016.12.14 23:01:00 Moving tral-martin EURUSD,M1: OrderClose error 138
2017.01.05 18:31:44.919 2016.12.14 23:01:00 Moving tral-martin EURUSD,M1: OrderClose error 138
2017.01.05 18:31:44.919 2016.12.14 23:01:00 Moving tral-martin EURUSD,M1: OrderClose error 138
2017.01.05 18:31:44.919 2016.12.14 23:01:00 Moving tral-martin EURUSD,M1: modify #711 sell 0.01 EURUSD at 1.05862 sl: 1.05321 tp: 0.00000 ok
2017.01.05 18:31:44.919 2016.12.14 23:01:00 Moving tral-martin EURUSD,M1: modify #712 sell 0.02 EURUSD at 1.05682 sl: 1.05321 tp: 0.00000 ok
2017.01.05 18:31:44.919 2016.12.14 23:01:00 Moving tral-martin EURUSD,M1: modify #713 sell 0.04 EURUSD at 1.05388 sl: 1.05321 tp: 0.00000 ok
2017.01.05 18:31:44.919 2016.12.14 23:01:00 Moving tral-martin EURUSD,M1: modify #714 sell 0.08 EURUSD at 1.05229 sl: 1.05321 tp: 0.00000 ok
2017.01.05 18:31:44.919 2016.12.14 23:01:00 Moving tral-martin EURUSD,M1: modify #715 sell 0.16 EURUSD at 1.05077 sl: 1.05321 tp: 0.00000 ok
2017.01.05 18:31:44.919 2016.12.14 23:01:00 Moving tral-martin EURUSD,M1: modify #716 sell 0.32 EURUSD at 1.05232 sl: 1.05321 tp: 0.00000 ok
2017.01.05 18:31:44.919 2016.12.14 23:01:00 Moving tral-martin EURUSD,M1: open #716 sell 0.32 EURUSD at 1.05232 ok
2017.01.05 18:31:44.918 2016.12.14 22:52:00 Moving tral-martin EURUSD,M1: OrderClose error 138
2017.01.05 18:31:44.918 2016.12.14 22:52:00 Moving tral-martin EURUSD,M1: OrderClose error 138
2017.01.05 18:31:44.918 2016.12.14 22:52:00 Moving tral-martin EURUSD,M1: OrderClose error 138
2017.01.05 18:31:44.918 2016.12.14 22:52:00 Moving tral-martin EURUSD,M1: OrderClose error 138
2017.01.05 18:31:44.918 2016.12.14 22:52:00 Moving tral-martin EURUSD,M1: OrderModify error 4051
2017.01.05 18:31:44.918 2016.12.14 22:52:00 Moving tral-martin EURUSD,M1: invalid stoploss for OrderModify function
2017.01.05 18:31:44.918 2016.12.14 22:52:00 Moving tral-martin EURUSD,M1: modify #715 sell 0.16 EURUSD at 1.05077 sl: 200.00000 tp: 0.00000 ok
2017.01.05 18:31:44.918 2016.12.14 22:52:00 Moving tral-martin EURUSD,M1: open #715 sell 0.16 EURUSD at 1.05077 ok
2017.01.05 18:31:44.918 2016.12.14 22:44:00 Moving tral-martin EURUSD,M1: OrderClose error 138
2017.01.05 18:31:44.918 2016.12.14 22:44:00 Moving tral-martin EURUSD,M1: OrderClose error 138
2017.01.05 18:31:44.918 2016.12.14 22:44:00 Moving tral-martin EURUSD,M1: OrderClose error 138
2017.01.05 18:31:44.917 2016.12.14 22:44:00 Moving tral-martin EURUSD,M1: OrderModify error 4051
2017.01.05 18:31:44.917 2016.12.14 22:44:00 Moving tral-martin EURUSD,M1: invalid stoploss for OrderModify function
2017.01.05 18:31:44.917 2016.12.14 22:44:00 Moving tral-martin EURUSD,M1: modify #714 sell 0.08 EURUSD at 1.05229 sl: 200.00000 tp: 0.00000 ok
2017.01.05 18:31:44.917 2016.12.14 22:44:00 Moving tral-martin EURUSD,M1: open #714 sell 0.08 EURUSD at 1.05229 ok
2017.01.05 18:31:44.916 2016.12.14 22:09:00 Moving tral-martin EURUSD,M1: OrderClose error 138
2017.01.05 18:31:44.916 2016.12.14 22:09:00 Moving tral-martin EURUSD,M1: OrderClose error 138
2017.01.05 18:31:44.916 2016.12.14 22:09:00 Moving tral-martin EURUSD,M1: OrderModify error 4051
OrdersTotal()-1
Nope. That's right. Artyom, read about prefix and postfix increment/decrement functions.
In my version, the start value is first decreased by 1 and then the cycle starts.
Nope. That's right. Artyom read about prefix and postfix increment/decrement functions.
In my version, the start value is first decreased by 1 and then the cycle starts.
trader781: вот кусок журнала при текущей обработке, часть кроется часть модифицируется, причем вне зависимости от команды сработают не все ордера, если ордеров больше 20, это повторяется для всех при каждой команде, а ведь только тестер
Again with zero slippage (138)?
And the stoplosses are not calculated correctly, according to the logbook.Again with zero slippage (138)?
50 is everywhere
the fact that with a great number of orders all of them are not simultaneously closed or modified
Stop Losses - the hell with them, I'll figure them all out when I close them all at once
for now it is like this
https://www.mql5.com/ru/charts/6368852/eurusd-m1-metaquotes-software-corp