Refering to D1 opening price in M15 chart?

 
Need an idea on how I can refer to daily opening price from M15 chart. My EA is attached to M15 chart, is there any way to access D1 opening price info at any time? -> MQL4
 
iOpen can do that.
Documentation on MQL5: Timeseries and Indicators Access / iOpen
Documentation on MQL5: Timeseries and Indicators Access / iOpen
  • www.mql5.com
iOpen - Timeseries and Indicators Access - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
SamSuleymanov: Need an idea on how I can refer to daily opening price from M15 chart. My EA is attached to M15 chart, is there any way to access D1 opening price info at any time? -> MQL4
  1. Why did you post your MT4 question in the MT5 General section instead of the MQL4 section, (bottom of the Root page)?
              General rules and best pratices of the Forum. - General - MQL5 programming forum?
    Next time, post in the correct place. The moderators will likely move this thread there soon.

    1. Perhaps you should read the manual. iOpen Get the D1 shift for the corresponding M15 shift and read it.
         How To Ask Questions The Smart Way. 2004
            How To Interpret Answers.
               RTFM and STFW: How To Tell You've Seriously Screwed Up.

    2. On MT4: Unless the current chart is that specific symbol(s)/TF(s) referenced, you must handle 4066/4073 errors before accessing candle/indicator values.
                Download history in MQL4 EA - Forex Calendar - MQL4 programming forum - Page 3 #26.4 2019.05.20

  2. Or to avoid having to load the D1. Compute the start of the day, get the shift, and just read it.

    datetime  bod = date(Time[i]);
    int      iBod = iBarShift(_Symbol, _Period, bod);
    double   openD1 = Open[iBod];
              Find bar of the same time one day ago - MQL4 programming forum 2017.10.06
 
Panteleimon Mar Andreadis:
iOpen can do that.
Thank you! Worked like a charm!
 
William Roeder:
  1. Why did you post your MT4 question in the MT5 General section instead of the MQL4 section, (bottom of the Root page)?
              General rules and best pratices of the Forum. - General - MQL5 programming forum?
    Next time, post in the correct place. The moderators will likely move this thread there soon.

    1. Perhaps you should read the manual. iOpen Get the D1 shift for the corresponding M15 shift and read it.
         How To Ask Questions The Smart Way. 2004
            How To Interpret Answers.
               RTFM and STFW: How To Tell You've Seriously Screwed Up.

    2. On MT4: Unless the current chart is that specific symbol(s)/TF(s) referenced, you must handle 4066/4073 errors before accessing candle/indicator values.
                Download history in MQL4 EA - Forex Calendar - MQL4 programming forum - Page 3 #26.4 2019.05.20

  2. Or to avoid having to load the D1. Compute the start of the day, get the shift, and just read it.

              Find bar of the same time one day ago - MQL4 programming forum 2017.10.06
Thank you for the sugestion, I'll post MQL4 related questions in MQL4 forum the next time. Meantime, iOpen solved my problem.