Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How do I keep my position open when the bar closes?

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

    How do I keep my position open when the bar closes?

    Hello,

    I trade S&P E-mini futures on a 15 minute time period.

    For practicality, the profit target in this example is 10 points

    my entry method is written as shown below:

    -----------------------------

    if ((GetCurrentBid >= (open[0] + (4 * TickSize)))
    || (GetCurrentAsk >= (open[0] + (4 * TickSize))))
    {
    EnterLong()
    }

    -----------------------------

    This logic works fine; however, when my account is still in a position when the bar closes, my position is closed automatically before it reaches my profit target.

    How do I keep my position open after a new bar appears?

    #2
    Hello Don22Trader1,

    A position is only closed when an exit order (or Set method order) is submitted and filled, or an entry in the opposite direction exits the position and reverses, or when the Exit on session close event occurs.

    Do you have any exit orders or Set methods in the script?
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    93 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    138 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
    123 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    73 views
    0 likes
    Last Post PaulMohn  
    Working...
    X