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

    Free online storage and sharing with Screencast.com. 2 GB of storage and 2 GB of bandwidth per month for free. We won't compress, alter or take ownership of your content.


    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

    Free online storage and sharing with Screencast.com. 2 GB of storage and 2 GB of bandwidth per month for free. We won't compress, alter or take ownership of your content.


    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 GussJ, 03-04-2020, 03:11 PM
    11 responses
    3,229 views
    0 likes
    Last Post xiinteractive  
    Started by andrewtrades, Today, 04:57 PM
    1 response
    14 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by chbruno, Today, 04:10 PM
    0 responses
    7 views
    0 likes
    Last Post chbruno
    by chbruno
     
    Started by josh18955, 03-25-2023, 11:16 AM
    6 responses
    441 views
    0 likes
    Last Post Delerium  
    Started by FAQtrader, Today, 03:35 PM
    0 responses
    12 views
    0 likes
    Last Post FAQtrader  
    Working...
    X