• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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?
    Patrick H.NinjaTrader Customer Service

    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!
            Patrick H.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by ttodua, Today, 01:52 PM
            1 response
            16 views
            0 likes
            Last Post NinjaTrader_Jim  
            Started by muisca, 05-19-2017, 11:49 AM
            8 responses
            6,463 views
            0 likes
            Last Post NinjaTrader_Tyler  
            Started by NinjaTrader_Brandon, Today, 12:08 PM
            0 responses
            69 views
            0 likes
            Last Post NinjaTrader_Brandon  
            Started by iq200, Today, 12:00 PM
            2 responses
            11 views
            0 likes
            Last Post iq200
            by iq200
             
            Started by valhallafutures, Today, 11:33 AM
            1 response
            18 views
            0 likes
            Last Post NinjaTrader_PatrickG  
            Working...
            X