Is there a way to enter an order 2 seconds before the current bar closes on Strategy Builder? I have seen some limitations on Strategy Builder when I use the "exit long by stop order" because if in the same bar that I had entered the price goes directly my stop it is not excecuted until the bar that I had entered closes... and I think that if I can anticipate my entry 2sec before the bar closes the "exit long/short by stop order" could be inmmidiatly excecuted in the first bar to protect my position
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Strategy Builder enter an order 2 seconds before the current bar closes?
Collapse
X
-
Strategy Builder enter an order 2 seconds before the current bar closes?
Hi Ninjas,
Is there a way to enter an order 2 seconds before the current bar closes on Strategy Builder? I have seen some limitations on Strategy Builder when I use the "exit long by stop order" because if in the same bar that I had entered the price goes directly my stop it is not excecuted until the bar that I had entered closes... and I think that if I can anticipate my entry 2sec before the bar closes the "exit long/short by stop order" could be inmmidiatly excecuted in the first bar to protect my positionTags: None
-
Hello MarcoNT29,
Intra-bar granularity and TickReplay allows for submitting orders intra-bar (on the same bar).
http://ninjatrader.com/support/forum...063#post499063
https://ninjatrader.com/support/foru...377#post773377
This would be something complex, and likely not possible to achieve with the Strategy Builder.
The Strategy Builder cannot subtract seconds from a time object to calculate the time 2 seconds before the end of the bar.
The Strategy Builder also does not have the ability to use Threading.Timer or Threading.Task, which would likely be what you would want to use to trigger events at specific seconds. So this would likely require unlocking the script and coding by hand to acheive.
https://ninjatrader.com/support/foru...445#post496445
Below I am providing a link to a forum post with helpful information about getting started with C# and NinjaScript.
Chelsea B.NinjaTrader Customer Service
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
47 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
22 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
33 views
1 like
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
50 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
42 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment