read the book again
int Period( | ) |
Print("Period is ", Period());
Timeframe of the chart (chart period). It can be any of the following values:
Constant | Value | Description |
---|---|---|
PERIOD_M1 | 1 | 1 minute. |
PERIOD_M5 | 5 | 5 minutes. |
PERIOD_M15 | 15 | 15 minutes. |
PERIOD_M30 | 30 | 30 minutes. |
PERIOD_H1 | 60 | 1 hour. |
PERIOD_H4 | 240 | 4 hour. |
PERIOD_D1 | 1440 | Daily. |
PERIOD_W1 | 10080 | Weekly. |
PERIOD_MN1 | 43200 | Monthly. |
0 (zero) | 0 | Timeframe used on the chart. |
I know this and understood it!
But on my Alpari Account I got sometimes one of the both values I have written:
On the Timeframe M1 the Period()-Functions gives 1 ...or...60 back.
On the Timeframe M15 the Period()-Functions gives 15...or...60 back.
On the Timeframe H1 the Period()-Functions gives 60 ...or...60 back.
On the Timeframe H4 the Period()-Functions gives 240 ...or...60 back.
I get sometimes the right value and sometimes the wrong value at the same timeframe!
On my ActiveTrade Account everything is working well!
What means "period pull down"??? I worked with the tester...
if(TimeFrame==0) TimeF = Period(); else TimeF = TimeFrame; Print("Period(): ", Period());
maybe u have some place in the code that TimeFrame = 60 or TimeF = 60
edit: one more thing
replace:
Print("Period(): ", Period());
with:
Print("Period(): ", TimeF);
What means "period pull down"??? I worked with the tester...


- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
I am programming an indicator and using the function Period().
But it doesn't work really.
On the Timeframe M1 the Period()-Functions gives 1 ...or...60 back.
On the Timeframe M15 the Period()-Functions gives 15...or...60 back.
On the Timeframe H1 the Period()-Functions gives 60 ...or...60 back.
On the Timeframe H4 the Period()-Functions gives 240 ...or...60 back.
...
Why?? What can I do against that?!