About this template
Edited to include changes through version 9:
This is a variant of @simpliTEE's KISS n Sleep (#KnS) v9_Sidewinder MOD w/Hedge (v7) which is a variant of @RyanB's KISS n Sleep (#KnS aka Easy Bake Oven) template. The difference is that it uses @Charles's Study Targeted 0-1 DTE Iron Butterfly Market Checks and Profit Targets. Another difference is that it opens iron butterflies if the VIX is below 25 and narrow iron condors if the VIX is above 25 like in @simpliTEE's Sell the Vol Sidewinder No Monitor - Low VIX. In addition, it uses Exit Options as below. Since Exit Options are set, I felt the 'Patient Working Close' logic was redundant from simpliTEE's KnS bot's logic and I deleted that.
Here's how it works:
On market open (9:40 a.m.):
Resets bot tags and then performs market checks to make sure that RSI is within range (if not, is tagged entry off).
Tags to allow for 0DTE entry if there has not been an intraday increase of more than 0.3%.
If 0DTE entry is allowed, it also checks to see if there's been a move since yesterday's close between -2% to 0.8% and an intraday decrease of less than 0.3% to tag to allow for 1DTE entry.
Tags for position entry for potential mean reversion:
- If market gapped up, tags for bear call spread.
- If market gapped down, tags for bull put spread.
- If no market gap, tags for neutral position entry.
If the VIX is below 25, then it opens an iron butterfly (if mean reversion on - opens BCS/BPS). If the VIX is at or above 25, it opens a narrow iron condor.
If the spread is 0DTE, it checks to see if the chance of max loss is < 15.01 before opening a position.
If the spread is 1DTE, it checks to see if the chance of max loss is < 16 before opening a position.
At 9:45 a.m., on position close, and on scans every 15 minutes after that:
It seeks to open another position using the same entry criteria until 12:00 p.m. (Can be turned off after 2nd position is opened with Maintain 2 Morning Positions switch).
Default 0DTE Exit Options: 15% profit taking
Default 1DTE Exit Options: 10% profit taking, 25% stop loss.
Hedging:
Uses the same logic as in @simpliTEE's KnS bot. I just unified it into 1 monitor. Basically, it opens an iron butterfly or a short put spread or a short call spread (depending on the underlying Symbol's price movement).
VIX Limit Toggle:
Prevents new positions from opening when the VIX is above the VIX Limit Threshold (set at default to 31.5 as per @Charles's bot).
Bot Level P/L SmartStop Monitor: (Can be turned on/off by switch - default is off)
Starting after 11 a.m. (during monitor events every 15 minutes), the monitor checks bot's day P/L%.
If there is a loss in the day P/L of less than the Bot Stop Loss% (defaulted to -10%), then it closes all positions and tags the bot not to enter in any new positions for the day.
If there is a profit, it tags the bot for day P/L% in 5% increments all the way up to a day P/L of 95%. Should there be a pullback below the tagged amount, it will close all positions and tag the bot not to enter any new positions for the day.
Monitor for Chance of ITM Exit: (Can be turned on/off by switch - default is on)
On or after 11:00 a.m., closes the position if the chance that any of the short legs is ITM is greater than 95%.
On or after 12:00 p.m., closes the position if the chance that any of the short legs is ITM is greater than 90%.
On or after 1:00 p.m., closes the position if the chance that any of the short legs is ITM is greater than 85%.
On or after 2:00 p.m., closes the position if the chance that any of the short legs is ITM is greater than 80%.
On or after 3:00 p.m., closes the position if the chance that any of the short legs is ITM is greater than 75%.
Tradier Account: (Can be turned on/off by switch - default is off)
To avoid fees with Tradier (or to act like earlier versions of the template), on or after 3:00 p.m. on 0DTE, initiates expiration close of the position.
Market Close (10 minutes before when market closes for that day):
Performs expiration close for all 0DTE positions.
By default, Market Gap Check and Mean Reversion switches are off (the bot seems to perform better that way from testing so far).
Note: These settings are optimized for SPY. The bot can be used for other highly liquid tickers (currently in testing on QQQ & IWM). However, the settings may need to be tweaked.