
Start Here
Platform

Tour
Bots 101How it worksLive demo
Tools
Automated tradingOptions backtestingWatchlist scannerPrivate community
Use cases
New investorsStock tradersActive tradersPassive investorsSwing tradersAlgorithmic traders

Templates
By trade type
Stock trading botsOptions trading bots
By strategy type
Bullish options strategiesNeutral options strategiesBearish options strategiesHedging strategies
By style
Active and high frequency botsEvent-based botsTrend trading botsMomentum trading botsStatistic and probability-based botsTechnical analysis botsEarnings strategy bots

Integrations

Pricing
Education

Courses
Overview
By experience
Beginner
What is an options contract?Stock trading vs. options tradingOptions contract specificsCall vs. put options basicsBuying options vs. selling optionsOptions profit and loss diagramsOptions pricing tablesOption moneyness (ITM, OTM, and ATM)Options pricing and the "Greeks"Options expiration and assignmentWhat's our "edge" trading options?Single vs. multi-leg options strategiesSmall account options strategies
Intermediate
Fearless, confident options tradingHistorical volatility vs. implied volatilityPredicting market movesTrade size and capital reservesPortfolio balance and beta weightingHow to choose the best options strategyHow far out to place trades?Strike price anchoring with probabilitiesTips on getting your trades filledAdvanced and contingent orders7 step options trade entry checklist
Advanced
Developing a daily trading routineHow to avoid "Black Swan" eventsAdjusting and hedging option tradesExiting options trades automaticallyOptions strategies we don't adjust (and why)Big picture adjustment strategyWhen to adjust or notAdjusting straddles and stranglesAdjusting credit spreads, iron condors, and calendarsSmarter stop-loss ordersBuilding a diversified options portfolioRolling options trades for duration and premiumOptions expiration week position checklistDealing with stock assignment and dividendsHow to free up trading margin and cash
By subject
Options basics
Why options vs. stocks?What is an options contract?Smart use of leverageOption strike priceOption premiumOption expirationOption contract multiplierProfit and loss diagramsLong call option explainedShort call option explainedLong put option explainedShort put option explainedATM, ITM, and OTM optionsCash vs. margin basicsHigh probability trading definedHow to buy a call optionHow to buy a put optionSingle-leg vs. multi-legWhat is the VIX?Is fundamental analysis dead?
Entering and exiting trades
Game of numbers7 step entry checklistStrong liquidity examplesPicking the next directionScanning for tradesOption pricing table basicsSetting up your trade tabPinning your probability of profitUsing delta for probabilitiesBuy to open vs sell to openBuy to close vs sell to closeMarket, limit, stop loss orders5 types of contingent ordersLimit ordersMarket ordersLimit on close ordersMarket on close ordersAdvanced contingent ordersTaking profits before expirationMechanics of rollingConsider future events
Options expiration
Options expiration explainedWhat is the Options Clearing Corporation (OCC)?Physical vs. cash settlement optionsAmerican vs. European style optionsWeekly options expirationWeekly expiration tags/codesOptions assignment processOptions exercise processTrading timeline (duration)
Bullish options strategies
Bull put spreadBull call spreadLong callShort putBull call backspreadPut broken wing butterflyCall calendar spreadPut diagonal spreadCustom naked putCovered callSynthetic long stock
Neutral options strategies
Short straddleLong straddleIron condorsShort strangleLong strangleIron butterflyUnbalanced iron condors
Bearish options strategies
Bear call spreadBear put spreadLong putShort callBear put backspreadCall broken wing butterflyPut calendar spreadCall diagonal spreadCustom naked callCovered putSynthetic short stock
Portfolio managmeent
No guaranteed tradesDon't do something, sit thereAccount size adjustmentsAvoiding stock market overloadStocks, indexes, & ETFsMonitoring positionsCreating automatic alertsIndividual stock betaPortfolio betaBeta weighting your portfolioUncorrelated industries/sectorsSystematic vs. unsystematic riskEfficient portfolio frontierLimiting undefined risk tradesEconomic calendarConcept of legging
Options pricing and volatility
How to find option price quotesUnderstanding the mathIV vs. IV percentileProbability of profit vs. probability of touchOption probability curveBid-ask spread definedIV expected vs. actual moveThe "Greeks"Fatal pricing errorsInverse ETFsOptions parity
Adjusting trades
#1 adjustment for any tradeWhen to adjust a tradeSingle options trade vs. overall portfolioCall spread adjustmentsPut spread adjustmentsShort strangle adjustmentsIron condor adjustmentsShort straddle adjustmentsCalendar spread adjustmentsDebit spread adjustmentsButterfly adjustmentsUsing stop lossesDelta hedgingRolling positionsPairs hedging

