use of DRAW_NONE from mql4 to mql5

 

Good evening,


I'm in the process of converting my MT4 indicators to MT5. In MT4 I have an indicator that draws 5 lines in M5 en 3 lines in H1. The code I use is:

if(Period() == PERIOD_H1) {Show_InnerEnv = false;}
   
    
//---- drawing settings MainLines
   SetIndexStyle(0,Show_OuterEnv ? DRAW_LINE : DRAW_NONE,LineStyle_OuterEnv,LineWidth_OuterEnv,clrLimeGreen); 
   SetIndexStyle(1,Show_OuterEnv ? DRAW_LINE : DRAW_NONE,LineStyle_OuterEnv,LineWidth_OuterEnv,clrRed);
   SetIndexStyle(2,Show_MA ? DRAW_LINE : DRAW_NONE,LineStyle_MA,LineWidth_MA,clrDeepSkyBlue);
   SetIndexStyle(3,Show_InnerEnv ? DRAW_LINE : DRAW_NONE,LineStyle_InnerEnv,LineWidth_InnerEnv,clrLimeGreen);
   SetIndexStyle(4,Show_InnerEnv ? DRAW_LINE : DRAW_NONE,LineStyle_InnerEnv,LineWidth_InnerEnv,clrRed);

 Can anyone tell me how to code this in MT5, I would like to keep using one indicator for the different TF's instead of using several to get the same result.


I found this, but I don't see this is a solution to my question: https://www.mql5.com/en/docs/customind/indicators_examples/draw_none


Best regards,


Robert

Documentation on MQL5: Custom Indicators / Indicator Styles in Examples / DRAW_NONE
Documentation on MQL5: Custom Indicators / Indicator Styles in Examples / DRAW_NONE
  • www.mql5.com
DRAW_NONE - Indicator Styles in Examples - Custom Indicators - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 

Thank you Fernando, I will.


Have a nice day,


Robert