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

Add, Or statement

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

    Add, Or statement

    Using Ninja Strategy Wizard, how do I add an "and" statement so that when condition 1 AND condition 2 are true a signal results?

    Same question for "OR" statement when either condition is true?

    Thanks.

    #2
    Hello Trader Thor,

    The Strategy Wizard in NinjaTrader 7 is limited and is not able to add or (||) operators.

    If you need an or, you can use two different condition sets, and in the second condition set explicitly require the conditions in the first set to not be true.

    All conditions added to a condition set will use the and operator (&&). If you must have all conditions true, add all conditions to the same condition set.

    The Strategy Wizard is a good starting point for very simple strategies. Once you need more complicated logic or if you need to math, you would need to unlock the script and start adding code by hand.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Will this feature be available in Ninja 8?

      Comment


        #4
        Hello Trader Thor,

        In NinjaTrader 8, on a condition set you can specify that any of the conditions in that set be true, or you can specify that all conditions in that condition set are true. When set to 'any', this will use or's (||) between each condition in that set.
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by terofs, Yesterday, 04:18 PM
        1 response
        21 views
        0 likes
        Last Post terofs
        by terofs
         
        Started by CommonWhale, Today, 09:55 AM
        1 response
        3 views
        0 likes
        Last Post NinjaTrader_Erick  
        Started by Gerik, Today, 09:40 AM
        2 responses
        7 views
        0 likes
        Last Post Gerik
        by Gerik
         
        Started by RookieTrader, Today, 09:37 AM
        2 responses
        13 views
        0 likes
        Last Post RookieTrader  
        Started by alifarahani, Today, 09:40 AM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Working...
        X