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:



    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.

    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 CaptainJack, 05-29-2026, 05:09 AM
      0 responses
      45 views
      0 likes
      Last Post CaptainJack  
      Started by CaptainJack, 05-29-2026, 12:02 AM
      0 responses
      30 views
      0 likes
      Last Post CaptainJack  
      Started by charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      99 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      177 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      170 views
      0 likes
      Last Post CarlTrading  
      Working...
      X