Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator

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

    Indicator

    I'm looking for a MACD that colors the bars when the avg is above macd line and above zero line and opposite for below zero line

    #2
    Welcome to the forums sinclair54!

    Many custom indicators and modifications of the MACD indicator can be found on our User App Share. I have provided a link to a search of MACD variants below. You may find several different customized indicators to choose from here.



    The link above is publicly available.

    The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.


    We look forward to assisting.

    Comment


      #3
      I looked at all and there was not anything I would like to have. can you take one and tweak it for me. Thanks

      Comment


        #4
        Hello sinclair54,

        Our support staff would not provide the code modifications on your behalf, but we would be happy to show you what modifications you would need to make so you can customize your own indicators.

        You can open the MACD indicator in the NinjaScript Editor, right click, and then select Save As to create a copy that you can modify.

        Note that our current plot values are Value[0], Avg[0], and Diff[0].

        Your comparisons involve comparing the MACD plot (Value[0]) to the Avg plot (Avg[0]) and then changing the color of the Diff plot. Note that the Diff plot is the third plot that is added with AddPlot in State.SetDefaults.

        You can then make comparisons between the MACD and Avg plots to see if the MACD plot is greater than the Avg plot or the MACD plot is less than the Avg plot. Then you can change PlotBrushes[2][0] to change the current brush color for the Diff plot (3rd plot added) for your desired color.

        For example:

        Code:
        if (Value[0] > Avg[0] && Value[0] < 0)
            PlotBrushes[2][0] = Brushes.Red;
        Some basic programming concepts can be found in our NinjaTrader 7 Help Guide, but you can find more robust C# education resources external to NinjaTrader. Changing the colors of indicator in your own way would be a good introductory exercise, but if this is too difficult, you can always consider enlisting the services of a NinjaScript Consultant to have the code written for you. If that interests you, please let us know and we can have a colleague follow up with more information.

        Basic Programming Concepts - https://ninjatrader.com/support/help...g_concepts.htm

        PlotBrushes - https://ninjatrader.com/support/help...lotbrushes.htm

        Let us know if there is anything else we can do to help.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        634 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        364 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        105 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        567 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        568 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X