Attach Order to SMA

Is there a command to attach a buy/stop order to an SMA? I know you can do this on the platform, but I would like to include this in a strategy.
Thanks!