Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT8.0.0.9 Playback Bug?

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

    NT8.0.0.9 Playback Bug?

    Hello, I am running a ninjascript in an 8 Range Chart with the ES futures instrument in Play back mode. I've loaded the dates from 2/14/16 to 2/20/16 for ES

    After 5 trades, no more trades are initiated even though the condition to enter a trade clearly exist.

    This happens for data set on 2/21/16 to 2/27/16 also (but I cannot remember after how many trades)

    Attached is a pic of the chart setup, the ninjascript strategy and output file. Just enable the strategy. Please see if you can re-produce this error (bug?) on your end.

    Thank you.
    Attached Files
    Last edited by geekodude; 02-29-2016, 01:23 PM.

    #2
    Hello geekodude,

    Thank you for your patience.

    The only item I could see that could potentially cause this is the use of Calculate.OnPriceChange and the following:
    Code:
    			if (IsFirstTickOfBar)
    				{
    					thisBarTrades = 0;
    					initiateTrade++;
    				}
    As the OnBarUpdate() is not called on each tick and only on price change, it could cause an effect where the opening tick is the closing tick of the prior bar and there for not a price change.

    Can you try Calculate.OnEachTick and advise if the same behavior is seen?

    Comment


      #3
      Yes, I forgot to mention in my first post I did run the strategy with every tick and the same results occur. Just to make sure I've attached a picture of trade executions as to where the trades stop . The trades stop at the exact same spot regardless of the settings ( Calculate.OnPriceChange or Calculate.OnEachTick) see pic.

      I've also ran at different speeds - same result. I've also tried different simple entry conditions. The strategy exhibits the same behavior - stops trading even though the entry condition exists throughout the data set...

      This is a very strange issue.
      Attached Files
      Last edited by geekodude; 03-01-2016, 10:44 AM.

      Comment


        #4
        Another clue. I did more testing and switched values on the range chart (see attached pic).

        For 4 range charts - upon first entry my profit target and stop loss disappear. At one point I have a 35 point profit - lol.

        For 5 Range Charts I don't get any trades after x amount of trades.

        For 10 Range Charts everything works normal!

        For Other Values on Range Charts things are random, sometimes I get trades and then they stop. Other times I don't get any trades at all.

        Upon further testing with different kinds of charts (tick minute, volume etc) I get the same inconsistencies.

        I tried 10 Range Chart again, I said it was normal above, but I still see issues.

        Please see if you can re-produce this behavior in different charts.

        Thank you
        Attached Files
        Last edited by geekodude; 03-01-2016, 02:31 PM.

        Comment


          #5
          Looks like my own ignorance got me into trouble again. Attached is a clean up version of the ninjascript in which I put events such as order entry and cancel orders into their proper event routines. Now the strategy works as intended. Since, NT8 is multithreaded, it is paramount to have events in their proper event handling routines.

          I got away with a lot of messy coding in NT7....

          Thanks for attempting and reading...
          Attached Files

          Comment


            #6
            Thanks for the update, geekodude!

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by WeyldFalcon, 08-07-2020, 06:13 AM
            11 responses
            1,422 views
            0 likes
            Last Post jculp
            by jculp
             
            Started by RubenCazorla, Today, 09:07 AM
            0 responses
            4 views
            0 likes
            Last Post RubenCazorla  
            Started by BarzTrading, Today, 07:25 AM
            2 responses
            29 views
            1 like
            Last Post BarzTrading  
            Started by devatechnologies, 04-14-2024, 02:58 PM
            3 responses
            21 views
            0 likes
            Last Post NinjaTrader_BrandonH  
            Started by tkaboris, Today, 08:01 AM
            0 responses
            6 views
            0 likes
            Last Post tkaboris  
            Working...
            X