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

 
Galim_V:

Greetings, I can't understand why the SELECT_BY_TICKET selection does not work in this design, unlike SELECT_BY_POS.

In 4, when the order is successfully opened, the ticket is returned, not the result, like in 5. You should remember it right after the order is opened, and the Magic script is only needed for insurance. And it doesn't work because you have numbers in order, and there are no such tickets. Therefore there is no such order error.

 
Andrey Sokolov:
MakarFX, Mihail Matkovskij
thanks. But my question is not about that. I want to ask how an EA may render data from arrays, like from indicator buffers, if it ' s possible.

This is what makes an indicator different from an EA, that it has indicator buffers that are easier and cheaper to draw than in an EA. apparently only kanvas native or semco to help.

 
Valeriy Yastremskiy:

This is what makes an indicator different from an EA, it has indicator buffers that are easier and cheaper to draw than in an EA. apparently only kanvas native or semco to help.

Thank you.
It has an indicator buffers that are easier and cheaper to draw than an EA. Yes, Cap.
Semco is what?

 
Andrey Sokolov:

Thanks.
This is what makes an indicator different from an EA, that it has indicator buffers that are easier and cheaper to draw than in an EA. - yes, Cap.
Semco is what?

Nikolai, he has a clothed and improved kanvas in kodobase. And he's cool with it in general.

And these buffers by the way impose a lot of restrictions on themselves, so no orders are placed in the indices).
Nikolai Semko
Nikolai Semko
  • 2021.08.10
  • www.mql5.com
Профиль трейдера
 
Valeriy Yastremskiy:

Nikolai, he has a clothed and improved canvass in his kodobase. And he's cool with it in general.

And these buffers, by the way, impose a lot of restrictions themselves, so no orders are placed in the indices).

The indicators of one chart work all in one thread. Therefore, we cannot call the MessageBox and make trades in them. It is possible to obtain information about deals and orders if my memory is correct. But you cannot trade. You can only trade in Expert Advisors and scripts. A separate thread is allocated to each expert.

 
Tell me how to type OR || with a keyboard))))) still copypaste))))
 
Valeriy Yastremskiy:
Tell me how to type OR || with a keyboard))))) still copypaste))))

 
MakarFX:

Thank you)))) Shift Slash))). Laziness is not always a panacea after all)))

 
Valeriy Yastremskiy:

In 4, when an order is successfully opened, a ticket is returned, not the result as in 5. Remember it immediately after opening an order, and Magik is only needed for insurance. And it doesn't work because you have numbers in order, and there are no such tickets. Therefore there is no such order error.

Thanks, but I still don't know what to do with it. The source is compiling. If you have the time, point the finger.

Files:
08pw65u5_04.mq4  26 kb
 
Galim_V:

Thanks, but I still don't know what to do with it. The source code compiles. If you have the time, point the finger.

Logic is lame, everything is there, and arrays for tickets and order types. Only it is not filled when orders are opened, and the array is zeroed out in the TicketLimit function for some reason. At first glance.

 if(ParSar>MaxClose&&chekt==1){
    ticket=_OrderSend(NULL,OP_BUYSTOP,0.01,MaxClose+(spread*Point()),0);
Увеличить последний индекс массива _тикет на 1.
Здесь запомнить тикет в массив _тикет и тип ордера тоже и запомнить последний индекс массива!!!
  }
    }
    if(MinClose!=0){
   if(ParSar<MinClose&&chekt==1){
    _price= NormalizeDouble( MinClose-(spread*Point()),Digits);
    ticket=_OrderSend(NULL,OP_SELLSTOP,0.01,_price,0);
Увеличить последний индекс массива _тикет на 1.
Здесь запомнить тикет в массив _тикет и тип ордера тоже и запомнить последний индекс массива!!!

А потом в Ордер селект подставлять значение массива _тикет) Цикл по индексу массива _тикет от 1 до последнего индекса.




Reason: