Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SharpDX.Direct2D1 Render Vertical Line in Indicator Window and price panel

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

    SharpDX.Direct2D1 Render Vertical Line in Indicator Window and price panel

    ​Hello,
    I am trying to render a vertical line between the indicator and price panel in one fluid motion > or at least render a seperate line on both panels to create the illusion that they connect.
    Im not using DrawOnPricePanel for resources sack and i dont see any specific documentation on changing the chartControl and chartScale to the price panel,
    Can draw a line on indicator panel fine, but dont see any way to switch to price in OnRender and render it on the price panel with SHARP, Click image for larger version

Name:	Sad Face.png
Views:	262
Size:	31.6 KB
ID:	1244433
    Can this be done or bang-head-against wall?

    #2
    OnRender can only render within the chart panel the indicator or strategy is running in. Instead of drawing a vertical line, you could try BackBrushAll = Brushes.CornflowerBlue; or something like that and this will color the background behind that bar on every panel. Or, you could run an indicator in each panel so they can talk to one another and each can render the line in its own panel. Or, if there is only ONE subpanel below price, you could run the indicator in the subpanel and draw the line twice (once with the parameter for DrawOnPricePanel = true and once with the parameter for DrawOnPricePanel = false) to cover the two panels. Note that the inbuilt drawing tools can draw on the price panel even if the indicator is running in a subpanel, while if you render it yourself, you cannot.
    Bruce DeVault
    QuantKey Trading Vendor Services
    NinjaTrader Ecosystem Vendor - QuantKey

    Comment


      #3
      Hello Entwaze,

      Thank you for your post.

      The render area is intended to be limited to the chart panel by default. That said, there is a script that is publicly available on our NinjaTrader Ecosystem website that does draw a vertical line that is visible across all panels:The code used in this drawing tool is not supported. I am supplying it as an example to demonstrate that what you desire to do is possible, though not within the bounds of documented and supported NinjaScript.


      Please let me know if I can be of further assistance.

      The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.

      Comment


        #4
        Originally posted by QuantKey_Bruce View Post
        OnRender can only render within the chart panel the indicator or strategy is running in. Instead of drawing a vertical line, you could try BackBrushAll = Brushes.CornflowerBlue; or something like that and this will color the background behind that bar on every panel. Or, you could run an indicator in each panel so they can talk to one another and each can render the line in its own panel. Or, if there is only ONE subpanel below price, you could run the indicator in the subpanel and draw the line twice (once with the parameter for DrawOnPricePanel = true and once with the parameter for DrawOnPricePanel = false) to cover the two panels. Note that the inbuilt drawing tools can draw on the price panel even if the indicator is running in a subpanel, while if you render it yourself, you cannot.
        Oh this is cool i will have to incorporate this going forward., as far as the problem with the line and indicator, i always ran into this problem on other platforms like trading view and MQL5 and my best solution is to just render the indicator and price up in the same window and scrap the division

        Comment


          #5
          Originally posted by Entwaze View Post
          Oh this is cool i will have to incorporate this going forward., as far as the problem with the line and indicator, i always ran into this problem on other platforms like trading view and MQL5 and my best solution is to just render the indicator and price up in the same window and scrap the division
          Yes, you could do that as well.
          Bruce DeVault
          QuantKey Trading Vendor Services
          NinjaTrader Ecosystem Vendor - QuantKey

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          577 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          334 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          101 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          553 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          551 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X