[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 291

 
granit77:
Here is the code snippet from Integer's EA that shows the work with the arrow indicator.



Thank you so much! Everything has become clearer.

If I understand correctly, after creating an indicator function and mentioning it in the Expert Advisor, I access indicator buffers using iCustom?

 
silhouette:

Can the deinit() function be called from the start() function? For example, I want to make Expert Advisor to unload itself when specified conditions are met.


Calling deinit will not stop the EA. this piece of code will help you :

PostMessageA(WindowHandle(Symbol(),Period()), WM_COMMAND, 33050, 0);
 
We need a function that finds the price level - forced position closing.

"Stop out" - an order to forcibly close a position, generated by the server.

And also this function, to find the price level:

"Margin Call" - the state of the account, at which the Dealer has the right, but not obliged to close all open positions of the client because of lack of Free Margin. The "Margin level" at which the "margin call" situation occurs on the account is specified in this Agreement.
 
FAQ:


Calling deinit will not stop the EA from working. this piece of code will help you :


?
 
tara:

?

What, you didn't know?
 
fore-x:
We need a function that finds the price level - forced position closing.

"
Stop out" - an order to forcibly close a position, generated by the server.

And
also this function, to find the price level:

"Margin Call" - a state of the account at which the Dealer has the right, but not obliged to close all open positions of the client because of lack of the Free Margin. The "Margin level" at which the "margin call" situation occurs on the account is specified in this Agreement.
Why don't I google it for you?
 

Oh, with a kick up the arse - here we go: Installing Stop Out

 

drknn, FAQ, thanks for the answers!

PostMessageA(WindowHandle(Symbol(),Period()), WM_COMMAND, 33050, 0);
Only I can't find a description of this function, in particular the WM_COMMAND variable, which the compiler swears at, saying it's not declared.
 
FAQ:

What, you didn't know?


I guessed. Just - thought: why is it in this thread.

 
silhouette:

drknn, FAQ, thanks for the answers!

Just can't find a description of this function, in particular the WM_COMMAND variable, which the compiler is swearing at, saying it's not declared.


https://www.mql5.com/ru/forum/110207

At the very beginning of the advisor, before the externs, spell out :

#include <WinUser32.mqh>

Reason: