• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Color of Candle Body and Candle Outline?

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

    Color of Candle Body and Candle Outline?

    Hi,

    Can you show me the code to take the brushes of candle body (both up and down) and pens of candle outline (if possible, candle wick also)?

    These colors are ones that can be seen and set from Data Series dialog.

    Thanks.
    ninZa
    NinjaTrader Ecosystem Vendor - ninZa.co

    #2
    The CandleStyle, the Body would be:

    ChartBars.Properties.ChartStyle.UpBrush

    The CandleOutline:

    ChartBars.Properties.ChartStyle.Stroke

    The CandleWick:

    ChartBars.Properties.ChartStyle.Stroke2
    MatthewNinjaTrader Product Management

    Comment


      #3
      Originally posted by NinjaTrader_Matthew View Post
      The CandleStyle, the Body would be:

      ChartBars.Properties.ChartStyle.UpBrush

      The CandleOutline:

      ChartBars.Properties.ChartStyle.Stroke

      The CandleWick:

      ChartBars.Properties.ChartStyle.Stroke2
      Not to whine, but I'm curious about this as a general case. Wouldn't it take less than 60 seconds to add properties with meaningful names? And wouldn't that save you many hours of support time in the coming few years, not to mention time and frustration for users? Thanks.

      Comment


        #4
        The objects used for chart styles were made generically so they could be used among all chart styles, rather than have to code for specific chart styles, which we anticipate will only grow as 3rd party developers adapter their own chart styles.

        The properties are very easy to identify now that the ChartStyles are exposed:

        Code:
        			else if (State == State.Configure)
        			{
        				SetPropertyName("BarWidth",		Custom.Resource.NinjaScriptChartStyleBarWidth);
        				SetPropertyName("DownBrush",	Custom.Resource.NinjaScriptChartStyleCandleDownBarsColor);
        				SetPropertyName("UpBrush",		Custom.Resource.NinjaScriptChartStyleCandleUpBarsColor);
        				SetPropertyName("Stroke",		Custom.Resource.NinjaScriptChartStyleCandleOutline);
        				SetPropertyName("Stroke2",		Custom.Resource.NinjaScriptChartStyleCandleWick);
        			}
        MatthewNinjaTrader Product Management

        Comment


          #5
          Originally posted by NinjaTrader_Matthew View Post
          The CandleStyle, the Body would be:

          ChartBars.Properties.ChartStyle.UpBrush

          The CandleOutline:

          ChartBars.Properties.ChartStyle.Stroke

          The CandleWick:

          ChartBars.Properties.ChartStyle.Stroke2
          Thanks. But now the next problem prevents me from conditionally setting colors for candles (after a user clicks a custom toolbar button):

          http://www.ninjatrader.com/support/f...d.php?p=436811
          ninZa
          NinjaTrader Ecosystem Vendor - ninZa.co

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by andrewtrades, Yesterday, 08:24 PM
          2 responses
          15 views
          0 likes
          Last Post NinjaTrader_ChristopherD  
          Started by slbreufdr, Today, 06:31 AM
          0 responses
          2 views
          0 likes
          Last Post slbreufdr  
          Started by authenticx, Yesterday, 10:07 PM
          1 response
          30 views
          0 likes
          Last Post NinjaTrader_PatrickG  
          Started by jeronymite, Today, 05:11 AM
          1 response
          8 views
          0 likes
          Last Post NinjaTrader_Jim  
          Started by Harvard, Yesterday, 11:37 PM
          0 responses
          22 views
          0 likes
          Last Post Harvard
          by Harvard
           
          Working...
          X