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 Mindset, Today, 06:46 AM
        0 responses
        12 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, Yesterday, 05:21 PM
        0 responses
        18 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        16 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        82 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        50 views
        0 likes
        Last Post PaulMohn  
        Working...
        X