Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Logic question...in condition builder

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

    Logic question...in condition builder

    I am trying to figure out how to put this in the condition builder...there is a horizontal line as a target on my chart (i.e. a indicator are my chart that can be defined as X)...I want the trade to fire IF:

    1. If the prior bar (the one to the left of the current bar) touched or went beyond that horizontal X line BUT did not close on or above that line (i.e. it wick up to touch or went beyond it), then on this current bar go SHORT.

    2. If the prior bar (the one to the left of the current bar) actually closed on or above that horizontal X line, then on this current bar go LONG.




    Thanks...

    #2
    birdog,

    1. If the prior bar (the one to the left of the current bar) touched or went beyond that horizontal X line BUT did not close on or above that line (i.e. it wick up to touch or went beyond it), then on this current bar go SHORT.
    Check if the High is above or equal to the line, but the Close is less than the line. High and close are located in the "Price data" section of the condition builder. That's the easiest way for the Strategy Wizard.

    You just then put your EnterShort in the action section.

    2. If the prior bar (the one to the left of the current bar) actually closed on or above that horizontal X line, then on this current bar go LONG.
    Check if the close is greater than or equal to the line. This will be a disjoint occurrence to the other event so no other checking is needed.

    You just then put your EnterLong in the action section.
    Adam P.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_AdamP View Post
      birdog,



      Check if the High is above or equal to the line, but the Close is less than the line. High and close are located in the "Price data" section of the condition builder. That's the easiest way for the Strategy Wizard.

      You just then put your EnterShort in the action section.



      Check if the close is greater than or equal to the line. This will be a disjoint occurrence to the other event so no other checking is needed.

      You just then put your EnterLong in the action section.
      Do you think you might be able to show me what expressions and qualifiers to use to get those results...I working on it be can not seem to quite get it working right...

      Comment


        #4
        birdog,

        How are you defining this price line? Is it a manually drawn line or do you want to define it as a user-defined variable?
        Adam P.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_AdamP View Post
          birdog,

          How are you defining this price line? Is it a manually drawn line or do you want to define it as a user-defined variable?
          It is a line automatically drawn by a indicator.

          Comment


            #6
            Birdog,

            So I can better find an example, which indicator are you using? If the indicator doesn't store the line value in a plot you may not be able to access it in the Wizard.
            Adam P.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by birdog View Post
              It is a line automatically drawn by a indicator.
              Drawn how?

              Are you accessing that indicator in the strategy?

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by argusthome, Yesterday, 10:06 AM
              0 responses
              22 views
              0 likes
              Last Post argusthome  
              Started by NabilKhattabi, 03-06-2026, 11:18 AM
              0 responses
              19 views
              0 likes
              Last Post NabilKhattabi  
              Started by Deep42, 03-06-2026, 12:28 AM
              0 responses
              14 views
              0 likes
              Last Post Deep42
              by Deep42
               
              Started by TheRealMorford, 03-05-2026, 06:15 PM
              0 responses
              10 views
              0 likes
              Last Post TheRealMorford  
              Started by Mindset, 02-28-2026, 06:16 AM
              0 responses
              41 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Working...
              X