We have already fixed this problem. Just wait for future build.
At this moment you can try this code.
string tmp=AccountInfoString(ACCOUNT_NAME); Alert(tmp+" "+(string)_Period);
Documentation on MQL5: Standard Constants, Enumerations and Structures / Environment State / Symbol Properties
- www.mql5.com
Standard Constants, Enumerations and Structures / Environment State / Symbol Properties - Documentation on MQL5
alexvd:
We have already fixed this problem. Just wait for future build.
At this moment you can try this code.
I haven't supposed it was a problem, just i thinked was my ingnorancy..
But what is the problem? The PERIOD_CURRENT cannot actually be converted into integers or strings?
Thanks for the code of course, i will try..
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
Dear. I want simply to print(or alert) the current account name and current period of the EA attached to the chart.
About the name no problem, i solved with:
But for the current chart timeframe i am not able..
No matter how the output of the "function" will be, if it string or integer,
the important is that it differs from timeframe to timefreame (i.e. period 5m printed as 5, and period 1h printed as 60);
I've tried:
but none of both give me the expected results..
Do you know how to obtain?
It is possible to convert ENUM_TIMEFRAMES into integer or string
as we do for IntegerToString or StringToInteger? (something "like" ENUM_TIMEFRAMEStoInteger ??)
Thanks