Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Change Color in AddPlot

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

    Change Color in AddPlot

    hallo,

    AddPlot(colorBar, "Conta");

    Is possible to change colorBar in OnBarUpdate? (it's to color of plot)
    Code:
        protected override void OnBarUpdate()
         {
                if (flag < 0) colorBar = Brushes.Azure;
                    else colorBar = Brushes.Yellow;
    
         MtUp[0] =flag;   
       }
    i try it but it don't works
    Last edited by esignal; 03-06-2016, 05:42 AM.

    #2
    Originally posted by esignal View Post
    hallo,

    AddPlot(colorBar, "Conta");

    Is possible to change colorBar in OnBarUpdate? (it's to color of plot)
    Code:
        protected override void OnBarUpdate()
         {
                if (flag < 0) colorBar = Brushes.Azure;
                    else colorBar = Brushes.Yellow;
    
         MtUp[0] =flag;   
       }
    i try it but it don't works
    It helps tremendously if we use the correct syntax, as stated in the documentation.

    ref: http://ninjatrader.com/support/helpG...s/barbrush.htm

    Comment


      #3
      yes..now i read it....but you see pics below



      when i write :

      AddPlot(colorBar, "Conta");

      how can i refer to it?

      Comment


        #4
        Originally posted by esignal View Post
        yes..now i read it....but you see pics below



        when i write :

        AddPlot(colorBar, "Conta");

        how can i refer to it?
        Now I see you mentioned AddPlot(), but you asked the question in a manner that made it seem that you were asking about coloring a bar, not a plot of an indicator. My fault; I should read more carefully, especially as I come down pretty hard on they that do not.

        Refer to PlotBrushes, to change the color of a plot on a specific bar.

        ref: http://ninjatrader.com/support/helpG...lotbrushes.htm
        Last edited by koganam; 03-07-2016, 12:26 PM.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        81 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        46 views
        0 likes
        Last Post PaulMohn  
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        169 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        101 views
        1 like
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        175 views
        2 likes
        Last Post CaptainJack  
        Working...
        X