Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

MultiColor Plots

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

    MultiColor Plots

    I'm having problems with bars plotting a wrong color on multicolored plots.

    Having read a few of the threads concerning MultiColor Plots, I came across the sample code "SampleMultiColoredPlot" which uses the reset method. I ran the sample code on a chart and still found bars that had multiple values in the Data Box.

    To illustrate the problem, I put together a simple indicator that measures the amount of change in a SMA(20). The indicator plots a different color for the following:

    Up and Increasing
    Up and Decreasing
    Down and Increasing
    Down and decreasing

    Attached is a chart pic of the indicator on 2 different panels, 1 as a line plot and one as a bar. You can see numerous discrepancies bewteen the 2. Also, the arrow shows where the SMA rate of change decreased, but no corresponding change in plot color.

    I have also attached the code for this indicator. Am I doing something wrong here?

    Thx,

    BB
    Attached Files

    #2
    Hi Brad, we'll look into it thanks for the report. Which NT release are you working with here?

    Comment


      #3
      Thx, NT7 Beta 23

      Comment


        #4
        For NT7 you would want to use the approach outlined here - http://www.ninjatrader.com/support/f...89&postcount=1

        Now we would offer access to the PlotColor series / array - http://www.ninjatrader.com/support/h...plotcolors.htm

        Comment


          #5
          Thanks Bertrand, that works fine. I wasn't aware of the new PlotColor. Question, I searched on MultiColor and Plot. Why didn't the post from Ray come up? Do I need to search in a specific area for NT7?

          Comment


            #6
            Hi Brad,

            You can search all forums or particular sections with the advanced searc. A google search often works pretty well too.

            Ryan M.NinjaTrader Customer Service

            Comment


              #7
              PlotColors and Min / Max

              Hello,

              I'm attempting to using line values for Min / Max similar to:

              Code:
              [FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]
              if[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2][COLOR=#000000](CurrentBar == [/COLOR][/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]0[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2][COLOR=#000000])[/COLOR]
              {
              Plots[[/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]0[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]].Min = Lines[[/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]0[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]].Value;
              Plots[[/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]0[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]].Max = Lines[[/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]1[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]].Value;
              Plots[[/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]2[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]].Min = Lines[[/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]1[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]].Value;
              Plots[[/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]3[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]].Max = Lines[[/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]0[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]].Value;
              }
              
              [/SIZE][/FONT][/SIZE][/FONT]
              I understand using Rising/Falling or < > for PlotColors[0][0]. However, I'm struggling with the PlotColors[0][0] to make it work with the Min/Max values.
              Are these two methods compatible to get colored plots?
              thanks,
              Kirk

              Comment


                #8
                Kirk, Min/Max and colors aren't compatible. Colors are defined as colors and min/max are defined as numbers so I'm not really sure how you could compare those.
                AustinNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by sjsj2732, 03-23-2026, 04:31 AM
                0 responses
                42 views
                0 likes
                Last Post sjsj2732  
                Started by NullPointStrategies, 03-13-2026, 05:17 AM
                0 responses
                295 views
                0 likes
                Last Post NullPointStrategies  
                Started by argusthome, 03-08-2026, 10:06 AM
                0 responses
                290 views
                0 likes
                Last Post argusthome  
                Started by NabilKhattabi, 03-06-2026, 11:18 AM
                0 responses
                135 views
                1 like
                Last Post NabilKhattabi  
                Started by Deep42, 03-06-2026, 12:28 AM
                0 responses
                98 views
                0 likes
                Last Post Deep42
                by Deep42
                 
                Working...
                X