Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Builder enter an order 2 seconds before the current bar closes?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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 position

    #2
    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

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    91 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    137 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    121 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    72 views
    0 likes
    Last Post PaulMohn  
    Working...
    X