Strategies
OverviewLong callLong putShort callShort putCovered callCovered putProtective putCollar strategyLEAPSBull call debit spreadBear call credit spreadBull put credit spreadBear put debit spreadLong straddleShort straddleLong strangleShort strangleCall calendar spreadPut calendar spreadIron condorReverse iron condorIron butterflyReverse iron butterflyCall butterflyPut butterflyStrapCall diagonal spreadPut diagonal spreadCall ratio spreadPut ratio spreadCall backspreadPut backspreadLong box spreadShort box spreadReversalStock repair

Topics
OverviewAsset allocationAutomated tradingBehavioral financeBondsBrokersCandlestick patternsChart patternsDay tradingDividendsEconomic indicatorsEconomicsETFsEquity investmentsExercise & assignmentFinancial analysisFinancial historyFinancial marketsFinancial modelingFinancial theoriesFundamental analysisFuturesInvesting basicsInvestment accountsInvestment taxesInvestor biasesMarket holidaysMarket hoursMarket indexesMarket indicatorsMomentum tradingOptionsOptions pricingOptions settlementPortfolio managementRisk managementStocksStock marketSwing tradingTechnical analysisTechnical indicatorsTrading commissionsTrading platformsTrading psychologyTrend tradingGlossary
Resources

Workshops

Podcast

Blog
Support

Help Center
Overview
Getting started
What is a bot?Creating a bot
Using the bot wizard
Automation typesAutomation editorBot dashboardBot positionsBot logTemplates and cloningKey conceptsSafeguards and limitsPower of botsBest practices
Bot automations
What is an automation?Scanner automationsMonitor automationsEvent automationsEditing automationsReusing automationsCopying automationsOrdering automationsUsing custom inputsBot level inputsAutomation statusesAutomations library
Bot actions
DecisionsOpen positionClose positionNotificationsLoop symbolsLoop positionsBot tagsPosition tags
Bot examples
Genesis 1.0 botGenesis 2.0 botGenesis 3.0 botTrend trading with stocks botPortfolio trend trading botTrend trading with options botMultiple moving averages botTechnical swing trading botTrend and momentum botWeekly credit spread botRecurring iron condors botThe "Honey Badger" botHybrid spreads botHigh IV rank iron condor bot
Decision recipes
Comparing underlying symbol priceEvaluating symbol typeEvaluating underlying symbol OHLCComparing underlying symbol propertiesEvaluating underlying symbol performanceEvaluating underlying symbol standard deviationComparing underlying symbol price to an indicatorComparing multiple underlying symbol indicatorsEvaluating underlying symbol implied volatility rankEvaluating underlying symbol earnings reportingEvaluating underlying symbol price probabilityEvaluating underlying symbol probability within rangeEvaluating bot propertiesEvaluating bot available capital for opportunitiesComparing bot position count to position typeComparing bot position count to underlying symbolEvaluating bot position count to position type and underlying symbolEvaluating bot last position activityEvaluating bot last activity with underlying symbolEvaluating bot position activity historyEvaluating bot position activity history with underlying symbolComparing bot active orders statusComparing bot active orders status with underlying symbolEvaluating bot position availabilityEvaluating bot tagsEvaluating opportunity availabilityEvaluating opportunity return expectationsComparing opportunity attributesComparing opportunity leg attributesComparing opportunity bid-ask spreadEvaluating opportunity probabilitiesEvaluating position performanceComparing profit target to trailing valueComparing position time to expirationComparing position durationEvaluating position underlying symbolComparing position propertiesComparing position leg propertiesEvaluating position typeEvaluating position sideComparing underlying symbol price to position legEvaluating position tagsEvaluating underlying symbol indicator propertiesComparing multiple underlying symbol indicator propertiesEvaluating MACD technical indicatorComparing Bollinger Bands to symbol priceEvaluating stochastic technical indicatorComparing VIX propertiesEvaluating market time of the dayEvaluating days of the weekEvaluating bot switches
Position statement
Activity summaryPosition detailsTrade detailsOpened positionsClosed positionsCanceled positionsOverride positionsExpired positionsPosition historyManually open positionManually close positionImport position
Order pricing
SmartPricingFinal price settingsPosition summaryOrder detailsWorking ordersManual override
Bot templates
Creating new templatesUpdating existing templatesDeleting templatesSharing templatesUpdating shared templatesTemplate best practices
Cloning bots
Cloning existing botsCloning from templateCloning from shared template
Troubleshooting
Using bot logsTesting your botsNot enough capital warningDaily position limit warningTotal position limit warningPricing anomaly warningMissing or invalid input errorDaily symbol limit errorExcessive errors failsafeOverlapping strikes failsafePrice exceeds strike-difference errorOptions expiration protocolDuplicate orders errorOptions approval level errorBot event loopsStock splits and corporate actionsSupported browsersSupported countries
Community forum
Community guidelinesCrafting your introductionSending group messagesSending private messagesAttaching bot templatesReceiving bot templatesAttaching automationsReceiving automationsFollowing tradersPosting publiclyEditing posts and messagesSubscribed discussionsUsing bookmarks
Using backtester
Running a new backtestBacktesting results summaryModifying existing backtestsMy backtestsInstantly create bot from backtestBacktesting research databaseTop backtestsBacktesting errors
Account settings
My profileTrading accountsConnecting to TDAmeritradeConnecting to TradeStationConnecting to TradierIncompatible accountsPassword managementSession timeoutTwo-step authentication
Technical docs
Infrastructure and securityAutomation structureAutomation behaviorData feedsOrder handlingTrade enforcementsBroker rejection errorsBot limitationsProfit and lossFair value pricingDecision propertiesDecision calculationsParameter selectionCalculating probabilityPlatform indicators

