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

Strategy Logic

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

    Strategy Logic

    Can Strategy Builder create something like this? Condition 1 and ( Condition 2 or Condition 3 ) are True then ........

    Thank you.

    #2
    Or something like this? (Condition 1 or Condition 2) and Condition 3 are true then ......
    Thanks.

    Comment


      #3
      Hello Trader17,

      Thanks for your posts.

      Yes, the strategy builder conditions builder offers both And/Or functionality.
      This is accomplished by selecting "If any" or "If All".
      The "If Any" is the "or" function. The "If All" is the "and" function.

      You can mix these, for example, by setting the conditions window to be "If All" which means that all conditions listed must resolve true to perform the "do the following" section. To get the "Or" case in that situation you would use the "group" function to create a group of "or" conditions, in the "group" window is the option to set the group as an "If All" or "If Any" so in this example you would set it to be "if Any" for the "or" functionality.

      To help clarify I've created a short video: https://Paul-ninjaTrader.tinytake.co...A4NV84OTU5MjI5

      For further information, please see the help guide section, "Understanding the Conditions and Actions screen": https://ninjatrader.com/support/help...er_screens.htm

      Paul H.NinjaTrader Customer Service

      Comment


        #4
        Perfect. Thank you very much for taking the time to make the video. Also when you have 2 or more Sets for longs or shorts what happens if one Set has you in a long and the other Set fires off? Will it take the trade or the entries per direction will prevent that?
        Thanks.
        Last edited by Trader17; 10-10-2018, 07:17 PM.

        Comment


          #5
          Hello Trader17,

          Thanks for your reply.

          Entries per direction would prevent additional entries in the same direction.

          You could also add an entry condition, in each set, that checks that you are in a flat position which would prevent the 2nd order from being placed, to begin with, which would be a better practice.

          There is an example of this (checking for flat position) in the help guide section, "How to create market position comparisons": https://ninjatrader.com/support/help...on_builder.htm
          Last edited by NinjaTrader_PaulH; 10-11-2018, 07:57 AM. Reason: added "2nd"
          Paul H.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by mjairg, 07-20-2023, 11:57 PM
          3 responses
          213 views
          1 like
          Last Post PaulMohn  
          Started by TheWhiteDragon, 01-21-2019, 12:44 PM
          4 responses
          544 views
          0 likes
          Last Post PaulMohn  
          Started by GLFX005, Today, 03:23 AM
          0 responses
          3 views
          0 likes
          Last Post GLFX005
          by GLFX005
           
          Started by XXtrader, Yesterday, 11:30 PM
          2 responses
          12 views
          0 likes
          Last Post XXtrader  
          Started by Waxavi, Today, 02:10 AM
          0 responses
          7 views
          0 likes
          Last Post Waxavi
          by Waxavi
           
          Working...
          X