I have a strategy that enters the market with an atm strategy (just 1 target, 1 stop) as follows:
AtmStrategyCreate(OrderAction.Buy, EntryPrice >= GetCurrentAsk() ? OrderType.StopMarket : OrderType.Limit, EntryPrice, EntryPrice, TimeInForce.Day, orderId, "ToffyLadder", 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; stratRunAttempts++; } });
Now I would like to add to this position so that the target and stop orders pick up the additional quantities for the exit. (Which works just like that when manually entering trades as long as the same ATM strategy is selected.)
I ensure programmatically the same ATM Strategy is selected in Chart Trader and then simply enter via
EnterLongStopMarket(0, true, qty, stopPrice, "Entry_" + n);
Two questions:
1) How do I need to create the entries to be added? Each as a separate AtmStrategyCreate?
2) Once the ATM Strategy is active, how can I obtain the current price level or TARGET1 and STOP1?
Thanks in advance!
Comment