I am looking to start with coding the following strategy.

Wait for condition: 10 Period EMA crosses above 30 Period SMA

Place a limit order to buy to open a call option at 1 strike OTM on SPY at the mark price.

Wait for condition: Profit is 50 %

Place a trailing stop limit order to sell to close a call option on SPY at the mark price.

Assistance is greatly appreciated.

Author