Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Same timestamps => multiple identical entries

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

    Same timestamps => multiple identical entries

    Hi. I have a tick-based strategy in which entries often occur at prices followed by prices with the same time stamps. I have used unmanaged approach and send orders via the SubmitOrder function.

    Problem in backtest: In the same time stamps situation, my submitting an order results in submitting several 'cloned' orders, each for every subsequent equal time stamp. The 'EntriesPerDirection = 1' command doesn't help. Is there a workaround? (I need 1 entry per direction and I have that when using managed but not unmanaged approach)

    #2
    Hello volodja,

    Using the Unmanaged Approach the "EntriesPerDirection" entry handing rule will be ignored as Unmanaged provides the most flexibility for entering orders.

    If you would like to try to limit the amount of orders you are submitting when in a Position, you may want to use the Position.MarketPosition to be able to get your current MarketPosition to add into your entry conditions. Here is a link to our Help Guide that will give you an example of this that you may view.

    JCNinjaTrader Customer Service

    Comment


      #3
      Thanks for your response. I mean that if I send one order at a tick followed by n ticks all with the same time stamp as the entry tick, then instead of one order, n + 1 orders are submitted.

      Example: Suppose I happen to submit an order when the first tick in the series below is reached:

      7/1/2013 11:55:22; 97.38 // I submit a market order here
      7/1/2013 11:55:22; 97.35
      7/1/2013 11:55:22; 97.35
      7/1/2013 11:55:22; 97.34

      Then instead of one market order, four market orders are submitted simultaneously, at prices 97.38, 97.35, 97.35, and 97.34, respectively. So even though I plan to buy one lot at 97.38, I end up buying four lots at the above prices.

      If I use managed approach, this problem will not exist.

      Comment


        #4
        Hello volodja,

        Thanks for the clarification. You may want to use an IOrder object and check to make sure your IOrder object is null before submitting another order, that way if Ticks come in before your order is filled NinjaTrader still knows that you are already submitted an order. An example of this can be found at the following link to our Help Guide.

        JCNinjaTrader Customer Service

        Comment


          #5
          I'm not so sure that testing a script which uses unmanaged approach in backtest, can performance the same as it was a live simulation. I've tried this before and backtest comes with funny results

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          649 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          370 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          109 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          574 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          576 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X