Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Connect the Bars with line

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

    Connect the Bars with line

    Can someone help me to draw the lines to connect HH /HL and LL/LH. Please do not worry about locating the HH/ HL and LL/LH.
    What I need how to plot the line once the above points are identified . In other words something like a ZIGZAG indicator. I tried to explore the that indicator. But it is little complicated to me as I am not a pro in C#.
    For the demonstration purposes you may try to connect every 15bars . Please connect the bars at the close of the bar.
    Attached Files

    #2
    Hello Simple,

    Thank you for your post.

    The ZigZag uses custom plotting, you can find the same code used in our CustomPlotSample under Tools > Edit NinjaScript > Indicator > CustomPlotSample.

    You could potentially just use the DrawLine() method in NinjaScript: http://www.ninjatrader.com/support/h...7/drawline.htm

    Comment


      #3
      Hello!
      Is there any up to date solution for this? I am unable to locate this "CustomPlotSample" file.
      I am looking for a solution to do this with AddPlot() not with DrawLine().
      Thanks for the answer.

      Comment


        #4
        Hello snbence, thanks for your note.

        The CustomPlotSample is still in NinjaTrader 7. If you are using NinjaTrader 8 it is in the NinjaScript editor Indicator folder titled SampleCustomRender. Plots would need a value for every bar, so it would be easier to do it with the line draw object otherwise you would need to calculate a point/slope formula to get a correct line.

        Please let me know if you have any further questions.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        601 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        347 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        103 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        559 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        558 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X