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;
});
Comment