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

OnRender drawline

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

    OnRender drawline

    Can someone help me on converting this to NT8?

    Point[][] linePoints = new Point[flines][];

    for (i = 0; i <flines; i++)
    graphics.DrawLines(linePrices[i].Pen, linePoints[i]);

    It would result a continuous line.

    #2
    Hello luxurious_04,

    Thank you for the post.

    You will need to use SharpDX in NinjaTrader 8. For an example on how to render lines in OnRender, have a look at the "SampleCustomRender" indicator. That script demonstrates how to use SharpDX in the context of a NinjaScript, notice how the line is drawn with RenderTarget.DrawLine(...).

    Here is the help guide page on using SharpDX for custom plotting:


    Please let me know if I can assist further.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Ok I have check that already my problem how can I convert Points[][] linePoints or what is the equivalent of linePoints[i] in OnRender.Drawline? In OnRender.Drawline it needs to vector points while in graphics.Drawlines in NT7 it only use points of array like linePoints[i].

      Comment


        #4
        Hello luxurious_04,

        Thank you for the reply.

        The DrawLines method takes two Points. This is the equivalent of the Point array to draw.

        Below is a public link to three examples of how to use DrawLine

        C# (CSharp) SharpDX.DrawLine - 3 examples found. These are the top rated real world C# (CSharp) examples of SharpDX.DrawLine extracted from open source projects. You can rate examples to help us improve the quality of examples.


        Please let me know if I can assist further.
        Chris L.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by The_Sec, Yesterday, 03:37 PM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by vecnopus, Today, 06:15 AM
        0 responses
        1 view
        0 likes
        Last Post vecnopus  
        Started by Aviram Y, Today, 05:29 AM
        0 responses
        5 views
        0 likes
        Last Post Aviram Y  
        Started by quantismo, 04-17-2024, 05:13 PM
        3 responses
        27 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by ScottWalsh, 04-16-2024, 04:29 PM
        7 responses
        36 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Working...
        X