Try:
string filename _Symbol+"_Trade_reatime.csv";
The compiler doesn't allow 'your' #define!
Carl Schreiber:
Try:
The compiler doesn't allow 'your' #define!
I tried this:
string filename = _Symbol+"_Trade_reatime.csv"; input string forecast_fetch=filename;
Got this error:
'filename' - constant expected Trade_Real_Test.mq5 85 29Still the error persists.
No that is because you are trying to assign a value to a static input which you can not change.
You can't even change input variables ion mql5 (other than extern in mql4!!)
input string forecast_fetch = ""; string _forecast_fetch; //aux. var. ... int OnInit() { _forecast_fetch = (forecast_fetch != "") forecast_fetch : filename; ... }
Carl Schreiber:
You can't even change input variables ion mql5 (other than extern in mql4!!)
So that means there is no way out for my problem.. right?
string filename = _Symbol+"_Trade_reatime.csv";
This should be sufficient.
If you want to add more by input parameter:
static input string somestring="blablablah_"; string filename = somestring+_Symbol+"_Trade_reatime.csv";Not the way around.
Carl Schreiber:
You can't even change input variables ion mql5 (other than extern in mql4!!)
MQL5 has `extern` as well.
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
I have tried the following and got the error:
Error got is:
Please let me know what I can do to have this sort of file name. My signal vary with respect to the symbol on chart. Hence, I need to have the file name with respect to chart to avoid typing file name every time. Please let me know the way out.