Creating a robust trading robot cannot be done without an understanding of the mechanisms of the MetaTrader 5 trading system. The client terminal receives the information about the positions, orders, and deals from the trading server. To handle this data properly using the MQL5, it's necessary to have a good understanding of the interaction between the MQL5-program and the client terminal.
Alain Verleyen: You should stop to guess and start reading and learning the documentation.
Yes, I've been doing this for a while and it was all very confusing. I was able to observe a kind of transition time between MQL4 and MQL5. And finally a few days ago I discovered the "Trade Classes" and the doors of heaven were opened to me. Thanks developers for doing this !!
Ok i changed PositionsTotal() by HistoryDealsTotal()... but it still not working :-(
You should stop to guess and start reading and learning the documentation.
Btw, ArrayResize ist one to small...
Yes, I am looking for some function that allows me to allocate an array in memory.
Something like this in C ++:
double * array = new double [size];
But for some reason that I can't understand, this is not working in MQL5 ...
karp wak:
Yes, I am looking for some function that allows me to allocate an array in memory.
Something like this in C ++:
double * array = new double [size];
But for some reason that I can't understand, this is not working in MQL5 ...
You must learn to read the documentation: ArrayResize()
I understand it. Thanks for your help Dominik.