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 cre8able, 02-11-2023, 05:43 PM
        3 responses
        236 views
        0 likes
        Last Post rhubear
        by rhubear
         
        Started by frslvr, 04-11-2024, 07:26 AM
        8 responses
        113 views
        1 like
        Last Post NinjaTrader_BrandonH  
        Started by stafe, 04-15-2024, 08:34 PM
        10 responses
        46 views
        0 likes
        Last Post stafe
        by stafe
         
        Started by rocketman7, Today, 09:41 AM
        3 responses
        11 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by traderqz, Today, 09:44 AM
        2 responses
        10 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Working...
        X