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

Help with line drawing

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

    Help with line drawing

    Hi All,
    i am struggling to understand how to draw lines on the chart.. more specifically what i am trying to accomplish is to create a line that start say from the High of a bar and keeps drawing until the price touches it again..
    There may be more of this lines on the chart and so how to tell Ninja to stop drawing a particular line if touched and keep drawing what is not..
    Any advices on to do this?
    Thanks a bunch in advance!

    #2
    I would suggest reviewing this indicator/code to get some ideas: https://ninjatraderecosystem.com/use...ad/swingrays2/

    Comment


      #3
      MAN... this is a great advice!! Thanks a lot my friend!!

      Comment


        #4
        Hello AtApi,

        Thanks for your post.

        The indicator mentioned by Tasker-182 from the Ecosystem User App Share would be a good example of how that could be accomplished by drawing lines on the chart from one point to another on the chart and removing the draw object when the condition to draw the line is no longer true.

        Draw.Line() would be used to draw the line on a chart when a certain condition is met. RemoveDrawObject() is used to remove the draw object from the chart.

        See the help guide page linked below for more information and sample code.
        Draw.Line(): https://ninjatrader.com/support/help.../draw_line.htm
        RemoveDrawObject(): https://ninjatrader.com/support/help...drawobject.htm
        Drawing: https://ninjatrader.com/support/help...t8/drawing.htm

        Let me know if you have further questions.
        Brandon H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by jaybedreamin, Yesterday, 06:06 PM
        1 response
        35 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by ballston, 05-07-2021, 06:32 AM
        6 responses
        253 views
        0 likes
        Last Post NinjaTrader_Clayton  
        Started by demarcog, Today, 08:51 AM
        0 responses
        1 view
        0 likes
        Last Post demarcog  
        Started by futuros, 01-26-2023, 05:10 PM
        3 responses
        40 views
        0 likes
        Last Post NinjaTrader_ChrisL  
        Started by number1, Yesterday, 09:13 PM
        1 response
        33 views
        0 likes
        Last Post NinjaTrader_Sev  
        Working...
        X