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 charlesugo_1, 05-26-2026, 05:03 PM
|
0 responses
59 views
0 likes
|
Last Post
by charlesugo_1
05-26-2026, 05:03 PM
|
||
|
Started by DannyP96, 05-18-2026, 02:38 PM
|
1 response
143 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
161 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|
||
|
Started by CarlTrading, 05-10-2026, 08:12 PM
|
0 responses
97 views
0 likes
|
Last Post
by CarlTrading
05-10-2026, 08:12 PM
|
||
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
276 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|

Comment