try to use it :
if (CheckPointer(obj)== POINTER_INVALID ) {Print("Invalid Pointer "); }
if you have "invalid pointer access" - error like I had using dynamic object collections - see my answer (GetPointer() needed, though not everywhere)... though I do not know why Not everywhere?..
![[MQL4/5] How to save/load/sort dynamic object collections? [MQL4/5] How to save/load/sort dynamic object collections?](https://c.mql5.com/36/51/mql4-5-how-to-save-load-sort-dynamic.jpg)
[MQL4/5] How to save/load/sort dynamic object collections?
- 2017.08.09
- www.mql5.com
I wasn't able to find any documentation on how to override the CObject virtual methods Load, Save, and Compare to make use of(CList and CArrayObj...

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
Ok I have had it with the error coming up in my EA. I am getting 'invalid pointer access' here is the what happening..
1. before i use any obbject is use
the conditions passes and then I proceed to get the 'invalid pointer access'
i have tried to run this in debug mode from the editor so i can use the add watch variable, i can see the variable is not null
2. all objects being used are created by new and then deleted using delete when they are done.
3. the error is not consistent it seems random, in one instance it runs flawlessly and then seemingly out of nowhere i start to get invalid pointer access, the same code that might be running normally in one chart.