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 strategist007, Today, 07:51 PM
    0 responses
    0 views
    0 likes
    Last Post strategist007  
    Started by StockTrader88, 03-06-2021, 08:58 AM
    44 responses
    3,967 views
    3 likes
    Last Post jhudas88  
    Started by rbeckmann05, Today, 06:48 PM
    0 responses
    4 views
    0 likes
    Last Post rbeckmann05  
    Started by rhyminkevin, Today, 04:58 PM
    4 responses
    55 views
    0 likes
    Last Post dp8282
    by dp8282
     
    Started by iceman2018, Today, 05:07 PM
    0 responses
    6 views
    0 likes
    Last Post iceman2018  
    Working...
    X