Leon: Greetings! Can you tell me how to delete a pending order on a previous candlestick if I need to reopen the pending order on a new one? A new bar is defined as I place the pending order like this
Can it be like this? Well, how to close in a past moment that has already passed in the past
staticdatetime New_Time=0; // Время текущего бара
New_Bar=false; // Нового бара нетif(New_Time!=Time[0]) // Сравниваем время
{
New_Time=Time[0]; // Теперь время такое
Closer();
OrderSend(Symbol(),OP_BUYSTOP,NormalizeDouble(Lotpers,5),Ask+OrderStep*Point,100,0,0,NULL,MagicNumber,0,clrNavy);
}
void Closer()
{
Тут разные проверки наличия и закрытие
}
1. How do I close a position with a pending order? I couldn't find any special tools in the documentation. So, only by counter order and then OrderCloseBy()?
2. How do I know the error that occurred when triggering a pending order, e.g. NOT_ENOUGH_MONEY? There is nothing in LastError(). But it is there and the tester displays it in the log.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
You mean these buttons?
No. The button to open a closed chart either with the mouse from the list on the left...
Greetings!
Can you tell me how to delete a pending order on a previous candlestick if I need to reopen the pending order on a new one?
A new bar is defined as
I place the pending order like this
draw a screenshot. With the mouse to the left of what?
draw a screenshot
if this button is
- I removed it long ago and forgot about it. And the plus sign is in the middle rather than in the left corner
No. The button to open a closed chart either by mouse from the list on the left...
And such a beauty, no?
Is there any way to set up a chart to open with the required timeframe on the open button? Thanks
Try the following.
Open the right chart with the right TF. Configure it the way you want. Save it in a default template
STARIJ:
Может быть так? Ну как закрыть в прошлый момент, который уже прошел в прошлое
Thank you, it worked!
1. How do I close a position with a pending order? I couldn't find any special tools in the documentation. So, only by counter order and then OrderCloseBy()?
2. How do I know the error that occurred when triggering a pending order, e.g. NOT_ENOUGH_MONEY? There is nothing in LastError(). But it is there and the tester displays it in the log.