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 arvidvanstaey, Today, 02:19 PM
        4 responses
        11 views
        0 likes
        Last Post arvidvanstaey  
        Started by samish18, 04-17-2024, 08:57 AM
        16 responses
        61 views
        0 likes
        Last Post samish18  
        Started by jordanq2, Today, 03:10 PM
        2 responses
        9 views
        0 likes
        Last Post jordanq2  
        Started by traderqz, Today, 12:06 AM
        10 responses
        18 views
        0 likes
        Last Post traderqz  
        Started by algospoke, 04-17-2024, 06:40 PM
        5 responses
        48 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Working...
        X