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 kinfxhk, 07-13-2026, 10:18 AM
    0 responses
    59 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-13-2026, 09:50 AM
    0 responses
    41 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-13-2026, 07:21 AM
    0 responses
    47 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-11-2026, 02:11 AM
    0 responses
    38 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by SalmaTrader, 07-07-2026, 10:26 PM
    0 responses
    157 views
    0 likes
    Last Post SalmaTrader  
    Working...
    X