StockHero Guide
  • Setting Up Your Stock Trading Bot
  • Quick Start Bots
  • Video Gallery
  • Major Updates
    • Achieving ISO27001 Certification
    • StockHero Version 3
    • StockHero V2, The Best Is Not Enough
      • StockHero V2.5
    • StockHero Release Notes
  • Getting started
    • Paper Trading
    • Backtesting
    • Dashboard
    • Portfolio
    • Bots and Deals
    • Bots Processing Priority
    • Strategy Marketplace
    • Deploying A Marketplace Bot
    • SMS Notifications
  • Futures Trading
  • Bot Settings
    • Strategies
    • Trading Parameters
    • Entry / Exit Conditions
    • Advanced Bots
    • DCA Bots
    • Exit Bot
    • Price Bot
    • Grid Bot
    • Sell Bot
    • Momentum Bot
    • Trailing Stoploss
    • Trailing Take Profit
    • Bot's Performance Stats
    • Strategy Designer
  • Technical Indicators
    • Bollinger Band
    • EMA
    • RSI
    • Stoch RSI
    • MACD
    • Volume
    • TradingView
    • Mandatory Indicators
  • Connecting Your Brokerage
    • Supported Brokerages
    • Trading Account Connection
    • TradeStation
    • Webull
  • Wealthsimple
  • FAQ
    • Terminology
    • Frequently Asked Questions
  • Housekeeping
    • Release Notes
    • Terms of Use
    • Official Communities
Powered by GitBook
On this page
  • Example 1
  • Example 2
  • Example 3
  • Example 4
  • Strategy Designer for TradingView
  1. Bot Settings

Strategy Designer

Available for Premium and Professional users

PreviousBot's Performance StatsNextBollinger Band

Last updated 11 months ago

StockHero's latest revolutionary Strategy Designer allows a trader to create complex strategies easily. A complex strategy can also be loosely called a MultiStrat in the hedge fund world. Multiple strategies are combined to create an overarching strategy. For example, a long-short strategy is considered MultiStrat as it consists of a long strategy followed by a short strategy, with each executing consecutively.

StockHero's Strategy Designer offers advanced traders the ability to create complex strategies that capture a greater part of the market movement. For example, a trader can create a long-short strategy using our Strategy Designer.

The actual implementation is via Daisy-Chain in StockHero. The Strategy Designer is only available for Advanced bot types.

Let us illustrate with an example on how to implement a Long-Short MultiStrat strategy.

  • User creates Bot X (Advanced Bot) for Long strategy

  • User creates Bot Y for Short strategy

  • User configures Bot X to activate Daisy-Chain and also the "First in Daisy-Chain" option. When enabled, bot X will start to run after it is created. See picture below.

  • User sets Bot Y to activate Daisy-Chain but "First in Daisy-Chain" is NOT enabled. When bot Y is created, bot Y will NOT run. Its trigger is from Bot X as we will see below

  • User sets bot X exit condition to trigger bot Y after X completes a deal. Similarly, Bot Y's exit condition has been set to trigger Bot X after Y completes a deal

  • After X and Y are created, only X will run and monitor the market

  • Bot X completes a deal and X sends trigger to Bot Y. X will NOT auto-restart. X will be deactivated

  • Bot Y activates and monitors the market

  • Bot Y completes a deal and triggers Bot X

  • Bot X "wakes up" from its deactivated state and start to run. The whole cycle repeats.

As shown in the example above, a user has successfully created a Long-Short strategy.

A user can link two or more bots in a daisy-chain as well.

[Bot A] > [Bot B] > [Bot C] > ….. > [Bot Z]

If the LAST bot Z has NO trigger condition in the EXIT condition, the whole strategy (Bot A to Z) will only run once. But, if Bot Z Exit Condition has a trigger to Bot A, then the whole strategy repeats. I.e. Bot A will “wake up” and start to monitor the market.

StockHero's Strategy Designer is like a 4GL programming language for automated trading. A trader can create multiple bots, each with its own condition, in order to create a single holistic strategy. It is really up to the trader's expertise and imagination as to what complex strategy to setup using the Strategy Designer.

Example 1

Three bots MultiStrat

Bot A

Bot B

Bot C

Entry Condition

Activate Daisy Chain = True

First = True

Activate Daisy Chain = True

First = False

Activate Daisy Chain = True

First = False

Exit Condition

Trigger B

Trigger C

Trigger A

Above strategy will cause the following sequence: A > B > C > A > B > C > (repeats)

Bot A will activate on creating/updating since Activate Daisy-Chain = True AND First=True

Example 2

Bot A

Bot B

Bot C

Entry Condition

Activate Daisy Chain = True

First = True

Activate Daisy Chain = True

First = False

Activate Daisy Chain = True

First = False

Exit Condition

Trigger B

Trigger C

Trigger B

Above strategy will cause the following sequence: A > B > C > B > C > (repeats)

You can see that Bot A is only run once as no other bot triggers Bot A.

Example 3

Bot A

Bot B

Bot C

Bot D

Entry Condition

Activate Daisy Chain = True

First = True

Activate Daisy Chain = True

First = False

Activate Daisy Chain = True

First = False

Activate Daisy Chain = True

First = False

Exit Condition

Trigger B

Trigger C

Trigger D

Trigger A

Above strategy will cause the following sequence A > B > C > D > A > (repeats)

Example 4

Bot A

Bot B

Bot C

Bot D

Entry Condition

Activate Daisy Chain = True

First = True

Activate Daisy Chain = True

First = False

Activate Daisy Chain = True

First = True

Activate Daisy Chain = True

First = False

Exit Condition

Trigger B

Trigger C

Trigger D

Trigger A

Above strategy will cause bots A and C to be activated together.

Sequence: A > B > C > D > A > (repeats)

What if Bot C activates BO first?, then, it will look like

C > D > A > B > C > D > A > (repeats)

Hence, there is a danger of “race condition” (in computer science where two resources compete for the same resource X) if a user sets two bots as First=True in a single daisy-chain.

So if a Bot X calls another bot Y to activate and Y is already active, X will become deactivated (as per normal, like a daisy-chain bot), but an error message will appear: “Attempt to call an active bot in the daisy-chain.” However, X can still be activated again if another bot triggers X as part of the Daisy Chain.

Multiple Daisy Chains can be created as well such that each chain of bots are mutually exclusive.

Strategy Designer for TradingView

Daisy-Chain linking can also be activated for TradingView signals.

Whenever a signal is received and if the bot has daisy-chain enabled, StockHero will check if the bot is "First in Daisy-Chain." If yes, the bot will execute a trade. If not, the bot will check the prior linked bot to see if it has already completed a deal. If yes, the bot will execute a trade; otherwise, it will do nothing.