Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Why are trades cancelled

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

    Why are trades cancelled

    Hello all,

    So.......why when running an optimization do I end up with certain trades that are cancelled? The strategy takes both long and short trades but only ever has short positions cancelled. I have run multiple passes with the same results.

    The attached screen shot shows what I'm talking about.

    GuppyDRV
    Attached Files

    #2
    Hello GuppyDRV,

    What is in the code of the script?

    Are entries and exits being submitted on the same bar?

    Are orders being submitted at the end of a session?

    Are you attempting to use multiple orders to exit a single entry?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Chelsea,

      Thanks and sorry for the late response. So yes I'm evaluating an on bar close case where the strategy will first looks at a set of parameters and if met take a long trade. If these parameters are not met it will then (in another set of the strategy builder) evaluate for a new set of parameters and if met take a short trade. This will all happen on the same bar close. Most trades are happening but some (say 15%) are showing as cancelled. The cancelled trades are all short trades which obviously is saying there is something I'm missing in the logic as to the second trade happening.

      It is also possible to have an entry and an exit on the same bar close.

      Any help in pointing in the right direction would be greatly appreciated.

      GuppyDRV

      Comment


        #4
        Hello GuppyDRV,

        Thank you for your response.

        Without the strategy we would not be able to say for certain what is occurring. I would recommend debugging the strategy further by utilizing TraceOrders. This will provide details on the orders in the Output window (Tools > Output).

        For information on TraceOrders please visit the following link: http://ninjatrader.com/support/forum...ead.php?t=3627
        For information on debugging your script please visit the following link: http://ninjatrader.com/support/forum...ead.php?t=3418

        Comment


          #5
          Patrick,

          Thanks for the help. Is this function associated with the "Trace" check box in the strategy builder? So.....can I do this without having to manually go into the code and make changes? Does it work with back test? It sounds like a real time function that might work with Market Replay. No worries either way I can run a replay and change the code, however, I'm lazy and if I can do it with the wizard that's preferable.

          Happy Holidays,

          GuppyDRV

          Comment


            #6
            Hello GuppyDRV,

            Thank you for your patience.

            That is the correct check box in the Strategy Builder for "Trace Orders". This will work for Historical (backtesting) and Realtime orders.

            Please let me know if you have any questions.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Javierw.ok, Today, 04:12 PM
            0 responses
            4 views
            0 likes
            Last Post Javierw.ok  
            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  
            Working...
            X