Download MetaTrader 5

symbols.raw or string handling?

To add comments, please log in or register
szgy74
269
szgy74  

Hi,

I struggle for hours with this simple problem that was no problem before:

I read the terminal symbol names and descriptions from the symbols.raw file.


string sSymbol=FileReadString(handle, 12);
string desc=FileReadString(handle, 75);
Print("symbol#",i,"/",n_pairs,": ", sSymbol, " / ", desc, " trade: ", trallow);


in the print nothing appears after the symbol name, not only here, in any kind of print. when I change the sSymbol to "xxxxxx" then it is OK.

now the result:

EURUSD,H1: symbol#63/22: GBPAUD

earlier it was:

EURUSDi,H1: symbol#63/22: GBPAUD / Great Britain Pound Sterling vs Australian Dollar trade: 1

How can I print anything what comes after this name?

Thank you.

Alain Verleyen
Moderator
32410
Alain Verleyen  
szgy74:

Hi,

I struggle for hours with this simple problem that was no problem before:

I read the terminal symbol names and descriptions from the symbols.raw file.


string sSymbol=FileReadString(handle, 12);
string desc=FileReadString(handle, 75);
Print("symbol#",i,"/",n_pairs,": ", sSymbol, " / ", desc, " trade: ", trallow);


in the print nothing appears after the symbol name, not only here, in any kind of print. when I change the sSymbol to "xxxxxx" then it is OK.

now the result:

EURUSD,H1: symbol#63/22: GBPAUD

earlier it was:

EURUSDi,H1: symbol#63/22: GBPAUD / Great Britain Pound Sterling vs Australian Dollar trade: 1

How can I print anything what comes after this name?

Thank you.


Not sure if you deserve to be helped

It's no more needed to use hack :

   Print("Symbol : ",_Symbol, " => ",SymbolInfoString(_Symbol,SYMBOL_DESCRIPTION));
szgy74
269
szgy74  
angevoyageur:

Not sure if you deserve to be helped

It's no more needed to use hack :



I'm not sure too, but thank you, really.

To add comments, please log in or register