Thanks for your time and regards.
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!
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
NinjaTrader
Inverse condition in the Strategy Builder
Collapse
X
-
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.Tags: None
-
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
-
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
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by SnailHorn, 03-27-2024, 09:54 AM
|
4 responses
17 views
0 likes
|
Last Post
by SnailHorn
Today, 09:19 AM
|
||
Started by ninza33, Today, 07:16 AM
|
3 responses
18 views
0 likes
|
Last Post
by ninza33
Today, 09:01 AM
|
||
Started by foxtrott21, Today, 08:27 AM
|
0 responses
4 views
0 likes
|
Last Post
by foxtrott21
Today, 08:27 AM
|
||
Started by jaypelle3, Today, 08:26 AM
|
0 responses
3 views
0 likes
|
Last Post
by jaypelle3
Today, 08:26 AM
|
||
Started by linkcou, Today, 07:01 AM
|
2 responses
26 views
0 likes
|
Last Post
by bltdavid
Today, 08:25 AM
|
Comment