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 Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        670 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        379 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        111 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        575 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        582 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X