The second form, on the other hand, is unclear. After all, it is responsible for the time in the future or the past.
Yes, they have not documented this point. Then it is better not to rely on the second form of the function to check the availability of the trade flow.
One more question. Let's say, when the EA attempts to open an order with a busy trade thread, will we always get the same error number, namely '146'? Or, maybe there will be some other error?
Yes, somehow this point is not documented. Then it is better not to rely on the second form of the function to check if the trade flow is available.
There is also one more question. Let us say, when the EA makes an attempt to open an order when a thread is busy, will we always get the same error number, namely, '146'? Or, will there be some other error?
It may not get to the point of sending the order because of other errors. Why find out about the thread availability at all in this way? It would be much easier to use the function checking if the thread is busy.
It may not get to the point of sending the order because there are other errors. Why find out about thread occupancy in this way at all? It is easier to use the thread occupancy check function.
Лауреат: How to make a function which would close an open position by its own bridge after a specified number of candles have passed in the time history.
for(int i = 0; i < 36; i++) // 36 - история 36 свечей
{
if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
{
if(OrderSymbol() == Symbol() && OrderMagicNumber() == Magic)
{
if(OrderType()==OP_BUY)
{
boolOrderClose(
int ticket, // номер ордераdouble lots, // количество лотовdouble price, // цена закрытияint slippage, // максимальное проскальзываниеcolor arrow_color // цвет
);
}
if(OrderType()==OP_SELL )
{
boolOrderClose(
int ticket, // номер ордераdouble lots, // количество лотовdouble price, // цена закрытияint slippage, // максимальное проскальзываниеcolor arrow_color // цвет
);
}
}
}
}
return;
}
The second form, on the other hand, is unclear. After all, it is responsible for the time in the future or the past.
Yes, they have not documented this point. Then it is better not to rely on the second form of the function to check the availability of the trade flow.
One more question. Let's say, when the EA attempts to open an order with a busy trade thread, will we always get the same error number, namely '146'? Or, maybe there will be some other error?
Yes, somehow this point is not documented. Then it is better not to rely on the second form of the function to check if the trade flow is available.
There is also one more question. Let us say, when the EA makes an attempt to open an order when a thread is busy, will we always get the same error number, namely, '146'? Or, will there be some other error?
It may not get to the point of sending the order because of other errors. Why find out about the thread availability at all in this way? It would be much easier to use the function checking if the thread is busy.
It may not get to the point of sending the order because there are other errors. Why find out about thread occupancy in this way at all? It is easier to use the thread occupancy check function.
Thank you, I will do so.
Hi all!!! How do I open orders one at a time!!! i.e. open sell, then buy and so on???
you can
How many orders do I have to open?
one sell, then one Buy, then sell, then one Buy and so on!
How to make a function which would close an open position by its own bridge after a specified number of candles have passed in the time history.