Hello, can you suggest decision how to manage large data and trade with Metatrader 4. I have an EA that records in csv file in Metaeditor/File folder quotes and some variables of symbols in Market Watch. However when recording data becomes very, very large - above 1 million of rows, and if EA just records it is ok, but of there is an open order EA must read from file and take decisions, and then my pc work with 100% of processor power all the time! Does anybody has similar problem and to know how to solve it? Thanks.
- How can I include a csv file directly in MQL4?
- Open extern files with metatrader
- Saving Quotes on another folder than the "experts/files"
iCurrency:
Hello, can you suggest decision how to manage large data and trade with Metatrader 4. I have an EA that records in csv file in Metaeditor/File folder quotes and some variables of symbols in Market Watch. However when recording data becomes very, very large - above 1 million of rows, and if EA just records it is ok, but of there is an open order EA must read from file and take decisions, and then my pc work with 100% of processor power all the time! Does anybody has similar problem and to know how to solve it? Thanks.
Hello, can you suggest decision how to manage large data and trade with Metatrader 4. I have an EA that records in csv file in Metaeditor/File folder quotes and some variables of symbols in Market Watch. However when recording data becomes very, very large - above 1 million of rows, and if EA just records it is ok, but of there is an open order EA must read from file and take decisions, and then my pc work with 100% of processor power all the time! Does anybody has similar problem and to know how to solve it? Thanks.
Derive a class from CObject and override its Load and Save methods to load the row into your new object. Then derive a class from CList to store your collection of data, and override its Load Save methods to read your CSV. Here is a post I just made about using the collection class' Load/Save methods. https://www.mql5.com/en/forum/213003
#property strict #include <Arrays\List.mqh> //+------------------------------------------------------------------+ class MyObj : public CObject { public: string symbol; double bid; double ask; }; //+------------------------------------------------------------------+ void OnStart() { //--- CList list; for(int i=0;i<1000000;i++) { MyObj *obj = new MyObj; obj.symbol = Symbol(); obj.bid = Bid; obj.ask = Ask; list.Add(obj); } string symbol; double bid,ask; uint st = GetTickCount(); int cnt=0; for(MyObj *obj = list.GetFirstNode();obj!=NULL;obj = list.GetNextNode()) { symbol = obj.symbol; bid = obj.bid; ask = obj.ask; cnt++; } uint ed = GetTickCount(); Print("It took ",ed-st," ms to iterate over ",cnt," objects"); } //+------------------------------------------------------------------+
![[MQL4/5] How to save/load/sort dynamic object collections? [MQL4/5] How to save/load/sort dynamic object collections?](/i/community/logo_mql5_small.png)
[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...
Thanks.

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