Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to draw region on another panel?

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

    How to draw region on another panel?

    I want to draw the line and region on another panel, but it only work for line only.
    I dont know what is wrong.

    Code:
    Calculate = Calculate.OnBarClose;
    IsOverlay = false;
    DisplayInDataBox = false;
    DrawOnPricePanel = true;
    DrawHorizontalGridLines = true;
    DrawVerticalGridLines = true;
    PaintPriceMarkers = false;
    ScaleJustification = NinjaTrader.Gui.Chart.ScaleJustification.Right;
    //Disable this property if your indicator requires custom values that cumulate with each new market data event.
    //See Help Guide for additional information.
    IsSuspendedWhileInactive = true;
    Attached Files

    #2
    https://ninjatrader.com/support/help...highlighty.htm. this might help.

    Comment


      #3
      Hello soon123,
      You need to add another line after Draw.Region, use DrawOnPricePanel = false; so it will draw the region on indicator panel, hope it helps.

      Comment


        #4
        Hello soon123,

        Thanks for your post.

        In State.SetDefaults you have "DrawOnPricePanel = true;", this means any "Draw" based methods objects will be placed in the price panel. You would need to set DrawOnPricePanel = false; for the draw objects to show in the indicator panel.

        Reference: https://ninjatrader.com/support/help...pricepanel.htm
        Paul H.NinjaTrader Customer Service

        Comment


          #5
          I have a similar problem..
          Code:
          if (InSync[0] > 0) Draw.Region(this, "UP", CurrentBar, 0, InSync, 50, null, Brushes.Blue, 0);
          else Draw.Region(this, "DW", CurrentBar, 0, InSync, 50, null, Brushes.Orange, 0);
          Basically i won`t accept the price parameter after the series InSync..
          In other words how can draw a region between the indicator value and the oscillator mid point of 50?

          Thanks

          Comment


            #6
            Hello AtApi,

            Thanks for your post and welcome to the NinjaTrader forums!

            Please check your Draw.Region() parameters against the method overloads in the help guide. You should only need 8 parameters and you have 9.

            Reference: https://ninjatrader.com/support/help...raw_region.htm

            Paul H.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by TheCatTrader, Today, 04:52 PM
            0 responses
            4 views
            0 likes
            Last Post TheCatTrader  
            Started by localappleseed, Today, 04:10 PM
            0 responses
            8 views
            0 likes
            Last Post localappleseed  
            Started by Ragstoriches, Today, 03:13 PM
            2 responses
            15 views
            0 likes
            Last Post Ragstoriches  
            Started by michaelsh, Today, 03:21 PM
            1 response
            16 views
            0 likes
            Last Post NinjaTrader_ChrisL  
            Started by Ragstoriches, Today, 02:53 PM
            1 response
            14 views
            0 likes
            Last Post NinjaTrader_Emily  
            Working...
            X