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 alifarahani, Today, 09:40 AM
        4 responses
        21 views
        0 likes
        Last Post alifarahani  
        Started by gentlebenthebear, Today, 01:30 AM
        3 responses
        16 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by PhillT, Today, 02:16 PM
        2 responses
        7 views
        0 likes
        Last Post PhillT
        by PhillT
         
        Started by Kaledus, Today, 01:29 PM
        4 responses
        11 views
        0 likes
        Last Post Kaledus
        by Kaledus
         
        Started by frankthearm, Yesterday, 09:08 AM
        14 responses
        47 views
        0 likes
        Last Post NinjaTrader_Clayton  
        Working...
        X