Noob Question

 

Hello to Everyone,

Question, are a some difference between _Period, Period(), Current Period?, because they look the same.


Thanks in advanced!


Reggards!

 
No.
 
fdesu :

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


 
Alexandr Bryzgalov:

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! :)

 
Comments that do not relate to this topic, have been moved to "Off Topic Posts".
Reason: