In mql5 coding can a logic let's say cleanup invalid objects like IFVG be inside of oncalculate function and still work or it has to be outside with all its variables and loops then only called inside the oncalculate function to work. I have this IFVG indicator that I have been working on which doesn't delete it's invalidated ifvg zones represented by arrows. Am thinking of introducing a new cleanup logic function outside and placing all the cleanup loops and variables then calling it once in the oncalculate function.

Documentation on MQL5: Language Basics / Functions / Event Handling Functions
- www.mql5.com
The MQL5 language provides processing of some predefined events . Functions for handling these events must be defined in a MQL5 program; function...
Files:
IFVG_ARROW_DELETION.mq5
15 kb
- Moving from MQL4
- Custom Indicators
- Event Handling
To answer your two questions, either and yes.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register