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 Mindset, 04-21-2026, 06:46 AM
    0 responses
    93 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    138 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    123 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    73 views
    0 likes
    Last Post PaulMohn  
    Working...
    X