Function return value inside a string possible?

 

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.

 
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);
 
Meng Yin Teoh:


Way better than variables. Thanks a zillion!
Reason: