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 Mindset, 04-21-2026, 06:46 AM
    0 responses
    87 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    132 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    65 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    118 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    67 views
    0 likes
    Last Post PaulMohn  
    Working...
    X