Note: Please provide feedback! I want to make this better for everyone.
Premise: I wanted to create a bot that looked for high probability trades with 1 day until expiration to mitigate the odds of losing. The initial idea was to enter a trade that held an 80% or better chance of winning when VIX was relatively low. I also only wanted to enter a trade after the morning volatility had died down. I wanted the monitor to be fairly aggressive with my position and hold when we are in winning territory but on the surface the contract price is losing. I also wanted this bot to work for both small accounts and large accounts with the most flexibility coming for those that can day trade. It also had to be easily customizable to adjust to the user’s risk tolerance and fine tune a winning program. Here is what I came up with:
Shout out to the "Twice-a-Week - 80% Chance" bot and @matt for the inspiration!
The bot will look open a spy Iron Condor position 1DTE on Tuesday and Thursday after 11:45 EST and on Friday after 11:45 EST set to expire on Monday (or Tuesday if Monday is a holiday). I have found that I can collect very similar premiums with 2DTE Condors so why give it the extra day if we don’t need to?
Allocation requirements: You’ll want to allocate at least $100 for every 1 width point x2. So a 5 wide iron condor will require $500 x 2 or $1000 (x2 because the bot may open a new position on the date of expiration on Friday). The bot will open as many contracts it can with 50% of your total allocation. You can eliminate the x2 if you disable Friday trading.
You’ll need to program the Scanner with the following inputs:
Scanner-What we do on Tuesday/Thursday/Friday.
> Scanner VIX Threshold: Default 23.00 – The scanner will only look for new positions when volatility is below your threshold. The higher the VIX, the most likely your Iron Condor will be challenged. We will make reference to this value later in the Monitor section.
> Spread Width: Default 5. The condor will open legs (call verticals and put verticals) with the following width. It’s also about how much money you stand to risk x100 minus premium collected. There is much theory on how wide to make your Iron Condor, please do your research and understand what risks you are taking by selecting a particular condor width.
> Chance of Winning minimum: Default 79. You want this percentage number 1 below your actual target or the bot will not take a position at your target number (79 will only purchase spreads that have an 80% or better chance of winning). The lower you make this value, the more profit you stand to earn but the greater risk you take on.
> Minimum Win Credit: Default 0.44. The bot will not take in a credit smaller than this value. This is also thought of as the smallest amount of money you stand to earn per contract. For my trading, when selecting a width of $5, I want a true target of 0.50 for my target credit, but I might not get that price if a trade doesn’t trigger until later in the day and I definitely don’t want to miss an opportunity to hold a position for a few bucks.
> Trade on Friday? Default ON. The bot will make a trade on Friday if this button is on. The contract is like all the rest except it is set to expire on Monday (or Tuesday if Monday is a Holiday and a Tuesday expiration is available). This play contains more risk as holding through a weekend is generally considered “more risky” for most positions. I personally think that this risk is offset by the weekend Theta decay.
> Friday Allocation %: Default 50. The bot will only ever have 2 positions open so the max here would be 50% which will keep the bot functioning normally. But if you want to lower risk through the weekend, lowering this value will open fewer contracts based on your allocation. It does NOT affect normal behavior on Tuesday and Thursday. If you’re interested in compounding as quickly as possible, 50% is best.
What the scanner will do:
- After 11:45am EST on Tuesday, Thursday, and Friday, the bot will check your VIX Threshold against the Current VIX and see if it is below that value before continuing. No action is taken if the VIX is above your VIX Threshold.
- The bot will then make sure that you have not already opened a position today. If you get stopped out, the bot is done trading for the day.
- The bot will then go through a series of checks to make sure a contract is available that fits your criteria from the inputs above.
- The bot will also make sure that the position has a bid price greater than 0.01 and open interest is 1+.
- Next, it will make sure the bid/ask spread is less than $0.20, that you have enough money to open a position, and that the Mark is above your Max Win Credit.
- Finally, the position is opened, or it’s not.
Monitors - Core Monitor
The Core Monitor gives you the ability to turn up or down the risk levels in your play that fit your trading plan. It also contains a manual abort button to close all positions in the event you’re not liking what’s going on.
> Close all Positions Now Button: Default Off. Flip this switch and the bot will begin to close all positions, even if they were opened today. DAY TRADE WARNING. I include a button like this usually for debugging, but it’s also helpful to have a giant cancel button when I don’t like what the market is doing. It’s also useful to have as a step prior to shutting the bot down with active positions.
> Core Monitor VIX: 25 Default. This number is usually the same or higher than your Scanner VIX Threshold. Volatility ebbs and flows but at some point too much is too much. The Monitor will make different decisions to preserve capital when the VIX is above this number.
> Day Trades are OKAY? Button: Default On. I highly recommend you keep this on if your capital can support the threshold for a pattern day trader(usually about 25k as of this writing). If this is the only bot you run, you should still be able to keep the button ON and utilize the 3 day trades. To be safe, smaller accounts should probably turn off Friday trading so you never incur more than 2 day trades originating from this bot. This way you can take advantage of the the bot’s attempts to preserve capital or take an early profit.
>Take Early Profit at: Default 90. This is where your bot will look to close the position at. However, the higher the number, the less likely you’ll be able to close the position and you may have to let the options expire. Depending when in the day the Take Early Profit target hits will dictate if the position can be closed.
>Use a Trailing stop? Button: Default on. Turns on the monitor’s trailing stop function. A trailing stop uses 2 values (further explained below) to decide when to exit a position. Best paired with Day Trades are OKAY? in the on position.
> > Trailing Stop %: Default 75. The bot will check if you have earned this % of profit or more. It keeps a note on the “more” part.
> > Trail by %: Default 5. The bot will close this position if your profit falls by this value from the highest it has earned above the Trailing Stop % value above.
> Don’t Monitor and just let expire? Button: Default Off. Every trader is different. If you don’t want the monitor to check on your position for profit or loss and you want to just let the positions expire, turn this on. RISKY!
What the monitor will do:
Assuming that you have the Don’t Monitor and just let expire button in the off position, the Monitor will take two different paths based on where the VIX is in relation to your CORE Monitor VIX value.
VIX is Lower than your value:
The bot will check if the underlying price of the SPY is between the Short call and short put strikes. If so, it largely leaves the position alone. The bot will close the position when your Take Early Profit At value is reached. If you are using a Trailing Stop, it will check if it’s profit taking time all while respecting your day trade button status. If the underlying price is outside the short strikes, the bot will check if your return % is lower than -400%. If it is, it will close the position. If Day Trades are OKAY? button is off, you will get an alert that a leg is challenged and you can manually decide to close or adjust. If you have not lost more than -400%, an alert will warn you that you have a challenged leg but no action will be taken.
VIX is Higher than your value:
The bot will begin to look to exit the position but with some considerations: If you are profitable above $1, it will close the position while respecting the Day trade button. If you are not profitable, the bot will keep the position open so as long as the SPY underlying price is between your short strikes. Once the SPY underlying price has moved beyond your short strikes, the bot looks to see how much money you’ve lost. If your return on risk % is less than -300%, the position will close, day trade button respected.
Monitors – Leg Work
Until automated Iron Condor Legs is built, this monitor will alert you 3 times that your position might need to be adjusted when the bid or the ask of each leg (depending if is short or long) is between 0 and 0.05. If you don’t make an adjustment soon after you get the alert, you may lose the opportunity to adjust all together. Just to be clear, the testing data of this bot’s performance does NOT adjust legs (hence the origin of the “Don’t Monitor and just let expire? Button”).
> Would you like reminders about adjusting legs? Button – Default On.
A note about the VIX: I haven’t figured out where the sweet spot is with the VIX. At the time of V1.0’s writing, the VIX was in the 23 range and I was able to make consistent profit. HOWEVER, as soon as the VIX approached 25, Legs became challenged so something like 23 for the Scanner and 25 for the Monitor might be the ticket here. Let me know what you find out!
A note of about manual adjustments: Once the position has been manually overridden, you will need to close the position manually as well or allow to expire. Importing the position will reset the bot to incorrectly think that it was opened today and may throw off it’s calculation of DTE and day trade ability. See this video by Steve G on how to correct your P/L: https://www.loom.com/share/851c5e6c340d4dac84eb057b7e617d98
A note about adjusting your bot’s allocation: This bot compounds nicely. Try adjusting your allocation as you collect wins. Keep in mind, you are expected to win 80% of the time, that’s 4 out of 5 contracts.
A note about capital preservation: With 1 DTE options, the bot may not have adequate time to exit your position nor enough time to make manual adjustments to the Iron Condor legs especially if the underlying SPY move comes late in the trading day, usually because the unchallenged side is near worthless. Even though the bot will made decisions to help you preserve capital, there is no guarantee that it will work for your position so you should always only risk what you are willing to lose – you need to be aware of what MAX LOSS is because if you have a position open for every market day, eventually MAX LOSS WILL HAPPEN.
A note about testing: You should paper trade this bot until you get a good feel for how it behaves and after you watch it lose. This way to can make adjustments to the bot to limit drawdowns to your comfort level.
Plans for the future:
-Considering a "take profit early" active only on the day the spread was opened.
-Technicals to find the best entry points
-Automated modifying of Iron Condor Legs.
-Holiday falls on a Thursday or Friday programming.
-Sharper exit strategies
V1.3 (Version 5) 9-12-22 Reuploaded same bot to correct name of bot to correction version.
V1.3 9-11-2022 - Recommend all clones update to this version.
-The Friday argument looking for profitability chance was written with the wrong intended argument, causing the trade to never trigger. It's been updated to correctly match the Tuesday/Thursday logic.
-Removed ATR and Profit target Debug routines to clean up the bot.
New update to clean up a few things and added bid check per Steve's idea (creates better paper-trading results that are closer to real life trading results.)
-changed time to 11:30 to get trades to trigger after 11:45
-added Friday’s time restriction
-added “bid is greater than 0.01” checks to close position opportunities per Steve
Afternoon update V2
-Fixed issue with Friday trading not triggering
-Added a button for debugging additional trades the same day.
V1.1 9-3-2022 – Added the Leg Work monitor. Changed Loss of Return % from -50% to 400% (This is about a $2 dip below/above in the underlying to your strikes which boils down to about a 45% loss.) The original release would always trigger if left at -50% and -400% gives us a fighting spirt. -400% is 4x Max profit.