• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Stop drawing once price closes above/below a line

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

    Stop drawing once price closes above/below a line

    Hi guys

    I have recently compiled a simple indicator that plots a mid-point line (DrawLine()). Is there a way I can make the line to stop once price crosses and closes above it? I attached a picture to show what I'm talking about

    Thanks!
    Vladi
    Attached Files

    #2
    Hello,

    Thank you for the question.

    It would be easiest to see what you have already put in place to provide a suggestion, there are a few different ways you could check that the price has crossed.

    To start with, if you are currently using the Price series to draw the line, you could likely use the same series to check a CrossAbove or CrossBelow for a price value:
    http://ninjatrader.com/support/helpG...sub=crossbelow
    http://ninjatrader.com/support/helpG...sub=crossabove

    This could additionally be accomplished by checking conditions and using variables, again it would be better to see what you currently have and recommend something based on that.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Originally posted by Scalper85 View Post
      Hi guys

      I have recently compiled a simple indicator that plots a mid-point line (DrawLine()). Is there a way I can make the line to stop once price crosses and closes above it? I attached a picture to show what I'm talking about

      Thanks!
      Vladi
      Exact question answered here, with the relevant code posted.

      ref: http://ninjatrader.com/support/forum...78&postcount=1

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Captain_Qwark, Today, 10:55 AM
      2 responses
      18 views
      0 likes
      Last Post Captain_Qwark  
      Started by kmpc1, Today, 11:03 AM
      1 response
      13 views
      0 likes
      Last Post NinjaTrader_PatrickG  
      Started by jransom, Today, 09:08 AM
      1 response
      17 views
      0 likes
      Last Post NinjaTrader_Kate  
      Started by mtamaku, Today, 09:19 AM
      0 responses
      23 views
      0 likes
      Last Post mtamaku
      by mtamaku
       
      Started by traderMNQ, Today, 09:00 AM
      4 responses
      20 views
      0 likes
      Last Post traderMNQ  
      Working...
      X