Introduction

Building Algos

Building an algo used to be hard, now its as easy as selecting some assets, building some rules, and modifying a few settings.

Assets

Assets are what you’re actually trading. Currently, they consist of Stocks, ETFs, and cryptocurrencies. Asset classes can also be comingled, meaning your algo can be trading SPY and BTC at the same time (if your brokerage supports this). If you’re not sure what you want to trade, try the randomize assets feature. You can always backtest and optimize from there!

Rules

Rules are what govern when your algo buys and sells. Rules can be added to the buying side or the selling side. During the execution of a backtest or a live algo, all of the rules will be evaluated against each asset to decide whether it should be bought or sold.

And/Or Operator

Rules can use the “AND” or “OR” operator when there are multiple rules, allowing for more complex algorithms. For example, if only “AND” is used, every rule would have to resolve to true in order to buy or sell the asset. However, if there is a mixture of operators, the “AND” operator would take precedence. Lets use the following set of rules as an example:

  1. RSI < 30 (OR)
  2. currentPrice > $100 (AND)
  3. currentTime > 12:00pm (AND)

Rule 2 and 3 would be evaluated first, then rule 1 would be evaluated against that.

Indicator Types

Rules can have one of the following types:

Indicator Type

  • These rules use indicators such as Simple Moving Average and Relative Strenght Index (RSI) to dictate when to buy or sell.
  • Can be useful when comparing to other indicators (SMA (20) > SMA (50)), the asset price (SMA > currentPrice), or even a custom value (SMA > $100).

Asset Price Type

  • These rules use the price of the asset to dictate when to buy or sell.
  • Pricing data is stored internally as candles (open, high, low, close), where close is the current price of the asset.
  • By default, the latest pricing data is used, but historical data can also be accessed.
    • To use historical data, simply increase the lookback period under “Advanced Settings.” By default, the lookback period is 0, or the latest data. However, if this was changed to 5, and you were on the daily timeframe, it would mean you would be evaluating the price from 5 days ago.
  • Can be useful when comparing to indicators (assetPrice > SMA), a price range (assetPrice > priceHigh), or just a custom value (assetPrice > $100).

Time Type

  • These rules use the current (or simulated time during a backtest) to dictate when to buy or sell.
  • These rules can only be compared to a custom value (currentTime = 1:00 pm).

Price Range Type

  • These rules are used to look back in history to find the highest or lowest price during a given period to dictate when to buy or sell.
  • Can be useful when comparing to indicators (priceHigh > SMA), the asset price (priceHigh < currentPrice), or just a custom value (priceHigh > $100).

Return Percentage Type

  • These rules use the return percentage of the position you are in to dictate when to sell.
  • Can only be compared against a custom value (returnPercentage > 5%).
  • Can only be accessed on the closing side.

Hours Held Type

  • These rules determine the hours held for a position you have and use that to dictate when to sell.
  • Can only be compared against a custom value (hoursHeld > 5).
  • Can only be accessed on the closing side.

Custom Value Type

  • These rules are specific values given by you usually to compare against other rule types.
  • The potential value could be a decimal, a dollar value, or a specific time.

Settings

Timeframe

  • The timeframe setting refers to how often your algo will be executed and therfore trading. Currently, options include Minute, 5 Minute, 10 Minute, 15 Minute, 30 Minute, Hourly, and Daily.
  • Choosing the correct timeframe for your algo is very important and can significant impact performance.
    • Choosing a smaller timeframe will likely mean more trades and less price action between trades. But it will also introduce more noise. The asset price and indicators will fluctuate more significantly, potentially causing false signals. These timeframes could be good for those looking to get in and out of a position quickly.
    • Choosing a larger timeframe will liekely mean less trades and more price action between trades. Larger timesframes will help elliminate noise, potenailly reducing false signals. These timeframes could be good for those looking for longer term positions and higher win rates.

Investment Amount

  • The investment amount setting controls how much will can be invested in each trade. This setting can be represented in dollars or as a percentage value. Both types use the total available cash on the account to calculate how many shares can be purchased.
  • Shares are rounded down to the nearest whole number (for equity assets) or decimal (for cryptocurrency assets).

The above content is designed for informational purposes only, and is explicitly not investment advice. Algo Pilot is a US based technology company and not a bank, broker-dealer, or RIA. As such, Algo Pilot LLC does not provide investment advice and is not a member, SIPC. Brokerage services offered by 3rd parties are not directly affiliated with Algo Pilot LLC, and Algo Pilot users may choose the broker relationship that they desire.

Algo Pilot Icon LogoX LogoLinkedIn Logo

Algo PilotTM is a US based technology company and not a bank, broker-dealer, or RIA. As such, Algo Pilot LLC does not provide investment advice and is not a member, SIPC. Brokerage services offered by 3rd parties are not directly affiliated with Algo Pilot LLC, and Algo PilotTM users may choose the broker relationship that they desire. Algo Pilot's Algo Builder is Patent Pending with the USPTO.

Past performance, whether actual or indicated by historical tests of strategies, is not a guarantee of future performance or success. Investing in stocks, futures, options, currencies, cryptocurrencies, and other financial vehicles involves risk. Investing in securities involves potential loss of principal. Trading in options or security futures involves a high degree of risk and investors may lose more than their initial investment; options trading is not suitable for all investors. Before trading, please read all applicable risk disclosures such as Characteristics and Risks of Standardized Options disclosure from your broker.

Algo Pilot software is proudly made in America  
Close Cookie Popup
We value your privacy
By clicking “Accept All”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and for marketing as outlined in our privacy policy.
Strictly Necessary (Always Active)
Cookies required to enable basic website functionality.
Cookies helping us understand how this website performs, how visitors interact with the site, and whether there may be technical issues.
Cookies used to deliver advertising that is more relevant to you and your interests.
Cookies allowing the website to remember choices you make (such as your user name, language, or the region you are in).