Why don't read the docs? for CArrayObj:
https://www.mql5.com/en/docs/standardlibrary/datastructures/carray/carraytotal
For list:
https://www.mql5.com/en/docs/standardlibrary/datastructures/clist/clisttotal https://www.mql5.com/en/docs/standardlibrary/datastructures/clist/clistgetnodeatindex
or
https://www.mql5.com/en/docs/standardlibrary/datastructures/clist/clistgetfirstnode https://www.mql5.com/en/docs/standardlibrary/datastructures/clist/clistgetnextnode
Documentation on MQL5: Standard Library / Data Collections / CArray / Total
- www.mql5.com
Standard Library / Data Collections / CArray / Total - Reference on algorithmic/automated trading language for MetaTrader 5
Drew Clayman:
I'm curious if there is a way to for-loop through a CArrayObj or CList?
You may find this of interest:
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
I'm curious if there is a way to for-loop through a CArrayObj or CList?
Also, is there a way to get the number of objects within a CArrayObj or CList?
I've thought of work arounds like having a counter that I increments every time I add to the list, but just curious if there's a standard way.