Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

is it possible to draw curved lines via sharpDX?

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

    is it possible to draw curved lines via sharpDX?

    Is it possible to draw a curved line using sharpDX?

    I have no clue how to use System.Windows.Media.Geometry.Parse, so if there also are other ways of going about doing this, I'm all ears.

    for learning and testing purposes, I was thinking about trying to recreate a moving average using sharpDX. Is this even possible to do? Any idea on how this would compare to a "regular" moving average indicator in terms of resource usage? Are there any examples that I could check out to help me get me started and pointing in the right direction?


    thank you!

    #2
    Hello,

    Thank you for the post.

    For Curved lines, you would likely need to use Bezier curves. This would be a concept I could not provide an example for, unfortunately.

    You can find examples of bezier curves and sharpdx / directx in various places online but they would not specifically relate to NinjaTrader as this is a drawing concept.

    For examples of using path Geometry, you could see the Region Drawing object, this uses Path Geometry and is a good example of what may be required. Again I would not have a simple example, in this case, drawing geometry is a difficult subject as it is quite involved.

    If you are simply trying to render a Plot, you may instead check the Pivots indicator and see how it renders the Plots it uses, this may be the better approach or to utilize the visible bars to render a path. For a curved line, again you would need to use a Path and Geometry but would also need to utilize Bezier curves which are considerably more difficult than just connecting lines.

    please let me know if I may be of further asssitance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    558 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    324 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
    545 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    547 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X