Download MetaTrader 5
To add comments, please log in or register
How to use MQL5.community messages editor? Find out in the article!
Carl Schreiber
5939
Carl Schreiber 2014.02.23 12:45 

Hi,

the new mt4 (b610+) offers a lot but:

is there an option (work-around) to load all available symbols in the MarketWatch out of an EA, script or an Indicator?

Really would appreciate!!

Gooly

whroeder1
13602
whroeder1 2014.02.23 13:40  
gooly:is there an option (work-around) to load all available symbols in the MarketWatch out of an EA, script or an Indicator?
If you mean get all available symbols, RTFM: for loop using SymbolsTotal and SymbolName
Carl Schreiber
5939
Carl Schreiber 2014.02.23 14:01  
WHRoeder:
If you mean get all available symbols, RTFM: for loop using SymbolsTotal and SymbolName




Ok, some new functions for mql4 but e.g. if the symbol is not in the MarketWatch I don't get e.g. MarketInfo(sym,Point) (or its is 0.0).

Therefore I'd like to enable an EA to 'load' all available symbols.

The other option would be to read symbols.raw - but I'd like to have 'cheaper' way and if this exists there might be a chance - that would be just hilarious - to 'hide All' (not needed) symbols all from with in an EA.

Michael
492
Michael 2014.03.13 04:05  
Open up the Market Watch window, right click on it, select 'show all'. Once you do that, you'll be able to loop through the Symbols per WHRoeder.
Keith Watford
Moderator
7899
Keith Watford 2014.03.13 04:37  
gooly:

Ok, some new functions for mql4 but e.g. if the symbol is not in the MarketWatch I don't get e.g. MarketInfo(sym,Point) (or its is 0.0).

Therefore I'd like to enable an EA to 'load' all available symbols.

The other option would be to read symbols.raw - but I'd like to have 'cheaper' way and if this exists there might be a chance - that would be just hilarious - to 'hide All' (not needed) symbols all from with in an EA.



This may give you some pointers

   int number = SymbolsTotal(true);                //If true all symbols, if false just those in the Market Watch window
   string SymbolArray[];
   ArrayResize(SymbolArray,number);
   for(int index=0;index<number;index++)
      SymbolArray[index]= SymbolName(index,true);  // must be true or false, the same as above
   
/
To add comments, please log in or register