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 algospoke, Today, 06:40 PM
        0 responses
        9 views
        0 likes
        Last Post algospoke  
        Started by maybeimnotrader, Today, 05:46 PM
        0 responses
        7 views
        0 likes
        Last Post maybeimnotrader  
        Started by quantismo, Today, 05:13 PM
        0 responses
        7 views
        0 likes
        Last Post quantismo  
        Started by AttiM, 02-14-2024, 05:20 PM
        8 responses
        168 views
        0 likes
        Last Post jeronymite  
        Started by cre8able, Today, 04:22 PM
        0 responses
        10 views
        0 likes
        Last Post cre8able  
        Working...
        X