Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

And/Or functions

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

    And/Or functions

    If I create more than one condition in the condition builder it is taken as an "AND" function.
    How do I create an "OR" function?

    #2
    yellowTrader,

    To use an "or" you want to just use a separate Set. You can change Set's on that top row of the Conditions & Actions page.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      You mean if :

      in Set 1 condition is : ToTime{Time[0]} == ToTime{11,4,6}
      and Action is : EnterLong{DefaultQuantity,""}

      and in Set 2 condition is : Close[0] > MyInput1
      and Action is : EnterLong{DefaultQuantity,""}

      then you mean the two conditions above are taken as an OR function ? and Action will be taken once ? not twice?

      Comment


        #4
        Each set is evaluated independently of the other. If you want to limit it you need to use User Variables and prevent it from doing the other.

        If one of the sets evaluates to true, set a user variable to take on a value of 1. Add yourself a condition that must have the user variable != to 1 then it won't enter.

        Alternatively, you can just let the EntriesPerDirection settings for your strategy prevent the second entry.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          OK.One more thing.
          In the condition builder the command to EnterLong or Short doesn't give me the option to choose the quantity or the type of order(MKT, LMT, etc..).
          Where do I find these options?

          Comment


            #6
            yellowTrader,

            I am not sure I follow. When you select EnterLong/Short you have a Quantity field you can choose.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Yes, I'm sorry you are right. I do have the option for quantity but not for the order type.
              How can I change the order type? It seems it is set to MKT by default.

              Comment


                #8
                EnterLong is a market order. Not sure what you are after. If you want a limit order you need to choose the limit order action.
                Josh P.NinjaTrader Customer Service

                Comment


                  #9
                  What I mean is how can I set it up to Sell ask or Buy bid ?

                  Comment


                    #10
                    If you want to sell ask just select a sell limit order and for the limit price choose the ask price. If you want to buy bid select a buy limit order and use the bid price for the limit price.
                    Josh P.NinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                    0 responses
                    558 views
                    0 likes
                    Last Post Geovanny Suaza  
                    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                    0 responses
                    324 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by Mindset, 02-09-2026, 11:44 AM
                    0 responses
                    101 views
                    0 likes
                    Last Post Mindset
                    by Mindset
                     
                    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                    0 responses
                    545 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by RFrosty, 01-28-2026, 06:49 PM
                    0 responses
                    547 views
                    1 like
                    Last Post RFrosty
                    by RFrosty
                     
                    Working...
                    X