This is an updated version of the Market Trending Bot posted last week. This BOT sells a daily put spread as long as the market is above its 20, 50, and 200 day moving averages. I realize that I could have combined those into one decision, but I have left room for expanding the BOT to do different strategies in different trends. Main reason for updating BOT is because I ran into position size limits when I was doing SPY and QQQ in the same BOT, and yes, I have cloned this to run the same strategy on the QQQ's.
Additional updates, the VIX must fall within a range which can be updated easily, the bid/ask spread must be below $0.20, and the Open Interest on the short leg must be greater than 200. The parameters for the trade are sell a put spread with 10 DTE, -0.40 Delta, $10 wide spread. Trade is unwound upon breaking below moving averages, or if there is a 75% profit, or if there are < 2 DTE. Another change was that since I am only allowed 10 positions, and right now, I am only doing 1 contract, I could lower my allocation for the BOT accordingly.
Finally, I added a "Liquidate All" button in the BOT, that uses the 'Set When Button Is Clicked' feature, to act as a safeguard just in case I accidentally press the button I will have to confirm the TICKER_SYMBOL before the button runs the automation. FYI, the Original BOT had 10 positions before I liquidated it, and used less than $10K of the $25K allocated for 10 straight winning trades (100%), and a profit of $802 for a return of 3.20% from 2/3 through 2/11. If I had set the allocation properly at $10k, the return would have been 8.02% in 8 days.