Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by r68cervera, Today, 05:29 AM
    0 responses
    2 views
    0 likes
    Last Post r68cervera  
    Started by geddyisodin, Today, 05:20 AM
    0 responses
    3 views
    0 likes
    Last Post geddyisodin  
    Started by JonesJoker, 04-22-2024, 12:23 PM
    6 responses
    34 views
    0 likes
    Last Post JonesJoker  
    Started by GussJ, 03-04-2020, 03:11 PM
    12 responses
    3,239 views
    0 likes
    Last Post Leafcutter  
    Started by AveryFlynn, Today, 04:57 AM
    0 responses
    6 views
    0 likes
    Last Post AveryFlynn  
    Working...
    X