How do I create an "OR" function?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
And/Or functions
Collapse
X
-
And/Or functions
If I create more than one condition in the condition builder it is taken as an "AND" function.
How do I create an "OR" function?Tags: None
-
You mean if :
in Set 1 condition is : ToTime{Time[0]} == ToTime{11,4,6}
and Action is : EnterLong{DefaultQuantity,""}
and in Set 2 condition is : Close[0] > MyInput1
and Action is : EnterLong{DefaultQuantity,""}
then you mean the two conditions above are taken as an OR function ? and Action will be taken once ? not twice?
Comment
-
Each set is evaluated independently of the other. If you want to limit it you need to use User Variables and prevent it from doing the other.
If one of the sets evaluates to true, set a user variable to take on a value of 1. Add yourself a condition that must have the user variable != to 1 then it won't enter.
Alternatively, you can just let the EntriesPerDirection settings for your strategy prevent the second entry.Josh P.NinjaTrader Customer Service
Comment
-
OK.One more thing.
In the condition builder the command to EnterLong or Short doesn't give me the option to choose the quantity or the type of order(MKT, LMT, etc..).
Where do I find these options?
Comment
-
Yes, I'm sorry you are right. I do have the option for quantity but not for the order type.
How can I change the order type? It seems it is set to MKT by default.
Comment
-
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
558 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
324 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
545 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
547 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment