It looks like I'll need to include this line of code in SetDefaults:
IsAdoptAccountPositionAware = true;
The AtmStrategyChangeStopTarget() method has four parameters:
| limitPrice | Order limit price |
| stopPrice | Order stop price |
| orderName | The order name such as "Stop1" or "Target2" |
| atmStrategyId | The unique identifier for the ATM strategy |
protected override void OnBarUpdate()
{
AtmStrategyChangeStopTarget(0, SMA(10)[0], "Stop1", "AtmIdValue");
}
If we're just trying to trail the stop:
- leave limitPrice = 0 ?
- set stopPrice to wherever you're trying to move the new stop
- how do you get "orderName" and "atmStrategyId" for trades you place manually??

Comment