Flags either control the number of order types or if there is a ticket control the closing time of the market order, if not equal to zero then the order has closed and the order opening flag is false.
AIGUL SALMANOVA: How is this done programmatically ???
if(OrderSelect(Ticket, SELECT_BY_TICKET)==true)
{
if(OrderCloseTime()==0) // Если наш рыночный ордер не закрыт
{
if(flagAlert == true)
Alert("Наш рыночный ордер жив, Модифицируем его если нужно ", Text,Ticket,". Ждём ответ..");
ModifyTral(); // Модифицируем если нужно
}
if(OrderCloseTime()!=0) // Если наш рыночный ордер закрылся
{
OpnOr=false; // Флаг открытия рыночного ордера после его закрытия делаем ЛОЖЬ
Ticket=0; // Тикет ордера рыночного, он может быть только одинAlert("Наш рыночный ордер закрылся. Работа Советника продолжается ","Прибыль/убыток = ",OrderProfit(),
" Своп = ", OrderSwap(), " Комиссия = ", OrderCommission());
return;
}
}
else
{ Alert("OrderSelect() нашего рыночного ордера вернул ошибку - ",GetLastError()); return;}
}
To account for a ticket.
When opening an order, the ticket must be memorised.
Flags either control the number of order types or if there is a ticket control the closing time of the market order, if not equal to zero then the order has closed and the order opening flag is false.
How is this done programmatically ???
To account for a ticket.
When opening an order, the ticket must be memorised.
To be honest, it's not clear what you're looking for. Write in formulas how you understand what is output and what you need.
You need the time in milliseconds between the last 4 ticks. Update values when new tick appears.
The indicator writes the time of the last tick(GetTickCount()) in the buffer.
The Expert Advisor takes values from the indicator and calculates the time difference.
It seems to count, but Alert shows values as in the image.
I don't understand why.
Need the time in milliseconds between the last 4 ticks. Updates the values when a new tick occurs.
The indicator writes the time of the last tick (GetTickCount()) into the buffer.
The Expert Advisor takes values from the indicator and calculates the time difference.
It seems to count, but Alert shows values as in the image.
I do not understand why.
Because you haven't read the documentation
Help for GetTickCount says it's an integer counter overflow
because you don't read the documentation.
The GetTickCount reference says it's an integer overflow.
You mean uint? Why is it popping up in the alert? I didn't put it there.
You mean uint? Why is it popping up in the alert? I didn't write it there.
In the first Alerte you output incorrectly (without taking into account overflows) calculated difference,
the second Alert, where a large integer value is looked for in the code, it is not present in this fragment :-)
That's the thing, it's not in the code.
All the indicator code.
All of the EA code.
That's the thing, it's not in the code.
All of the indicator code.
All of it.
Look what else is in it.
time.mq4 - maybe it sends alerts
That's the thing, it's not in the code.
All the indicator code.
All of the EA code.
In the indicator, in the Alert structure. The 5th line from the bottomAlert(b);
Apparently this is the number of milliseconds since the start of the system)
How do I track the status of the quick trade buttons?
That is, are they present on the chart or not.
Can you suggest a function or another method?