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 argusthome, 03-08-2026, 10:06 AM
    0 responses
    108 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    55 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    37 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    39 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    76 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X