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 Cross161, Yesterday, 10:33 PM
        0 responses
        6 views
        0 likes
        Last Post Cross161  
        Started by neilzep, Yesterday, 08:55 PM
        0 responses
        7 views
        0 likes
        Last Post neilzep
        by neilzep
         
        Started by javier.filgueira, Yesterday, 03:29 PM
        3 responses
        10 views
        0 likes
        Last Post javier.filgueira  
        Started by Da vinci, Yesterday, 03:15 PM
        1 response
        8 views
        0 likes
        Last Post NinjaTrader_ChrisL  
        Started by Da vinci, Yesterday, 02:51 PM
        1 response
        14 views
        0 likes
        Last Post NinjaTrader_ChrisL  
        Working...
        X