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

Inverse condition in the Strategy Builder

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

    Inverse condition in the Strategy Builder

    Hi. I would like to know to see if you can help me. Is it possible to configure an inverse condition in the Strategy Builder? That is to say when the set of conditions established by the indicators in the Set are given, the program executes the action of NOT OPERATING, that is, not of entry to any order. I hope I have explained clearly.

    Thanks for your time and regards.

    #2
    Hello Rober182,

    I wanted to clarify your question, I have not completely understood this as written.

    Are you saying that if all of the conditions in your set are true, the condition does not happen? So the condition should happen only when the conditions are otherwise false?

    If that is the case, you could do that with a user variable. Setting the variable to true when the sets conditions are true, and in a second set checking if that variable is not true to do the action. When the variable is not true, it would work inversely of the other condition. You would also need to reset the variable on each bar before this happens, so this would take 3 sets total.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Sorry for the grammar, I write from Spain and I use a translator. It is correct, if all the conditions as a whole are true, the condition does not occur. Thanks for the assistance, Jesse.

      Comment


        #4
        Hello Rober182,

        Thank you for confirming.

        Yes in that situation you could use 3 sets and a variable like I had described. In a first set, set the variable to false to reset it for each bar, there is no condition required just the action of setting the variable. In a second set, check your normal condition which you want the inverse of, instead of the current action, set the variable to true. In a third set, check if the variable is not true to enact the action for each bar where set 2 did not become true otherwise when set 2 is true, set 3 is not true.

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          Thanks for the assistance, Jesse.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by yertle, Yesterday, 08:38 AM
          7 responses
          28 views
          0 likes
          Last Post yertle
          by yertle
           
          Started by bmartz, 03-12-2024, 06:12 AM
          2 responses
          20 views
          0 likes
          Last Post bmartz
          by bmartz
           
          Started by funk10101, Today, 12:02 AM
          0 responses
          4 views
          0 likes
          Last Post funk10101  
          Started by gravdigaz6, Yesterday, 11:40 PM
          1 response
          8 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by MarianApalaghiei, Yesterday, 10:49 PM
          3 responses
          10 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Working...
          X