get the distance of candles

 

drawing horizontal  line on chart

if (MA1>M2) && High[1] > Low[4];

    from High[1] to Low[4];

  OBJ_HLINE(High[], LOW[]); on pervious day.

 Print(High[1] to Low[4], ""); 

Pls help to get horizontal line of previous day on chart. 

Documentation on MQL5: Constants, Enumerations and Structures / Indicator Constants / Drawing Styles
Documentation on MQL5: Constants, Enumerations and Structures / Indicator Constants / Drawing Styles
  • www.mql5.com
Drawing Styles - Indicator Constants - Constants, Enumerations and Structures - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
  1. Please edit your (original) post and use the CODE button (or Alt+S)! (For large amounts of code, attach it.)
              General rules and best pratices of the Forum. - General - MQL5 programming forum (2019)
              Messages Editor

  2. Do not post code that will not even compile.

              MT4: Learn to code it.
              MT5: Begin learning to code it.

    If you don't learn MQL4/5, there is no common language for us to communicate. If we tell you what you need, you can't code it. If we give you the code, you don't know how to integrate it into your code.

  3. Help you with what? You haven't stated a problem, you stated a want. Show us your attempt (using the CODE button) and state the nature of your difficulty.
              No free help (2017)

    Or pay someone. Top of every page is the link Freelance.
              Hiring to write script - General - MQL5 programming forum (2018)

    We're not going to code it for you (although it could happen if you are lucky or the issue is interesting).
              No free help (2017)

  4. Where do you find the beginning of today, beginning of yesterday? Where do you find the highest high/lowest low. Where do you create or move your HLine?
              Find bar of the same time one day ago - MQL4 programming forum #1 & #6 (2017)

Reason: