Hello to Everyone,
Question, are a some difference between _Period, Period(), Current Period?, because they look the same.
Thanks in advanced!
Reggards!
There is no difference in the displayed value.
But in the first case it is a predefined variable, in the second - a function, in the third - a constant.
void OnStart()
{
if(_Period!=PERIOD_CURRENT)Print("_Period!=PERIOD_CURRENT");
}
2021.04.26 11:38:06.544 Period ETHUSD,Daily: _Period!=PERIOD_CURRENT
There is no difference in the displayed value.
But in the first case it is a predefined variable, in the second - a function, in the third - a constant.
void OnStart()
{
if(_Period!=PERIOD_CURRENT)Print("_Period!=PERIOD_CURRENT");
}
2021.04.26 11:38:06.544 Period ETHUSD,Daily: _Period!=PERIOD_CURRENT
Thanks! :)
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello to Everyone,
Question, are a some difference between _Period, Period(), Current Period?, because they look the same.
Thanks in advanced!
Reggards!