• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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 rwilliam, Today, 03:14 PM
        0 responses
        3 views
        0 likes
        Last Post rwilliam  
        Started by rwilliam, Today, 03:10 PM
        1 response
        3 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by rontronimous, Today, 03:04 PM
        2 responses
        4 views
        0 likes
        Last Post rontronimous  
        Started by zacharydw00, Today, 03:14 PM
        0 responses
        2 views
        0 likes
        Last Post zacharydw00  
        Started by junkone, 09-12-2019, 07:10 PM
        11 responses
        78 views
        0 likes
        Last Post cnecorp
        by cnecorp
         
        Working...
        X