troojansafir:
My code is the following ...
chart time frame is D1.
whats happening?
when did 16408 start?
what return Period() function?
i think Period() function returned timeframe of the current chart.(for this=D1)
thanks lot
Period() is an enumeration try the code below and you will see.
If you want the physical period duration try using PeriodSeconds()
Print("Period is: " + EnumToString(Period())); Print("Period Seconds are: " + PeriodSeconds()); // RESULTS // Period is: PERIOD_M5 // Period Seconds are: 300
tnx lot
string as_string(ENUM_TIMEFRAMES period){ if(period == PERIOD_CURRENT) period = (ENUM_TIMEFRAMES) _Period; string period_xxx = EnumToString(period); // PERIOD_XXX return StringSubstr(period_xxx, 7); // XXX }
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
My code is the following ...
chart time frame is D1.
whats happening?
when did 16408 start?
what return Period() function?
i think Period() function returned timeframe of the current chart.(for this=D1)
thanks lot