About this template
I really appreciate all the OA community thus far. So, hopefully this contribution will help give back to the OA community. It's a small account Short Call Spread Bot which has proven solid over the past 2 weeks. I think this will continue to be quite profitable in a neutral to bearish market. Logic has been pulled from many differ bots around OA but special thanks to Viraj, Kirk, Bill, and Larry Rupp. The bot Works as listed below.
Note: I would allow the max number of positions able to be open each day and total in order to allow the bot to hedge each SCS with an SPS if necessary. Also, I would double the money allotment for the hedge as well.
SCANNER - focused on 2-9 DTE with good PoP, RoR, and low budget account.
- Loops through ticker list. Note that I have several of these bots going and these tickers have shown to be most profitable with 0 losses.
- Checks Opportunity for:
+ Good IV Rank. Certainly can be tuned, but 17 seems to be fine for me...I haven't really played with this much.
+ 0 previous positions open with this ticker.
+ Bot has available positions available. I'm only allowing 4 total as to allow for each to be hedged with a buffer, but should move to 5.
+ A DTE position is available.
+ Meets Potential Profit requirements, Rate of Return requirements, and bid/ask price < $0.20.
+ Checks to see if ticker is in a bull status using SMA (20>50/50>200/14ADX>25). If in bull market, no open position.
+ Using a switch, the scanner could check if the ticker is in a bear market status. If OFF, the scanner will open a position, else a bear status check will occur.
+ If the switch is on, check to see if the ticker is in a bear status using SMA (200>50/50>20/14ADX>25). If in a bear market state, the scanner will open a new position, else no open position.
CREDIT SPREAD HEDGER - hedges a credit spread with an opposing short spread to lessen the bleeding
- This is an automation I'm using in other credit spreads as well. Can be used with an original Short Call or Short Put spread.
- Uses a position tag to ensure this is not hedging a hedge, and the original position has not already been hedged (only 1 allowed).
- I do not want to hedge if there is 0DTE. This seemed logical to me at first, to avoid PDT but I'm handling that elsewhere so this could be out of date.
- Checks to see if the short leg is ITM.
- Makes sure the opposing credit spread is available.
- Opens the hedge credit spread with exit options. Note that these exit options are the only handling to exit the hedge credit spread.
- Appropriate tags are applied.
CREDIT SPREAD 0DTE CLOSER - handles closing original position at 0DTE
- Note that all actual position closing will occur in the Waterfall Exit Monitor. This will just tag the position to close it.
- This will only work on original positions, not hedge positions.
- Obviously, is the position at 0DTE?
- If the position is close to being ITM, just close it. This is my risk tolerance at 0DTE, but you may want to adjust it.
- If the position is not close to being ITM, then I want high profits; either high profit limit to close position or let it expire.
NOMINAL CREDIT SPREAD CLOSER - handles closing original position any time before 0DTE
- Note that all actual position closing will occur in the Waterfall Exit Monitor. This will just tag the position to close it.
- This will only work on original positions, not hedge positions.
- Obviously, is this position more than 0DTE?
- Check to see if this position is trailing the 'trailing' amount profit target and if so, mark the position to close.
- If not, check to see if the position is at a 'stop loss' amount but only after being hedged. I put the hedged constraint in there in case the original position is still OTM but early on in the position, there was a bad swing and the position can come back. If both are true, then mark the position to close.
BID/ASK WATERFALL EXIT MONITOR - This will close original credit spread and work bot level tags to avoid Day Trading when needed
- There is a switch up front that will allow or disallow day trades. There is also a bot level tag that will allow or disallow day trades. If either of these conditions are ON or TRUE and the incoming position has been opened < 1 market day, the position will not be allowed to close in order to avoid PDT. Read into this monitor and the Day Trade Counter Event to see how this works with bot level tags.
- After allowed to close position, the actual closure amount will be based on bid/ask difference. Read into this monitor for more details.
- Finally, after closing the position, if the position was opened < 1 market day ago, then a tag is added to the bot that there was a day trade that occurred. This tag will trigger actual entry into the Day Trade Counter Event.
DAY TRADE COUNTER - This simply adds bot level tags based on a counter
- Instead of explaining the exact logic flow, I'll explain how the entirety of this works. There is only 3 day trades allowed each week, starting on Monday and ending on Friday. At COB Friday, the counters are reset to 0 day trades. Each time the exit waterfall monitor conducts a day trade, this event will update a bot level tag with the old count + 1 (i.e. 0 day trades now equals '1 day trade'). Note that this of course will not account for other bots or positions that may get day traded.
ALLOW DAY TRADES - This will actually reset the count
- See Day trade Counter for information. This will trigger at COB Fridays.
BOT INPUTS:
Ticker List - This is the loop of tickers I found to be best.
DTE - Default is 2-9. Used when opening a position or checking an opportunity.
Allow Hedge - Default is ON. Used in hedge monitor. If on, allows a hedge, else will not allow a hedge position.
Market DTE Closer Checker - Not used anymore but didn't delete. This could be used in the closer monitors.
ITM Value to Close -Default is 20. This will be used in the 0DTE to see if the position is close to being ITM.
Trailed Profit Taking Before 0DTE - Default is 35. This is the nominal closer profit target trail amount.
Nominal Profit Loss After Hedge - Default is -250. Essentially a 'stop loss' after a hedge occurs. Used in the Nominal Closer Monitor.
Rate of Return - Default is 12.5. This is used in the Scanner to check an opportunity.
Min PoP - Default is 77. This is used in the Scanner to check an opportunity.
IV Rank - Default is 17. This is used in the Scanner to check an opportunity.
SCS Short Leg Delta - Default is 0.15 Delta. This is the short leg of the SCS in the Scanner.
Long Leg Width - Default is 0.01. This is the start of the long leg check and will go up from there. For small accounts this works well.
0DTE Return Percent - Default is 85. This is used on 0DTE and when the position is not challenged.
Hedge Position Exit Options - Exit options for the hedge credit spread.
Force Bear Market Indication - Default is OFF. This switch will force the scanner to check for bear market conditions to open a position.
Preclude Day Trading - Default is OFF. This will not allow the exit waterfall monitor to close day trade positions.
Num Contracts - Default is 2. This is the number of contracts to open. Originally, I had 1 but as things went well I upped to 2.