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 150)
- 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 after 10:45 am (if uptrend conditions are met) and oversold SPSs will be opened at EOD after 2:45 pm. 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: 150. 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: Stop Loss 400%. This was the setting used in the backtest.
Monitor:
There is one monitor that collects position stats and closes positions on expiration day: After 3:30 pm (or after 12:30 pm on early close days AND "Early Close" switch is "On"), or if the "Tradier Close" switch is turned on and it is after 2:45 pm or later (or 11:45 am or later on early close days AND "Early Close" switch is "On"), the bot send a closing order for any position:
- Less than "Profit Target EOD Exp Close (%)"
- Greater then "Chance of ITM EOD Exp Close (%)"
- Less then "OTM EOD Exp Close ($)"
Monitor automation input default settings:
Tradier Close: Off. Toggle "On" to close positions @ 3:00 pm on expiration day according to above logic.
Early Close: Off. Toggle to "On" on days when market closes at 1:00 pm ET.
Profit Target EOD Exp Close (%): 75%
Chance of ITM EOD Exp Close (%): 15%
OTM EOD Exp Close ($): $2.5
Exp EOD Close Price: 100% of b/a spread using fast smartpricing
EOD Expiration Exit Options: Expiration 2 hours, 100% of b/a spread using fast smartpricing
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:
I have a version of this bot that has been running in paper for 4 months now. Here is its performance.