Hello all,

I am new to the automated trading world and writing code. My goal is to develop an algorithm that trades options credit spreads. I have been manually trading this strategy for about a year, The problem is I still have a full time job and the strategy needs close attention.

I would like the ability to have the algo enter trades. It would also need the ability to turn this feature off and be attached to a manually entered trade. The present strategy is to enter trades after the open and close all trades before market close. I have been trading SPY and the overnight gaps are dangerous.

The criteria would be:

1. Determine the direction of the underlying. Bullish would enter a put credit. Bearish would enter a call credit spread.

2. Enter trades after an adjustable time. The first hour is too volatile.

3. A short position delta of A. This determines probability of profit.

4. A spread of B points

5. The credit is => the number of days till expiration (15%roi for 15dte)

6. I also look at open interest and find the highest. That is where the smart money is and a great indicator of what is going to happen.

Once the credit spread is filled, the algo will monitor the long and short positions. The short position will immediately have a trailing stop order of Ycents placed on it. I have been using .20 cents for the first hour and then adjust to .1-.12 cents for the rest of the day. If price goes in my favor the short will lose value and eventually be stopped out for a profit. If price does not go in my favor the short will get stopped out thus minimizing loss. When this occurs, a tight trailing stop is placed on the long position. If price continues in the right direction the long will get stopped out. If price reverses the long will gain value and either increase profit for the spread or reduce the loss.

Finding the right trailing stop values has been a challenge. Getting stopped out and maximizing profit is a fine line. Other ideas for exiting the trades are encouraged!

If the trade goes my way and does not get stopped out. the algo will close the trade at a determined percentage of max profit.

I currently use Interactive Brokers to trade so the algo should be compatible with IB. I am open to suggestions on where to use it.