About this template
Intro:
This bot is heavily based off of @Michael White's popular bot, Double Take (9-14 DTE). I give him the credit for this bot, assuming that it has any success at all. I am merely attempting to offer any improvement, if possible, to this already-amazing bot. He and I have been collaborating behind the scenes and he gave me the green light to go ahead and post this bot template with the hope that it might be helpful to the community.
https://app.optionalpha.com/community/member/michaelaw85/post/oversoldoverbought-etf-spreads-2
The concept of this bot is the same as his bot: look for overbought (Ob) / oversold (Os) conditions using the RSI and CCI indicators. But this bot, instead of merely anticipating a trend reversal or reversion (-R) to the mean like Double Take, actually waits until a reversal begins to happen before entering into a position. This is where the bot gets its name: ObOs-R
Background:
On Sep 26, my Double Take paper bot opened a SPS position in XLU. It was in bear market conditions w/ RSI < 38 and CCI < -125 (crosshairs show ticker price and RSI/CCI levels on that particular day). Little did we know that XLU would drop like a rock over the next few days. This position closed near max loss.
Similarly, the bot also opened positions in TLT (on 9/22) and GLD (on 9/26). These positions also suffered close to max losses because they never bounced back up as anticipated.
The ObOs-R bot, on the other hand, did not suffer these losses because it waited until the reversal in price began to happen. The ObOs-R bot waited until 9/28 before it opened a SPS position in TLT. It closed the position on 10/11 for 50% profit (it tried to close 1 day after opening but didn't get a fill in paper trading).
It opened another SPS position in TLT on 10/4 after another reversal had begun and closed it on 10/10 for another 50% profit.
Here is a comparison of the ObOs-R bot's performance compared to the same bot that does NOT wait for the reversal conditions (opens positions purely based on RSI/CCI readings).
ObOs-R (left); ObOs - no R (right).
The ObOs-R bot does not have XLU as a ticker. But if it did, it would have avoided the big loss of the Double Take bot in this position. Also of note is that by the time GLD finally bottomed out and began to reverse, the CCI indicator was no longer in oversold territory and so the ObOs-R bot did not enter a position in GLD at all, thus avoiding the loss that Double Take experienced.
(Just to note, the ObOs - no R (right) bot did not open a position in GLD in the end of Sept because the bot had maxed out at 10 positions. Then, by the time the bot had space for more positions, the Std Dev check did its job and prevented position entry in GLD. Its one loss was in TLT, as suffered by Double Take.)
Scanner:
The ObOs-R bot has one scanner that first determines whether the ticker is in an uptrend (bull), neutral, or downtrend (bear).
Short MA: 50 day (SMA)
Long MA: 200 day (SMA)
RSI Length: 14 day
CCI Length: 14 day
Bull: Short MA (50 SMA) is above Long MA (200 SMA) AND price > Short MA (50 SMA)
Neutral: (Short MA (50 SMA) is above Long MA (200 SMA) AND price < Short MA (50 SMA)) OR (Short MA (50 SMA) is below Long MA (200 SMA) AND price > Short MA (50 SMA))
Bear: Short MA (50 SMA) is below Long MA (200 SMA) AND price < Short MA (50 SMA)
Then it looks for overbought/oversold conditions based on the following automation inputs.
Bull Mkt Very Overbought RSI: 75
Bull Mkt Very Overbought CCI: 125
Bull Mkt Overbought RSI: 70
Bull Mkt Overbought CCI: 125
Bull Mkt Very Oversold RSI: 35
Bull Mkt Very Oversold CCI: -125
Bull Mkt Oversold RSI: 40
Bull Mkt Oversold CCI: -125
Neutral Mkt Very Overbought RSI: 68
Neutral Mkt Very Overbought CCI: 125
Neutral Mkt Overbought RSI: 63
Neutral Mkt Overbought CCI: 125
Neutral Mkt Very Oversold RSI: 33
Neutral Mkt Very Oversold CCI: -125
Neutral Mkt Oversold RSI: 40
Neutral Mkt Oversold CCI: -125
Bear Mkt Very Overbought RSI: 63
Bear Mkt Very Overbought CCI: 125
Bear Mkt Overbought RSI: 60
Bear Mkt Overbought CCI: 125
Bear Mkt Very Oversold RSI: 33
Bear Mkt Very Oversold CCI: -125
Bear Mkt Oversold RSI: 38
Bear Mkt Oversold CCI: -125
Position Entry:
Open Positions Anytime: Off
Open Positions Midday: Off
Open Positions EOD: On
Open New Positions After Reversal: On
Position Ladder: 2 market days
Short Std Dev: 5 std devs
Long Std Dev: 8 std devs
Std Dev Check: On
SPS Expiration: 10 days
SCS Expiration: 10 days
Long Call: $3 above short call leg
Short Call: .15 delta
Short Put: -.15 delta
Long Put: $3 below short put leg
Position Size: 1 contract
Open Price: ⇢ $.03 from mid price
RoR: 6.5
RoR Very Oversold: 8
PoP: 75
Open Interest: 5
B/A Spread: 0.15
Exiting Positions:
All values are customizable by setting the corresponding Exit Options, but these are the defaults.
Profit Taking:
Accelerated PT: Close positions that reach 50% profit if open for Accelerated PT Days Open market day or less (default is 1 market day).
PT High: Close positions at 50% profit if expiration is more than Reduced PT 1 DTE market days away (default is 3 market days).
If position return is below PT Nearing Expiration (%) (default is 45%),
Reduced PT 1: Close positions at 30% if expiration is Reduced PT 1 DTE market days away or less (default is 3 market days).
Reduced PT 2: Close positions at 20% if expiration is Reduced PT 2 DTE market days away or less (default is 2 market days).
PT Low: Close positions at 5% if expiration is PT Low DTE market day away or less (default is 1 market days).
Stop Loss:
The monitor has 2 toggles to control stop loss exits. One continuously checks for stop conditions (stop loss and breached strikes); the other only checks at the EOD (at 3:30 pm and after). Here are the default values.
Close positions at 200% stop loss if expiration is 1 market day away or less at EOD.
Close positions if short strike is breached and expiration is 1 market day away or less at EOD.
At Expiration:
The bot will attempt to close positions at 3:30 pm and after on expiration day, if:
Position return is < PT Expiration Close @ EOD (%) (default is 75%) OR
Short leg chance of ITM is > Chance of ITM Expiration Close @ EOD (%) (default is 15%) OR
Short leg OTM amount is < OTM Expiration Close @ EOD ($) (default is $1)
PDT:
This is a PDT safe bot (make sure Exit Options are set accordingly).
Allocation:
I started this bot with a $3000 allocation. This gives the bot room for 10 positions at a time, each with $300 maintenance.