Timestamps of the Open/High/Low/Close prices

 
Dear all,

is it possible to get the timestamps of the Open/High/Low/Close prices of a bar?

Background is to determine whether the Close-Price is recovering from a Low-Price or falling down from a High-Price.

Best regards
Dirk
 
sahl04:
Dear all,

is it possible to get the timestamps of the Open/High/Low/Close prices of a bar?


No, not from any historical data. You can obviously code a solution that records and stores it for you . . . you could get it from data that you can get as tick data, Dukascopy for example.
 
sahl04:
Dear all,

is it possible to get the timestamps of the Open/High/Low/Close prices of a bar?

Background is to determine whether the Close-Price is recovering from a Low-Price or falling down from a High-Price.

Best regards
Dirk

You could check the one minute bars for the highest high and lowest low using the iHighest(), iLowest() functions. The open and close are always going to be the times of your bar open/close on whatever timeframe you are using.

 
paul_hughes:

You could check the one minute bars for the highest high and lowest low using the iHighest(), iLowest() functions. The open and close are always going to be the times of your bar open/close on whatever timeframe you are using.

You do not know when the bar closed . . . you can get he bar open time and that is it . . .
 
Yes you can but for high and low it will be a bit harder for close of previous bar you can get current hour using Hour() function if say you are using H1 timeframe for open time it will be Hour()-1 . But you wont need timestamp to determine wether close price is recovering or falling just do a comparison e.g. if iclose of previous bar is greater than or lower than ihigh or ilow of that bar. If a is the current hour, x is the bar shift, o is the open time of a bar and c the close time for previous bars then use the formula c=a-(x-1) while to get open time for previous bars use the formula o=x-1 in your EA if you must.
 
RaptorUK:
No, not from any historical data. You can obviously code a solution that records and stores it for you . . . you could get it from data that you can get as tick data, Dukascopy for example.
 
tonny:
Yes you can but for high and low it will be a bit harder for close of previous bar you can get current hour using Hour() function if say you are using H1 timeframe for open time it will be Hour()-1 . But you wont need timestamp to determine wether close price is recovering or falling just do a comparison e.g. if iclose of previous bar is greater than or lower than ihigh or ilow of that bar. If a is the current hour, x is the bar shift, o is the open time of a bar and c the close time for previous bars then use the formula c=a-(x-1) while to get open time for previous bars use the formula o=x-1 in your EA if you must.
NO . . . you cannot. The Open is the bar open time, that is a given . . but the High, Low and Close times cannot be determined without tick data . . . they can be approximated with M1 but it is an approximation . . .
 
The open is the bar open time yes and at the same time its previous bar close time since immediately one bar closes the next opens.
 
tonny:
The open is the bar open time yes and at the same time its previous bar close time since immediately one bar closes the next opens.
Time[] is the start of the bar, on a H1 bar it is the start of the hour. The time of the open price is the time of the first tick in that bar and that could be minutes later, just as the last tick of the previous bar (the close) could be minutes earlier.
 
tonny:
The open is the bar open time yes and at the same time its previous bar close time since immediately one bar closes the next opens.
Not the case . . . it's possible to have no ticks for several minutes sometimes on some pairs, if this happens at the end of a bar it's close price time is not the same as the next bars open time.
 
RaptorUK:
You do not know when the bar closed . . . you can get he bar open time and that is it . . .

But is it not the case that for whichever time frame you're using, the Close of the bar must always occur at a pre-determined number of minutes following the open of the bar?

Reason: