Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

EnterShortStopLimit() not executing properly in backtest

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

    EnterShortStopLimit() not executing properly in backtest

    I'm testing a counter-trend/range-bound strategy and it appears there is a bug in NT7.

    See the chart attached here as well at

    World's leading screen capture + recorder from Snagit + Screencast by Techsmith. Capture, edit and share professional-quality content seamlessly.


    I am drawing a red line where I am placing EnterShortStopLimit() orders and green lines where I am drawing EnterLongStopLimit() orders. In a backtest, though, sometimes the order is not getting filled. See the note at the bottom of the image.

    I tried changing it to EnterShortStop() and EnterLongStop() but I can the same results.

    I realize these type of orders won't always fill like this in a real market, but I'd at least like the backtest to work properly.

    I checked my "Log" tab in Control Center and there is no indication of errors or bugs in my strategy.
    Attached Files

    #2
    Originally posted by shodson View Post
    I'm testing a counter-trend/range-bound strategy and it appears there is a bug in NT7.

    See the chart attached here as well at

    World's leading screen capture + recorder from Snagit + Screencast by Techsmith. Capture, edit and share professional-quality content seamlessly.


    I am drawing a red line where I am placing EnterShortStopLimit() orders and green lines where I am drawing EnterLongStopLimit() orders. In a backtest, though, sometimes the order is not getting filled. See the note at the bottom of the image.

    I tried changing it to EnterShortStop() and EnterLongStop() but I can the same results.

    I realize these type of orders won't always fill like this in a real market, but I'd at least like the backtest to work properly.

    I checked my "Log" tab in Control Center and there is no indication of errors or bugs in my strategy.
    The order that you marked would not have filled if using the default order methods. That order would only fill if the very next bar only traded through the price. In your picture, the next bar after the order did not trade through the order price. If you want your orders to persist, you will have to either resubmit them if not filled, or else use the liveUntilCancelled override on your orders.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    117 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    166 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    85 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    130 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    88 views
    0 likes
    Last Post PaulMohn  
    Working...
    X