About this template
This is one of a series of 4 bots used to evaluate the best performance, based on a moving average as the directional decision indicator for opening new positions. Except for the moving average indicator being used, the logic design for all 4 bots is identical. During the performance evaluation and testing period, the tickers used and all other settings like moving average days, Rate of Return (ROR), etc were identical. The moving average indicators available through the platform are SMA, EMA, KAMA and TRIMA.
The scanner design handles both put and credit spreads (PCS and CCS) and can trade up to the 10 ticker current bot limit of the platform. Supporting both PCS and CCS positions in a single scanner (only one side per ticker), in my opinion provides the most efficient use of a single pool of capital.
The monitors are profit based only. They do not rely on changes in direction of the moving averages. No hedging is included at this time.
The KAMA version of these bots is included with this posting, configured to trade 6 tickers.
Description - Scanner:
There are 5 sections (multiple decision blocks in each) to the scanner that are involved to ultimately arrive at the point of opening a trade. They are:
a) The bot and the market are in a state where the bot can open new positions (multiple decision blocks at top, above the Loop TickerList.
b) The ticker being managed is moving upwards or down based on the moving average indicator relative to the current ticker price and short/long period relative value (Primary Trend checks).
c) The targeted option spread is suitable to be opened based on your expectations (Suitability Checks). Suitability includes checks like minimum premium that will be received, maximum bid/ask spread and several others. (NOTE: This suitability block is (or will be) in all of my bots that manage directional spreads.)
d) The bot is sufficiently funded to open the targeted option spread. The bot funding was recently moved out of the suitability block so that the scanner can gracefully alert the user with a notification if there is not sufficient capital to open the new position. If there is not enough available funds left to open the new position, a notification is sent to the user.
All input settings are mapped to the bot level. Separate settings exist for defining the PCS and the CCS positions.
Description – Monitors
Separate monitors are available for the PCS and CCS positions. While their logic is virtually the same, each uses separate set of input settings for the position type being managed. With this approach, the user might want to take profits quicker for CCS positions that for PCS ones under then feeling that downturns are short term dips but upward moves are actual trends.
Three push buttons are included to allow the user to run the scanner or either monitor on demand.
Pre-Release test results:
Testing for these and the majority of my bots are configured with $3k allocation and 2 positions daily and total so that sorting by P/L in the bot list is essentially an equal comparison. Sorting by P/L % is preferred but that is not available in the platform.
The test period began on 09/07/2021. (Note: The capital requirement notification was not separated into its own decision block until 11/23/2021 but since all other logic is the same, the chart is still from the original start date.) The KAMA version has been the best performer and is the version that I started using a live broker account.
Results shown are from my paper trading account. The performance results and positions of the KAMA version through 12/09/2021 are below. Both PCS and CCS positions have been traded.
Change and Version notes:
11/17/2021 Released into live trading.
11/26/2021 Added bot level switch for winding down trades for all scanner instances in the bot. A separate switch exists at the scanner level to suspend opening new positions for an individual scanner in case more than one instance has been included in the bot.
12/05/2021 Restructured scanner to use the new Symbol Loop feature of the platform. Added check for intraday relationship of the moving average indicator. This should help prevent false signals due to intraday reversals.
12/06/2021 Separated check for available capital for the suitability decision block. If sufficient capital is not available for the new position a notification will be sent to the user.
12/09/2021 Version 25 shared with the community.
12/11/2021 First draft of a user reference write up has been posted at this link
12/11/2021 NOTE: Please ignore and remove the events for "Classify Profile Tag" from your clones. This snuck in there when I shared it before I had time to decide on wanting to keep the logic and tags. They have no effect on actual trading.
12/12/2021 From a reply I made to a community user's posting.
To all. I am not a long time multi-leg option trader. Do not take my "opinions" as based on any multi-hear history of trading successes and failures. These are just my observations and testing concepts and ideas that I can use on the platform after I do some quick reading of strategies used by others and general internet searches about the various indicators.
PLEASE, PLEASE run any bots that I post as many ways from Sunday that you can with paper money until you are comfortable with the results before enabling them for live trading. And even then, slowly and patiently add money and gradually increase the number and size of positions over time.
12/16/2021 Version 27 - Updated with correction to CCS trending decision block detected by Mayank (thanks for the good eyes). Both the PCS and CCS decision blocks in this updated version have 1 additional trend confirmation check for the ticker price move intraday relative to the prior day close. This was added to provide some protection against the really choppy markets we have been having lately.
01/03/2022 Version 32 - Added three (3) new administrative switches which should round out the administrative control features of this bot. The "Trade All Hours" switch allows the user to enable new positions to be open during all scan cycles of the market day. The default is OFF (is equivalent to prior version) where new positions can be opened on or after 10:00 am and before 3:00 pm market time.
The new switches for "Disable PCS Trades" and "Disable CCS Trades" allows the user to let the scanner still run but only open new positions in one direction. The intent here is if you want to change the balance of the bot's open positions you can temporarily suspend opening positions in one direction. DO NOT TURN BOTH OF THESE SWITCHES ON, as that will effectively suspend the scanner from opening any positions at all (See the Suspend Scanner switch).
Added new input setting (DaysB4TkrNewTrade) (the default is 1). which, if set to 1 or higher require the scanner to wait to open a new position for a symbol if a prior position was closed for at least 1 day (or the value of this input setting).
In the monitors, moved time of day check in the monitors from top before position repeater to just above _Mid profit% check to allow profit taking at the higher levels in the first scan cycle of the day.
01/07/2022 🔵Version 33: Corrected decision block at the bottom of the Put Spread Manager where the Hard Exit % is checked. When the time of day check was added to the managers in this bot(ver 32) it was "loosely" added as its own *OR* block rather than being part of the HardExit% test.