Contact
Send FeedbackReport IssueEmail Us
Option AlphaOption Alpha

LoginSign Up
ResourcesPodcast

Building a Bot for All Market Conditions: The "Hexabot" Story

What if you could build an automated strategy that navigates all market conditions? The Hexabot evaluates the market trend and proactively adapts to current market conditions. In today’s episode, we introduce you to the Hexabot and share its entire origin story.
Building a Bot for All Market Conditions: The "Hexabot" Story
Kirk Du Plessis
Aug 1, 2022

In this episode, do a deep dive into the story of the brand new Hexabot! The goal of this project was to build an automated strategy that navigates all market conditions.

We believe you can design a bot to assess short-term and long-term market trends, proactively adapt to current market conditions, and enter the appropriate position type. With the amazing involvement of our entire community, we built the Hexabot.

This podcast is only a brief overview of the Hexabot. Click here for Kirk’s Community post to see a more detailed explanation and clone the bot.

Hexabot

Not an Option Alpha member? Start a free trial today to access the Hexabot and hundreds of other pre-built templates.

Origin & background

The Hexabot is the collective brainchild of the Option Alpha trading Community. There are so many unique ideas that we pulled out of other shared templates to create the Hexabot. We studied monitors and scanners from popular templates to find what we could add and optimize in the Hexabot.

It took a really long time. We deliberately went through a planning and research phase and an ideation phase. Then, we did more testing and research. Finally, we started building.

Of course, we'll continue refining this template and look for opportunities to improve it. We've already updated the version a few times, correcting and simplifying items based on members’ feedback.

Foundational elements

We set this bot up to trade one ticker to let us more easily control things like position sizing and allocation. We approached the strategy holistically, considering how much to allocate to each ticker in our portfolio. You are always in full control of a bot’s position and allocation limits.

The standard position allocation is 10% of the bot’s net liquidity. We wanted the bot to trade actively, so we created laddered entries. You typically get smoother returns when you space out your entries over time.

Six different market environments

We identified six market environments and outlined how we wanted the bot to trade within each of those trends.

  1. Strong uptrend: Ticker is above long-term SMA, above short-term SMA, and short-term SMA is above long-term SMA
  2. Uptrend: Ticker is above long-term SMA, above short-term SMA, and short-term SMA is below long-term SMA
  3. Weak uptrend: Ticker is above long-term SMA but below short-term SMA
  4. Strong downtrend: Ticker is below long-term SMA, below short-term SMA, and short-term SMA is below long-term SMA
  5. Downtrend: Ticker is below long-term SMA, below short-term SMA, and short-term SMA is above long-term SMA
  6. Weak downtrend: Ticker is below long-term SMA but above short-term SMA

Each market condition yields a different position type:

  • Strong uptrend + overbought technicals = Short call spread
  • Strong uptrend + neutral technicals = Short put spread
  • Uptrend + overbought technicals = Iron condor (with an option to skew)
  • Uptrend + neutral technicals = Iron condor (balanced)
  • Weak uptrend + oversold technicals = Short put spread
  • Weak uptrend + neutral technicals = Iron condor (balanced)
  • Strong downtrend + oversold technicals = Short put spread
  • Strong downtrend + neutral technicals = Short call spread
  • Downtrend + oversold technicals = Iron condor (with an option to skew)
  • Downtrend + neutral technicals = Iron condor (balanced)
  • Weak downtrend + overbought technicals = Short call spread
  • Weak downtrend + neutral technicals = Iron condor (balanced)

