Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ATM Strategy is getting overriding

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

    ATM Strategy is getting overriding

    Hi ,

    When ever my strategy place ATM order with one Template = ATM_TemplateName1 and other strategy places order with different template Template = ATM_TemplateName2 .

    As these strategies are running in diff Sim account SIM101 and SIM102 . But when order is placed in SIM102 with ATM_TemplateName2 previously placed order with ATM_TemplateName1 in SIM101 will be overritten by ATM_TemplateName2 in SIM101 . I don't don't want this to happen SIM101 should work with ATM_TemplateName1 and SIM102 hould work with ATM_TemplateName2
    How i can achive this?

    AtmStrategyCreate(OrderAction.Buy, OrderType.Limit, longLimitPrice, lstop-1, TimeInForce.Day, orderId, ATM_TemplateName1, atmStrategyId, (atmCallbackErrorCode, atmCallBackId) => {
    //check that the atm strategy create did not result in error, and that the requested atm strategy matches the id in callback
    if (atmCallbackErrorCode == ErrorCode.NoError && atmCallBackId == atmStrategyId)
    isAtmStrategyCreated = true;
    });

    AtmStrategyCreate(OrderAction.Buy, OrderType.Limit, longLimitPrice, lstop-1, TimeInForce.Day, orderId, ATM_TemplateName2, atmStrategyId, (atmCallbackErrorCode, atmCallBackId) => {
    //check that the atm strategy create did not result in error, and that the requested atm strategy matches the id in callback
    if (atmCallbackErrorCode == ErrorCode.NoError && atmCallBackId == atmStrategyId)
    isAtmStrategyCreated = true;
    });

    #2
    Hello shankar.deshapande,

    From the given code I would not be certain what the problem is. Have you tried to make a copy of the SampleATMStrategy and modify it to use your template? You could then make a second copy pointing to the second template to further test. If you can see a problem using that sample then we could take a look at the situation with the steps you provide to see the problem.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    45 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    21 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    31 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    50 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    42 views
    0 likes
    Last Post CarlTrading  
    Working...
    X