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

Plotting not in panel 1 but want to BarColor panel 1

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

    Plotting not in panel 1 but want to BarColor panel 1

    I have an indicator that plots in a secondary panel (not panel 1). I Wanted to change the price action BarColor in Panel1. Can I do that?

    I tried this but it didn't work:
    Overlay = true;
    DrawOnPricePanel = true;
    BarColor = PlotColors[0][0];
    Overlay = false;
    DrawOnPricePanel = false;

    I can use backcolorall but that is not really what I wanted.

    #2
    Originally posted by ct View Post
    I have an indicator that plots in a secondary panel (not panel 1). I Wanted to change the price action BarColor in Panel1. Can I do that?

    I tried this but it didn't work:
    Overlay = true;
    DrawOnPricePanel = true;
    BarColor = PlotColors[0][0];
    Overlay = false;
    DrawOnPricePanel = false;

    I can use backcolorall but that is not really what I wanted.
    I think the issue is: BarColor = PlotColors[0][0]; Normally one is assigning a color to PlotColor. Try, for testing purposes, BarColor = Color.Blue; to see if that works.

    Comment


      #3
      I had tried that but , it just changed the bar color in the same panel as the indicator. I was trying to set the price action bar color the same as my plot.

      Comment


        #4
        Would this be on a MultiSeries chart then ct? As this simple example works well for me with the indicator plot not being in Panel1 but BarColoring to the price panel.

        Plot0.Set(SMA(20)[0]);

        if (Rising(Plot0))
        {
        PlotColors[0][0] = Color.Blue;
        BarColor = Color.Blue;
        }

        else if (Falling(Plot0))
        {
        PlotColors[0][0] = Color.Red;
        BarColor = Color.Red;
        }

        else
        {
        PlotColors[0][0] = Color.DarkGray;
        BarColor = Color.DarkGray;
        }
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Bertrand

          Yes it is a multi series but the barcolor fires on barsarray[0] the chart time frame.
          Last edited by ct; 02-14-2014, 02:03 PM.

          Comment


            #6
            Correct ct, that's what I would expect in this case. Would unfortunately not be aware of a workaround.
            BertrandNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Vietanhnguyen2hotmailcom, Yesterday, 10:29 AM
            4 responses
            23 views
            0 likes
            Last Post Vietanhnguyen2hotmailcom  
            Started by PhillT, 04-19-2024, 02:16 PM
            4 responses
            36 views
            0 likes
            Last Post PhillT
            by PhillT
             
            Started by ageeholdings, 05-01-2024, 05:22 AM
            5 responses
            37 views
            0 likes
            Last Post ageeholdings  
            Started by reynoldsn, Today, 02:34 PM
            0 responses
            14 views
            0 likes
            Last Post reynoldsn  
            Started by nightstalker, Today, 02:05 PM
            0 responses
            24 views
            0 likes
            Last Post nightstalker  
            Working...
            X