Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Removal the MA lines from MACD

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Removal the MA lines from MACD

    Hello.

    I want to remove the two MA lines from MACD default NinjaTrader indicator, keeping only the histogram.

    I tried to erase the two red lines from the MACD's code below, but then the indicator doesn't plot anything.


    Code:
            protected override void Initialize()
            {
                [COLOR=Red]Add(new Plot(Color.Green, "Macd"));[/COLOR]
                [COLOR=Red]Add(new Plot(Color.DarkViolet, "Avg"));[/COLOR]
                Add(new Plot(new Pen(Color.Navy, 2), PlotStyle.Bar, "Diff"));
    
                Add(new Line(Color.DarkGray, 0, "Zero line"));
    
                fastEma    = new DataSeries(this);
                slowEma    = new DataSeries(this);
            }
    I think that may be easy.

    Any help please...?
    Attached Files

    #2
    Originally posted by Armonistas View Post
    Hello.

    I want to remove the two MA lines from MACD default NinjaTrader indicator, keeping only the histogram.

    I tried to erase the two red lines from the MACD's code below, but then the indicator doesn't plot anything.


    Code:
            protected override void Initialize()
            {
                [COLOR=Red]Add(new Plot(Color.Green, "Macd"));[/COLOR]
                [COLOR=Red]Add(new Plot(Color.DarkViolet, "Avg"));[/COLOR]
                Add(new Plot(new Pen(Color.Navy, 2), PlotStyle.Bar, "Diff"));
    
                Add(new Line(Color.DarkGray, 0, "Zero line"));
    
                fastEma    = new DataSeries(this);
                slowEma    = new DataSeries(this);
            }
    I think that may be easy.

    Any help please...?
    Hi Armonistas,

    The easiest and quickest way is to change the color of them to transparent.
    Then you will not see them .

    Cheers,

    Comment


      #3
      Thank you astra, it works!

      It was so simple.
      I had not even thought it.

      Comment


        #4
        Armonistas,

        You may find the MACDUpDownColor indicator even more visually useful.

        Here is this link:




        Best wishes,
        astra

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        155 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        90 views
        1 like
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        137 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        130 views
        1 like
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        107 views
        0 likes
        Last Post CarlTrading  
        Working...
        X