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

  • Rober182
    replied
    Thanks for the assistance, Jesse.

    Leave a comment:


  • NinjaTrader_Jesse
    replied
    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.

    Leave a comment:


  • Rober182
    replied
    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.

    Leave a comment:


  • NinjaTrader_Jesse
    replied
    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.

    Leave a comment:


  • Rober182
    started a topic Inverse condition in the Strategy Builder

    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.

Latest Posts

Collapse

Topics Statistics Last Post
Started by Brevo, Today, 01:45 AM
0 responses
3 views
0 likes
Last Post Brevo
by Brevo
 
Started by aussugardefender, Today, 01:07 AM
0 responses
3 views
0 likes
Last Post aussugardefender  
Started by pvincent, 06-23-2022, 12:53 PM
14 responses
240 views
0 likes
Last Post Nyman
by Nyman
 
Started by TraderG23, 12-08-2023, 07:56 AM
9 responses
384 views
1 like
Last Post Gavini
by Gavini
 
Started by oviejo, Today, 12:28 AM
0 responses
6 views
0 likes
Last Post oviejo
by oviejo
 
Working...
X