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 SalmaTrader, 07-07-2026, 10:26 PM
|
0 responses
45 views
0 likes
|
Last Post
by SalmaTrader
07-07-2026, 10:26 PM
|
||
|
Started by CarlTrading, 07-05-2026, 01:16 PM
|
0 responses
22 views
0 likes
|
Last Post
by CarlTrading
07-05-2026, 01:16 PM
|
||
|
Started by CaptainJack, 06-17-2026, 10:32 AM
|
0 responses
14 views
0 likes
|
Last Post
by CaptainJack
06-17-2026, 10:32 AM
|
||
|
Started by kinfxhk, 06-17-2026, 04:15 AM
|
0 responses
20 views
0 likes
|
Last Post
by kinfxhk
06-17-2026, 04:15 AM
|
||
|
Started by kinfxhk, 06-17-2026, 04:06 AM
|
0 responses
22 views
0 likes
|
Last Post
by kinfxhk
06-17-2026, 04:06 AM
|

Comment