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 Taddypole, 04-26-2024, 02:47 PM
          5 responses
          35 views
          0 likes
          Last Post eDanny
          by eDanny
           
          Started by kujista, 04-23-2024, 06:23 AM
          6 responses
          47 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by giulyko00, 04-24-2024, 12:03 PM
          7 responses
          36 views
          0 likes
          Last Post eDanny
          by eDanny
           
          Started by NM_eFe, Today, 10:13 AM
          0 responses
          10 views
          0 likes
          Last Post NM_eFe
          by NM_eFe
           
          Started by hdge4u, Yesterday, 12:23 PM
          1 response
          10 views
          0 likes
          Last Post hdge4u
          by hdge4u
           
          Working...
          X