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 SalmaTrader, 07-07-2026, 10:26 PM
    0 responses
    30 views
    0 likes
    Last Post SalmaTrader  
    Started by CarlTrading, 07-05-2026, 01:16 PM
    0 responses
    17 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 06-17-2026, 10:32 AM
    0 responses
    9 views
    0 likes
    Last Post CaptainJack  
    Started by kinfxhk, 06-17-2026, 04:15 AM
    0 responses
    16 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 06-17-2026, 04:06 AM
    0 responses
    19 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Working...
    X