Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

up and donw colors on indicators and ma's

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

    #16
    Hello marcus2300,

    I am not sure we are looking at the same indicator. Your databox is showing multiple plots for MACD, when some times there is a plot value and sometimes there is not.

    I have been testing the User App Share submission below:

    https://ninjatraderecosystem.com/use...macd-updown-2/

    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.


    Which will only colorize the main MACD plot if the current plot value is greater than the last value or less than the last value.

    Below is the logic that checks if the main MACD line is rising or falling. It only colors one plot and there is not case for both the conditions to be true at once. So the issue of seeing "two colors at once" may be due to the specific version of the indicator you are using.

    Code:
     // Plots MACD color when rising or falling
    if (IsRising(MACD(Fast, Slow, Smooth)))
    {
        PlotBrushes[0][0] = Uptick;
    }
    else if (IsFalling(MACD(Fast, Slow, Smooth)))
    {
        PlotBrushes[0][0] = Downtick;
    }
    I also do not see cases where the plot is incorrectly colored. To check that, you would use the data box look at the current and pervious plot values for the same plot. (if the indicator uses two plots to show different colors this would not work the same.) If the current plot value is greater than the previous, IsRising() is true, and the bar gets colored. The bar gets colored once and even if it did set PlotBrushes again, the color would be overwritten and there would not be a "two colors at once case."


    Comment


      #17
      Originally posted by NinjaTrader_Jim View Post
      Hello marcus2300,

      I am not sure we are looking at the same indicator. Your databox is showing multiple plots for MACD, when some times there is a plot value and sometimes there is not.

      I have been testing the User App Share submission below:

      https://ninjatraderecosystem.com/use...macd-updown-2/

      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.


      Which will only colorize the main MACD plot if the current plot value is greater than the last value or less than the last value.

      Below is the logic that checks if the main MACD line is rising or falling. It only colors one plot and there is not case for both the conditions to be true at once. So the issue of seeing "two colors at once" may be due to the specific version of the indicator you are using.

      Code:
       // Plots MACD color when rising or falling
      if (IsRising(MACD(Fast, Slow, Smooth)))
      {
      PlotBrushes[0][0] = Uptick;
      }
      else if (IsFalling(MACD(Fast, Slow, Smooth)))
      {
      PlotBrushes[0][0] = Downtick;
      }
      I also do not see cases where the plot is incorrectly colored. To check that, you would use the data box look at the current and pervious plot values for the same plot. (if the indicator uses two plots to show different colors this would not work the same.) If the current plot value is greater than the previous, IsRising() is true, and the bar gets colored. The bar gets colored once and even if it did set PlotBrushes again, the color would be overwritten and there would not be a "two colors at once case."

      Hi Jim,
      thanks for reply. My understanding is this MACD up-down indicator changes the color of plot line based on difference between current value and one bar prior, right?
      Is there an indicator that changes the color of price bar on the main panel instead of plot line?

      Comment


        #18
        Hello judysamnt7,

        You are welcome to check the User App Share for free indicators. Mentioning if there is a specific indicator that changes chart bar colors based on MACD colors may be a bit tricky since it is a pretty specific behavior.

        If you wanted to modify the MACD Up Down indicator I linked so it colors the main chart bars instead of the MACD line, you can download the indicator I linked and you can replace the usage of PlotBrushes with BarBrushes

        BarBrushes - https://ninjatrader.com/support/help...barbrushes.htm

        Since this thread is originally for NinjaTrader 7, please direct any NinjaTrader 8 questions to new threads in the proper NinjaTrader 8 forums. (This helps to keep the forum organized and so users browsing can easily find answers to their questions.)

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        556 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        324 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        545 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        547 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X