Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Cancelled orders in backtest resulting in errant date and impossible outcome

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

    Cancelled orders in backtest resulting in errant date and impossible outcome

    So I have a backtest where I cancel trades after a certain period of time. I also do it with # of bars. Either way this shows up.

    Click image for larger version

Name:	Screenshot 2023-07-17 at 8.47.18 PM.png
Views:	93
Size:	567.1 KB
ID:	1260861
    As you can see, Time on these reads 1/1/1800. Which in itself isn't so bad.

    Click image for larger version

Name:	Screenshot 2023-07-17 at 8.48.12 PM.png
Views:	82
Size:	139.3 KB
ID:	1260862
    But on the chart, where there is only ONE entry per direction, and also where on 1 fill happens per direction, thanks to my cancellations... I get multiple entry/exit lines (and therefore calculations) heavily skewing my results.

    This is with TickReplay. Calculate.OnTick.

    Please advise as I've never seen this before and can only suppose the two are related.

    Thanks

    #2
    Nevermind. I see what the problem is. Using Bars in progress index for the trade substantially longer than the bars in progress that it's checking on seems to do it. I also switched between ticks and time bars so.. one of those.
    Last edited by tony_28217; 07-18-2023, 12:17 PM.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by popecapllc, 08-09-2023, 07:42 PM
    8 responses
    1,348 views
    0 likes
    Last Post Johng22
    by Johng22
     
    Started by ETFVoyageur, 04-30-2024, 02:04 PM
    11 responses
    100 views
    0 likes
    Last Post ETFVoyageur  
    Started by bubblegum, 03-18-2024, 10:41 AM
    3 responses
    45 views
    0 likes
    Last Post vjsworld  
    Started by JamesK1, Today, 02:48 PM
    1 response
    13 views
    0 likes
    Last Post JamesK1
    by JamesK1
     
    Started by llanqui, Today, 03:51 PM
    0 responses
    13 views
    0 likes
    Last Post llanqui
    by llanqui
     
    Working...
    X