specify time with iHighest ect - page 2

 

"There are not 24 H1 bars in a day." A far more correct way to say this is: "Don't count on there always being 24 H1 bars on different days or different brokers etc.." or something like that. On Oanda, until they change something or there is a glitch or something, there are 24 H1 bars every single day and in fact from 7AM Friday to 7AM Monday there are 24 H1 bars!! The weekend gets cut out perfectly. Ok, so Friday there are 16 H1 bars and Sunday there are 8 H1 bars, but I need to combine them anyway and MT4 is fine with that. I made and used a script in MT4 to write 10 weeks of custom D1(@7AM) OHLC data to a .CSV file. I compared and imported that into my excel file where I do calculations. The only differences were where I made typos putting in the data daily over the last few months. I only used iBarShift once in the beginning to find my distance from 7AM. I used multiples of 24 per day for how many days back I wish. It treated the 16 Friday H1 bars and 8 Sunday bars as a continuous set of 24 H1 bars.


Oanda did have extended hours of trading after the normal hours years ago, so this would have been more complicated then. I don't know how this would be at different brokers now. I see 120 H1 bars, but 6 D1 bars per week on Oanda now. Oandas D1 bars are at midnight New York I think. I didn't check other time frames yet.

I hope this helps someone.

Reason: