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:

    https://ninjatrader.com/support/help...stopmarket.htm

    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,
    https://ninjatrader.com/support/help...r_handling.htm

    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:

        https://www.youtube.com/watch?v=K8v_...tu.be&t=48m45s

        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 Rubens_2020, Today, 01:48 PM
          1 response
          9 views
          0 likes
          Last Post NinjaTrader_Kate  
          Started by kempotrader, Today, 01:34 PM
          1 response
          22 views
          0 likes
          Last Post NinjaTrader_ChrisL  
          Started by bc24fl, Today, 01:50 PM
          1 response
          9 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Started by vantojo, Today, 01:39 PM
          0 responses
          13 views
          0 likes
          Last Post vantojo
          by vantojo
           
          Started by bosajin, 01-21-2021, 09:15 AM
          7 responses
          58 views
          0 likes
          Last Post NinjaTrader_PaulH  
          Working...
          X