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 burtoninlondon, Today, 12:38 AM
    0 responses
    5 views
    0 likes
    Last Post burtoninlondon  
    Started by AaronKoRn, Yesterday, 09:49 PM
    0 responses
    13 views
    0 likes
    Last Post AaronKoRn  
    Started by carnitron, Yesterday, 08:42 PM
    0 responses
    11 views
    0 likes
    Last Post carnitron  
    Started by strategist007, Yesterday, 07:51 PM
    0 responses
    13 views
    0 likes
    Last Post strategist007  
    Started by StockTrader88, 03-06-2021, 08:58 AM
    44 responses
    3,982 views
    3 likes
    Last Post jhudas88  
    Working...
    X