Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Strategy Builder Flatten Positions
Collapse
X
-
Strategy Builder Flatten Positions
What do I need to do in order to flatten positions at 4:00 PM using Strategy Builder? I know how to input trading times however it is not closing potions.Tags: None
-
Hello TheMasterBlaster,
Welcome to the NinjaTrader forums.
You would need a condition set that compares Time series on the left to Time value on the right set to 4:00 PM, and then for the action calls Exit a long position and Exit a short position.
This would cause an exit order to be submitted at that time.Chelsea B.NinjaTrader Customer Service
-
Thank you. Now that I have that figure out I'm trying to set my trading hours from 6:00 PM EST - 4:00 PM EST. When I set it up it doesn't take any trades.
Comment
-
Hello TheMasterBlaster,
Is the time filter the only conditions that trigger the order? Are there other conditions?
Use prints to understand the behavior.
Print all values in all conditions that lead the to entry order to the output window along with the time of the bar.
Below is a link to a forum post with a video that demonstrates how to use prints to understand behavior using the Strategy Builder.
Chelsea B.NinjaTrader Customer Service
Comment
-
Still struggling with setting my trade times. Trying to trade from 6:00 PM EST - 4:00 PM EST. I have added this to my strategy and it won't take any trades.
1 Photo
Comment
-
Hello TheMasterBlaster,
Are you comparing entire date times or just the time part of the date?
A number (time in one day) cannot be greater than 18 (6:00 PM) and less than 16 (4:00 PM) at the same time.
It can be greater than 0 (12:00 AM) and less than 16 (4:00 PM) OR equal to or greater than 18 (6:00 PM) and less than 24 (12:59:59).
Chelsea B.NinjaTrader Customer Service
Comment
-
I set the times @ Greater than 6:00 PM less that 11:59 PM
Greater than 12:01 AM less than 4:00 PM
Comment
-
Hello TheMasterBlaster,
With these condition groups in the single condition set using 'If Any' for the OR between the condition groups, and no other conditions or condition groups in that set, this condition set is not triggering?
Are you printing or drawing a dot to ensure the condition is evaluating as true?
May I have a screenshot of the condition set with only those conditions?
(The screenshot you have provided above has conditions that cannot evaluate as true.)Last edited by NinjaTrader_ChelseaB; 06-12-2019, 03:45 PM.Chelsea B.NinjaTrader Customer Service
Comment
-
When I remove the times I have showed in the picture my strategy takes the trade. When I add those times that are in the picture it doesn't take any trades. Have verified with backtesting. What is the correct way to add the trading hours I have posted? 6:00 PM - 4:00 PM.
Comment
-
Hello TheMasterBlaster,
Yes, for one condition set or condition group you can have greater than 0 (12:00 AM) and less than 16 (4:00 PM). And in another condition set you can have equal to or greater than 18 (6:00 PM) and less than 24 (12:59:59).
Below is a link to a video that demonstrates putting these in different sets which is the simple way. Using condition groups with the 'If Any' (for conditional OR operators) is cleaner code but more complex.
Chelsea B.NinjaTrader Customer Service
Comment
-
If I'm running multiple Auto Strategies on the $NQ with the same account will the orders on one of the strategies effect the other strategy?
Comment
-
Comment
-
If I have a strategy for the ES & NQ running at the same time on the same account will they effect one another?
Comment
-
Hello TheMasterBlaster,
ES and NQ are separate instruments and running separate strategies on these instruments will not cause any interference with Strategy/Account Positions.
It would not be advised, however, to apply multiple strategies against the same instrument as this can cause the Strategy's position to fall out of sync with the Account. For example, if one strategy flattens its position, the account may still be long.
Strategy vs. Account Position - https://ninjatrader.com/support/help..._account_p.htm
Please let us know if you have any additional questions.JimNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Barry Milan, Yesterday, 10:35 PM
|
3 responses
10 views
0 likes
|
Last Post Yesterday, 11:58 PM | ||
Started by WeyldFalcon, 12-10-2020, 06:48 PM
|
14 responses
1,428 views
0 likes
|
Last Post
by Handclap0241
Yesterday, 10:43 PM
|
||
Started by DJ888, 04-16-2024, 06:09 PM
|
2 responses
9 views
0 likes
|
Last Post
by DJ888
Yesterday, 10:31 PM
|
||
Started by jeronymite, 04-12-2024, 04:26 PM
|
3 responses
41 views
0 likes
|
Last Post
by jeronymite
Yesterday, 10:10 PM
|
||
Started by bill2023, Yesterday, 08:51 AM
|
2 responses
16 views
0 likes
|
Last Post
by bill2023
Yesterday, 10:10 PM
|
Comment