About this template
Edited to include changes through version 19:
This is a bot template I've created based on the entry logic in Cow's Self Adjusting High Probability Synth Iron Condor SPY PDT Edition. I've been using Cow's bot for a while, and it almost never had a losing position. I believe that was mainly due to the entry criteria being so rigid that it only cherry picks the trades with a high probability of success.
However, when there is a significant move in the market that causes a position to lose, I felt the management of potential losses in that bot was lacking. It was hard to understand all the different tags that helped manage that bot. In addition, Cow's bot was designed around 1 ticker and I felt that a multi-ticker capable bot would be better. So, that led me to create this template.
Note about allocation:
Please allocate DOUBLE what you intend to risk as making a synthetic condor requires a double maintenance (one for each wing). When OA sends the order to your platform, only one maintenance hold will actually exist but the bot will think it's holding onto two, so we're tricking it ;)
Here's how it works:
Scanner:
Loops through all symbols in Symbol Loop.
Avoid Earnings - avoids opening positions if earnings are within Earnings Blackout Period
If the VIX is below the VIX Scanning Threshold (default at 33) and the Symbol hasn't moved significantly based on standard deviation moves, then the scanner checks for trends based on SMA.
- Bullish trend (5/20/50): Checks for iron condors with 0.05 delta short calls & -0.15 delta short puts
- Bearish trend (50/20/5): Checks for iron condors with 0.15 delta short calls & -0.05 delta short puts
- Neutral trend: Checks for iron condors with 0.10 delta short calls & -0.10 delta short puts
Opportunity filters:
1. Checks to see if the position is available.
2. Checks to see if chance of profit is more than Minimum Chance of Winning (modifiable but defaulted to 79%).
3. Checks to see if bid price > $0.01.
4. Checks to see if all legs open interest > 1.
5. Checks to see if bid/ask spread < $0.20.
6. Checks to see if rate of return > Minimum Rate of Return % (modifiable but defaulted to 13%).
7. Checks to see if bot has enough capital to open position.
8. Checks to see if short put spread rate of return > Put Spread Minimum Rate of Return % (modifiable but defaulted to 5%).
If it passes all of that, then it opens a short put spread with the same strikes as in the iron condors.
The Spread Width is defaulted to $3 (modifiable).
Global Exit Options - 70% profit take with Fast SmartPricing; Trail with 60% trigger, 20% pullback (modifiable).
Position Size - default set to 10% of net liquid. If you do not wish to use compounding, then change to use % of allocation instead.
Complete Original Iron Condor:
Upon opening an original short put spread, this automation completes the iron condor with opening the corresponding short call spread if the call spread's rate of return is greater than Call Spread Minimum Rate of Return % (modifiable, but defaulted to 4%).
Complete Broken Wing Monitor:
This checks to see if the iron condor has only 1 of its spreads. If it does, then it goes through the same checks as in the scanner and looks to complete the iron condor.
Iron Fly Hedging: *Adjusted to be more of a very narrow iron condor*
If a wing of the iron condor is challenged, then it opens up the contralateral spread to create a synthetic iron butterfly for the challenged position. In other words:
If symbol's price is under the short strike of the put spread, a credit call spread is opened with the short strike being 1 above the short strike in the put spread.
If symbol's price is above the short strike of the call spread, a credit put spread is opened with the short strike being 1 below the short strike in the call spread.
This additional credit should hedge any losses from the challenged position.
Hedge Spread Exit Options is by default set to 70% profit take with Fast SmartPricing; Trail with 60% trigger, 20% pullback (modifiable).
Synthetic Iron Condor Monitor:
Tradier Account Check: (Can be turned off via bot-level switch)
On/after 3:00 p.m. EST, checks all 0DTE positions to see if the short leg's delta's have the potential to be ITM. If it does, then it initiates an expiration close.
If position is challenged based on chance of ITM:
Seeks to close position based on if the position's short leg's chance of being in the money:
- If position's chance of ITM exceeds Highest Chance of ITM Close % - defaulted to 65%
- After 12pm on 0DTE, if position's chance of ITM exceeds 0DTE 12pm Chance of ITM Close % - defaulted to 60%
- After 1pm on 0DTE, if position's chance of ITM exceeds 0DTE 1pm Chance of ITM Close % - defaulted to 60%
- After 2pm on 0DTE, if position's chance of ITM exceeds 0DTE 2pm Chance of ITM Close % - defaulted to 55%
- After 3pm on 0DTE, if position's chance of ITM exceeds 0DTE 3pm Chance of ITM Close % - defaulted to 50%
Market Close:
Closes all 0DTE positions that have assignment risk at market close.
Additional Switches:
Avoid PDT? - When turned on, this will prevent the monitor automations from closing positions on the day they were opened and prevent opening 0 DTE positions (complete wings and/or hedging). *NOTE* This switch will only avoid PDT closures by the monitor automations. You have to also select ‘Wait at least 1 day to avoid pattern day trading’ in Exit Options to make sure no pattern day trades occur.
Note: Due to the high probability of this trade, most positions will close at the Global Exit Options Profit Target/Trailing Stop or expire at max profit (if no profit taking is set).
Ticker test data trade logs from 12/12/22 - 2/3/23 are available with this link.