Is it possible to write such a script that when closing an order for example I close an order from the phone the terminal is at home the EA is turned on when closing an order the terminal was also closed?
Share
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
alexeyvik
Barely found in the bins of old not tested functions… But that was so long ago…. Just for fun posted.
#include
int start()
{
int hwnd = WindowHandle(Symbol(), Period());
int hwnd_parent = 0;
while(!IsStopped())
{
hwnd = GetParent(hwnd);
if (hwnd == 0) break;
hwnd_parent = hwnd;
}
if(hwnd_parent != 0)
PostMessageA(hwnd_parent, WM_CLOSE, 0, 0);
return(0);
}
But this is a very old version, may need to be fixed or even no longer works.
ivanbg
Or maybe it’s better to use expertremove()
mvs
You can enter the control of the remaining open positions, and if some closed, but there is still in the market, then do not close the terminal, but close only when the last one is closed.
nektomk
questions about something for money are freelancing.
and there any thing that can be formulated is possible
starij
But if the order is closed at SL or TP too close to the terminal? Then you just need the expert to open only one order!!! And to do it is to freelance
krot1941
And there is no desire to make such? For ₽ or $ ?
alximiks
Execute cannot be pardoned
artmedia70
This is a function whose call from an Expert Advisor or script causes the terminal to close on the tick that follows the function call.
krot1941
What does it mean?
tecciztecatl
TerminalClose();