Skip to content

Definitions

Updated Oct 18, 2026. Market rules read at their sources on Oct 18, 2026.

Words first, then (folded under "How it works here") exactly how our engine computes or applies each one. Nothing here is advice, and results are always hypothetical.

152 definitions

Stocks and ETFs: how trading works

Market rules a stock or ETF bot runs into, and exactly how our engine applies each one.

  • Regular trading hours

    US stocks and ETFs trade from 9:30 to 16:00 New York time, Monday to Friday, with market holidays and some half days.

    How it works here for Regular trading hours

    In our engine: Sessions, holidays and half days come from the New York Stock Exchange calendar.

  • Settlement (T+1)

    A US stock or ETF trade settles one business day after the trade day, called T+1. The seller's cash becomes real, spendable cash then.

    How it works here for Settlement (T+1)

    Since 28 May 2024 the standard US cycle is T+1. Crypto on an exchange's own books settles at once, so none of this applies there.

    In our engine: In a cash account the engine counts a sale's proceeds as settled funds on the next settlement day: a weekday when both the Federal Reserve Banks and the exchange are open.

    Source: SEC investor bulletin: the new T+1 settlement cycle

  • Settled cash

    Cash from a sale that has finished settling. Cash accounts may only count on settled cash to pay for trades in full.

    How it works here for Settled cash

    In our engine: A cash account tracks settled and unsettled proceeds. Margin accounts are not held to this rule, so the engine counts nothing for them.

    Source: SEC investor bulletin: Trading in Cash Accounts

  • Good-faith violation

    In a cash account: buying with money from a sale that has not settled, then selling that purchase before the money settles.

    How it works here for Good-faith violation

    Freeriding is related but different: buying and selling a security without ever paying for it in full. That can freeze the account for 90 days under Regulation T (see the next entry). How many good-faith violations a broker tolerates is the broker's own policy.

    In our engine: The engine counts every such sale as a good-faith violation and shows the count. A result with any is capped at grade C, because the record could not be repeated on a real cash account. The 90-day freeze after a set number of violations is applied only when the account policy says so.

    Source: SEC investor bulletin: Trading in Cash Accounts

  • The 90-day freeze (freeriding)

    If you buy and sell a stock without paying for it in full, Regulation T lets your broker freeze your cash account for 90 days.

    How it works here for The 90-day freeze (freeriding)

    During the freeze every purchase must be paid in full, with settled money, on the day you make it.

    In our engine: When the account policy sets a number of violations, the engine switches the account to settled-funds-only for 90 days after that many, as a broker would.

    Source: Investor.gov: Freeriding

  • Day trading and the old $25,000 rule

    Day trading means buying and selling the same stock on the same day. The old pattern-day-trader rule needed $25,000 in the account; FINRA replaced it on 4 June 2026.

    How it works here for Day trading and the old $25,000 rule

    The new standard checks, during the day, that your equity covers 25% of your long positions. Brokers may keep their old rules until 20 October 2027, and trading with borrowed money needs at least $2,000 in the account. Your broker's own policy decides which applies to you today.

    In our engine: For history before 4 June 2026 the engine applies the old pattern-day-trader rule on margin accounts; from that date it does not.

    Source: FINRA: Understanding the new intraday margin requirements

  • Margin and short selling (stocks)

    Margin is borrowing from your broker to buy more than your cash. Short selling is selling shares you borrowed, hoping to buy them back cheaper.

    How it works here for Margin and short selling (stocks)

    Losses can be larger than the money you put in. Your broker can sell your positions if your equity falls too low.

    In our engine: At Alpaca the engine allows up to 2x, needs $2,000, charges margin interest at 6.5% a year, and treats every short as easy to borrow with no fee. It does not model hard-to-borrow stocks, intraday buying power above 2x, the time brokers give you to meet a margin call (it sells at once), or the short-sale price test.

    Source: FINRA: Understanding the new intraday margin requirements

  • Market-on-open and market-on-close orders

    An order that trades at the official opening price (MOO) or closing price (MOC) of the stock exchange, in the opening or closing auction.

    How it works here for Market-on-open and market-on-close orders

    They have deadlines. At Alpaca an opening order must be in before 9:28 and a closing order before 15:50 New York time.

    In our engine: A rule exit set to close-auction sells at the session's closing price, and only if the rule fires 10 minutes or more before the close; a later one sends nothing and is read again at the next decision. An open-auction exit sells at the next session's official opening price.

    Source: Alpaca docs: orders (opg and cls cutoffs)

  • Stock splits

    A split cuts the price per share and raises the number of shares, so your total value does not change. A 2-for-1 halves the price.

    How it works here for Stock splits

    In our engine: The engine applies each split to the position and to the price history, so a 2-for-1 never looks like a 50% crash and indicators read adjusted prices. Reverse splits are exact.

  • Dividends

    A dividend is cash a company pays its shareholders. You get it only if you own the stock before its ex-dividend date.

    How it works here for Dividends

    In our engine: A cash dividend is credited on the ex-dividend date to every share held, in the stock's currency. Spin-offs, mergers and name changes are not modelled: the run lists them as left out.

  • Leveraged and inverse ETFs

    Funds that aim for a multiple (2x, 3x) or the opposite of an index's move each day. They reset daily.

    How it works here for Leveraged and inverse ETFs

    Over longer than a day, compounding can make the result differ a lot from that multiple. FINRA warns these funds are generally unsuitable for retail investors who hold them longer than one trading session.

    In our engine: The engine treats them like any fund. Its design review flags a leveraged fund in a bot's symbols.

    Source: FINRA Regulatory Notice 09-31: leveraged and inverse ETFs

Crypto: how trading works

