The indicator draws a line, which the next day breaks away from the bars and hangs to the side. When I restart the indicator it draws normally again. What can it be?
In order not to do such a thing, I use a ticket. Actually, we may rewrite the logic (at least, we may write the returned OrderClose() value in bool and then check it). I am just curious, why it doesn't return the right value for a closed order and I don't want to overload the program with unnecessary actions. I hope on your help :)
In order not to do such a thing, I use a ticket. Actually, we may rewrite the logic (at least, we may write the returned OrderClose() value in bool and then check it). I am just curious, why it doesn't return the right value for a closed order and I don't want to overload the program with unnecessary actions. I hope on your help :)
I have already answered your question: you have to check the close time of an order by ticket right after its selection. Only for closed orders it is higher than zero. But in your case, the check of closing time goes after the block of closing other orders, and you, respectively, check the closing time of other orders. In general, you get such comprehensive answers to how much code you have shown.
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.
to artmedia70:
Well, the order is already closed when it comes to this condition.
to demlin:
Well I can see it disappearing from Trading.
Hi all!
The indicator draws a line, which the next day breaks away from the bars and hangs to the side. When I restart the indicator it draws normally again. What can it be?
The indicator is crooked. We have to redo it.
The indicator is crooked. We have to redo it.
to demlin:
Well I can see it disappearing from Trading.
to delmin:
In order not to do such a thing, I use a ticket. Actually, we may rewrite the logic (at least, we may write the returned OrderClose() value in bool and then check it). I am just curious, why it doesn't return the right value for a closed order and I don't want to overload the program with unnecessary actions. I hope on your help :)
to delmin:
In order not to do such a thing, I use a ticket. Actually, we may rewrite the logic (at least, we may write the returned OrderClose() value in bool and then check it). I am just curious, why it doesn't return the right value for a closed order and I don't want to overload the program with unnecessary actions. I hope on your help :)
I understand that, but what could be the problem?
You need to look at the code, otherwise only telepaths can help
Here's the code for that block where the closing time checker does all the stuff.
Doesn't it matter when to call the function? The main thing is to have a closed order. Or not...?
Z.Y. Already changed it to more profitable in terms of productivity. But I still wonder what I do wrong with OrderCloseTime().
Here's the code of the block where the closing time checker does all the stuff.
Doesn't it matter when to call the function? The main thing is to have a closed order. Or not...?
Z.Y. Already changed it to more profitable in terms of productivity. But I still wonder what I do wrong with OrderCloseTime().