Time[0]

To add comments, please log in or register
Trader1529
302
Trader1529  

Good morning everyone.

I need to know what is the function "Time[0]" in MQL4 and what it do.

Can someone please help me?

Keith Watford
Moderator
20477
Keith Watford  
It is the opening time of the current bar in the chart time-frame.
Trader1529
302
Trader1529  
Keith Watford:
It is the opening time of the current bar in the chart time-frame.

If I modify it in "Time[1]" what will change? Can you please make an example with timeframe H1?

Jefferson Metha
2263
Jefferson Metha  
Trader1529:

If I modify it in "Time[1]" what will change? Can you please make an example with timeframe H1?

https://www.mql5.com/en/docs/series/itime 

I thing the word SEARCH can assist you here very much 

even if u open your metaEditor and type iTime then press F1 you will be answered to satisfaction. 

I also had that very same question a year ago, however metaeditor inbuilt reference answered it for me

Documentation on MQL5: Timeseries and Indicators Access / iTime
Documentation on MQL5: Timeseries and Indicators Access / iTime
  • www.mql5.com
//| Script program start function                                    | //
William Roeder
20228
William Roeder  
Trader1529: If I modify it in "Time[1]" what will change? Can you please make an example with timeframe H1?
  1. Perhaps you should read the manual. Open - Predefined Variables - MQL4 Reference.
  2. If the chart is timeframe H1, the example is in the manual. Otherwise, it's not possible — read the "See also."
Trader1529
302
Trader1529  
William Roeder:
  1. Perhaps you should read the manual. Open - Predefined Variables - MQL4 Reference.
  2. If the chart is timeframe H1, the example is in the manual. Otherwise, it's not possible — read the "See also."

On "See also" I read the iTime function, but not "Time[0]"

Yohana Parmi
6949
Yohana Parmi  
Trader1529:

Good morning everyone.

I need to know what is the function "Time[0]" in MQL4 and what it do.

Can someone please help me?

Hi,

Keith has answered it.

The sequence of bar numbers, read as a series from right to left,
-- starts from 0 on the bar (candle) that is currently moving.

Visually it can be seen like this:

Trader1529:

If I modify it in "Time[1]" what will change? Can you please make an example with timeframe H1?

You will get time value on 2nd bar (seen from the right) that have sequence number 1.

Trader1529
302
Trader1529  
Yohana Parmi:

Hi,

Keith has answered it.

The sequence of bar numbers, read as a series from right to left,
-- starts from 0 on the bar (candle) that is currently moving.

Visually it can be seen like this:

You will get time value on 2nd bar (seen from the right) that have sequence number 1.

Now it's all clear. Thank you very much

To add comments, please log in or register