Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Invalid 'Close Position' on intraday chart

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

    Invalid 'Close Position' on intraday chart

    When I apply a strategy that is currently in a position, to a chart that is
    updating, I always see a 'Close position' exit that isn't being generated by
    the strategy, on the last bar of the chart (the currently forming bar) --
    this makes the strategy go out of sync with the account.

    In other words, the account and strategy will be in sync, and I'll
    make a change to the ninja script which doesn't change the current
    position of the strategy, and when I reload the script, I always get a
    'Close position' on the last bar that wasn't triggered by the strategy.

    When I wait for the session to close and the chart to stop updating and
    reload the strategy that 'Close position' goes away.

    Can someone explain this ?

    #2
    Please use TraceOrders = true to determine what is happening in your strategy. Also, check your Exit on Close setting.
    Josh P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    105 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    54 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    36 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    38 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    74 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X