Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1716 1...170917101711171217131714171517161717171817191720172117221723...1965 New comment Sergey Gridnev 2021.11.03 19:04 #17151 MakarFX #:Interesting idea! Thank you. No, it's not interesting( Every time you change timeframes again, it's not nice to enter the settings( So you should analyse the reason for deinitialisation, so that you don't ask for parameters when you shouldn't. EVGENII SHELIPOV 2021.11.03 19:08 #17152 MakarFX #:Worked like clockwork as you were looking for the last max_ticket order Couldn't find another ticket. Makar translate again Tretyakov Rostyslav 2021.11.03 19:12 #17153 Sergey Gridnev #: So analyse the reason for deinitialisation so that you don't ask for parameters when you shouldn't be asking for them. I have no idea what you are talking about... Tretyakov Rostyslav 2021.11.03 19:13 #17154 EVGENII SHELIPOV #:Makar, translate again. Post the code where you open the orders EVGENII SHELIPOV 2021.11.03 19:13 #17155 MakarFX #:It is possible to memorise a ticket before opening a new order. Alas Makar my level of programming does not allow me to do this Sergey Gridnev 2021.11.03 19:15 #17156 MakarFX #: I have no idea what we're talking about...https://www.mql5.com/ru/docs/event_handlers/ondeinit Tretyakov Rostyslav 2021.11.03 19:20 #17157 Sergey Gridnev #: h ttps://www.mql5.com/ru/docs/event_handlers/ondeinit Thank you very much. I didn't know that. Tretyakov Rostyslav 2021.11.03 19:24 #17158 EVGENII SHELIPOV #:Alas Makar my level of programming does not allow to do it MakarFX #: Post the code where you open the orders Where is the code? EVGENII SHELIPOV 2021.11.03 19:34 #17159 MakarFX #:Where's the code? if(CountTrade() < MaxOrders) { price = FindLastOrderInfo(2); lastlot = NormalizeDouble(GetMinLotOrder()*MathPow(MultiplierParameter, CountTrade()), 2); if(FindLastOrderInfo(1) == 0) { if(Ask<= price - Step()*Point) { if(OrderSend(Symbol(), OP_BUY, lastlot, Ask, slip, 0, 0, "Групповой ордер на покупку", Magic, 0, Blue)) Print("Ордер на покупку открыт!"); else Print("Ошибка открытия ордера на покупку! - ",GetLastError()); } } if(FindLastOrderInfo(1) == 1) { if(Bid>= price + Step()*Point) { if(OrderSend(Symbol(), OP_SELL, lastlot, Bid, slip, 0, 0, "Групповой ордер на продажу", Magic, 0, Red)) Print("Ордер на продажу открыт!"); else Print("Ошибка открытия ордера на продажу! - ",GetLastError()); } } } EVGENII SHELIPOV 2021.11.03 19:41 #17160 MakarFX #:This function cannot work correctly Makar and it's exactly the same here because OrderSelect SELECT_BY_TICKET - the index parameter passes the ticket number. 1...170917101711171217131714171517161717171817191720172117221723...1965 New comment
Interesting idea! Thank you.
No, it's not interesting(
Every time you change timeframes again, it's not nice to enter the settings(
Worked like clockwork as you were looking for the last max_ticket order
Couldn't find another ticket.
Makar translate again
So analyse the reason for deinitialisation so that you don't ask for parameters when you shouldn't be asking for them.
Makar, translate again.
It is possible to memorise a ticket before opening a new order.
Alas Makar my level of programming does not allow me to do this
I have no idea what we're talking about...
h ttps://www.mql5.com/ru/docs/event_handlers/ondeinit
Alas Makar my level of programming does not allow to do it
Post the code where you open the orders
Where is the code?
Where's the code?
This function cannot work correctly
Makar and it's exactly the same here because
OrderSelectSELECT_BY_TICKET - the index parameter passes the ticket number.