Download MetaTrader 5

OHLC every day at a certain time help

To add comments, please log in or register

Hi all

I am trying to write a script that will give me the OHLC values for the last 3 bars at a certain time  of the  day that runs all the time

How would write the if condition for the time to trigger in the day  and only when the market it open

and print it to the screen.

I have seen this and at a guess I could some how could store the values in an  array 3 times for each bar

I guess I will have to loop it with it counting backwords -1 of  the shift in time

double high=iHigh(Symbol(),PERIOD_H1, Value);

double low=iLow(Symbol(),PERIOD_H1, Value);

double close=iClose(Symbol(),PERIOD_H1, Value);

double open=iOpen(Symbol(),PERIOD_H1, Value);

any help would be much appricated

webstep: any help would be much appricated
  1. Don't paste code
    Play video
    Please edit your post.
    For large amounts of code, attach it

  2. "last 3 bars at a certain time," makes no sense, only one bar is at a certain time.
  3. "a certain time that runs all the time," makes no sense, a certain time can not be all the time.
  4. Help with what? You stated what you need to do, so do it. learn to code it, or pay (Freelance) someone to code it. We're not going to code it for you (although it could happen if you are lucky or the problem is interesting.) We are willing to help you when you post your attempt (using SRC) and the nature of your problem.
Keith Watford
Keith Watford  
I have edited your post to put your code in a SRC box. Please remember to do it yourself in future as it makes it much easier to read
To add comments, please log in or register