[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 586

 
Can you tell me how to find out programmatically what event caused init() and deinit() to be called, possible events are timeframe switching, connecting and deleting an EA, closing Metatredera!
 
rejie:
Can you tell me how to find out programmatically what event caused init() and deinit() to be called, possible events are timeframe switching, connection to delete EA, close Metatredera!
https://docs.mql4.com/ru/check/UninitializeReason
 

The download is slowing down... Time to move to Reality Level 4)))

 
Hello. There are scripts with many different scripts to close orders, I need one that closes all orders when a certain total profit on orders is reached, couldn't find one. Has anyone seen a similar one or can they refine any similar script for my scenario?
 
gawrik:
Hello. There are scripts with many different scripts to close orders, I need one that closes all orders when a certain total profit on orders is reached, couldn't find one. Has anyone seen a similar one or can any similar script be refined to suit my scenario?
Here
 
alsu:
Here
Thanks. another question: when orders are closed it disappears and has to be restarted. how do i make it work all the time?
 
gawrik:
I have one more question: it disappears after orders are closed and has to be run again.

Either the script should be in endless loop, or you should write an Expert Advisor. The second option is more preferable to me
 
artmedia70:

Why are you filling everything with screenshots? Can you yourself test in visualisation mode step by step, observing the state of your flags?

Start the test, put the ADX window on the visualization chart, press Pause/Break - the test will pause. Then continue with the test by pressing F12. Observe the state of ADX and the flags.

No one but you will do this


Thanks for the advice, it doesn't work, and the screenshots are for clarification
 

Can you give me a link to a Range Bar Chart indicator with accumulation (combining unidirectional bars)?

 
alkador:

Either put the script in an infinite loop or write an EA. The second option is more preferable to me

easy to say... :) is it possible for a little-known person to do it?
Reason: