Community of Expertise - page 8

 
After all, you delete a position and it is removed from the list. The next position takes its place, and the counter is incremented, and this very position is simply skipped.

Slava, it's not written anywhere.
Somewhere you have a record of the state at the moment the tick arrives, and somewhere it doesn't.

Thanks for the tip.
Then maybe this is more correct?
while (OrdersTotal() > 0) { ........... }


Will OrdersTotal change when an order (position) is deleted?

 
Вы ведь удаляете позицию, а она удаляется из списка. на её место попадает следующая позиция, а счётчик инкрементируется, и эта самая позиция просто пропускается.

Slava, this is not written anywhere, is it?

That the position is deleted after it has been deleted?

Then maybe this is more correct?
while (OrdersTotal() > 0) { ........... }


Will OrdersTotal change when an order (position) is deleted?


You can write it this way if you totally delete ALL positions indiscriminately. But even in this case, at each iteration of the loop you refer to a function and lose an extra hundred clock cycles.
 
That the position is deleted after it is deleted?

That the length of the array on the same tick changes when the position is deleted.
 
Is it possible to have a hint with some information that we would like to add to the arrow in the Expert Advisor? For example, would the number of the condition by which the Expert Advisor was opened be automatically written next to the arrow?
 
<br / translate="no"> Is it possible to have a hint with some information that we would like to add to the arrow in the Expert Advisor? For example, could the number of the condition by which the Expert Advisor was opened be automatically written next to the arrow?

Give a descriptive value to the arrow. This descriptive value will be displayed in the hint
 
[/quote] set the descriptive arrow. this descriptive will show up in the hint [/quote]

I would like to know where and how to set this description :)

Can you give me a code snippet with a descriptive example near the arrow?
 

Можно ли в эксперте возле стрелочки выдавался хинт с некоторой информацией, которую мы сами хотели бы туда дописывать. Например автоматически возле стрелочки прописывался бы номер условия по которому эксперт открылся?

Set a descriptive arrow. This descriptive arrow will be displayed in the hint


You don't mean the handwritten descripthen? :)
But we need it to be automatic!

There are 23 different sets of conditions by which the EA opens. For example, it was opened by 8 conditions. How do we know what condition it was opened by?
 
<br / translate="no"> Are you by any chance talking about the manual descriptor? :)

You can add it programmatically using the function ObjectSetText
But we need it to be automatic!

the big green "win" button?

There are, for example, 23 different sets of conditions, by which the EA is opened. For example, it opens by condition 8. And how can we know by which condition it is opened?

and how do we know which condition? so place an order with an arrow, then find the last object and set its own assigned descriptor
 
[/quote]
how do we know which condition? so set an order with an arrow, then find the last object and set it to your own assigned descriptor
[/quote]

We are working on the green button. It's all about its design :)

The "Order Send" function worked. How do I define this arrow and add text to the arrow?
 
Something like this

ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,Slippage,0.0,0.0,"buy",ExpertMagicNumber,0,Blue);
            if(ticket<0)
               {
               Print("OrderSend failed with error #",GetLastError());
               return(0);
               }
            ObjectCreate("buy"+tr_CounterLabel,OBJ_ARROW,0,Time[0],Ask);
            ObjectSet("buy"+tr_CounterLabel,OBJPROP_ARROWCODE,tr_LabelArrow);
            ObjectSet("buy"+tr_CounterLabel,OBJPROP_COLOR,tr_LongColor);
            ObjectSetText("buy"+tr_CounterLabel,"купил от балды",10);
            tr_CounterLabel++;


"bought out of the blue" is your description of the arrow :)))

Reason: