About this template
Explanation:
This bot was created based off of this backtest:
Scanner:
There is one scanner automation looking to open a SPS using technical analysis. It checks to see if the ticker is:
- In an uptrend:
- Ticker price is above 9 EMA AND Ticker price increased 0.15% since close 1 day ago AND
- 9 EMA intraday is above 20 EMA intraday AND
- 9 EMA 1 day ago is above 9 EMA 2 days ago AND
- Ticker is not overbought (14 day RSI intraday below 65 AND 20 day CCI intraday below 125)
- Oversold:
- Ticker price increased 0.15% since close 1 day ago AND
- (Ticker 14 day RSI below 35 1 day ago AND Ticker 14 day RSI intraday is above Ticker 14 day RSI 1 day ago
- OR -
- Ticker 20 day CCI below -150 1 day ago AND Ticker 20 day CCI intraday is above Ticker 20 day CCI 1 day ago)
Scanner automation input default settings:
- Open SPS Positions: On
- Open Positions Anytime: Off. For "Off" settings, uptrend SPSs will be opened at 11:00 am or after (if uptrend conditions are met) and oversold SPSs will be opened at EOD at 3:00 pm or after. Toggle "On" to open positions anytime, regardless of time.
- Max SPS Positions: 5 positions
- Ticker: SPY
- Price Increase (%): 0.15
- RSI Overbought: 65. This was the setting used in the backtest.
- CCI Overbought: 125. This was the setting used in the backtest.
- RSI Oversold: 35. This was the setting used in the backtest.
- CCI Oversold: -150. This was the setting used in the backtest.
- Expiration: 35 days. This was the setting used in the backtest.
- Long Put: $10 below short put leg exactly. The backtest used -0.10 delta.
- Short Put: -0.15 delta or lower. This was the setting used in the backtest.
- Min Bid Price: $0.6
- B/A Spread: $0.05
- Position Size: 1 contract
- Open Price: 100% bid/ask spread, patient smartpricing
- Exit Options: None
Monitor:
There is one monitor that collects position stats and updates exit options according to to follow settings:
Monitor automation input default settings:
- Monitor On/Off: On.
- Early Close: Off. Toggle On on days when market closes early, Off on normal days
- Tradier Close: Off. Toggle On to evaluate closing positions 1 hour before market close
- Hold Until Expiration: Off. Toggle On to only evaluate closing positions 15 mins before market closes on expiration day
- PT Expiration Close @ EOD (%): 85%. Close positions w/ return < this value @ EOD on expiration day
- Chance of ITM EOD Expiration Close (%): 15%. Close positions w/ short leg chance of ITM > this value @ EOD on expiration day
- OTM EOD Expiration Close ($): $2. Close positions w/ short leg OTM < this value @ EOD on expiration day
- EOD Expiration EO: 2 hours before, $0.05 from mid price. Exit Options applied at EOD on expiration day if any of above conditions are met
- Continuous Stop/Breached Monitor: Off. Continuously check for stop loss, breached strikes
- EOD Stop/Breached Monitor: On. Check for stop loss, breached strikes at EOD
- Stop Loss (%): 400%. This was the setting used in the backtest
- Stop Loss Monitor: On. Toggle On to close positions w/ return < Stop Loss (%)
- Stop Loss DTE Monitor: Off. Toggle On to close positions below Stop Loss (%) if expiration <= Stop Loss DTE
- Stop Loss DTE: 1 market day
- Stop Loss EO: -5%, $0.05 from mid price. Exit Options when position return < Stop Loss (%)
- Short Strike Breached Monitor: Off. Toggle On to close positions when short strike is breached
- Short Strike Breached DTE Monitor: On. Toggle On to close positions w/ breached short strike if expiration <= Short Strike Breached DTE
- Short Strike Breached DTE: 1 market day
- Short Strike Breached EO: 5%, $0.05 from mid price. Exit Options when short strike is breached
- Accelerated PT Days Open: 5 market days. Apply Accelerated PT EO to positions opened for <= this value
- Accelerated PT EO: 60%. Exit Options applied when position has been opened <= Accelerated PT Days Open
- PT High EO: 75%, 60%/15% trail, disable below 45%. Exit Options applied when expiration > Reduced PT 1 DTE days until expiration
- PT Nearing Expiration (%): 40%. If position return is less than this value as expiration approaches, reduce profit targets
- Reduced PT 1 DTE: 5 market days
- Reduced PT 1 EO: 30%. Exit Options when Reduced PT 1 DTE days from expiration & return < PT Nearing Expiration (%)
- Reduced PT 2 DTE: 3 market days
- Reduced PT 2 EO: 20%. Exit Options when Reduced PT 2 DTE days from expiration & return < PT Nearing Expiration (%)
- PT Low DTE: 1 market day
- PT Low EO: 5%: Exit Options when PT Low DTE days from expiration & return < PT Nearing Expiration (%)
Allocation:
With the default settings, this bot should use a maximum of $5000 in maintenance (5 positions max, each at $1000 risk).
Bot Safeguards:
Daily Positions: 1 per day
Position Limits: 5 at once
Cautions:
The premise of the bot is not to take profits and hold positions until the last hour or so on expiration day, assuming that they will expire worthless (unless stopped out earlier). This was the setting of the backtest. If you would like to take early profits, go ahead and update the Exit Options to your preference.
PTD Friendly:
If run with default settings, this bot is PTD friendly and OK to run in small accounts.
Performance: (As of 5/25/24)
I have a version of this bot that has been running in paper for over a year now. Here is its performance.