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

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?
    BertrandNinjaTrader Customer Service

    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
        BertrandNinjaTrader Customer Service

        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 Fitspressorest, Today, 01:38 PM
                0 responses
                2 views
                0 likes
                Last Post Fitspressorest  
                Started by Jonker, Today, 01:19 PM
                0 responses
                2 views
                0 likes
                Last Post Jonker
                by Jonker
                 
                Started by futtrader, Today, 01:16 PM
                0 responses
                6 views
                0 likes
                Last Post futtrader  
                Started by Segwin, 05-07-2018, 02:15 PM
                14 responses
                1,791 views
                0 likes
                Last Post aligator  
                Started by Jimmyk, 01-26-2018, 05:19 AM
                6 responses
                844 views
                0 likes
                Last Post emuns
                by emuns
                 
                Working...
                X