Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Incorrect stop entry / exit fill on Opening gap

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

    Incorrect stop entry / exit fill on Opening gap

    In a Strategy Analyzer backtest of a simple MA crossover strategy with stop entries and with stop loss and profit target exits, I found that NT8 generates an incorrect fill price for a stop entry or stop exit order when the Open price gaps beyond the stop price. In these cases, the stop order should be filled at the Open price, but NT8 incorrectly fills these orders at the stop price. NT7 correctly handled these cases.

    I'm emailing you the strategy code for both NT8 and NT7, instructions for reproducing my results, and an Excel spreadsheet of the NT8-generated trades highlighting the trade results that differ from NT7.

    The simple strategy generates entry signals upon fast / slow MA crossings like the Ninjatrader-included SampleMACrossOver strategy, but this one has stop entries, with the stop price set to the High of the signal bar for long entry and the Low of the signal bar for short entry. Also, stop loss and profit target exits are included, with both set for 100 ticks (1.00 in price movement in this test since the ticker used was the stock TSLA). The backtest is for daily bars of TSLA over the period 6/29/2010 to 6/15/2015, with historical data obtained from Kinetic.

    As highlighted in the spreadsheet I'm emailing you, although there were 3 trades with incorrect fills resulting from the issue being reported here, the good news (which I previously mentioned in the General Discussion forum) is that in 12 of the 25 total trades in the backtest, NT8 produced more logically correct exits than NT7 where either an exit condition was met on the entry bar (but would have preceded the entry and should have been ignored) or when both the stop loss and the profit target conditions were met on the same bar and the backtest logic had to choose which exit would have most likely been triggered.

    Note: A separate minor issue occurred when I exported my strategy from NT8. The final Export dialog box displaying the message "The following file(s) will be included..." appeared to hang with the Windows hourglass symbol never going away, but the export seemed to work anyway once I clicked "Yes". From the exported zip file, I was able to successfully import the strategy on another computer running NT8.

    #2
    Thanks for your detailed post, our PM team is reviewing this logic based on your observations. We will report back when we have more info - PM-404
    MatthewNinjaTrader Product Management

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by TraderG23, 12-08-2023, 07:56 AM
    9 responses
    382 views
    1 like
    Last Post Gavini
    by Gavini
     
    Started by oviejo, Today, 12:28 AM
    0 responses
    1 view
    0 likes
    Last Post oviejo
    by oviejo
     
    Started by pechtri, 06-22-2023, 02:31 AM
    10 responses
    125 views
    0 likes
    Last Post Leeroy_Jenkins  
    Started by judysamnt7, 03-13-2023, 09:11 AM
    4 responses
    59 views
    0 likes
    Last Post DynamicTest  
    Started by ScottWalsh, Yesterday, 06:52 PM
    4 responses
    36 views
    0 likes
    Last Post ScottWalsh  
    Working...
    X