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

Drawing on Multiple Panels

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

    Drawing on Multiple Panels

    Hi,

    Is it possible to draw onto the main price panel and to also draw on a separate panel using the same indicator? I have an indicator that performs some calculations. I would like to display those results on the main price panel. However, I also calculate some secondary results. I would like to show those on a different panel. Is this possible? Thank you.

    #2
    Hello Zeos6,

    Thanks for your inquiry.

    The supported technique would be to use 2 separate indicators. However, some clients have had luck by explicitly setting DrawOnPricePanel before they draw their Draw Objects.

    Here is a rough example of how this can be done with Drawing Objects:
    Code:
    protected override void OnStateChange()
    {
    	if (State == State.SetDefaults)
    	{
    		IsOverlay									= false;
    		DrawOnPricePanel							= false;				
    	}
    ...
    Code:
    if(CurrentBar < 3) return;
    DrawOnPricePanel = true;
    Draw.Dot(this, CurrentBar.ToString(), true, 3, Close[0], Brushes.Blue);
    DrawOnPricePanel = false;
    Draw.Dot(this, CurrentBar.ToString(), true, 3, Open[0], Brushes.Blue);
    Please let me know if I may be of further assistance.
    JimNinjaTrader Customer Service

    Comment


      #3
      I thought, from way back, that this would be supported in NT8. What happened?
      eDanny
      NinjaTrader Ecosystem Vendor - Integrity Traders

      Comment


        #4
        Hello eDanny,

        As far as I know, this has been something that had worked in NinjaTrader 7 but was not officially supported and thus was not documented in the Help Guide. The Help Guide for NinjaTrader 8 does not describe explicitly describe being able to do this so it would still fall under the "unsupported" category.

        I am aware of one issue where doing such had caused unreliable results in NinjaTrader 8, but there is not an open feature request tracking interest to officially supporting this.

        If you would like, I can submit a feature request and make sure votes are counted for you and Zeos6 so this can be documented and officially supported.

        For now though, it should be minded that there might be some unexpected behavior when doing such.
        JimNinjaTrader Customer Service

        Comment


          #5
          Thanks for the clarification and the work around Jim. I will give it a try.
          As to the feature request for this, YES. Please put it in. I too find it odd that this is not yet supported.

          Comment


            #6
            Hello,

            The ticket number for the feature request is SFT-2701. When it is implemented, you can reference this ticket number in the Release Notes of the version of NinjaTrader that includes this feature.

            Release Notes for NinjaTrader 8 can be found here: https://ninjatrader.com/support/help...ease_notes.htm

            Feature requests are fulfilled based on our development team's schedule and priorities and we cannot provide a time frame for it to become available.
            Last edited by NinjaTrader_Jim; 09-25-2017, 11:47 AM.
            JimNinjaTrader Customer Service

            Comment


              #7
              It appears that feature request SFT-2701 still hasn't been implemented. This is a fundamentally important capability, both because it is common to need to display multiple plots with different scalings, such as plots scaled with price scaling simultaneously along with others with relatively small values that often oscillate above and below zero, and also because it is common to need to display one or more price overlay plots simultaneously along with plots in one or more sub-panels.

              I recently discovered this https://ninjatrader.com/support/help...gyPlot_NT8.zip technique that works great to enable strategies to simultaneously have price overlay plots along with plots in multiple sub-panels. Unfortunately, it appears to not be supported for indicators. Why not where there is commonly more need with indicators than with strategies? Please add my vote for feature request SFT-2701 if implementation in the near future is a reasonable possibility. However, the technique currently enabled for strategies seems more flexible and will probably be easy to implement in the same way for indicators, so I am alternatively requesting that it be enabled for indicators.

              Comment


                #8
                Hello caveat_lector,

                Thank you for your vote and suggestion.

                I've both added a vote for you to SFT-2701 as well as created a feature request for your suggestion that a similar technique to SampleStrategyPlot be available for indicators. This request may be tracked as SFT-4506.

                As with all feature requests, interest is tracked before implementation is considered, so we cannot offer an ETA or promise of fulfillment. If implemented, it will be noted in the Release Notes page of the Help Guide.

                Release Notes — https://ninjatrader.com/support/help...ease_notes.htm

                Please let us know if we may be of further assistance to you.
                Kate W.NinjaTrader Customer Service

                Comment


                  #9
                  I know this has been out here for a bit--but before I invest a lot of time, if I have a strategy plot that I want to show in its own panel (its currently working).

                  I also want to draw customized arrows for Buy/Sell trade entries on the price panel. I tried the work around where I turn DrawOnPricePanel on/off before I use the Draw.Text() shown in post #2, but it didn't work for me...plus I actually prefer to use SharpDX's drawing methods to save on resources...

                  Can I use SharpDX.Direct2D1.RenderTarget.DrawText() and specify the panel (or more precisely, specify x,y coordinates on the price panel ) even though I have set IsOverlay and DrawOnPricePanel to 'false' so the strategy plot remains on its own panel?-

                  Jim-Boulder
                  NinjaTrader Ecosystem Vendor - Elephant Tracks

                  Comment


                    #10
                    Hello Jim-Boulder,

                    Thanks for your post.

                    There are no supported or documented means for having SharpDX DrawText() to draw on the price panel when IsOverlay is set to false. SharpDXcustom-rendered objects will follow the indicator/strategy's panel.

                    Note that the DrawOnPricePanel property is only for drawing objects, such as Draw.Text(), not custom rendered objects.

                    That said, this thread will be open for other community members to share unsupported code that could accomplish this.

                    Please let me know if I may assist further.
                    Brandon H.NinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by algospoke, Today, 06:40 PM
                    0 responses
                    10 views
                    0 likes
                    Last Post algospoke  
                    Started by maybeimnotrader, Today, 05:46 PM
                    0 responses
                    8 views
                    0 likes
                    Last Post maybeimnotrader  
                    Started by quantismo, Today, 05:13 PM
                    0 responses
                    7 views
                    0 likes
                    Last Post quantismo  
                    Started by AttiM, 02-14-2024, 05:20 PM
                    8 responses
                    169 views
                    0 likes
                    Last Post jeronymite  
                    Started by cre8able, Today, 04:22 PM
                    0 responses
                    10 views
                    0 likes
                    Last Post cre8able  
                    Working...
                    X