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?
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.
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.
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.
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.
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.
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.
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?
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