About this template
Explanation:
This bot opens an IB every hour on the hour while the market is open. At each scan interval, the monitor checks to see if the bot's open P/L is above/below the P/L targets. If so, it sends orders to close the IB position with the highest/lowest open P/L. Rinse and repeat.
At the EOD, it will either send orders to close all open positions (if the 'Hold Positions Overnight' switch is Off); or, if the 'Hold Positions Overnight' is On, the bot will begin to send orders to close positions (beginning with the position with the highest open return), until the bot is left with 'Max Overnight Positions' positions open to swing to the next day.
Here are the default automation inputs.
Scanner Automation:
Open New Positions: On
Skip FOMC & CPI: On
Symbol: SPY
Long Put: $10.00 below short put leg
Long Call: $10.00 above short call leg
Position Size: 1 contract
Open Price: 100% of bid/ask
Exit Options: Expiration: 1 hr
Monitor Automation:
Monitor On/Off: On
Early Close: Off
Hold Positions Overnight: On
Max Overnight Positions: 3 positions
Close 1 hr Before EOD: On (would recommend turning this Off if using 5 min scans)
Open PT: $100
Open Max Loss: -$100
Close Price: $.03 from mid price
Max B/A Spread (Close): $0.3
Performance:
This bot has been performing well over the past month since I created it.
Some comments and observations:
This bot is NOT PDT safe. It will open/close positions on the same day.
The wings on the IBs are $10 wide (per default settings). The wings could (and probably should) be narrower since they are shorter DTE positions (typically 1 - 4 DTE), especially if running live. I would check an option chain and find long legs that have a better chance of having bidders so that closing orders fill quicker (I'm guessing $5-$7 might be better?). This would also help to reduce required margin/allocation. At most, I've seen this bot have 5-7 potions open at once, so plan your allocation accordingly.
I also have some versions of this bot running with and without P/L targets that also employ Exit Options (10/3 & 7/2.5 PT/Trail with a 15% S/L). This bot (only using P/L targets, no EOs) has performed significantly better.
This bot uses a tagging automation to tag each position's open return % at each monitor interval. It also tags the bot with the highest and lowest open return % so that it knows which position to close if the open P/L target is reached.
Regarding the 'Close 1 hr Before EOD' switch. If this switch is On, the bot will begin sending orders to close positions at EOD (1 hr before market close) if the number of open positions in the bot is > 'Max Overnight Positions' (to reduce overnight risk). If you are running with 15 min scan intervals, I would recommend turning this switch On; if you're on 5 mins scans (like I am), I would recommend turning this switch Off and the bot will begin sending closing orders 30 mins before market close.
There are also buttons that run the scanner and monitor automations that can be employed at any time by the user.