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 Hwop38, 05-04-2026, 07:02 PM
        0 responses
        169 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Started by CaptainJack, 04-24-2026, 11:07 PM
        0 responses
        326 views
        0 likes
        Last Post CaptainJack  
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        252 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        353 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        180 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Working...
        X