Multi timeframe

 
Hello, I have been trying to develop a function for some time but unfortunately I fail. My goal is that if I have a candlestick at 23:56 on the M1 chart, it will be at 23:55 on the M5 chart. And at the M15 Chart then at 23:45 o'clock and so on. Many thanks
 

Jackie9136:
I have been trying to develop a function for some time but unfortunately I fail.

My goal is that if I have a candlestick at 23:56 on the M1 chart, it will be at 23:55 on the M5 chart. And at the M15 Chart then at 23:45 o'clock and so on.

  1. You fail: "Doesn't work" is meaningless - just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires - meaningless. We can't see your broken code. There are no mind readers here and our crystal balls are cracked.

  2. That is not a goal. That is what the chart are.

  3. Show us on the forum, your attempt (using CODE button) and state the nature of your problem. There are no mind readers here and our crystal balls are cracked.
 
If the M1 candlestick is at 23:56 and I change to the M5 chart, then it should be calculated in which M5 candlestick the M1 candlestick is located.
 
Documentation on MQL5: Timeseries and Indicators Access / iBarShift
Documentation on MQL5: Timeseries and Indicators Access / iBarShift
  • www.mql5.com
//| Script program start function                                    | //