Wai Shing Ng :
hello guys.
I got a situation that when my EA open new order, Order Open Price will sort in Array. However, when order closed, that Open Price still in Array(e.g BuyOrderOpenPrice[0]).
I tried ArrayRemove, ArrayFill, ArrayResize etc, but not work. Does anyone know how to clear array memory after order close? Thanks.
To help you, you must show your MQL5 code.
Wai Shing Ng:
Use https://www.mql5.com/en/docs/standardlibrary/datastructures/clist instead of raw arrays.
hello guys.
I got a situation that when my EA open new order, Order Open Price will sort in Array. However, when order closed, that Open Price still in Array(e.g BuyOrderOpenPrice[0]).
I tried ArrayRemove, ArrayFill, ArrayResize etc, but not work. Does anyone know how to clear array memory after order close? Thanks.

Documentation on MQL5: Standard Library / Data Collections / CList
- www.mql5.com
CList - Data Collections - Standard Library - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5

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
hello guys.
I got a situation that when my EA open new order, Order Open Price will sort in Array. However, when order closed, that Open Price still in Array(e.g BuyOrderOpenPrice[0]).
I tried ArrayRemove, ArrayFill, ArrayResize etc, but not work. Does anyone know how to clear array memory after order close? Thanks.