Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

old existing playback order

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

    old existing playback order

    Trying to test a strategy with Advanced Order Handling as shown here:



    Connected via Playback, there seems to be an order already filled that is keeping the strategy from doing anything because myEntryOrder is never null, even after it gets initialized as null.



    I have tried the Reset DB option but this order under playback always shows up when I start the strategy.

    Suggestions?

    Thanks,
    Mark

    #2
    Hello TraderMark,

    Thank you for your note.

    At the following link, Under Advanced Order Handling, Transitioning order references from historical to live,


    If you check if entryOrder is not null when transitioning to State.Realtime, and set it accordingly as shown in the example, does the issue resolve?

    I look forward to your reply.
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_AlanP View Post
      If you check if entryOrder is not null when transitioning to State.Realtime, and set it accordingly as shown in the example, does the issue resolve?
      It helps because a order gets generated for the first entry but after that trade is stopped out, no more orders get generated.

      Comment


        #4
        Hello Trader_Mark,

        I would suggest adding print statements to check whether and when your conditions are becoming true. I’ve provided a link to a youtube video which covers an example of using prints to understand behavior:



        I’ve provided a link covering debugging which you may find helpful.
        Debugging: http://ninjatrader.com/support/forum...ead.php?t=3418

        If you’d like to send a copy of the strategy you’re running, I can take a look and see if anything jumps out.

        To export a NinjaScript from NinjaTrader 8 do the following:
        From the Control Center window select Tools -> Export -> NinjaScript...
        Click Add>Select the indicator>OK>Export.
        Then attach that file you saved; under My Docs>NT8>Bin>Custom>Select the downloaded .zip file.

        Please let us know if you need further assistance.
        Alan P.NinjaTrader Customer Service

        Comment


          #5
          Are you checking for historical?

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by NullPointStrategies, Today, 05:17 AM
          0 responses
          39 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          124 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          64 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          41 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          46 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X