Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
How to exit open positions OnBarClose?
Collapse
X
-
How to exit open positions OnBarClose?
I am working on a strategy based on 60 minute bars. After positions are opened, I want to exit them at the end of the current 60 minute bar, but I am having trouble figuring this out. Any help would be greatly appreciated. Thanks.Tags: None
-
Hello Betican,
Thanks for your post.
When the 60-minute bar closes, if you are using the Managed approach you can use the ExitLong() or ExitShort() methods.
References:
https://ninjatrader.com/support/help...l?exitlong.htm
https://ninjatrader.com/support/help...?exitshort.htm
If you are using the UnManaged approach, then you would use SubmitOrderUnmanaged() and use the Position.Quantity for the quantity field.
Reference: https://ninjatrader.com/support/help...runmanaged.htm
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
132 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
74 views
1 like
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
117 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
113 views
1 like
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
89 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment