Hi coders, I'm learning coding now.
Pertaining to this post : https://www.mql5.com/en/forum/305424#comment_10829666
From my understanding, the "symbols" is a buffer to store all the open trades symbols. Let's say there are 5 symbols that with open orders, is there a way to index the open trades symbols and to avoid using the [i] so that if I want to get the iHigh price for all the open trades symbols, such as :-
How to "convert" the symbols[i] into oSym and sort the 5 oSym according to MODE_ASCEND ? What are the coding steps to do so ? Thanks
FYI, I tried to firstly to "convert" as follows :-
but the output only has 1 symbol (the first symbol), the other 4 symbols are not shown, why ?
Pertaining to this post : https://www.mql5.com/en/forum/305424#comment_10829666
Inserted Code
for (int i=0; i<symbols.Total(); i++) Print(symbols[i]);
From my understanding, the "symbols" is a buffer to store all the open trades symbols. Let's say there are 5 symbols that with open orders, is there a way to index the open trades symbols and to avoid using the [i] so that if I want to get the iHigh price for all the open trades symbols, such as :-
Inserted Code
Print(DoubleToStr(iHigh(symbols,1440,1),5)); // expected output would be the High price of the 5 symbols
How to "convert" the symbols[i] into oSym and sort the 5 oSym according to MODE_ASCEND ? What are the coding steps to do so ? Thanks
FYI, I tried to firstly to "convert" as follows :-
Inserted Code
string oSym=""; for(int i=0; i<symbols.Total(); i++) oSym=symbols[i]; Print(oSym+" High "+DoubleToStr(iHigh(oSym,1440,1),5));
but the output only has 1 symbol (the first symbol), the other 4 symbols are not shown, why ?