Download MetaTrader 5

Function return value inside a string possible?

To add comments, please log in or register
nadiawicket
417
nadiawicket  

Is there a way to, for example, have the compiler put the chart's _Symbol right inside a string?

FileDelete("Sell_Symbol",FILE_COMMON);

If not, Ill have 30 EA's instead of just 1 because of having to write every single currency pair in there.

I'm sure there has to be someone else who has faced the necessity of writing the return of a function inside a string like this.

Any ideas or workarounds to this end? Variables?

Thanks in advanced.

Meng Yin Teoh
1826
Meng Yin Teoh  
nadiawicket:

Is there a way to, for example, have the compiler put the chart's _Symbol right inside a string?

If not, Ill have 30 EA's instead of just 1 because of having to write every single currency pair in there.

I'm sure there has to be someone else who has faced the necessity of writing the return of a function inside a string like this.

Any ideas or workarounds to this end? Variables?

Thanks in advanced.


FileDelete(StringConcatenate("Sell_",Symbol()),FILE_COMMON);
nadiawicket
417
nadiawicket  
Meng Yin Teoh:


Way better than variables. Thanks a zillion!
To add comments, please log in or register