Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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:

        Dive into manipulating C# code from within an unlocked NinjaScript strategy using the NinjaScript Editor.NinjaTrader 7 is an award winning end to end online ...


        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 timmbbo, Today, 08:59 AM
          2 responses
          10 views
          0 likes
          Last Post bltdavid  
          Started by alifarahani, Today, 09:40 AM
          6 responses
          40 views
          0 likes
          Last Post alifarahani  
          Started by Waxavi, Today, 02:10 AM
          1 response
          18 views
          0 likes
          Last Post NinjaTrader_LuisH  
          Started by Kaledus, Today, 01:29 PM
          5 responses
          15 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by Waxavi, Today, 02:00 AM
          1 response
          12 views
          0 likes
          Last Post NinjaTrader_LuisH  
          Working...
          X