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.