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 rhyminkevin, Today, 04:58 PM
          1 response
          30 views
          0 likes
          Last Post Anfedport  
          Started by iceman2018, Today, 05:07 PM
          0 responses
          4 views
          0 likes
          Last Post iceman2018  
          Started by lightsun47, Today, 03:51 PM
          0 responses
          7 views
          0 likes
          Last Post lightsun47  
          Started by 00nevest, Today, 02:27 PM
          1 response
          14 views
          0 likes
          Last Post 00nevest  
          Started by futtrader, 04-21-2024, 01:50 AM
          4 responses
          49 views
          0 likes
          Last Post futtrader  
          Working...
          X