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 Aviram Y, 08-09-2023, 09:04 AM
    10 responses
    298 views
    0 likes
    Last Post MrHump
    by MrHump
     
    Started by jpapa, Today, 07:22 AM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by kevinenergy, 02-17-2023, 12:42 PM
    116 responses
    2,758 views
    1 like
    Last Post kevinenergy  
    Started by franatas, 12-04-2023, 03:43 AM
    7 responses
    106 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by Jltarrau, Today, 05:57 AM
    3 responses
    9 views
    0 likes
    Last Post Jltarrau  
    Working...
    X