Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Draw between two points of a plot...

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

    Draw between two points of a plot...

    Hello,

    I have an indicator that plots a dot on the close of specific candles. I am wondering if there is a way to draw a line from one dot of the plot to another dot of that same plot?

    Thank you!

    #2
    Hello benjamin$,

    Thank you for your note.

    It would be possible to custom render lines between your plot points using SharpDX. I'd start by taking a look at the built in indicator "Sample Custom Render" as this explains many concepts involved with custom rendering. You will want to ensure you also call the base OnRender in order for the plot with your dots to be correctly displayed:

    protected override void OnRender(ChartControl char tControl, ChartScale chartScale)
    {
    // call the base.OnRender() to ensure standard Plots work as designed
    base.OnRender(chartControl, chartScale);

    // custom render logic
    }



    Further resources on custom rendering can be found in our help guide here:



    As well as the SharpDX SDK Reference here:



    Please let us know if we may be of further assistance to you.

    Comment


      #3
      Originally posted by NinjaTrader_Kate View Post
      Hello benjamin$,

      Thank you for your note.

      It would be possible to custom render lines between your plot points using SharpDX. I'd start by taking a look at the built in indicator "Sample Custom Render" as this explains many concepts involved with custom rendering. You will want to ensure you also call the base OnRender in order for the plot with your dots to be correctly displayed:

      protected override void OnRender(ChartControl char tControl, ChartScale chartScale)
      {
      // call the base.OnRender() to ensure standard Plots work as designed
      base.OnRender(chartControl, chartScale);

      // custom render logic
      }



      Further resources on custom rendering can be found in our help guide here:



      As well as the SharpDX SDK Reference here:



      Please let us know if we may be of further assistance to you.
      Hi Kate,

      The "Sample Custom Render" covers, with detail, several concepts that together can become confusing for non-programmers. The most commonly render is prossibly drawing a line.

      I think it would be very useful if you can provide a simple exmple indicator with minimal SharpDX coding to draw just a simple line, let's say for example a line from the Highest High of 10 bars ago with a 10 bars length into furture. This could be then simply modified to use for many indicators that draw a line.

      Thanks,

      Comment


        #4
        Hello aligator,

        Thank you for your reply.

        While it may be simpler to draw a line between the two points using a drawing tool, this would not be recommended as the memory impact would be larger than custom rendering. I don't currently have the bandwidth to create a simplified SharpDX example at this time, as we've just switched over to a new support system internally and have a pretty large backlog of support inquiries at the moment. However, the built in Pivots indicator is fairly simplistic in how it draws line segments for the pivot lines, and would be a useful reference for someone trying to render line segments.

        I will note this as something to work on as we have more bandwidth.

        Please let us know if we may be of further assistance to you.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        659 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        374 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        109 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        574 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        579 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X