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 cmoran13, Yesterday, 01:02 PM
|
0 responses
29 views
0 likes
|
Last Post
by cmoran13
Yesterday, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
21 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|
||
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
160 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
95 views
1 like
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
148 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|

Comment