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 charlesugo_1, 05-26-2026, 05:03 PM
|
0 responses
66 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
149 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
162 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|
||
|
Started by CarlTrading, 05-10-2026, 08:12 PM
|
0 responses
99 views
0 likes
|
Last Post
by CarlTrading
05-10-2026, 08:12 PM
|
||
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
286 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|

Comment