Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Hiding the Primary Data Series

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

    Hiding the Primary Data Series

    There is a nice work around for hiding the primary DataSeries for an "Indicator only display" by turning all the candle parameters for the dataseries to Transparent. ie. Outline, Wicks, UpColor, DownColor.

    After doing that you can plot your indicator in Panel 1 and the data series scale is removed and the indicator is plotted sans candles. That is nice.

    The question is can I do that in NinjaScript. It appears that I have two properties I can set, BarColor and CandleOutlineColor. I can set these both to transparent and the candles sure enough disappear but the price scale remains preventing my indicator from displaying correctly.
    Last edited by redliontrader; 03-20-2011, 09:15 AM.

    #2
    Originally posted by redliontrader View Post
    There is a nice work around for hiding the primary DataSeries for an "Indicator only display" by turning all the candle parameters for the dataseries to Transparent. ie. Outline, Wicks, UpColor, DownColor.

    After doing that you can plot your indicator in Panel 1 and the data series scale is removed and the indicator is plotted sans candles. That is nice.

    The question is can I do that in NinjaScript. It appears that I have two properties I can set, BarColor and CandleOutlineColor. I can set these both to transparent and the candles sure enough disappear but the price scale remains preventing my indicator from displaying correctly.
    You would need to change the ScaleJustification of the indicator to Overlay

    Code:
    ScaleJustification = ScaleJustification.Overlay
    ;

    Comment


      #3
      Thanks Koganam..

      That didn't quite do it. It appears that I need to turn the primary data series justification to Overlay and set the indicators justification to Right. Is there a way to set the Primary Data series justification from and indicator?

      Comment


        #4
        Originally posted by redliontrader View Post
        Thanks Koganam..

        That didn't quite do it. It appears that I need to turn the primary data series justification to Overlay and set the indicators justification to Right. Is there a way to set the Primary Data series justification from and indicator?
        While that may be possible, simpler might be to set your candles' properties to the chart background color, achieving the same effect as transparency, but without its side effects.



        Code:
        Color colorFauxTransparentColor = ChartControl.BackColor;
        
        if (ChartControl != null 
        	&& ChartControl.ChartStyle.DownColor != Color.Transparent
        	&& ChartControl.ChartStyle.UpColor != Color.Transparent
        	&& ChartControl.ChartStyle.Pen.Color != Color.Transparent
        	&& ChartControl.ChartStyle.Pen2.Color != Color.Transparent)
        		{
        			ChartControl.ChartStyle.DownColor	= colorFauxTransparentColor; 
        			ChartControl.ChartStyle.UpColor	= colorFauxTransparentColor; 
        			ChartControl.ChartStyle.Pen.Color	= colorFauxTransparentColor; 
        			ChartControl.ChartStyle.Pen2.Color	= colorFauxTransparentColor; 
        		}
        Unfortunately, NT support will not answer any questions about ChartControl use.
        Last edited by koganam; 03-20-2011, 07:25 PM.

        Comment


          #5
          Good stuff

          Thanks, something new to play with.

          Thanks so much I will report back..

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by helpwanted, Today, 03:06 AM
          1 response
          11 views
          0 likes
          Last Post sarafuenonly123  
          Started by Brevo, Today, 01:45 AM
          0 responses
          9 views
          0 likes
          Last Post Brevo
          by Brevo
           
          Started by aussugardefender, Today, 01:07 AM
          0 responses
          5 views
          0 likes
          Last Post aussugardefender  
          Started by pvincent, 06-23-2022, 12:53 PM
          14 responses
          242 views
          0 likes
          Last Post Nyman
          by Nyman
           
          Started by TraderG23, 12-08-2023, 07:56 AM
          9 responses
          387 views
          1 like
          Last Post Gavini
          by Gavini
           
          Working...
          X