Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 36

 
spoiltboy:
ticketUP=OrderSend(Symbol(), OP_BUYLIMIT, lotB, minpr1, 3, slB, tpB, "", MagicB, 0, Red);

ticketD=OrderSend(Symbol(), OP_SELLLIMIT, lotS, maxpr1, 3, slS, tpS, "", MagicS, 0, Blue);
And why do you write MODE_TRADES when searching?
Why don't you check for closing time==0 ?

 
Artyom Trishkin:
Why do you write MODE_TRADES when searching?

To choose from open and pending.

You don't need to?

 
Artyom Trishkin:
Why don't you check for closing time==0 ?

Actually all this code is from the video course, they didn't do that there.
 
spoiltboy:

To choose from open and pending.

Don't you want it?

When selecting by ticket, the pool is ignored. To understand from which list an order is selected, you need to check its closing time. If it is greater than zero, it means that it was selected from the history, otherwise - from the list of active orders.
 
spoiltboy:
In fact, all this code is from the video course, they didn't do that there.
You can spit on this course. Isn't the content monetised there? They just collect money from YouTube for viewers. They do not want to give them knowledge but earn money on viewings...
 
Artyom Trishkin:
You don't give a shit about this course. Isn't the content monetized there? They just collect money from YouTube for views. They don't want to give knowledge, they want to earn money on viewings...

Recommend something sensible.

In fact, the course is from here http://tradelikeapro.ru/programmirovanie-na-mql-kurs/

«Программирование на MQL» — Курс молодого бойца
«Программирование на MQL» — Курс молодого бойца
  • tradelikeapro.ru
Пошаговый видеокурс «MQL программирование. Как самому написать форекс советник/ индикатор/ скрипт». Хотели бы Вы автоматизировать свою стратегию торговли на форекс? Хотели бы Вы перестать изо дня в день вручную повторять одни и те же рутинные операции, теряя на них по нескольку часов? Возможно, Вы уже задумывались над созданием своих торговых...
 
spoiltboy:

Recommend something sensible.

In fact, the course is from here http://tradelikeapro.ru/programmirovanie-na-mql-kurs/

I can't recommend anything other than the official textbook from Kovalev and reference material from Metaquotes.
The results of the other "courses" are obvious.
 
Artyom Trishkin:
The pool is ignored during selection by the ticket. To understand which list the order has been selected from, you should check its close time. If it is greater than zero, then it is selected from the history, otherwise - from the list of active orders.

I will try to figure it out.

And can you tell me why when you change the order selection function (we check for data on their availability), the order modification function generates an error. Why is it that everything (opening, closing, modification) runs fine for the first few dozen candles when I start it?

 
spoiltboy:

I will try to figure it out.

And can you tell me why when you change the order selection function (we check for data on their availability), the order modification function generates an error. And why at first everything (opening, closing, modification) runs fine for the first few tens of candles?

You should check the code. Everything is piled up on the small smartphone screen. No desire to plunge into this hell, sorry....
 
Good evening .Please advise me an EA that places a singlestop order on a signal and removes if not triggered on a reverse signal...
Reason: