Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategies output show duplicate execution

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

    Strategies output show duplicate execution

    Hi, I've noticed duplicate execution for strategies in NT8. For instance if I run the following simple strategy from Feb 1 2016 to Feb 3 2016 (hourly candles) I get a duplicate output in two passes from Feb 1st to 3rd, and again from 1st to 3rd

    I don't know if this is a bug or not, but it's strange and I'd like to know the reason. The strategies seem to work fine though.

    Best regards.

    Code:
    protected override void OnBarUpdate()
    { 
    Print(Time[0].ToString()+"; "+CurrentBar.ToString()+"; "+Instrument.FullName+"; BIP:"+BarsInProgress.ToString());
    return;
    }
    OUTPUT:
    01/02/2016 1:00:00; 0; ES 09-16; BIP:0
    01/02/2016 2:00:00; 1; ES 09-16; BIP:0
    01/02/2016 3:00:00; 2; ES 09-16; BIP:0
    01/02/2016 4:00:00; 3; ES 09-16; BIP:0
    01/02/2016 5:00:00; 4; ES 09-16; BIP:0
    01/02/2016 6:00:00; 5; ES 09-16; BIP:0
    01/02/2016 7:00:00; 6; ES 09-16; BIP:0
    01/02/2016 8:00:00; 7; ES 09-16; BIP:0
    01/02/2016 9:00:00; 8; ES 09-16; BIP:0
    01/02/2016 10:00:00; 9; ES 09-16; BIP:0
    01/02/2016 11:00:00; 10; ES 09-16; BIP:0
    01/02/2016 12:00:00; 11; ES 09-16; BIP:0
    01/02/2016 13:00:00; 12; ES 09-16; BIP:0
    01/02/2016 14:00:00; 13; ES 09-16; BIP:0
    01/02/2016 15:00:00; 14; ES 09-16; BIP:0
    01/02/2016 16:00:00; 15; ES 09-16; BIP:0
    01/02/2016 17:00:00; 16; ES 09-16; BIP:0
    01/02/2016 18:00:00; 17; ES 09-16; BIP:0
    01/02/2016 19:00:00; 18; ES 09-16; BIP:0
    01/02/2016 20:00:00; 19; ES 09-16; BIP:0
    01/02/2016 21:00:00; 20; ES 09-16; BIP:0
    01/02/2016 22:00:00; 21; ES 09-16; BIP:0
    01/02/2016 23:00:00; 22; ES 09-16; BIP:0
    02/02/2016 1:00:00; 23; ES 09-16; BIP:0
    02/02/2016 2:00:00; 24; ES 09-16; BIP:0
    02/02/2016 3:00:00; 25; ES 09-16; BIP:0
    02/02/2016 4:00:00; 26; ES 09-16; BIP:0
    02/02/2016 5:00:00; 27; ES 09-16; BIP:0
    02/02/2016 6:00:00; 28; ES 09-16; BIP:0
    02/02/2016 7:00:00; 29; ES 09-16; BIP:0
    02/02/2016 8:00:00; 30; ES 09-16; BIP:0
    02/02/2016 9:00:00; 31; ES 09-16; BIP:0
    02/02/2016 10:00:00; 32; ES 09-16; BIP:0
    02/02/2016 11:00:00; 33; ES 09-16; BIP:0
    02/02/2016 12:00:00; 34; ES 09-16; BIP:0
    02/02/2016 13:00:00; 35; ES 09-16; BIP:0
    02/02/2016 14:00:00; 36; ES 09-16; BIP:0
    02/02/2016 15:00:00; 37; ES 09-16; BIP:0
    02/02/2016 16:00:00; 38; ES 09-16; BIP:0
    02/02/2016 17:00:00; 39; ES 09-16; BIP:0
    02/02/2016 18:00:00; 40; ES 09-16; BIP:0
    02/02/2016 19:00:00; 41; ES 09-16; BIP:0
    02/02/2016 20:00:00; 42; ES 09-16; BIP:0
    02/02/2016 21:00:00; 43; ES 09-16; BIP:0
    02/02/2016 22:00:00; 44; ES 09-16; BIP:0
    02/02/2016 23:00:00; 45; ES 09-16; BIP:0
    03/02/2016 1:00:00; 46; ES 09-16; BIP:0
    03/02/2016 2:00:00; 47; ES 09-16; BIP:0
    03/02/2016 3:00:00; 48; ES 09-16; BIP:0
    03/02/2016 4:00:00; 49; ES 09-16; BIP:0
    03/02/2016 5:00:00; 50; ES 09-16; BIP:0
    03/02/2016 6:00:00; 51; ES 09-16; BIP:0
    03/02/2016 7:00:00; 52; ES 09-16; BIP:0
    03/02/2016 8:00:00; 53; ES 09-16; BIP:0
    03/02/2016 9:00:00; 54; ES 09-16; BIP:0
    03/02/2016 10:00:00; 55; ES 09-16; BIP:0
    03/02/2016 11:00:00; 56; ES 09-16; BIP:0
    03/02/2016 12:00:00; 57; ES 09-16; BIP:0
    03/02/2016 13:00:00; 58; ES 09-16; BIP:0
    03/02/2016 14:00:00; 59; ES 09-16; BIP:0
    03/02/2016 15:00:00; 60; ES 09-16; BIP:0
    03/02/2016 16:00:00; 61; ES 09-16; BIP:0
    03/02/2016 17:00:00; 62; ES 09-16; BIP:0
    03/02/2016 18:00:00; 63; ES 09-16; BIP:0
    03/02/2016 19:00:00; 64; ES 09-16; BIP:0
    03/02/2016 20:00:00; 65; ES 09-16; BIP:0
    03/02/2016 21:00:00; 66; ES 09-16; BIP:0
    03/02/2016 22:00:00; 67; ES 09-16; BIP:0
    01/02/2016 1:00:00; 0; ES 09-16; BIP:0
    01/02/2016 2:00:00; 1; ES 09-16; BIP:0
    01/02/2016 3:00:00; 2; ES 09-16; BIP:0
    01/02/2016 4:00:00; 3; ES 09-16; BIP:0
    01/02/2016 5:00:00; 4; ES 09-16; BIP:0
    01/02/2016 6:00:00; 5; ES 09-16; BIP:0
    01/02/2016 7:00:00; 6; ES 09-16; BIP:0
    01/02/2016 8:00:00; 7; ES 09-16; BIP:0
    01/02/2016 9:00:00; 8; ES 09-16; BIP:0
    01/02/2016 10:00:00; 9; ES 09-16; BIP:0
    01/02/2016 11:00:00; 10; ES 09-16; BIP:0
    01/02/2016 12:00:00; 11; ES 09-16; BIP:0
    01/02/2016 13:00:00; 12; ES 09-16; BIP:0
    01/02/2016 14:00:00; 13; ES 09-16; BIP:0
    01/02/2016 15:00:00; 14; ES 09-16; BIP:0
    01/02/2016 16:00:00; 15; ES 09-16; BIP:0
    01/02/2016 17:00:00; 16; ES 09-16; BIP:0
    01/02/2016 18:00:00; 17; ES 09-16; BIP:0
    01/02/2016 19:00:00; 18; ES 09-16; BIP:0
    01/02/2016 20:00:00; 19; ES 09-16; BIP:0
    01/02/2016 21:00:00; 20; ES 09-16; BIP:0
    01/02/2016 22:00:00; 21; ES 09-16; BIP:0
    01/02/2016 23:00:00; 22; ES 09-16; BIP:0
    02/02/2016 1:00:00; 23; ES 09-16; BIP:0
    02/02/2016 2:00:00; 24; ES 09-16; BIP:0
    02/02/2016 3:00:00; 25; ES 09-16; BIP:0
    02/02/2016 4:00:00; 26; ES 09-16; BIP:0
    02/02/2016 5:00:00; 27; ES 09-16; BIP:0
    02/02/2016 6:00:00; 28; ES 09-16; BIP:0
    02/02/2016 7:00:00; 29; ES 09-16; BIP:0
    02/02/2016 8:00:00; 30; ES 09-16; BIP:0
    02/02/2016 9:00:00; 31; ES 09-16; BIP:0
    02/02/2016 10:00:00; 32; ES 09-16; BIP:0
    02/02/2016 11:00:00; 33; ES 09-16; BIP:0
    02/02/2016 12:00:00; 34; ES 09-16; BIP:0
    02/02/2016 13:00:00; 35; ES 09-16; BIP:0
    02/02/2016 14:00:00; 36; ES 09-16; BIP:0
    02/02/2016 15:00:00; 37; ES 09-16; BIP:0
    02/02/2016 16:00:00; 38; ES 09-16; BIP:0
    02/02/2016 17:00:00; 39; ES 09-16; BIP:0
    02/02/2016 18:00:00; 40; ES 09-16; BIP:0
    02/02/2016 19:00:00; 41; ES 09-16; BIP:0
    02/02/2016 20:00:00; 42; ES 09-16; BIP:0
    02/02/2016 21:00:00; 43; ES 09-16; BIP:0
    02/02/2016 22:00:00; 44; ES 09-16; BIP:0
    02/02/2016 23:00:00; 45; ES 09-16; BIP:0
    03/02/2016 1:00:00; 46; ES 09-16; BIP:0
    03/02/2016 2:00:00; 47; ES 09-16; BIP:0
    03/02/2016 3:00:00; 48; ES 09-16; BIP:0
    03/02/2016 4:00:00; 49; ES 09-16; BIP:0
    03/02/2016 5:00:00; 50; ES 09-16; BIP:0
    03/02/2016 6:00:00; 51; ES 09-16; BIP:0
    03/02/2016 7:00:00; 52; ES 09-16; BIP:0
    03/02/2016 8:00:00; 53; ES 09-16; BIP:0
    03/02/2016 9:00:00; 54; ES 09-16; BIP:0
    03/02/2016 10:00:00; 55; ES 09-16; BIP:0
    03/02/2016 11:00:00; 56; ES 09-16; BIP:0
    03/02/2016 12:00:00; 57; ES 09-16; BIP:0
    03/02/2016 13:00:00; 58; ES 09-16; BIP:0
    03/02/2016 14:00:00; 59; ES 09-16; BIP:0
    03/02/2016 15:00:00; 60; ES 09-16; BIP:0
    03/02/2016 16:00:00; 61; ES 09-16; BIP:0
    03/02/2016 17:00:00; 62; ES 09-16; BIP:0
    03/02/2016 18:00:00; 63; ES 09-16; BIP:0
    03/02/2016 19:00:00; 64; ES 09-16; BIP:0
    03/02/2016 20:00:00; 65; ES 09-16; BIP:0
    03/02/2016 21:00:00; 66; ES 09-16; BIP:0
    03/02/2016 22:00:00; 67; ES 09-16; BIP:0

    #2
    Originally posted by drecio View Post
    Hi, I've noticed duplicate execution for strategies in NT8. For instance if I run the following simple strategy from Feb 1 2016 to Feb 3 2016 (hourly candles) I get a duplicate output in two passes from Feb 1st to 3rd, and again from 1st to 3rd

    I don't know if this is a bug or not, but it's strange and I'd like to know the reason. The strategies seem to work fine though.

    Best regards.
    I ran on ES from 6/24 to 7/1 and received 1 print for every hour and no repeat at Max Playback-Market Replay.

    Look in your replay data folder - do you have data in there 2x by chance?

    Have any other information to go off of? Does it do it for all dates or just these?

    Are you using merge back adjusted data? I noticed you are on ES 09-16, and you are running Feb 1 through Feb 3 2016?


    Did the first data happen instantly, then the 2nd prints where when it was actually playing? That would make sense to me. I've reported this but no one understands what the heck I'm talking about.

    Comment


      #3
      Originally posted by sledge View Post
      I ran on ES from 6/24 to 7/1 and received 1 print for every hour and no repeat at Max Playback-Market Replay.

      Look in your replay data folder - do you have data in there 2x by chance?

      Have any other information to go off of? Does it do it for all dates or just these?

      Are you using merge back adjusted data? I noticed you are on ES 09-16, and you are running Feb 1 through Feb 3 2016?


      Did the first data happen instantly, then the 2nd prints where when it was actually playing? That would make sense to me. I've reported this but no one understands what the heck I'm talking about.
      Hi sledge, thank you very much for your answer.
      I backtest the strategies in the Strategy Analyzer, so I get all the output at one time When I stambled upon this issue, I wrote a test dummy strategy which only prints every bar time in order to discard more complicated things. I'm using backtest adjusted data, but it seems not depend on the instrument nor the test dates. The Order Fill Resolution is Standard.
      Today I ran the backtest again by opening a new strategy analizer tab, and there was no duplicate output there, however my other opened tabs still showed duplicates after a new backtest. What I did was restarting NinjaTrader and it no longer had any duplicates, it was weird.

      After a bit digging, it turns out to be related to the Display Option within Strategy Analyzer, that is:
      1)-> If you select Summary or Settings there is no duplicate output,
      2)=> If you select another option (Analysis, Charts, Executions, Trades, Orders, Monte Carlo) the output is duplicated.

      Moreover. Taking into account Order Fill Resolution (which I don't fully understand yet as BarsInProgress is always 0)
      3)-> Order Fill Resolution to High (1m). If you select Summary or Settings there is no duplicate output,
      4)=>Order Fill Resolution to High (1m). If you select another option (Analysis, Charts, Executions, Trades, Orders, Monte Carlo) the output is duplicated three times (the second pass is duplicated twice for each bar). Sorry, the explanation is getting more complicated. It would be better to have a look into the below output examples.


      Output example for 6S 09-16 (contract that I never used before in NT8), you can try whatever contract you want, same results. 4 hour bars, Jul 28 to 29 2016

      1)-> Display (Summary, Settings):
      28/07/2016 4:00:00; 0; 6S 09-16; BIP:0
      28/07/2016 8:00:00; 1; 6S 09-16; BIP:0
      28/07/2016 12:00:00; 2; 6S 09-16; BIP:0
      28/07/2016 16:00:00; 3; 6S 09-16; BIP:0
      28/07/2016 20:00:00; 4; 6S 09-16; BIP:0
      28/07/2016 23:00:00; 5; 6S 09-16; BIP:0
      29/07/2016 4:00:00; 6; 6S 09-16; BIP:0
      29/07/2016 8:00:00; 7; 6S 09-16; BIP:0
      29/07/2016 12:00:00; 8; 6S 09-16; BIP:0
      29/07/2016 16:00:00; 9; 6S 09-16; BIP:0
      29/07/2016 20:00:00; 10; 6S 09-16; BIP:0

      2)=> Display (Analysis, Charts, Executions, Trades, Orders, Monte Carlo)
      28/07/2016 4:00:00; 0; 6S 09-16; BIP:0
      28/07/2016 8:00:00; 1; 6S 09-16; BIP:0
      28/07/2016 12:00:00; 2; 6S 09-16; BIP:0
      28/07/2016 16:00:00; 3; 6S 09-16; BIP:0
      28/07/2016 20:00:00; 4; 6S 09-16; BIP:0
      28/07/2016 23:00:00; 5; 6S 09-16; BIP:0
      29/07/2016 4:00:00; 6; 6S 09-16; BIP:0
      29/07/2016 8:00:00; 7; 6S 09-16; BIP:0
      29/07/2016 12:00:00; 8; 6S 09-16; BIP:0
      29/07/2016 16:00:00; 9; 6S 09-16; BIP:0
      29/07/2016 20:00:00; 10; 6S 09-16; BIP:0
      28/07/2016 4:00:00; 0; 6S 09-16; BIP:0
      28/07/2016 8:00:00; 1; 6S 09-16; BIP:0
      28/07/2016 12:00:00; 2; 6S 09-16; BIP:0
      28/07/2016 16:00:00; 3; 6S 09-16; BIP:0
      28/07/2016 20:00:00; 4; 6S 09-16; BIP:0
      28/07/2016 23:00:00; 5; 6S 09-16; BIP:0
      29/07/2016 4:00:00; 6; 6S 09-16; BIP:0
      29/07/2016 8:00:00; 7; 6S 09-16; BIP:0
      29/07/2016 12:00:00; 8; 6S 09-16; BIP:0
      29/07/2016 16:00:00; 9; 6S 09-16; BIP:0
      29/07/2016 20:00:00; 10; 6S 09-16; BIP:0

      3)-> Order Fill Resolution to High (1m). Display (Summary, Settings):
      28/07/2016 4:00:00; 0; 6S 09-16; BIP:0
      28/07/2016 8:00:00; 1; 6S 09-16; BIP:0
      28/07/2016 12:00:00; 2; 6S 09-16; BIP:0
      28/07/2016 16:00:00; 3; 6S 09-16; BIP:0
      28/07/2016 20:00:00; 4; 6S 09-16; BIP:0
      28/07/2016 23:00:00; 5; 6S 09-16; BIP:0
      29/07/2016 4:00:00; 6; 6S 09-16; BIP:0
      29/07/2016 8:00:00; 7; 6S 09-16; BIP:0
      29/07/2016 12:00:00; 8; 6S 09-16; BIP:0
      29/07/2016 16:00:00; 9; 6S 09-16; BIP:0
      29/07/2016 20:00:00; 10; 6S 09-16; BIP:0

      4)=> Order Fill Resolution to High (1m). Display (Analysis, Charts, Executions, Trades, Orders, Monte Carlo)
      28/07/2016 4:00:00; 0; 6S 09-16; BIP:0
      28/07/2016 8:00:00; 1; 6S 09-16; BIP:0
      28/07/2016 12:00:00; 2; 6S 09-16; BIP:0
      28/07/2016 16:00:00; 3; 6S 09-16; BIP:0
      28/07/2016 20:00:00; 4; 6S 09-16; BIP:0
      28/07/2016 23:00:00; 5; 6S 09-16; BIP:0
      29/07/2016 4:00:00; 6; 6S 09-16; BIP:0
      29/07/2016 8:00:00; 7; 6S 09-16; BIP:0
      29/07/2016 12:00:00; 8; 6S 09-16; BIP:0
      29/07/2016 16:00:00; 9; 6S 09-16; BIP:0
      29/07/2016 20:00:00; 10; 6S 09-16; BIP:0
      28/07/2016 4:00:00; 0; 6S 09-16; BIP:0
      28/07/2016 4:00:00; 0; 6S 09-16; BIP:0
      28/07/2016 8:00:00; 1; 6S 09-16; BIP:0
      28/07/2016 8:00:00; 1; 6S 09-16; BIP:0
      28/07/2016 12:00:00; 2; 6S 09-16; BIP:0
      28/07/2016 12:00:00; 2; 6S 09-16; BIP:0
      28/07/2016 16:00:00; 3; 6S 09-16; BIP:0
      28/07/2016 16:00:00; 3; 6S 09-16; BIP:0
      28/07/2016 20:00:00; 4; 6S 09-16; BIP:0
      28/07/2016 20:00:00; 4; 6S 09-16; BIP:0
      28/07/2016 23:00:00; 5; 6S 09-16; BIP:0
      28/07/2016 23:00:00; 5; 6S 09-16; BIP:0
      29/07/2016 4:00:00; 6; 6S 09-16; BIP:0
      29/07/2016 4:00:00; 6; 6S 09-16; BIP:0
      29/07/2016 8:00:00; 7; 6S 09-16; BIP:0
      29/07/2016 8:00:00; 7; 6S 09-16; BIP:0
      29/07/2016 12:00:00; 8; 6S 09-16; BIP:0
      29/07/2016 12:00:00; 8; 6S 09-16; BIP:0
      29/07/2016 16:00:00; 9; 6S 09-16; BIP:0
      29/07/2016 16:00:00; 9; 6S 09-16; BIP:0
      29/07/2016 20:00:00; 10; 6S 09-16; BIP:0
      29/07/2016 20:00:00; 10; 6S 09-16; BIP:0

      Comment


        #4
        Hello drecio,

        Thank you for writing in and for providing those steps you have used to reproduce the output.

        I was also able to reproduce this duplication behavior on my end and will be submitting this to our development team for further investigation. Thank you for finding this!

        Please, let us know if we may be of further assistance.
        Zachary G.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by kempotrader, Today, 08:56 AM
        0 responses
        6 views
        0 likes
        Last Post kempotrader  
        Started by kempotrader, Today, 08:54 AM
        0 responses
        4 views
        0 likes
        Last Post kempotrader  
        Started by mmenigma, Today, 08:54 AM
        0 responses
        2 views
        0 likes
        Last Post mmenigma  
        Started by halgo_boulder, Today, 08:44 AM
        0 responses
        1 view
        0 likes
        Last Post halgo_boulder  
        Started by drewski1980, Today, 08:24 AM
        0 responses
        3 views
        0 likes
        Last Post drewski1980  
        Working...
        X