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 NullPointStrategies, Today, 05:17 AM
    0 responses
    49 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    126 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    67 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    42 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    46 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X