-
may i know y u need it
Q
@
I have completed Symbols() function which stores in an array all Symbols and Instruments used by the Broker's Server. I have tested it on 3 Broker's, i heard there were 200? Thank you qjol and Ais. You will be able to download it when it is published.
Use something like that:
/** * Get the list of symbols available on this platform. * The function will resize and fill the supplied array with * the symbol names and return the number of symbols. */ int getSymbols(string &sym[]){ int i; string symbol; int f = FileOpenHistory("symbols.raw", FILE_BIN | FILE_READ); int count = FileSize(f) / 1936; ArrayResize(sym, count); for (i=0; i<count; i++){ symbol = FileReadString(f, 12); sym[i] = symbol; FileSeek(f, 1924, SEEK_CUR); } FileClose(f); return(count); }
use it like this:
int sym_count; string sym[]; int init(){ int i; sym_count = getSymbols(sym); for (i=0; i<sym_count; i++){ Print(i + " " + sym[i]); } }
hi bernd, i did not recognise your pseudonym, how is my trading partner from IRC forex Chat? take care my friend.
i cant understand what it is this all about
simple use \\meta_trader_folder/history/your_proker/symbols.raw
as u can c here
https://www.mql5.com/en/code/9102
& u have all the symbols from your broker
qjol, thank you very much for the codebase reference.
qjol:
You are a bit late. My posting already did exactly this. No need to do the whole dance with header and lib and everything for a simple 5-liner.
i cant understand what it is this all about
simple use \\meta_trader_folder/history/your_proker/symbols.raw
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
So far I have found the following characters used to form Symbol or Instrument names:
#ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789._abcdefghijklmnopqrstuvwxyz
are there any others?
Thanking you all in advance.