What differs from stocks, and how our engine applies it.

  • Always open, and the UTC day

    Crypto exchanges never close. A bot sees bars every hour of every day, weekends included.

    How it works here for Always open, and the UTC day

    In our engine: There is no session. Anything counted per day, such as the daily loss limit, trades per day and a daily-anchored VWAP, uses the UTC day: it resets at midnight UTC.

  • Maker and taker fees

    A taker takes an order that is already waiting and pays the higher fee. A maker leaves an order waiting for others to take and pays less.

    How it works here for Maker and taker fees

    In our engine: In the engine a fill pays the taker fee when its order trades as soon as it arrives, and the maker fee when the order rested first and filled later. Each venue's fee table is in the builder's broker list with the date it was read and whether every rate was confirmed at the venue (Coinbase Advanced's entry-tier rates are marked unconfirmed).

  • Minimum order size and tick size

    Each exchange refuses orders below a minimum value and only accepts prices in steps (the tick) and amounts in steps (the lot).

    How it works here for Minimum order size and tick size

    In our engine: The engine rounds prices and amounts to the venue's steps and refuses orders under its minimum, so a very small account may never trade. The design review warns when a trade is smaller than the minimum.

  • Dollar-pegged coins (USDT, USDC)

    A pair quoted in a stablecoin, like BTC/USDT, is priced in a coin meant to stay at one dollar.

    How it works here for Dollar-pegged coins (USDT, USDC)

    In our engine: A run values the coin with a measured USDT/USD rate series where one exists; otherwise at an assumed 1 to 1, and the run says which. A depeg would not show in an assumed-1:1 result.

  • Margin and shorting (crypto)

    Borrowing to buy more, or selling coins you borrowed. Only some exchanges offer it.

    How it works here for Margin and shorting (crypto)

    In our engine: The engine models it for Kraken only (up to 10x on BTC/USD, ETH/USD and SOL/USD, 2x on other pairs; 0.02% opening and rollover fees assumed for every pair). Coinbase Advanced and Alpaca crypto offer none, and Binance.com is not modelled yet. Real-money margin is off on the platform.

Risk words

  • Max drawdown

    Max drawdown is the biggest fall from a high point to the next low, before it recovered.

    How it works here for Max drawdown

    Think of the deepest valley on a hike. If you climbed to a peak and then dropped a long way, that drop is your drawdown. It tells you how bad the worst stretch felt. The past worst is not a limit; a future one can be deeper.

    In our engine: Measured on the account's equity (cash plus open positions at market prices) as a percent: the biggest fall from a highest-so-far point to the lowest point after it. The starting cash counts as the first high point.

  • Position size

    Position size is how much money goes into one trade.

    How it works here for Position size

    Think of how many eggs go in one basket. The same rules with a smaller size lose less when wrong, and win less when right. Size is often the thing that decides whether a bad streak is annoying or ruinous.

  • Stop-loss

    A stop-loss is an order that sells a trade if the price falls to a level you chose.

    How it works here for Stop-loss

    Think of an emergency exit you promise to use. It limits a loss to about the size you planned. In a fast fall or a gap the price can jump past it, so the sale can happen at a worse price than the one you set.

    In our engine: Stops are checked against each bar's high and low. If one bar reaches both a stop and a take-profit, the engine assumes the stop was hit first in its normal and stressed test profiles (only the optimistic profile assumes the target), and labels the fill, so a test does not flatter you.

  • Take profit

    A take-profit is an order that sells a trade once the price rises to a win you chose.

    How it works here for Take profit

    Think of leaving the arcade when you reach a score you set. It locks in a gain before it can shrink. The price of that: if it keeps rising after you leave, you miss the rest. That trade-off is a choice, so test both ways.

  • Trailing stop

    A trailing stop is a stop-loss that moves up with the price but never moves back down.

    How it works here for Trailing stop

    Think of a dog on a lead that you keep shortening as you walk. As the price climbs, the exit climbs behind it, keeping some of the gain. A small normal dip can trigger it, ending a trade that would have recovered.

    In our engine: A trailing stop follows the best price since the entry fill and moves only in the trade's favour. The ATR-based version (Chandelier) is moved at decisions, at the end of a bar, applies from the next bar, and is only ever tightened.

  • Risk per trade

    Risk per trade is the most of your account one trade may lose if its stop-loss is hit.

    How it works here for Risk per trade

    Think of a rule that you will never bet more than a small slice of your pocket money on one game. The bot works out the position size from it. A small slice survives a long losing streak. A big slice may not.

    In our engine: The engine sizes the position as equity x risk percent / the stop distance (as a share of the price), so a loss at exactly the stop price equals that share of equity. It needs a stop-loss or trailing stop, caps the position at your maximum position size, and does not count fees, slippage or a gap past the stop, which can make a real loss bigger.

  • Leverage and margin

    Leverage means trading with borrowed money, so gains and losses are both bigger than your own cash.

    How it works here for Leverage and margin

    Think of a see-saw with a long arm: a small push moves the far end a lot, in both directions. Margin is the money you put up so the broker lends the rest. Margin is switched off for real money for now; it is only in tests.

  • Daily loss limit

    The bot's own daily loss limit sells everything in every mode; the limit you set at go-live opens nothing new.

    How it works here for Daily loss limit

    Think of leaving the table once you have lost your budget. A limit built into the bot sells everything and stays out until midnight UTC, in a test, paper or real-money run. The separate limit you set when you start a real-money bot only stops new trades until 00:00 UTC: exits and stop-losses carry on, and it does not sell what it holds just because that limit was reached. The day is the UTC day.

    In our engine: The day is the UTC day, measured from the account value at the start of that day. A daily loss limit built into the bot acts the same in a test, a paper run and with real money (the live session replays the same engine and sends its exits): when the loss reaches the limit the engine sells everything, opens nothing until the next UTC day, and records the event. The separate limit you set when you start a real-money bot only stops new trades until 00:00 UTC: exits and stop-losses carry on.

Testing words

  • Backtest

    A backtest runs your rules over past prices to see what they would have done.

    How it works here for Backtest

    Think of replaying last season's matches with a new tactic. Costs are taken out, and every backtest starts clean. It shows what the rules would have done, never what they will do.

  • Hypothetical

    Hypothetical means the result came from past or practice prices, not from real trades.

    How it works here for Hypothetical

    Think of a flight simulator: realistic, but nobody flew. Real orders can fill differently, and markets do not repeat on request. Every backtest and paper result carries this label for that reason.

  • Overfitting

    Overfitting is trying many versions until one looks good by luck, then believing it.

    How it works here for Overfitting

    Think of flipping a coin in many batches and showing only the batch with the most heads. Test enough versions of a bot and one looks brilliant by chance, then does worse on new prices. That is why we count the versions you try.

  • Trial count

    The trial count is how many versions of a bot have been tested.

    How it works here for Trial count

    Think of a student who retakes an exam until they pass: the pass means less once you know how many tries it took. We show the count beside every result, and it feeds into the grade.

    In our engine: A trial is a distinct version of a bot, told apart by its behaviour. Running the same version again adds a run, not a trial. The count is kept per bot by the server, cannot be reset or deleted (archiving hides a trial from lists but it still counts), and is shown beside each result.

  • Out-of-sample

    Out-of-sample means prices the rules were never tuned on.

    How it works here for Out-of-sample

    Think of a pupil who practised on past papers, then sits a paper they have never seen. Only the unseen paper shows what they really learned. A result on prices the rules were shaped around is much less convincing.

  • Walk-forward

    Walk-forward means tuning on one stretch of prices, testing on the next, and sliding along.

    How it works here for Walk-forward

    Think of learning to cook from one week's meals, then cooking the next week's meals, and repeating. Each test uses prices the rules did not see while being shaped. It is a fairer test than tuning and testing on the same stretch.

  • Sharpe ratio

    The Sharpe ratio is the gain you got for each unit of bumpiness along the way.

    How it works here for Sharpe ratio

    Think of two bikes that both reach the top of the hill. One rides smoothly and one bounces hard. The smooth one has the higher ratio. A high number from a short test, or from many tries, can still be luck.

    In our engine: The average return per bar of the equity curve divided by its standard deviation, multiplied by the square root of the bars per year actually observed (about 252 for daily stock bars, about 365 for crypto). Nothing is subtracted for what plain cash would have earned. The grade does not rest on this raw number: it asks how likely the result is to be real after counting every version tried (a deflated Sharpe).

  • Win rate and payoff

    Win rate is how often trades make money. Payoff compares the average win with the average loss.

    How it works here for Win rate and payoff

    Think of a game where you win most rounds but each loss costs more than every win pays. You still lose. A low win rate can be fine with big wins, and a high one can hide big losses. Read both together, never one alone.

    In our engine: A trade is one exit of a position; the lots one exit closes count as one trade. A win is a net profit after costs, a loss is a net loss, and a trade at exactly zero is neither but stays in the total. Win rate = wins / all closed trades. Payoff = the average winning trade's percent return / the average losing trade's percent return (ignoring its minus sign).

  • Profit factor

    Profit factor is the total money won by winning trades divided by the total money lost by losing trades.

    How it works here for Profit factor

    Above 1 means the wins outweighed the losses. It says nothing about how bumpy the ride was, and a handful of trades can give a number that means little.

    In our engine: Net of fees and slippage, in money, over all closed trades. With no losing trades there is nothing to divide by, so the result shows no finite value.

  • Expectancy

    Expectancy is the average amount one trade makes or loses, over many trades.

    How it works here for Expectancy

    Think of a shop's average profit per customer: some customers lose money, and what counts is the overall average. It combines the win rate and the payoff in one number. Few trades give a shaky average, so more trades make it more trustworthy.

    In our engine: The mean net profit or loss per closed trade, in money, after fees and slippage. The results page also shows the mean net return per trade as a percent of what the trade cost.

  • The grade, A to F

    Our grade shows how strong the evidence is that a bot's rules worked, after costs and every version tried.

    How it works here for The grade, A to F

    Many sites grade by how much a bot made. Ours grades the evidence, because a big gain from many tries can be luck. It can rise or fall as the bot builds a paper record. It is not a promise and not advice.

  • The risk rating, 1 to 7

    The risk rating shows how rough the ride was; a higher number means bigger swings and deeper drops.

    How it works here for The risk rating, 1 to 7

    Think of two roads to the same town, one flat and one with steep hills. The rating says which kind the bot's past looked like. It sits beside the grade as a separate score. A low number can still lose money.

    In our engine: Class 1 (lowest) to 7 (highest), based on the volatility of daily returns on the same seven-band scale the EU uses for packaged investment products (PRIIPs), then raised, never lowered, by the size of a 1-in-20 one-year drawdown, and set to 7 if the account can lose more than was put in. It uses the equity curve only, so it does not depend on account size.

  • Paper record

    A paper record is a bot's pretend-money history on today's prices, kept by us from the day it starts.

    How it works here for Paper record

    Think of a diary kept in ink, starting today. Nothing is sent to a broker, and it cannot be reset. It shows how the rules do on prices nobody knew when they were written. It is still Hypothetical.

  • Live record

    A live record is the history of a bot's real trades in your own broker account.

    How it works here for Live record

    Think of a bank statement rather than a practice diary. Real trades pay real costs and can fill at different prices. We keep the record from the first trade. It is the strongest evidence a record can give, and still not a promise.

  • Slippage

    Slippage is the gap between the price you expected and the price you actually got.

    How it works here for Slippage

    Think of a price tag that changes while you queue at the till. In fast or thin markets the price moves between your order and the fill. Tests include an allowance for it, so results are not flattered.

    In our engine: Market and stop orders pay half the bid-ask spread plus a cost for their size, read from each market's own trading volume: about 1 basis point (0.01%) a side on BTC, ETH or SPY for a $10,000 order, more on thin markets, low-priced stocks (never less than half a cent) and brokers with a thinner order book. Limit orders that fill pay none. On top of fees.

  • Fees

    Fees are what the broker or exchange charges you to trade.

    How it works here for Fees

    Think of a toll on every trip. Small tolls add up quickly for a bot that trades often. Our tests take the fees out before showing a result, using the rules of the broker you pick.

    In our engine: Each venue's fee table is used: the taker fee when an order trades as soon as it arrives, the maker fee when it rested first and filled later. Each table is dated in the broker list.

Grades

  • Grade A

    Strong evidence

  • Grade B

    Good evidence

  • Grade C

    Promising, not proven

  • Grade D

    Weak evidence

  • Grade F

    No edge

How a bot is usually built

  • Strategy

    A strategy is your plan written as rules: what to trade, when to buy, when to sell.

    How it works here for Strategy

    Think of a recipe card. Anyone following the same card gets the same dish. A bot is a strategy that a computer follows for you, the same way every time, without getting tired or nervous.

  • Pick a market

    Most builds start by choosing what to trade, such as a coin, a stock or a fund.

    How it works here for Pick a market

    Think of choosing which sport to play before writing tactics. Each market moves differently and trades at different hours, so the choice shapes everything after it. Crypto trades all day, every day. Stocks and funds trade in set hours.

  • A rule to buy

    The buy rule says what has to be true before the bot buys, like the price falling to a level.

    How it works here for A rule to buy

    Think of a shopper who only buys when a sale sign is up. The rule has to be clear enough that a computer can check it on every bar. Beginners usually start with one simple rule and add more later.

  • A rule to sell

    The sell rule says when the bot leaves a trade, to take a win or cut a loss.

    How it works here for A rule to sell

    Think of deciding when to leave a party before you arrive. Deciding in advance keeps feelings out of it. A bot with a buy rule and no way out can sit in a falling price forever.

  • How much to risk

    The risk rules say how much of your money one trade may use, and when to stop.

    How it works here for How much to risk

    Think of a spending budget for a night out. You decide the limit first, so one bad night cannot empty your wallet. Good builds set this before anything else, because losing small keeps you playing.

  • Signal

    A signal is a yes or no your rules produce on each bar, such as the price crossing a line.

    How it works here for Signal

    Think of a traffic light turning green. It does not drive the car; it says when your rule is satisfied. The bot reads signals and then follows your instructions for what to do about them.

  • Indicator

    An indicator is a number worked out from past prices, such as an average, to help write a rule.

    How it works here for Indicator

    Think of a thermometer: it turns something hard to see into one number. The moving average is the classic example. It adds up recent closing prices and divides, so a wobbly price line becomes a smooth one. Your rule can then ask whether the price is above it.

Our process

  • Step 1: Build

    You write the rules in the builder, or by chatting with Talli.

    How it works here for Step 1: Build

    Think of drawing the plan before building the house. Both ways make the same kind of plan, so you can switch between them. Nothing trades yet, and nothing costs money. This step answers one question: what exactly should the bot do?

  • Step 2: Test and grade

    We replay your rules over past prices, take costs out, and give an honest grade.

    How it works here for Step 2: Test and grade

    Think of a driving test before a licence. The grade counts every version you tried, so luck cannot pass for skill. This step answers: did the rules look like they worked, and how strong is that evidence? It never says they will work next time.

  • Step 3: Paper trade

    The bot trades pretend money on today's prices, so you can watch it before any real money is involved.

    How it works here for Step 3: Paper trade

    Think of a practice match before the real game. Nobody has seen these prices yet, so the rules cannot have been tuned to them. We keep the record from the first day, and the grade can rise or fall with it.

  • Step 4: Run it

    When you choose, the bot trades with real money in your own broker account, within limits you set.

    How it works here for Step 4: Run it

    Think of lending someone your car with a trip limit. The money stays at your broker. The bot only has permission to trade, never to withdraw, and you can take the permission back at any time. Real trades can differ from tests.

Reading prices

  • Candle or bar

    A candle is one block of time on a chart, showing where the price opened, closed, peaked and dipped.

    How it works here for Candle or bar

    Think of a daily weather note: the morning temperature, the evening temperature, the highest and the lowest. The thick body runs from open to close. The thin lines show the extremes. A chart is a row of these blocks.

  • Timeframe

    The timeframe is how long each candle lasts, such as one minute, one hour or one day.

    How it works here for Timeframe

    Think of zooming a map. A short timeframe shows streets and many small moves. A long one shows the whole country and the big picture. Rules written for one timeframe can behave very differently on another.

  • Trend

    A trend is the general direction prices have been travelling: mostly up, mostly down, or sideways.

    How it works here for Trend

    Think of a river current with ripples on top. The ripples jump around, but the current still carries things one way. Many bots try to ride a trend. A trend can end at any time, and no rule can tell you when.

  • Range

    A range is a stretch where the price bounces between a high and a low without going anywhere.

    How it works here for Range

    Think of a ball bouncing between a floor and a ceiling. Rules that follow trends often struggle here, because the direction keeps flipping. Rules that buy low and sell high inside the room can do well, until the ball breaks through.

  • Volatility

    Volatility is how much and how fast a price jumps around.

    How it works here for Volatility

    Think of a calm lake and a stormy sea. Both can carry a boat, but the sea throws it about. High volatility means bigger wins and bigger losses are both more likely, so many bots size their trades smaller when it rises.

  • Support and resistance

    Support is a price where falls have often stopped. Resistance is a price where rises have often stopped.

    How it works here for Support and resistance

    Think of a floor and a ceiling in a room: the price has bounced off them before. Nothing forces it to bounce again, and when it breaks through, the old ceiling is often treated as the new floor. They are habits, not laws.

  • Gap

    A gap is a jump between one candle's close and the next one's open, with no trading in between.

    How it works here for Gap

    Think of a lift that skips a floor. It usually happens when the market was closed and news arrived. A stop-loss cannot catch a price that jumps past it, so the order fills at the next price available, which can be worse.

Market conditions

  • Bull and Bear

    Bull and Bear are labels from a rule you pick that reads past prices, such as price above its average.

    How it works here for Bull and Bear

    Think of a weather rule such as: if the last week was warm, call it summer. The label comes from the rule you choose, not from some official verdict. Different rules can give different labels for the same prices.

  • Neutral

    Neutral is what your rule shows when it says neither Bull nor Bear.

    How it works here for Neutral

    Think of a thermostat's middle zone, where it does neither heating nor cooling. A bot can stand aside while the rule says Neutral. The rule only reads prices that have already happened.

  • Why use conditions

    A condition lets one bot use different rules at different times, based on what prices have been doing.

    How it works here for Why use conditions

    Think of wearing a coat only on days that have been cold. Rules that suit a rising price often do badly in a falling one, so some builders switch them. Every rule added is another version to count, so overfitting is easier.

Trend: averages and channels

Lines that smooth prices to show which way they are heading.

  • Aroonaroon

    Shows how recently the price made its highest high and lowest low in a window. A fresh high pushes Aroon Up near 100; a fresh low pushes Aroon Down near 100.

    How it works here for Aroon

    In our engine: Looks at the last 15 bars (14 plus the current one): up = 100 * (14 - bars since the highest high) / 14, down likewise with lows. If two bars tie, the most recent counts. The first 14 bars return NaN. The oscillator is up minus down.

    up
    100 when the current bar made the window's high, falling by about 7 for each bar since.
    down
    100 when the current bar made the window's low, falling by about 7 for each bar since.
    osc
    Up minus down, from -100 to +100. Positive means highs are more recent than lows.
  • Average Directional Index (ADX) with +DI and -DIadx

    ADX measures how strong a trend is, whichever way it points, on a 0 to 100 scale. +DI and -DI show whether upward or downward movement is currently stronger.

    How it works here for Average Directional Index (ADX) with +DI and -DI

    In our engine: Wilder smoothing over 14 bars of directional movement and true range gives +DI and -DI; ADX is a further 14-bar Wilder smoothing of their normalized difference. +DI and -DI are blank for the first 14 bars and ADX for the first 27. The smoothing starts from a simple average of the first values, as in Wilder's book, StockCharts and TradingView; TA-Lib starts from a partial sum, so its early values differ slightly.

    adx
    Trend strength from 0 to 100, with no direction. Higher means a stronger trend.
    plus_di
    Strength of upward movement, 0 to 100.
    minus_di
    Strength of downward movement, 0 to 100.
  • Double Exponential Moving Average (DEMA)dema

    A smoothed average of price that reacts to changes faster than a regular moving average, so it lags less.

    How it works here for Double Exponential Moving Average (DEMA)

    In our engine: 2 * EMA(close, 20) minus the EMA of that EMA, with the EMA convention of this platform (seeded with the first value, first 19 bars hidden). The first 38 bars return NaN because the second EMA needs its own warm-up.

  • Exponential Moving Average (EMA)ema

    An average of recent prices that gives more weight to the latest bars, so it follows price more closely than a simple average.

    How it works here for Exponential Moving Average (EMA)

    In our engine: Smoothing factor 2 / (period + 1), default 20 bars, seeded with the first price. The first 19 bars are hidden as NaN. TA-Lib and StockCharts seed with a simple average of the first 20 prices instead, so early values differ slightly and converge over time (on a test series the two differed by 0.36 at bar 19 and by 0.00002 at bar 119).

  • Hull Moving Average (HMA)hma

    A moving average designed to follow price closely with little lag while staying smooth.

    How it works here for Hull Moving Average (HMA)

    In our engine: Weighted moving averages (newest bar heaviest): WMA of (2 * WMA over 10 bars minus WMA over 20 bars), smoothed over 4 bars (the square root of 20, rounded down). The first 22 bars return NaN. This is Alan Hull's formula; a tool that rounds the square root to the nearest whole number instead of down uses a different last length for some periods (for example 14).

  • Ichimoku Cloudichimoku

    A set of lines built from recent highs and lows that together draw a cloud. Traders read price above or below the cloud, and line crossovers, as a picture of trend.

    How it works here for Ichimoku Cloud

    In our engine: Midpoints of the highest high and lowest low: tenkan over 9 bars, kijun over 26, span_b over 52; span_a is the average of tenkan and kijun. Only values known on the current bar are used, nothing is shifted forward. cloud_a and cloud_b are the spans delayed by 25 bars, which is where charts draw them on this bar. Blank bars: tenkan 8, kijun and span_a 25, span_b 51, cloud_a 50 and cloud_b 76, so the full cloud starts at bar 76.

    tenkan
    Fast line: midpoint of the 9-bar high and low.
    kijun
    Slow line: midpoint of the 26-bar high and low.
    span_a
    Average of tenkan and kijun, as computed on this bar (charts draw it ahead).
    span_b
    Midpoint of the 52-bar high and low, as computed on this bar (charts draw it ahead).
    cloud_a
    Span A as drawn at this bar: the value computed 25 bars ago.
    cloud_b
    Span B as drawn at this bar: the value computed 25 bars ago.
  • Kaufman Adaptive Moving Average (KAMA)kama

    A moving average that speeds up when price is trending cleanly and slows down when price is choppy, to cut down false wiggles.

    How it works here for Kaufman Adaptive Moving Average (KAMA)

    In our engine: Efficiency ratio over 10 bars sets a smoothing speed between a 2-bar and a 30-bar EMA (squared), recursively applied. Seeded with the close of bar 9, so the first 10 bars return NaN and the first value is at bar 10 (TA-Lib convention).

  • Linear Regressionlinreg

    Fits a straight line through the last several prices and reports where the line ends, how steeply it slopes, and how closely prices stay near it.

    How it works here for Linear Regression

    In our engine: Least-squares line through the last 20 closes. value is the fitted line at the current bar (not the close). The first 19 bars return NaN. r2 is 0 for a flat window. Uses only closed bars, so the fit shifts as new bars arrive.

    value
    The fitted line's value at the current bar.
    slope
    How much the line rises per bar, in price units. Negative means falling.
    slope_pct
    The slope as a percent of the window's average price, per bar.
    r2
    How closely prices follow the line, from 0 (not at all) to 1 (perfectly).
  • Parabolic SARpsar

    A trailing dot that sits below price in an uptrend and above it in a downtrend, speeding up as the trend extends. Price touching the dot flips it to the other side.

    How it works here for Parabolic SAR

    In our engine: Wilder's method with TA-Lib's conventions: step 0.02, increment 0.02, cap 0.2. The value is the SAR in force on that bar. A bar whose low (or high) touches it reverses the trend. The first bar returns nothing; the starting side is set from the second bar's move.

    value
    The SAR price level on this bar.
    direction
    +1 when the SAR is below price (uptrend), -1 when above (downtrend).
  • Simple Moving Average (SMA)sma

    The average price over the last several bars, which smooths out the noise. Price above it is often read as an uptrend, below it as a downtrend.

    How it works here for Simple Moving Average (SMA)

    In our engine: Plain average of the last 20 values of the chosen price (default close), including the current bar. The first 19 bars return no value.

  • Supertrendsupertrend

    A line that trails price, below it in an uptrend and above it in a downtrend, set a multiple of recent typical movement away. It flips sides when price closes through it.

    How it works here for Supertrend

    In our engine: Bands are the bar midpoint (high + low) / 2 plus or minus 3 x ATR(10, Wilder); each band only moves toward price. Flips on a close beyond the opposite band. The first bar with an ATR (the 10th bar) starts as a downtrend. Direction here is +1 for an uptrend and -1 for a downtrend, the reverse of TradingView's sign.

    value
    The trailing band price: the lower band in an uptrend, the upper band in a downtrend.
    direction
    +1 uptrend, -1 downtrend.
  • Triple Exponential Moving Average (TEMA)tema

    A moving average built to follow price more closely than an ordinary one, with less lag. It reacts faster to turns but also to noise.

    How it works here for Triple Exponential Moving Average (TEMA)

    In our engine: 3 x EMA1 - 3 x EMA2 + EMA3, where each is an EMA(20) of the one before and the first is of the close. Each EMA is seeded with its first input value, and the first 19 bars after an input starts are blank, so the first 57 bars return no value.

  • Volume-Weighted Moving Average (VWMA)vwma

    A moving average where bars with more trading volume count for more. It leans toward prices where the most trading happened.

    How it works here for Volume-Weighted Moving Average (VWMA)

    In our engine: Sum of (close x volume) divided by sum of volume over the last 20 bars, current bar included. The first 19 bars, and any window with zero total volume, return no value.

  • Vortex Indicatorvortex

    Two lines measuring upward and downward movement. When the plus line is above the minus line, upward movement has dominated recently, and the reverse for a downtrend.

    How it works here for Vortex Indicator

    In our engine: Over 14 bars: VI+ = sum of |high - previous low|, VI- = sum of |low - previous high|, each divided by the sum of true range. Plain sums, no smoothing. Returns 0 if true range sums to 0. First 14 bars blank (the first bar has no true range).

    plus
    Upward movement strength; higher than the minus line means upward movement is stronger.
    minus
    Downward movement strength.
  • Weighted Moving Average (WMA)wma

    A moving average that gives the newest prices the most weight, so it follows recent price more closely than a simple average.

    How it works here for Weighted Moving Average (WMA)

    In our engine: Linearly weighted average of the last 20 values: the newest bar gets weight 20, the one before 19, down to 1 for the oldest, divided by the total weight (210). The first 19 bars return no value.

Momentum and oscillators

How fast and how far prices have moved, often on a fixed scale.

  • Awesome Oscillator (AO)ao

    Compares a short-term and a long-term average of bar midpoints. Above zero means recent prices are higher than the longer-term average; below zero means lower.

    How it works here for Awesome Oscillator (AO)

    In our engine: Simple average of (high + low) / 2 over 5 bars minus the same average over 34 bars, as on TradingView. The first 33 bars return NaN (no value yet). The value is in price units, so it is not comparable between different assets.

  • Chande Momentum Oscillator (CMO)cmo

    Compares total up-moves with total down-moves over recent bars, from -100 to +100. Near +100 means almost all moves were up; near -100 means almost all were down.

    How it works here for Chande Momentum Oscillator (CMO)

    In our engine: 100 * (sum of up-changes - sum of down-changes) / (sum of both) over the last 14 bar-to-bar changes in close. Plain sums, not Wilder smoothing (TA-Lib smooths, so values differ). Returns 0 if nothing moved. The first 14 bars return NaN.

  • Commodity Channel Index (CCI)cci

    Shows how far the typical price has moved from its recent average, scaled so most readings fall between about -100 and +100. Larger readings mean a stretched move.

    How it works here for Commodity Channel Index (CCI)

    In our engine: Typical price is (high + low + close) / 3. CCI = (typical price - its 20-bar average) / (0.015 * mean absolute deviation). Returns 0 when the window has no variation. The first 19 bars return NaN.

  • Momentum (MOM)mom

    How much the price has changed over the last several bars, in price units. Positive means price is higher than it was; negative means lower.

    How it works here for Momentum (MOM)

    In our engine: Current close minus the close 10 bars earlier (default period 10), in price units, not percent. The first 10 bars return no value.

  • Money Flow Index (MFI)mfi

    A 0 to 100 gauge like RSI that also weighs trading volume. High readings mean buying pressure dominated recently; low readings mean selling pressure did.

    How it works here for Money Flow Index (MFI)

    In our engine: Typical price = (high + low + close) / 3; money flow = typical price x volume. Over 14 bars, sums flow on bars where typical price rose and fell (unchanged bars count for neither). MFI = 100 x up / (up + down), plain sums, no smoothing. Returns 50 if no flow at all. First 14 bars blank.

  • Moving Average Convergence Divergence (MACD)macd

    Shows how far a fast average of price has moved from a slow one, plus a smoothed copy of that gap. Crossovers and the histogram are read as shifts in momentum.

    How it works here for Moving Average Convergence Divergence (MACD)

    In our engine: MACD line = EMA(12) minus EMA(26) of the close, each seeded with the first price. Signal = EMA(9) of the MACD line, seeded with its first value, so it starts on the same bar as the line. This differs from TA-Lib, whose signal starts 9 bars after the line. The first 25 bars return no value.

    macd
    Fast average minus slow average, in price units.
    signal
    Smoothed average of the MACD line.
    hist
    MACD line minus signal line; positive when the MACD line is above its signal.
  • Percentage Price Oscillator (PPO)ppo

    Like MACD, but the gap between fast and slow averages is shown as a percent of the slow one, so readings are comparable across different prices.

    How it works here for Percentage Price Oscillator (PPO)

    In our engine: 100 x (EMA(12) - EMA(26)) / EMA(26) of the close. EMAs are seeded with the first price; the first 25 bars are blank. Signal is EMA(9) of the PPO, which waits for its own 9 bars (starts at bar 33). Hist is PPO minus signal.

    ppo
    Fast minus slow average, as a percent of the slow average.
    signal
    Smoothed average of the PPO line.
    hist
    PPO line minus signal line.
  • Rate of Change (ROC)roc

    The percent change in price over the last several bars. Positive means price is higher than it was that many bars ago.

    How it works here for Rate of Change (ROC)

    In our engine: 100 x (close / close 10 bars ago - 1), default period 10, in percent. The first 10 bars return no value.

  • Relative Strength Index (RSI)rsi

    A 0 to 100 gauge of how strong recent gains are compared with recent losses. High readings mean price has risen a lot lately; low readings mean it has fallen a lot.

    How it works here for Relative Strength Index (RSI)

    In our engine: Wilder smoothing over 14 bars of gains and losses. By default (seed: wilder) the averages start from the simple average of the first 14 changes, like TradingView; seed: first starts from the first change instead. 100 if there were no losses, 50 if totally flat. First 14 bars blank.

  • Stochastic Oscillatorstoch

    Shows where the latest close sits within the recent high-low range, from 0 (at the low) to 100 (at the high). Readings near the ends mean price is at an extreme of its range.

    How it works here for Stochastic Oscillator

    In our engine: Raw %K = 100 x (close - lowest low) / (highest high - lowest low) over 14 bars. Default smoothing is 1 (the fast stochastic, TradingView style); %D is a simple 3-bar average of %K. A zero range returns 50. First 13 bars blank for %K.

    k
    Position of the close within the recent range, 0 to 100.
    d
    Simple average of %K, a slower signal line.
  • Stochastic RSIstochrsi

    Applies the stochastic idea to RSI: it shows where RSI sits within its own recent range. It swings between 0 and 100 faster than RSI itself.

    How it works here for Stochastic RSI

    In our engine: Computes Wilder RSI(14), then raw = 100 x (RSI - lowest RSI) / (highest RSI - lowest RSI) over 14 bars. %K is a 3-bar simple average of raw, %D a 3-bar simple average of %K. A flat RSI range returns 50. First 29 bars blank for %K.

    k
    Smoothed position of RSI within its recent range, 0 to 100.
    d
    Simple average of %K, a slower signal line.
  • TRIXtrix

    The one-bar percent change of a heavily smoothed average. Because the smoothing removes small wiggles, it shows only the slower direction of momentum.

    How it works here for TRIX

    In our engine: Triple EMA(15) of the close (each seeded with its first value), then 100 x (value / previous value - 1) in plain percent, as in StockCharts and TA-Lib. TradingView's built-in is based on log prices, so its numbers will not match these exactly. Signal is EMA(9) of TRIX. The first 43 bars return no TRIX.

    trix
    One-bar percent change of the triple-smoothed average.
    signal
    Smoothed average of TRIX.
  • True Strength Index (TSI)tsi

    A smoothed gauge of whether price changes have been mostly up or mostly down, from -100 to 100. Above zero means up-moves have dominated.

    How it works here for True Strength Index (TSI)

    In our engine: 100 x EMA(EMA(price change, 25), 13) / EMA(EMA(|price change|, 25), 13). Signal is EMA(13) of the TSI. Returns 0 if there is no movement. EMAs are seeded with their first value; the first 37 bars return no TSI.

    tsi
    Double-smoothed momentum, between -100 and 100.
    signal
    Smoothed average of the TSI.
  • Ultimate Oscillatorultosc

    A 0 to 100 gauge of buying pressure that blends three time spans so it is less jumpy than one. High readings mean buyers have been in charge across the spans.

    How it works here for Ultimate Oscillator

    In our engine: Buying pressure = close minus the lower of the low and prior close; true range = higher of high and prior close minus that lower value. Ratios of 7, 14 and 28 bar sums are blended 4:2:1 (divided by 7). A zero-range window counts as 0.5. First 28 bars blank.

  • Williams %Rwillr

    Shows where the latest close sits in the recent high-low range on a scale from -100 (at the low) to 0 (at the high). Readings near 0 mean price is near the top of its range.

    How it works here for Williams %R

    In our engine: -100 x (highest high - close) / (highest high - lowest low) over 14 bars, current bar included. A zero range returns -50. Range is -100 to 0. First 13 bars blank.

Volatility and range

How much prices swing.

  • Average True Range (ATR)atr

    Shows how much the price typically moves in one bar, in price units. Bigger values mean a more volatile market. It says nothing about direction.

    How it works here for Average True Range (ATR)

    In our engine: Wilder smoothing over 14 bars of the true range, the largest of high minus low and the gaps from the previous close to the high and to the low. The first bar uses high minus low. Seeded with a simple average of the first 14 true ranges, so bars 0 to 12 return NaN.

  • Bollinger Bandsbbands

    A moving average with a band above and below it that widens when prices swing more and narrows when they are calm. Traders read where price sits within the bands.

    How it works here for Bollinger Bands

    In our engine: Middle is the 20-bar simple average of close. The bands sit 2 standard deviations away, using the population standard deviation (the usual Bollinger convention). The first 19 bars return NaN. width is (upper - lower) / middle as a fraction, not a percent.

    upper
    Middle plus 2 standard deviations.
    middle
    The 20-bar simple moving average.
    lower
    Middle minus 2 standard deviations.
    width
    Band width as a fraction of the middle: (upper - lower) / middle. 0.10 means 10%.
    percent_b
    Where price sits in the bands: 0 at the lower band, 1 at the upper, 0.5 in the middle. Goes below 0 or above 1 outside the bands; 0.5 if the bands have zero width.
  • Chaikin Volatilitychaikin_vol

    Shows whether the typical high-to-low range of bars is expanding or shrinking compared with a few bars ago. Positive means ranges are getting wider.

    How it works here for Chaikin Volatility

    In our engine: Takes a 10-bar exponential average of high minus low, then returns its percent change over 10 bars: 100 * (now / 10 bars ago - 1). Gaps between bars are ignored (only high minus low is used). Returns 0 if the earlier value is 0. The first 19 bars return NaN.

  • Donchian Channeldonchian

    A channel drawn from the highest high and lowest low of the last several bars. Price breaking out of the channel is a common signal people watch.

    How it works here for Donchian Channel

    In our engine: Over 20 bars including the current bar: upper is the highest high, lower the lowest low, middle their average. The current bar is included, so a price can never close above upper on the same bar; compare with the previous bar's upper for breakouts. The first 19 bars return NaN.

    upper
    Highest high of the last 20 bars, current bar included.
    middle
    Halfway between upper and lower.
    lower
    Lowest low of the last 20 bars, current bar included.
    width
    Channel width as a fraction of the middle: (upper - lower) / middle.
  • Garman-Klass Volatilityhv_garman_klass

    A yearly volatility estimate that uses each bar's open, high, low and close, so it uses more information than closes alone.

    How it works here for Garman-Klass Volatility

    In our engine: Mean over 20 bars of 0.5 * ln(high/low)^2 - (2 ln 2 - 1) * ln(close/open)^2, floored at 0, then square root times sqrt(252). A decimal, not a percent. Ignores the gap from the previous close. The first 19 bars return NaN.

  • Historical Volatility (close-to-close)hv_close

    How much the price has been swinging, expressed as a yearly percentage, using only closing prices. 0.25 means about 25% per year.

    How it works here for Historical Volatility (close-to-close)

    In our engine: Sample standard deviation of 1-bar log returns over 20 bars, times the square root of 252. The result is a decimal, not a percent. 252 suits daily stock bars; crypto trades every day, so set 365 yourself, since the default does not adapt. The first 20 bars return NaN.

  • Keltner Channelskeltner

    A moving average with a channel above and below it set by the average bar range. Price near or beyond the edges shows a stretched move.

    How it works here for Keltner Channels

    In our engine: Middle is the 20-bar EMA of close; the channel sits 2 times the ATR (10 bars, Wilder smoothing) above and below. Uses true range, which includes gaps. The first 19 bars return NaN (EMA warm-up).

    upper
    Middle plus 2 times ATR.
    middle
    The 20-bar exponential moving average of close.
    lower
    Middle minus 2 times ATR.
  • Normalized Average True Range (NATR)natr

    How much price typically moves per bar, shown as a percent of the price. It lets you compare choppiness across assets with very different prices.

    How it works here for Normalized Average True Range (NATR)

    In our engine: 100 x ATR(14) / close. ATR is Wilder smoothing of the true range (which includes the gap from the previous close), seeded with the simple average of the first 14 true ranges. The first bar's true range is high minus low. First 13 bars blank.

  • Parkinson Volatilityhv_parkinson

    A yearly volatility estimate based only on each bar's high-to-low range. It reacts to intrabar swings that closing prices can miss.

    How it works here for Parkinson Volatility

    In our engine: Square root of the 20-bar mean of ln(high/low)^2 divided by (4 ln 2), times sqrt(252). A decimal, not a percent. Ignores opens and gaps between bars, so it understates volatility when prices gap. The first 19 bars return NaN.

  • Rogers-Satchell Volatilityhv_rogers_satchell

    A yearly volatility estimate from open, high, low and close that is not thrown off by a steady upward or downward drift in price.

    How it works here for Rogers-Satchell Volatility

    In our engine: Mean over 20 bars of ln(high/close)*ln(high/open) + ln(low/close)*ln(low/open), floored at 0, then square root times sqrt(252). A decimal, not a percent. Ignores the gap from the previous close. The first 19 bars return NaN.

  • Standard Deviationstdev

    How widely prices have been spread around their recent average, in price units. A larger number means choppier, more volatile prices.

    How it works here for Standard Deviation

    In our engine: Rolling standard deviation of the chosen price (default close) over 20 bars, current bar included. Default is the population form (ddof 0), as in TradingView and Bollinger Bands; ddof 1 gives the sample form. First 19 bars blank.

  • Ulcer Indexulcer

    A risk measure that grows with how deep and how long recent price drops from recent highs have been. Higher means a rougher, more painful ride.

    How it works here for Ulcer Index

    In our engine: Each bar's drawdown D = 100 x (close - highest close of the last 14 bars) / that highest close. Ulcer = square root of the average of D squared over 14 bars. The first 26 bars return no value because two 14-bar windows are chained.

  • Yang-Zhang Volatilityhv_yang_zhang

    A yearly volatility estimate that counts overnight gaps, inside-the-bar movement, and high-low swings together. It suits markets that gap, like stocks.

    How it works here for Yang-Zhang Volatility

    In our engine: Combines the sample variance of the overnight return (open vs previous close), the variance of the open-to-close return, and the Rogers-Satchell term, over 20 bars with weight k = 0.34 / (1.34 + 21/19). Square root times sqrt(252), a decimal. The first 20 bars return NaN.

Volume

How much traded, alone or combined with price.

  • Chaikin Money Flow (CMF)cmf

    Shows whether volume has mostly traded with closes near the highs (positive) or near the lows (negative) over the last stretch of bars, between -1 and +1.

    How it works here for Chaikin Money Flow (CMF)

    In our engine: Over 20 bars: sum of (money-flow multiplier * volume) divided by sum of volume, where the multiplier is ((close - low) - (high - close)) / (high - low), or 0 for a zero-range bar. Returns 0 if no volume traded in the window. The first 19 bars return NaN.

  • Ease of Movement (EOM)eom

    Shows how easily price is moving per unit of volume. Rising values mean price advanced on light volume; falling values mean it dropped easily.

    How it works here for Ease of Movement (EOM)

    In our engine: Per bar: (change in midpoint) divided by ((volume / 100,000,000) / (high - low)), set to 0 for zero range or zero volume. Then a 14-bar simple average. The scale depends on the asset's price and volume, so compare it to itself only. The first 14 bars return NaN.

  • Force Indexforce_index

    Combines how much price changed with how much volume traded. Positive means buyers had the force, negative means sellers; bigger values mean a stronger push.

    How it works here for Force Index

    In our engine: Smoothed with a 13-bar exponential average of (close minus previous close) * volume. Units are price times volume, so it is only comparable within one asset. The first bar has no price change, so the first 13 bars return NaN.

  • On-Balance Volume (OBV)obv

    A running total that adds volume on up-close bars and subtracts it on down-close bars. People watch whether it rises or falls along with price, not its absolute level.

    How it works here for On-Balance Volume (OBV)

    In our engine: Starts at 0 on the first bar. Each bar adds the bar's volume if the close is above the previous close, subtracts it if below, adds nothing if unchanged. Always has a value. The level depends on where the data starts (TA-Lib starts at the first volume instead), so use its slope or crosses.

  • Volume Z-Score (relative volume)volume_zscore

    How unusual the latest volume is compared with the recent average, in standard-deviation steps. Above 2 means volume is far busier than normal; below 0 means quieter.

    How it works here for Volume Z-Score (relative volume)

    In our engine: (volume - average volume) / standard deviation of volume over 20 bars, current bar included, population form. Returns 0 if volume was constant. Optional log mode (default off) uses ln(1 + volume) to tame spikes. First 19 bars blank.

  • Volume-Weighted Average Price (VWAP)vwap

    The average price paid over a period, weighted by how much traded at each price. Many traders treat it as a fair-value line for the day.

    How it works here for Volume-Weighted Average Price (VWAP)

    In our engine: Cumulative sum(price x volume) / sum(volume) since the anchor, price = (high + low + close) / 3. The default anchor resets at 00:00 UTC, because the engine holds every bar on a UTC clock. That is the usual crypto day. For US stocks and ETFs, regular-hours bars (9:30 to 16:00 New York) fall inside one UTC date, so it restarts each session, but at midnight UTC rather than at 9:30. On daily bars every bar is its own day, so it equals that bar's typical price. Blank while no volume has traded.

Candle patterns

Shapes of one to three candles that traders name.

  • Dark Cloud Coverdark_cloud

    A two-candle pattern after a rise: a long green candle, then a red candle that opens above it and closes deep into its body. Traders read it as a warning that buyers are tiring.

    How it works here for Dark Cloud Cover

    In our engine: Output is -1 on the second candle when it occurs, else 0 (never +1). Needs an uptrend: the close before the first candle must be above the average of the last 10 closes (trend_period 10). First candle long green, second opens above its high (gap required by default) and closes below its midpoint but above its open. The first 11 bars return NaN.

  • Dojidoji

    A candle that closes almost exactly where it opened, which traders read as indecision between buyers and sellers.

    How it works here for Doji

    In our engine: Output is 1 when it occurs, else 0 (no direction, never negative), read on the bar itself. True when the body (open to close) is at most 10% of the average high-low range of the previous 10 candles. No prior-trend requirement. The first 10 bars return NaN.

  • Dragonfly Dojidragonfly_doji

    A candle that opens, closes and peaks at about the same price, with a long tail below. Sellers pushed down but the price came back; traders watch it near lows.

    How it works here for Dragonfly Doji

    In our engine: Output is 1 when it occurs, else 0 (no direction). True when the body is at most 10% of the average range of the previous 10 candles, the upper shadow is under 10% of that range and the lower shadow is over 10%. No prior-trend requirement. The first 10 bars return NaN.

  • Engulfing patternengulfing

    A two-candle pattern where the second candle's body completely covers the first candle's body in the opposite direction. Traders read it as a possible turn in direction.

    How it works here for Engulfing pattern

    In our engine: Output is +1 bullish (red candle then a larger green one, after a downtrend), -1 bearish (green then larger red, after an uptrend), else 0. Needs a prior trend: the close before the first candle must be below (bullish) or above (bearish) the average of the last 10 closes (trend_period 10). The second body must cover the first and go strictly beyond it on at least one side. The first 11 bars return NaN.

  • Evening Starevening_star

    A three-candle pattern after a rise: a long green candle, a small candle above it, then a strong red candle. Traders read it as the rise running out of steam.

    How it works here for Evening Star

    In our engine: Output is -1 on the third candle when it occurs, else 0 (never +1). Needs an uptrend: the close before the first candle must be above the average of the last 10 closes (trend_period 10). The star body must gap above the first body by default, and the third candle closes more than 30% of the way down into the first body. The first 12 bars return NaN.

  • Gravestone Dojigravestone_doji

    A candle that opens, closes and bottoms at about the same price, with a long tail above. Buyers pushed up but the price fell back; traders watch it near highs.

    How it works here for Gravestone Doji

    In our engine: Output is 1 when it occurs, else 0 (no direction). True when the body is at most 10% of the average range of the previous 10 candles, the lower shadow is under 10% of that range and the upper shadow is over 10%. No prior-trend requirement. The first 10 bars return NaN.

  • Hammerhammer

    A candle with a small body at the top and a long lower tail, after a fall. Traders read it as buyers stepping in after sellers pushed price down.

    How it works here for Hammer

    In our engine: Output is +1 when it occurs, else 0. Needs a downtrend: the previous close must be below the average of the last 10 closes (trend_period 10). Body smaller than the 10-bar average body, lower shadow over 2 times the body, upper shadow under 10% of the average range. No gap needed by default. TA-Lib uses 1 time the body, and a body near the previous low instead of a trend. The first 10 bars return NaN.

  • Hanging Manhanging_man

    The same shape as a hammer, small body on top and a long lower tail, but appearing after a rise. Traders read it as a warning that sellers are testing lower prices.

    How it works here for Hanging Man

    In our engine: Output is -1 when it occurs, else 0 (never +1). Needs an uptrend: the previous close must be above the average of the last 10 closes (trend_period 10). Same shape rules as the hammer: lower shadow over 2 times the body, upper shadow under 10% of the average range. No gap needed by default. The first 10 bars return NaN.

  • Haramiharami

    A small candle sitting inside the body of the long candle before it. Traders read it as the previous move losing steam.

    How it works here for Harami

    In our engine: Output is +1 bullish (long red candle then a small body inside it, after a downtrend), -1 bearish (long green then small, after an uptrend), else 0. Needs a prior trend: the close before the first candle versus the average of the last 10 closes (trend_period 10). The first 11 bars return NaN.

  • Inside Barinside_bar

    A bar whose whole range fits within the previous bar's range, showing the market pausing. A break out of it is what traders usually wait for.

    How it works here for Inside Bar

    In our engine: Output is 1 when the high is strictly below the previous high and the low is strictly above the previous low, else 0 (no direction). Compares ranges (wicks), not bodies, and needs no prior trend. The first bar returns NaN.

  • Inverted Hammerinverted_hammer

    A candle with a small body at the bottom and a long tail above, after a fall. Traders see buyers trying to push up and wait for the next candle to confirm.

    How it works here for Inverted Hammer

    In our engine: Output is +1 when it occurs, else 0. Needs a downtrend: the previous close must be below the average of the last 10 closes (trend_period 10). Body smaller than the 10-bar average body, upper shadow over 2 times the body, lower shadow under 10% of the average range. No gap needed by default; TA-Lib requires a body gap down, uses 1 time the body and checks no trend. The first 10 bars return NaN.

  • Morning Star (candlestick pattern)morning_star

    A three-candle pattern after a decline: a long red candle, a small candle below it, then a strong green candle. People read it as a sign the fall may be stalling.

    How it works here for Morning Star (candlestick pattern)

    In our engine: Output is +1 on the third candle, else 0 (never -1). Needs a downtrend: the close before the first candle must be below the average of the last 10 closes (trend_period; 0 turns this off). The first candle is a long red one, the star is a small body that must gap below the first body by default (require_gap, rare in 24/7 crypto), and the third is a green candle closing more than 30% of the way up into the first body. The first 12 bars return NaN.

  • Outside Baroutside_bar

    A bar whose range is wider than the previous bar on both sides: it went higher and lower. It marks a burst of activity but says nothing about direction by itself.

    How it works here for Outside Bar

    In our engine: Output is 1 when the bar's high is strictly above the previous high and its low is strictly below the previous low, else 0. It is never negative and has no trend requirement. First bar blank. Add a close-versus-open test in your rules to get a direction.

  • Piercing Line (candlestick pattern)piercing

    After a decline, a long red candle followed by a green one that opens low and closes more than halfway up the red body. People read it as buyers pushing back.

    How it works here for Piercing Line (candlestick pattern)

    In our engine: Output is +1 on the second candle, else 0 (never -1). Needs a downtrend: the close before the first candle is below the average of the last 10 closes (trend_period). The first candle is a long red one. By default the green candle must open below the red candle's low (require_gap, rare in 24/7 crypto) and close past 50% of the red body (penetration) but below the red candle's open. The first 11 bars return NaN.

  • Shooting Star (candlestick pattern)shooting_star

    After a rise, a candle with a small body near its low and a long upper tail: buyers pushed up but sellers pushed the price back down. Read as a possible warning of a turn.

    How it works here for Shooting Star (candlestick pattern)

    In our engine: Output is -1 on the bar, else 0 (never +1). Needs an uptrend: the previous close is above the average of the last 10 closes (trend_period). Body smaller than the 10-bar average body, upper shadow over 2 times the body (TA-Lib uses 1 time), lower shadow under 10% of the average range. No gap needed by default (TA-Lib requires one and checks no trend). The first 10 bars return NaN.

  • Three Black Crows (candlestick pattern)three_black_crows

    Three falling red candles in a row after a rise, each closing near its low and lower than the last. Read as steady selling taking over.

    How it works here for Three Black Crows (candlestick pattern)

    In our engine: Output is -1 on the third candle, else 0 (never +1). Needs an uptrend: the close before the first candle is above the average of the last 10 closes (trend_period). The exact mirror of three white soldiers: each candle is red with a lower shadow under 10% of the recent average range, opens below the prior open (but at most 20% of the recent average range below the prior close) and closes lower. TA-Lib's rule differs: it wants a white candle just before the three and each open strictly inside the previous body. The first 12 bars return NaN.

  • Three White Soldiers (candlestick pattern)three_white_soldiers

    Three rising green candles in a row after a decline, each closing near its high and higher than the last. Read as steady buying taking over.

    How it works here for Three White Soldiers (candlestick pattern)

    In our engine: Output is +1 on the third candle, else 0 (never -1). Needs a downtrend: the close before the first candle is below the average of the last 10 closes (trend_period). Each candle is green with an upper shadow under 10% of the recent average range, opens above the prior open (but at most 20% of the recent average range above the prior close) and closes higher. No body is much shorter than the one before, and the third body is not short. The first 12 bars return NaN.

Highs, lows and structure

Swings, windows of highest and lowest values, and the shape they make.

  • Highest value (rolling high)highest

    The highest value reached over the last several bars, by default the highest high. Often used as a breakout level.

    How it works here for Highest value (rolling high)

    In our engine: Rolling maximum of the chosen column (default high) over 20 bars, including the current bar. The first 19 bars return NaN. Since the current bar is included, compare against the previous bar's value to test for a breakout.

  • Lowest (rolling low)lowest

    The lowest price reached over the last several bars. People use it as a floor level: a new low means price just broke below recent support.

    How it works here for Lowest (rolling low)

    In our engine: Rolling minimum of the chosen price (default: the bar lows) over 20 bars, including the current bar. The first 19 bars return no value. To test a breakout below the previous low, compare with an earlier bar, since the current bar is part of the window.

  • Swing Highs and Lows (market structure)swings

    Finds turning points in price (swing highs and lows) and reads whether they are rising, falling or broken. Each swing is only known a couple of bars after it happened.

    How it works here for Swing Highs and Lows (market structure)

    In our engine: A swing high has a high strictly above the 2 highs before it and at or above the 2 after it (lows mirrored). It is reported on the confirmation bar, 2 bars after the pivot, never earlier. Only swings from the last 50 bars count. All outputs are blank for the first 51 bars.

    swing_high
    1 on the bar a new swing high is confirmed, else 0.
    swing_low
    1 on the bar a new swing low is confirmed, else 0.
    highs
    +1 if the latest swing high is higher than the one before, -1 if lower, 0 if equal or fewer than two are known.
    lows
    +1 if the latest swing low is higher than the one before, -1 if lower, 0 if equal or fewer than two are known.
    structure
    +1 when highs and lows are both rising, -1 when both are falling, else 0.
    bos
    Break of structure: +1 on the first close above the latest swing high since it was confirmed, -1 on the first close below the latest swing low, else 0.
    last_high
    Price of the latest confirmed swing high; blank until one is known.
    last_low
    Price of the latest confirmed swing low; blank until one is known.
    high_bars_ago
    Bars since that swing high's pivot bar (at least 2); blank until one is known.
    low_bars_ago
    Bars since that swing low's pivot bar (at least 2); blank until one is known.

Market conditions

Rules that label the market bull, bear or neutral (the builder's market-condition detectors).

  • Bull/bear market by 20% movesdrawdown_regime

    Labels the market bear after a 20% fall from a high and bull after a 20% rise from a low, the usual textbook rule. Neutral means no such move yet.

    How it works here for Bull/bear market by 20% moves

    In our engine: Replays the rule on the last 504 closes only, starting neutral on each bar so results never depend on where the data begins. Inside that window the state flips to -1 when a close is 20% below the running high and to +1 when a close is 20% above the running low, and keeps the last state until the opposite 20% move. 0 means neither move happened in the window. The first 503 bars return NaN.

  • Consensus market conditionconsensus_regime

    A simple market-condition label that only says bullish or bearish when two common long-term checks agree, and stays neutral otherwise.

    How it works here for Consensus market condition

    In our engine: Uses simple averages of close with no tolerance band. +1 when close is above its 200-bar average and the 50-bar average is above the 200-bar average. -1 when both are below. 0 when they disagree or are equal. The first 199 bars return NaN. The bars are whatever the bot uses, so 200 bars equals 200 days only on daily data.

  • Market condition: moving-average cross (golden / death cross)ma_cross_regime

    Labels the market bullish, bearish or neutral by comparing a faster average of closes with a slower one. Fast above slow reads as bullish, fast below as bearish.

    How it works here for Market condition: moving-average cross (golden / death cross)

    In our engine: Uses simple averages of the close, 50 and 200 bars by default. +1 when fast is above slow x (1 + band), -1 when fast is below slow x (1 - band), otherwise 0. Band is 0 by default, so exact ties give 0. The first 199 bars return NaN, until the slow average exists.

  • Market condition: price vs moving averagema_regime

    Labels the market bullish, bearish or neutral by whether the price sits above or below its long-term average, the classic 200-bar rule.

    How it works here for Market condition: price vs moving average

    In our engine: Simple average of the close over 200 bars by default. +1 when close is above average x (1 + band), -1 when below average x (1 - band), otherwise 0. Band defaults to 0, so only an exact tie is neutral. The first 199 bars return NaN.

  • Market condition: trend plus volatilitytrend_vol_regime

    Labels the market bullish when price is above its long average and volatility is not extreme, bearish when below it and not unusually calm, otherwise neutral.

    How it works here for Market condition: trend plus volatility

    In our engine: Volatility percentile = mid-rank of 20-bar realized volatility of close-to-close log returns versus its previous 252 values. +1 when close is above SMA(200) and the percentile is below 80. -1 when close is below the SMA and the percentile is above 20. Otherwise 0. The first 272 bars return NaN.

  • Market condition: trend regime (average plus ADX)trend_regime

    Labels the market as trending up, trending down, or no clear trend. It needs price on the right side of its long average and a strong directional reading.

    How it works here for Market condition: trend regime (average plus ADX)

    In our engine: +1 when close is above its 200-bar simple average, ADX(14, Wilder) is at least 20, and +DI is above -DI. -1 when close is below the average, ADX is at least 20, and -DI is above +DI. Otherwise 0. The first 199 bars return NaN (the 200-bar average is the slowest part).

  • Market condition: volatility regimevol_regime

    Labels recent volatility as low, normal or high compared with its own past year or so. It says nothing about direction.

    How it works here for Market condition: volatility regime

    In our engine: Realized volatility = standard deviation (sample) of 20 close-to-close log returns. Percentile = mid-rank (ties count half) versus the previous 252 values. Value is -1 when the percentile is at or below 20, +1 when at or above 80, else 0. The first 272 bars return NaN.

    value
    -1 low volatility, 0 normal, +1 high.
    percentile
    Where current volatility ranks against its past, 0 to 100.

Statistics

Measures of how prices behave: noise, trend strength and randomness.

  • Autocorrelation of returnsautocorr

    Measures whether a price move tends to be followed by a move in the same direction (positive) or the opposite direction (negative), from -1 to +1.

    How it works here for Autocorrelation of returns

    In our engine: Pearson correlation between each 1-bar log return and the return 1 bar earlier, over the last 50 pairs. Returns 0 if either side has no variation. The first 51 bars return NaN. Uses closed bars only.

  • Choppiness Indexchop

    Rates how choppy or how trending the market has been, from 0 to 100. High readings mean sideways, back-and-forth movement; low readings mean a clean trend.

    How it works here for Choppiness Index

    In our engine: 100 * log10(sum of true range over 14 bars / (highest high - lowest low over 14 bars)) / log10(14). The first bar's true range is high minus low. Returns 100 when the 14-bar range is zero. The first 13 bars return NaN.

  • Kaufman Efficiency Ratioefficiency_ratio

    Compares how far price actually got with how much it wiggled to get there. Near 1 means a straight move; near 0 means mostly back-and-forth noise.

    How it works here for Kaufman Efficiency Ratio

    In our engine: |close now - close 10 bars ago| divided by the sum of the absolute bar-to-bar changes over those 10 bars. Always between 0 and 1. Returns 0 for a completely flat window. The first 10 bars return NaN.

  • Outside data (company numbers, your own data)signal

    A number that comes from outside the price chart, such as a company's profit from its filings or a score you bring yourself, known only from the day it was published.

    How it works here for Outside data (company numbers, your own data)

    In our engine: Reads one field of a data source and joins it to each decision bar as of the bar's end: the newest row published by then, carried forward. Outputs: the latest value, bars since it arrived, a one when a new row just arrived, and days since it arrived. A row published after a bar is never read on that bar.

  • Percentile Rankpercentile_rank

    Where the latest value stands compared with the recent past, from 0 to 100. A reading of 90 means it is higher than or equal to about 90 percent of recent values.

    How it works here for Percentile Rank

    In our engine: Counts how many of the previous 100 values are at or below the current one (the current bar is excluded) and divides by 100, so 0 to 100. Ties count in full, so a flat series reads 100. The first 100 bars return no value.

  • Rolling betabeta

    How much this coin or stock has typically moved for each 1% move of another one lately: 1.5 means half as much again, 0.5 half as much.

    How it works here for Rolling beta

    In our engine: The slope of this symbol's bar-to-bar returns against another symbol's over the last period bars (default 30): their covariance divided by the other symbol's variance. The other symbol is a traded symbol, the benchmark or a reference symbol of the bot; completed bars only.

  • Rolling correlationcorrelation

    How closely this coin or stock has been moving with another one lately: 1 means in step, 0 means no relation, and -1 means opposite.

    How it works here for Rolling correlation

    In our engine: Compares this symbol's bar-to-bar returns with another symbol's over the last period bars (default 30) and gives their correlation, from -1 to 1. The other symbol is a traded symbol, the benchmark or a reference symbol of the bot; both are read on the same bars, completed ones only.

  • Variance Ratio (Lo-MacKinlay)variance_ratio

    Tests whether price moves tend to reverse or to continue. Below 1 suggests moves tend to reverse; above 1 suggests they tend to continue; near 1 looks like a random walk.

    How it works here for Variance Ratio (Lo-MacKinlay)

    In our engine: Over the last 100 one-bar log returns, compares the variance of overlapping 2-bar returns with the one-bar variance, with Lo-MacKinlay bias corrections. A flat window gives ratio 1 and z of 0. First 100 bars return no value.

    value
    The variance ratio itself: below 1 mean-reverting, above 1 trending.
    z
    Test statistic for ratio versus 1, assuming constant volatility.
    z_robust
    Same test, adjusted for changing volatility.
  • Z-Scorezscore

    How many standard deviations the latest price is from its recent average. Large positive or negative values mean price has stretched far from its usual range.

    How it works here for Z-Score

    In our engine: (price - 20-bar simple average) / standard deviation over the same 20 bars, population form, current bar included. Returns 0 for a flat window. First 19 bars blank.

New here? Build your first bot.