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 NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    64 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    139 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    75 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    45 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    50 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X