Notifications

The Hexabot is an excellent example of using notifications to communicate what the bot did throughout its automations.

We relied heavily on tagging. Not only because it's super powerful, but because it allows us to set how the bot could lead itself down different paths and make different decisions.

One scanner automation and one monitor automation

We chose to use a single scanner and monitor so that you could see all of the logic at each step within one screen.

Initially, we had multiple scanners and monitors for different timeframes in the expiration cycle. We eventually got it all into one scanner and one monitor, so it was easier to make changes, edit decisions, and track the bot’s activity.

Bot level inputs

The scanner automation checks multiple criteria before entering a position using bot-level inputs. The first decision checks to see if the scanner is enabled. This allows us, at the top of the automation, to immediately prevent the bot from going down a path that would enter a new position.

Then, we reset the tags every time the bot runs. This allows the bot to be the most accurate and current version that reflects the market and bot‘s combined conditions.

An important volatility check ensures the bot can open a new position that day. This way, the automation monitors market conditions, the state of your portfolio, and the state of your bots so that you can focus on other decisions.

Technical indicator checks

The first market check is whether the underlying ticker is above the long-term simple moving average with this recipe. Next, the bot looks at the short-term moving average.

With the heat check, you can swap between bullish credit spreads, bearish credit spreads, neutral iron condors, and skewed iron condors. We've made all this very customizable with custom inputs. You can plug in your technical indicator of choice and your preferred overbought or oversold.

Opportunity filters

The bot has to pass four detailed opportunity filters before sending an order to the broker:

  1. Bid-ask spread maximum
  2. Open interest minimum
  3. Rate of return threshold
  4. Probability of profit input

Accelerated and absolute profit targets

The bot uses multiple targets to exit positions based on certain profit levels.

Absolute profit target

If the bot reaches an absolute profit target, it exits the position immediately.

Quick accelerated profit target

The bot will check if a potion has reached a pre-defined profit target. This allows you to exit the position for a quick profit and open another position.

Second accelerated profit target

The second accelerated profit target check happens after another set of days with a slightly different profit level.

Exit conditions

After we get past the decisions for evaluating the position’s strikes, if the stop-loss exit is turned on, it will determine whether that position has reached the stop-loss.

You already go through these decisions when trading manually; you just have to go through them yourself.

A short-term trend reversal trigger can help you evaluate whether the trend is changing. Also included here is a minimum rate of return threshold.

Reduced DTE profit targets

The monitor automation is set up to reduce the main profit target as positions near expiration.

Similar to how we were willing to accept early profits, we’re willing to accept smaller profits as time runs out. All you have to do is enable or disable a switch for intelligent expiration week management.

Bid-ask spread waterfalls

The bid-ask spread waterfall is a very clever but simple concept that repeats throughout the monitor automation. You'll see the same decisions and the same sets of criteria repeated throughout.

Essentially, you can adjust how SmartPricing works based on the spread width to avoid trying to execute orders when the bid-ask spread is wide.

  • Level 1 B/A Spread = 0.15 bid/ask spread
  • Level 1 Price = 100% of bid/ask spread
  • Level 2 B/A Spread = 0.25 bid/ask spread
  • Level 2 Price = 90% of bid/ask spread
  • Level 3 B/A Spread = 0.50 bid/ask spread
  • Level 3 Price = 70% of bid/ask spread
  • Level 4 B/A Spread = 0.75 bid/ask spread
  • Level 4 Price = 63% of bid/ask spread
  • Level 5 B/A Spread = 1.00 bid/ask spread
  • Level 5 Price = 60% of bid/ask spread

What’s next?

We truly hope you loved reading this summary and the Hexabot’s history. This Community is an incredibly special place and this template demonstrates the power of the wicked smart traders we have the pleasure of working with here at Option Alpha. This has been a really fun bot to build. 

Enjoy the Hexabot!

Automated Trading
RSI
SMA
Trend
Trend Following
Momentum
Iron Condor
Bull Put Spread
Bear Call Spread
Short Put Spread
Short Call Spread
Case Studies
Bot Tags
Bot Switches
Custom Inputs
Bot Level Input

4.8 (1.1k Ratings)
Subscribe Now

No-code, fully automated trading for stocks and options.

HomeAboutLegalStatusContact
©2022 Option Alpha. All Rights Reserved. Patent Pending USSN 63/118,547