[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 695

 
zhuki:
It's 30 degrees here in St. Petersburg at the moment, what about you?

32 in the flat... Siberia, third hour in the morning... :)
 
Abzasc:

32 in the flat... Siberia, third hour in the morning... :)

1 am, it's +8 in the flat, it's summer! ) just for the statistics )
 
Abzasc:

32 in the flat... Siberia, third hour in the morning... :)
16 C outside, 18 C in the flat 1.48am. Also Siberia, where did you find such Siberia?
 
artmedia70:
16 C outside, 18 C in the flat 1.48am. Also Siberia, and where did you find such Siberia???
They say in Siberia 2 fomka on the map is not the distance.
 
artmedia70:
16 C outside, 18 C in the flat 1.48am. Also Siberia, and where did you find such Siberia???

It's about 24 outside... Irkutsk region.
 
zhuki:
They say in Siberia 2 foms on a map is not a distance.

Yeah. Seven versts isn't a detour.

What's a hook?

Seven versts :)

 

KNOWLEDGE! Here's the question...

We open an order.

if (условие на вход){
   int ticket = OrderSend(Symbol(),OP_BUY, Lots, Ask, Slip, SL, TP, CommentsEA, Magic, 0, OrderColors); 
         if (ticket < 0){       
            int err = GetLastError();   
            Comment("Ошибка открытия ордера Buy : "+ err;
            }
         if (ticket > 0){   
            Comment("Ордер создан # "+ ticket );
            }
}

Now in the comments we will have to say either error or the order has been created. ...and now how do we track if the order has closed and closed by a TP or a stop and then display it in the comment?

 
T-G:

KNOWLEDGE! Here's the question...

We open an order.

Now in the comments we will have to say either error or the order has been created. ...and now how do we track if the order has closed and closed by a TP or a stop and then display it in the comment?


if i'm not mistaken, i need to create a function that checks closed orders (i.e. it checks the array of all orders) and searches for your order with your ticket - if this function finds it and sees that it is closed, it will give you all the necessary information)
 
How many orders are there going to be? If one, then it's easy. If there may be 50, it's more complicated.
 
zhuki:
How many orders are there going to be? If there is only one, everything is easy. If there might be 50, then it's more complicated.

I'm saying it's better to use functions at once int OrderTicket(), OrderSelect( ), int OrdersHistoryTotal()
int OrdersTotal()

and there will be no problems.
Reason: