Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ATM Strategy creates duplicate orders

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

    ATM Strategy creates duplicate orders

    When I create an ATM Strategy order using the following code, I end up seeing two orders both in my chart trader as well as under "Positions" tab.

    One of the orders gets created under my supplied strategy name and the other gets created under the generic "Custom" strategy. Also the second one created under "Custom" has a weird entry price which is close to my supplied price but a little off.

    Am I missing some setting which is causing these duplicate orders to get created? I am using Sim01 account to test this using a live feed.

    atmStrategyId = GetAtmStrategyUniqueId();
    orderId =GetAtmStrategyUniqueId();

    AtmStrategyCreate(Cbi.OrderAction.Buy, OrderType.Limit, Low[0] + .50, 0, TimeInForce.Day, orderId, ahATMStrategy, atmStrategyId);

    #2
    highler.high, could it be you're having a Shadow strategy enabled for your ATM template?

    Are you working with this on CalculateOnBarClose = true, or false?
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Hello Bertrand,

      Thanks for your quick response.

      Shadow template was the problem. When I created this template from another template, that template was set as a shadow of this one. Removing the shadow (making it none) has solved the problem.

      I do have CalculateOnBarClose= false;

      Thanks again for your help.

      Comment


        #4
        Ok, great to hear this is resolved for you - have a good weekend
        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by pechtri, 06-22-2023, 02:31 AM
        9 responses
        122 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by frankthearm, 04-18-2024, 09:08 AM
        16 responses
        66 views
        0 likes
        Last Post NinjaTrader_Clayton  
        Started by habeebft, Today, 01:18 PM
        1 response
        5 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by benmarkal, Today, 12:52 PM
        2 responses
        15 views
        0 likes
        Last Post benmarkal  
        Started by f.saeidi, Today, 01:38 PM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Working...
        X