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 strategist007, Today, 07:51 PM
        0 responses
        2 views
        0 likes
        Last Post strategist007  
        Started by StockTrader88, 03-06-2021, 08:58 AM
        44 responses
        3,967 views
        3 likes
        Last Post jhudas88  
        Started by rbeckmann05, Today, 06:48 PM
        0 responses
        4 views
        0 likes
        Last Post rbeckmann05  
        Started by rhyminkevin, Today, 04:58 PM
        4 responses
        58 views
        0 likes
        Last Post dp8282
        by dp8282
         
        Started by iceman2018, Today, 05:07 PM
        0 responses
        6 views
        0 likes
        Last Post iceman2018  
        Working...
        X