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?

    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

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        144 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        71 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        125 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        79 views
        0 likes
        Last Post PaulMohn  
        Working...
        X