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.
    JimNinjaTrader Customer Service

    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.
        JimNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Jimmyk, 01-26-2018, 05:19 AM
        6 responses
        835 views
        0 likes
        Last Post emuns
        by emuns
         
        Started by jxs_xrj, 01-12-2020, 09:49 AM
        6 responses
        3,291 views
        1 like
        Last Post jgualdronc  
        Started by Touch-Ups, Today, 10:36 AM
        0 responses
        10 views
        0 likes
        Last Post Touch-Ups  
        Started by geddyisodin, 04-25-2024, 05:20 AM
        11 responses
        62 views
        0 likes
        Last Post halgo_boulder  
        Started by Option Whisperer, Today, 09:55 AM
        0 responses
        9 views
        0 likes
        Last Post Option Whisperer  
        Working...
        X