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

PlotColors changes plot style

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

    PlotColors changes plot style

    PlotColors works just fine for changing the colors, however, it also changes my plot lines back to solid. Some of my plot lines are thicker than others. The thickness appears to be unaffected, but the style always reverts back to solid. I am sure it is something simple.

    for( i=0; i<6; i++)
    {
    Values[i].Set( plot_history[i][0] );

    if( Rising( Values[i] ) ) PlotColors[i][0] = short_up_color;
    else if( Falling( Values[i] ) ) PlotColors[i][0] = short_down_color;
    }

    #2
    Hello,

    Thank you for the question.

    Can you please post your initialize section where you create the plots? I would like to see what you are doing so I can test this on my end.

    If this is a short script you can attach the entire script if you would like, otherwise please provide the lines in your Initialize so I can test this.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      From Initialize()

      plot_history = new DataSeries[6];

      for( i=0; i<6; i++ )
      {
      Add( new Plot( short_up_color, PlotStyle.Line, "Plot" + i.ToString() ) );
      plot_history[i] = new DataSeries( this );
      }

      Plots[0 ].Pen.Width = 3;
      Plots[0 ].Pen.DashPattern = new float[]{3.0F, 1.0F};

      Comment


        #4
        Hello,

        Thank you for providing that.

        It looks like the PlotColors specifically is overriding the Line to color it so when using a DashStyle it is overridden.

        In this situation to both color the plot using PlotColors and use a Dashed line, you would need to use one of the pre-defined types such as Hash, Block, Dot or Cross.

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Pattontje, Yesterday, 02:10 PM
        2 responses
        14 views
        0 likes
        Last Post Pattontje  
        Started by flybuzz, 04-21-2024, 04:07 PM
        17 responses
        229 views
        0 likes
        Last Post TradingLoss  
        Started by agclub, 04-21-2024, 08:57 PM
        3 responses
        17 views
        0 likes
        Last Post TradingLoss  
        Started by TradingLoss, 04-21-2024, 04:32 PM
        4 responses
        43 views
        2 likes
        Last Post TradingLoss  
        Started by cre8able, 04-17-2024, 04:16 PM
        6 responses
        56 views
        0 likes
        Last Post cre8able  
        Working...
        X