Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 andrewtrades, Today, 04:57 PM
        1 response
        8 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by chbruno, Today, 04:10 PM
        0 responses
        6 views
        0 likes
        Last Post chbruno
        by chbruno
         
        Started by josh18955, 03-25-2023, 11:16 AM
        6 responses
        436 views
        0 likes
        Last Post Delerium  
        Started by FAQtrader, Today, 03:35 PM
        0 responses
        7 views
        0 likes
        Last Post FAQtrader  
        Started by rocketman7, Today, 09:41 AM
        5 responses
        19 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Working...
        X