Glossary
Terms are defined the way this course uses them, which is sometimes narrower than common usage and occasionally at odds with it. Where a word is genuinely ambiguous in the wider literature, the entry says so.
The glossary covers three kinds of vocabulary. The terms the course itself teaches, which link to their lesson. The language of the markets a reader will meet — stocks, options, futures and forex, order types and market structure — defined for someone who reads charts of those markets in AmiBroker. And the working vocabulary of professional traders, some of which is precise and some of which is slang; the entry says which, and where a word is more often used to sell something than to describe it, the entry says that too.
Entries the course teaches link to the lesson. “See also” links and the links inside definitions resolve within this page, and the test suite fails if any of them points at a term that is not here. Use the filter below to narrow the list by category or by any word in a term or its definition.
597 terms in 17 categories.344 of them are taught in this course and link to the lesson; the rest are here because a reader of trading material will meet them, and a definition that is honest about what a word does and does not mean is worth having to hand.
Build warning: these references point at terms that are not in the glossary: Tape reading → [[time & sales]].
Symbols
- _SECTION_BEGINalso: _SECTION_END, sectionsAFL
Markers that divide a formula into named sections, so that parameters are grouped in the Parameters window and so that several indicators can be dropped into one pane and edited separately. Drag-and-drop charting generates them. Everything between
_SECTION_BEGIN("name")and_SECTION_END()belongs to that section.- _TRACEalso: _TRACEF, DebugViewAFL
Writes a string to the debug output through the Windows
OutputDebugStringcall, so it lands both in AmiBroker's own Log window (Window → Log) and in an external viewer such as DebugView;_TRACEF()takes a format string, and_TRACE( "!CLEAR!" )clears the Log window between runs. It is the way to see what a formula did in the Analysis window, where there is no chart to look at, and to count how often and on which thread it ran.- #pragmaAFL
A pre-processor directive that sets options before the formula runs:
#pragma nocacheforces included files to be re-read on every execution,#pragma maxthreadslowers the number of Analysis threads,#pragma enable_static_declallowsstaticdeclarations. Directives, like#include, are handled before AFL sees the code.
A
- Accumulation/distributionalso: A/D line (Chaikin), Chaikin oscillatorIndicators
A cumulative volume measure that weights each bar's volume by where the close fell within its range;
AccDist()in AFL, with theChaikin()oscillator built on it. A refinement of OBV that avoids the all-or-nothing daily assignment. Not to be confused with the advance/decline line, a breadth measure with a similar abbreviation.- AddColumnalso: AddTextColumn, AddMultiTextColumnAFL
Adds a column to an Exploration's result table:
AddColumn()for numbers,AddTextColumn()for strings, with formatting and colour arguments. Together withFilter, which chooses the rows, it is the whole of the Exploration interface — a table whose columns are any array you can compute.- AddCustomMetricAFL
Adds a row to the backtest report and to the optimization result list from custom backtester code, with separate values for all, long-only and short-only trades. It is how a metric AmiBroker does not report — Sortino, a trade-count penalty, anything — becomes available as an optimization target.
- AddToCompositeAFL
Accumulates a value from every symbol in a scan into a composite ticker:
AddToComposite( array, "~name", "field", flags ). Run across a universe, it builds breadth series, sector sums and custom indexes as ordinary symbols that any chart or backtest can read. The flags control resetting and where the composite is filed.- Adjusted dataalso: back-adjusted dataMarket data
Price history restated so that corporate actions — splits, dividends, consolidations — do not appear as price moves. Unadjusted data manufactures gaps, breakouts and volume spikes on the bars where the action occurred, which is exactly what many studies are looking for. Adjustment is done by the data vendor, and different vendors do it differently.
- ADRalso: American depositary receipt, depositary receiptMarket structure
A US-listed certificate representing a fixed number of a foreign company's shares held by a bank. It trades in dollars during US hours while the underlying trades in its home market and currency, so an ADR carries currency exposure and can gap on news that arrived while the US was closed.
- Advance/decline linealso: A/D lineBreadth
A running total of the number of instruments that rose minus the number that fell, computed across a defined universe. A description of how widely a move was shared, not a forecast.
- Advance/decline ratioBreadth
Advancing issues divided by declining issues on a day, or a moving average of that ratio. Bounded below by zero and unbounded above, so it is usually smoothed or converted to a difference. Built from the same two daily counts as the advance/decline line, but presented as a rate rather than as a running total of their difference — and the ratio alone does not recover that difference.
- ADXalso: average directional index, directional movementIndicators
A measure of trend strength regardless of direction, from 0 to 100, built from the smoothed difference between upward and downward directional movement;
ADX()in AFL, withPDI()andMDI()for the two directional lines. Low readings are used to identify ranges and high ones to confirm trends. Its lag is substantial, and its thresholds are conventions.- AFLalso: AmiBroker Formula LanguageAmiBroker
AmiBroker's formula language. Array-oriented: almost every variable holds one value per bar, and an operation applies to every bar at once. Understanding that model is the single most important thing in learning it.
- AFL Code WizardAmiBroker
A separately licensed add-on program, launched from Analysis → AFL Code Wizard, that converts plain-English sentences into trading-system AFL for users who do not want to write code. Its licence key is also what unlocks the AI Code Assistant in AmiBroker 7. This course teaches the language instead, because a formula you cannot read is a backtest you cannot audit.
- AI Code Assistantalso: AFL Code AssistantAmiBroker
An assistant added in AmiBroker 7.00 that writes AFL from a plain-language description and proposes fixes for parser errors, inside the Formula Editor. Full use is gated by the AFL Code Wizard licence rather than by the edition. Anything it produces is code you did not verify, and it is checked the same way as code from a forum: against the function reference and against a chart.
- AlertReal-time
A notification raised by
AlertIf()when a condition becomes true, appearing in the Alert Output window and optionally as a sound or an email. In this course the chain ends at alert → human review → decision; nothing is automated.- Alert Output windowReal-time
The window where alerts raised by
AlertIf()and Easy Alerts are listed, with symbol, time and text. A formula that re-runs every refresh would raise the same alert each time, soAlertIf()ships with de-duplication on by default: itsflagsargument defaults to1+2+4+8, where bit 4 suppresses repeats of the same alert type and bit 8 suppresses repeats carrying the same date and time, remembered per symbol. The course's lesson on duplicate suppression covers what the defaults do not.- AlphaTrader jargon
Return in excess of what exposure to the market (Beta) would explain. In the strict sense it is a regression intercept; in trading talk it is a synonym for skill or edge. A strategy that is long the index with extra leverage has beta, not alpha, however good its year looked.
- American and European stylealso: American option, European optionOptions
An American-style option can be exercised at any time up to expiration; a European-style option only at expiration. The names have nothing to do with geography. Most US equity options are American-style; most index options are European-style and cash-settled.
- AmiQuoteAmiBroker
A separate downloader that ships inside the AmiBroker installer but is licensed separately and is not covered by a plain Standard or Professional licence; unregistered, it is capped at ten symbols per source. It fetches end-of-day, some intraday and fundamental data from public web sources into text files and imports them into the database.
- Analysis windowalso: New Analysis windowAmiBroker
The AmiBroker window that runs a formula across many symbols in one of four modes: Scan, Exploration, Backtest and Optimization. Its Apply To and Range settings live in the dialog rather than in the formula, which is why results are so often irreproducible.
- Anchored and rolling walk-forwardalso: anchored walk-forward, rolling walk-forwardSystems
Two ways to advance the in-sample window in a walk-forward test: anchored keeps the start fixed and lets the window grow, rolling moves both ends so the window stays the same length. AmiBroker's Walk-Forward settings offer both through an Anchored checkbox. Anchored uses more data; rolling adapts faster to regime change. Neither is right in general.
- Apply to and Rangealso: Apply to, Range (Analysis window)AmiBroker
The two settings that define what an Analysis run covers: Apply to selects the symbols (current, all, or a category filter), Range selects the bars (all quotes, the last N, or a date span). Scan, Exploration, Backtest and Optimization all honour them. Apply to: Filter and the AFL variable
Filterare different things with the same name.- ApplyStopAFL
The backtester's built-in stops:
ApplyStop( type, mode, amount, exitAtStop, volatile, reEntryDelay, validFrom, validTo )for maximum loss, profit target, trailing and N-bar stops, in percent, points or percent of profit.exitAtStopis not a flag but a three-way choice: 0 checks only the trade price and exits at it, 1 checks the bar's high–low range and exits intraday at the stop level, 2 checks the range but exits on the next bar at the regular trade price. Stops set here are evaluated by the engine, not by your signal arrays.- APX filealso: Analysis ProjectAmiBroker
A self-contained Analysis Project file holding the formula together with every setting, including Apply To and the date range. The reliable way to make a run reproducible, and what the Batch window operates on.
- Arms indexalso: TRINBreadth
The advance/decline ratio divided by the up-volume/down-volume ratio. A value of 1 means volume was spread in proportion to advances and declines; above 1 means decliners drew more than their share of volume. Read inverted — a high reading is bearish action — which trips up everyone once.
- ArrayAFL
A series of values, one per bar. In AFL,
Close,MA( Close, 50 )andClose > MA( Close, 50 )are all arrays. Operations are element-wise: comparing two arrays produces an array of Booleans, not a single true or false.- Array modelAFL
AFL's central idea: a formula describes a calculation applied to every bar simultaneously rather than a loop over bars. It is why
if( Close > Open )is an error andIIf( Close > Open, x, y )is not, and why almost every beginner mistake in AFL is a scalar/array confusion.- ASCII importeralso: ASCII Import Wizard, format definition fileAmiBroker
AmiBroker's tool for loading quotes from text and CSV files. The Import Wizard walks through the column mapping in three steps and can save the result as a format definition file; the importer proper reads such files, whose
$FORMATline declares the field order. Every data-quality lesson in this course begins with a file that was imported with the wrong mapping.- AssignmentOptions
What happens to an option writer when a holder exercises: the writer is obliged to deliver the underlying (for a call) or buy it (for a put) at the strike. Assignment can arrive early on American-style options, most often on deep in-the-money options or just before an ex-dividend date.
- ATRalso: Average True RangeIndicators
A volatility measure: an average of the true range, which is the greatest of the current bar's range, the distance from the previous close to the current high, and the distance from the previous close to the current low. Used throughout this course to make distances comparable across instruments. Note that
TrueRange()is not an AFL function;ATR( 1 )is the documented single-bar equivalent.- Auctionalso: opening auction, closing auction, call auctionMarket structure
A matching process in which orders accumulate for a period and then execute together at the single price that maximises volume. Most equity exchanges open and close with one. The closing auction price is the official close, used to value funds and indexes, and it is where market-on-close orders fill — which is why a backtest that trades on the close is assuming participation in an auction.
- Autocorrelationalso: serial correlationResearch
The correlation of a series with its own past values. Positive autocorrelation in returns is what trend following needs; negative is what mean reversion needs; daily equity returns show very little of either, which is why both approaches struggle on daily equity bars and why volatility, which is strongly autocorrelated, is easier to forecast than direction.
- Averaging downTrader jargon
Buying more of a position that has moved against you, lowering the average cost. It feels like a discount and it is a larger bet on a thesis the market has so far rejected. Systematically, it converts a series of small losses into occasional very large ones — the signature of a strategy whose backtest looks smooth until the sample includes the bad year.
B
- Back-adjusted contractalso: back-adjusted continuous contractFutures
A continuous contract in which prices before each roll are shifted by the roll gap, so the series has no artificial jumps. The cost is that historical price levels are false — they can even go negative — so any rule that uses absolute price, percentage moves or ratios must be checked against the adjustment method. Data vendors offer several methods, and the method changes the backtest.
- BackfillReal-time
Historical bars supplied by a real-time plug-in when AmiBroker first touches a symbol. How far back it reaches is the single most consequential number in a vendor comparison, and the one vendors are vaguest about.
- BacktestSystems
A simulation of trading a rule set over historical data. Not a measurement: a stack of assumptions with a number printed on top. A backtest result means nothing without the universe, period, costs, fill assumption, data source and sizing model attached.
- Backtest reportalso: report, Statistics pageAmiBroker
The output of a backtest: a statistics page of metrics for all, long and short trades; charts of equity, drawdown and profit distribution; the Trades page listing every trade; and optionally the formula and settings used.
AddCustomMetric()adds your own rows. Reading it in order — exposure, drawdown, trade count, then return — is the subject of a lesson.- BackwardationFutures
A futures curve in which nearer months trade above later ones, typically when the physical commodity is scarce now and expected to be less so. It rewards a long position at each roll and is often read as a sign of tight supply — a reading with more support than most curve folklore.
- Bad tickMarket data
A print that no chart should show — an erroneous or out-of-context trade. Some feeds filter them and some deliberately do not, passing the tape through as received. Whatever filtering a plug-in offers applies to the incoming stream; prints already in your database are a separate job for a quality scan and the Quote Editor.
- Bag holderTrader jargon
Someone left holding a position long after the reason for it has gone, usually because selling would realise the loss. Slang, and unkind, and a precise description of what the disposition effect — the documented tendency to sell winners early and hold losers — looks like in one account.
- BarMarket data
One period of price data, summarised as open, high, low, close and volume. A bar hides everything about the order in which prices occurred inside it — which is why a backtest cannot know whether a high or a low came first.
- Bar ReplayAmiBroker
AmiBroker's facility for stepping historical data forward one bar at a time, as though it were arriving live. The basis of this course's Level A path for every real-time topic.
GetPlaybackDateTime()returns the playback position, or zero when replay is not running.- BarIndex and BarCountalso: BarIndex, BarCountAFL
BarCountis the number of bars the formula is currently executing over;BarIndex()is each bar's position in that range. Under QuickAFL both describe the bars being calculated, not the whole database, so code that uses them as absolute positions behaves differently on a zoomed chart and in a full backtest.- BarsSinceAFL
The number of bars since a condition was last true, for every bar. It turns an event into a running count, which is how rules like within ten bars of a crossover are written. What it returns before the condition has ever been true is not documented, so check it in the application and handle the left edge of the array deliberately.
- Base currencyForex
The first currency in a pair — the one being priced, and the one a lot is denominated in. In EUR/USD the base is the euro; a standard lot is 100,000 euros. Profit and loss on the pair accrue in the quote currency and are converted to the account currency at the current rate.
- Base intervalAmiBroker
The finest bar size a database stores. Every higher interval is compressed from it on demand. Choosing it decides both what analysis is possible and how much disk and memory the database consumes.
- Base rateResearch
What happened on average without the condition — the unconditional outcome over the same universe and period. A conditional result is uninterpretable without it: a positive average after breakouts in a market that rose is evidence that the market rose.
- BasisFutures
The gap between a futures price and the spot price of its underlying — quoted by commodity hedgers as cash minus futures, and by financial-futures desks the other way round, so the sign convention has to be stated. Basis narrows to zero at expiration and reflects cost of carry in between. A hedger's risk is basis risk: the hedge and the thing hedged move together, but not identically.
- Batch windowAmiBroker
AmiBroker's automation facility, introduced in version 6.20. Runs sequences of Analysis operations from saved APX project files, with steps for exporting results, running external programs, importing data and more.
- BenchmarkResearch
The thing a strategy result is compared against. A benchmark measured over a different universe compares two universes at least as much as it tests the strategy; the benchmark that isolates a rule is passive ownership of the same instruments over the same period paying the same costs.
- BetaTrader jargon
The sensitivity of an instrument's returns to the market's: a beta of 1.5 means it moves half again as much as the index on average. Much of what looks like a strategy's return is beta in disguise, which is what comparing against a benchmark and against buy-and-hold is for.
- Bid and offeralso: hit the bid, lift the offer, on the bid, on the offerTrader jargon
Dealer language for the two sides of a quote. To hit the bid is to sell at the bid price, taking liquidity; to lift the offer is to buy at the ask. Being on the bid means a resting buy order waiting to be hit. The phrases are precise, and they describe who crossed the spread and who was paid for it.
- Black swanResearch
An event outside anything the historical sample contained, large in impact and rationalised afterwards. The phrase is used loosely for any large surprise; strictly it means the model had no such event in it, so no backtest could have shown the exposure. Position sizing that survives the worst day in the sample has not been sized for a black swan.
- Block tradealso: blockMarket structure
A single large trade, usually negotiated away from the open book and printed afterwards. A block on the tape tells you that size changed hands at a price; it does not tell you which side initiated, and the folklore that reads every block as smart money buying has not survived testing.
- Blow-off topTrader jargon
A final, near-vertical surge on very high volume that marks the end of an advance. Like most named tops it is easy to see afterwards and, in real time, looks exactly like a strong market. The volume climax is the measurable part.
- Bollinger BandsIndicators
A moving average with bands a set number of standard deviations above and below it, conventionally 20 periods and 2 deviations;
BBandTop()andBBandBot()in AFL. Band width is a volatility measure; price touching a band is a statement about recent dispersion, not a buy or sell signal, and returns beyond the bands are common in trends.- BookTrader jargon
A trader's or desk's collection of positions, as in the book is long. Also the order book, and the verb for realising a profit, as in booking a gain. Which sense is meant is clear from context to those who already know.
- Boolean arrayAFL
An array of true/false values, one per bar, produced by a comparison.
Close > MA( Close, 50 )is not one answer — it is a series of answers, one for every bar in the loaded range.- Bootstrapalso: resamplingResearch
Estimating the range of a statistic by drawing many random samples, with replacement, from the observed data and recomputing it each time. AmiBroker's Monte Carlo simulator bootstraps trades or equity changes to show the distribution of drawdowns and returns other orderings would have produced. It cannot invent outcomes the sample did not contain.
- Bracket orderalso: OCO, one-cancels-otherExecution
An entry order with a protective stop and a profit target attached, where filling one exit cancels the other (one-cancels-other). It implements the entry–stop–target shape most systems are written in, and it is the mechanism that lets a rule tested with
ApplyStop()be carried into live trading without a human watching the screen.- BreadthBreadth
How widely a market move is shared across the instruments in a universe: how many rose, how many are above a moving average, how many made new highs. A description of participation, and only meaningful over the universe it was measured on.
- BreakoutChart reading
Price moving beyond a defined level — typically the highest high or lowest low of a look-back window. The word is meaningless until the level and the window are stated, which is why every study in this course defines them numerically.
- Breakout failurealso: failed breakout, false breakout, fakeoutChart reading
A move through a level that reverses back inside it within a few bars. Failed breakouts are common — in many markets more common than successful ones — which makes the base rate of failure the single most useful number about any breakout rule, and the failure itself a setup some traders prefer to the breakout.
- Breakout systemSystems
A system that enters when price exceeds a defined level — the N-day high, the top of a consolidation, yesterday's range — on the hypothesis that the move continues. Its results depend on the base rate of breakout failure in the market tested, and on costs, since breakouts are frequent and most are small.
- BrokerMarket structure
The firm that holds your account and sends your orders to the market. An agency broker passes orders on; a principal or dealing broker may take the other side itself, as most retail forex and CFD providers do. Where your order goes, and who profits from how it is filled, is a question worth asking before choosing one.
- Bull trap and bear trapalso: bull trap, bear trap, head fakeTrader jargon
A breakout that draws in buyers and then reverses (bull trap), or a breakdown that draws in sellers and then reverses (bear trap). The trap is named by its victims; the phenomenon is the failed breakout, which is common enough that the base rate of failure, not the vividness of the trap, is the useful number.
- Buy and holdSystems
Owning an instrument for the whole test period. As a benchmark it must pay the same costs and cover the same universe as the strategy it is compared with; removing its costs to be "fair" destroys the comparison, because the cost difference is the economic argument against trading.
- Buy the dipalso: BTFDTrader jargon
Buying pullbacks in a rising market on the expectation that the trend resumes. It is a mean-reversion entry inside a trend-following thesis, it worked well in the long US equity bull markets that popularised it, and it stops working precisely when the trend has ended — which is only visible later.
- Buybackalso: share repurchaseMarket structure
A company buying its own shares in the market, reducing the share count. A steady buyback is a persistent buyer that leaves a footprint in volume; it is also a corporate decision that can be announced and then not executed. Neither fact makes it a signal on its own.
C
- Calendar spreadalso: time spread, horizontal spreadOptions
Writing a near-dated option and buying a longer-dated one at the same strike, to harvest the faster decay of the near option. Its value depends on the term structure of implied volatility as much as on the underlying. In futures the same name means a position in two contract months of the same commodity.
- Call optionalso: callOptions
The right to buy the underlying at the strike. A call gains value when the underlying rises, when implied volatility rises, and loses value as time passes. Buying a call caps the loss at the premium; writing one uncovered exposes the writer to an unbounded loss if the underlying rallies.
- Candlestickalso: candle, Japanese candlestickChart reading
A bar drawn as a body from open to close, filled or coloured by direction, with thin wicks to the high and low. It shows the same four numbers as an OHLC bar with the open–close relationship made visible. The named patterns — doji, hammer, engulfing — are descriptions of one to three candles' shapes, each with a claimed meaning that can be tested.
- Capitulationalso: washoutTrader jargon
A final wave of panic selling, on extreme volume and breadth, that exhausts the sellers and marks a low. The measurable signature — record down-volume, a breadth extreme, a volatility spike — is a real pattern in historical lows. It is also present in the middle of some declines, which is the problem.
- CARalso: compound annual return, CAGR, annual return %Systems
The constant yearly rate that would have grown the starting equity to the ending equity over the test period, compounding. AmiBroker reports it as Annual Return %. It ignores the path taken, so it is always read with drawdown, and it can be inflated by a short test that happened to end at a peak.
- CAR/MaxDDSystems
Compound annual return divided by maximum system drawdown. A single figure combining growth and pain, and like every single figure it discards information — two systems with the same ratio can have very different drawdown shapes.
- Carry tradeForex
Borrowing in a low-interest currency to hold a high-interest one, earning the differential as long as the exchange rate does not move against you. It earns steadily in calm markets and loses violently when risk appetite reverses and the crowded position unwinds. The classic example of a return that is really a premium for bearing a tail risk.
- Cash settlementalso: physical deliveryFutures
Closing an expiring contract by paying the difference between the contract price and the final settlement price, rather than delivering the underlying. Index futures, short-term interest-rate futures and index options settle in cash; many commodity futures, the deliverable bond futures and most single-stock options — all US-listed ones among them — settle by physical delivery. The distinction decides what happens if you are still holding at expiry.
- Cash-secured putOptions
Writing a put while holding enough cash to buy the underlying if assigned. It is marketed as being paid to wait for a lower entry; it is also a full acceptance of the downside from the strike, since assignment arrives exactly when the stock has fallen through it.
- Catching a falling knifeTrader jargon
Buying an instrument in a rapid decline in the hope that the fall is over. The proverb warns that declines continue further than they should; the counter-proverb, buy the dip, says the opposite. Both are true of some markets and some horizons, which is why neither is a rule.
- Categoryalso: category systemAmiBroker
AmiBroker's classification of symbols: watch lists, groups, markets, sectors, industries, favourites and indexes. Categories are how the Analysis window's Apply to: Filter narrows a run to part of the database, and how a formula asks
InWatchList()orSectorID()about the current symbol. Each symbol belongs to one group, one market and one industry, and to any number of watch lists.- CCIalso: commodity channel indexIndicators
The distance of the typical price from its moving average, scaled by mean deviation so that most values fall between −100 and +100;
CCI()in AFL. An unbounded oscillator originally built for commodity cycles, now used generically for overbought and oversold readings. Its name is history, not a restriction.- Central bankalso: central bank interventionForex
The institution that sets a currency's policy interest rate and, occasionally, buys or sells the currency outright to move its price. Rate decisions, statements and intervention are the scheduled and unscheduled shocks of the forex calendar. A system tested only on quiet periods has not met one.
- Chandelier exitSystems
A trailing stop placed a fixed number of ATRs below the highest high since entry. Implemented in AFL as a single
ApplyStop( stopTypeTrailing, stopModePoint, mult * ATR( n ), style, True )call, where thevolatileargument is what lets the distance follow ATR during the trade.- Channelalso: price channel, trend channelChart reading
Two parallel lines containing a trend: a trendline and a second line through the opposite swings. Price near the lower line is read as an entry in an uptrend, near the upper line as a place to take profit. Indicator channels — Donchian, Keltner, Bollinger — replace the drawn lines with a formula.
- Chart panealso: paneAmiBroker
One rectangular area of a chart window with its own Y axis, running one formula: the price pane, a volume pane, an RSI pane. Panes stack vertically in a chart sheet and share the X axis. A formula that calls
Plot()draws into the pane it is dropped on, which is why an indicator can be placed on the price chart or under it.- Chart patternChart reading
A named shape in price data. The difficulty is not whether patterns exist but whether they can be defined objectively enough that two people identify the same instances — which is the precondition for testing any claim about them.
- Chart sheetalso: sheetAmiBroker
A set of chart panes displayed together in one frame, selected by the tabs at the bottom of a chart window — one sheet for daily analysis, another for intraday, another for a study. The complete set of a window's sheets is a chart template.
- Chart templatealso: templateAmiBroker
The complete set of chart sheets and panes in a chart window, saved as a file so it can be applied to any symbol or made the default for new windows. A template is what makes every chart open with your indicators already in place. It is not a layout, which records which windows are open rather than what is inside one.
- Chart typesalso: line chart, bar chart, OHLC chartChart reading
The ways a price series can be drawn: a line through closes, OHLC bars, candlesticks, and constructions that abandon the time axis such as Renko and point and figure. Each hides something. A line chart hides the range; a bar chart hides the sequence within the bar; every chart hides the volume at each price unless a profile is added.
- ChasingTrader jargon
Entering after the planned entry price has passed, paying up for a move already under way. A chased entry has a worse cost basis and a stop that no longer sits where the plan put it. The discipline against it is the limit order and the willingness to miss a trade.
- Choppyalso: chop, sideways, range-boundTrader jargon
A market that moves back and forth without direction, generating trend signals that fail one after another. Chop is what a trend-following system's losing streaks look like from inside, and it is the regime in which most indicator crossovers lose money. Range-bound is the polite term.
- Circuit breakerMarket structure
A market-wide rule that halts trading when a benchmark index falls by a set percentage within the day, with tiers that lengthen the halt as the decline deepens. Distinct from the per-instrument volatility bands that pause a single stock, and from the daily price limits used in futures. All three exist to slow a cascade; none reverses it.
- Clearing housealso: central counterparty, CCPMarket structure
The institution that stands between buyer and seller after a trade, becoming the counterparty to each and collecting margin from both so that one side's failure does not fall on the other. It is why you can trade a futures contract with a stranger. It is also why margin requirements can rise overnight when volatility does.
- Code snippetalso: snippetsAmiBroker
A small reusable piece of AFL kept in the Formula Editor's snippet pane, shipped with the program or saved by you. Snippets are for fragments — a section header, a parameter block, a stop template; anything with logic worth reusing belongs in an include file where one copy serves every formula.
- CollarOptions
A protective put financed by a covered call: the underlying, a bought put below and a written call above. It brackets the outcome between the two strikes, often for little or no net premium, at the cost of any gain beyond the call.
- CommissionSystems
A broker's fee, charged on entry and again on exit. Set in AFL with
SetOption( "CommissionMode", n )andSetOption( "CommissionAmount", x ). The documented modes are a portfolio-manager table, a percentage of trade value, a currency amount per trade, and a currency amount per share.- Commitments of Traders reportalso: COT reportFutures
A weekly report from the US futures regulator showing open interest by trader category — commercial hedgers, large speculators, small traders — for each market, published on Fridays with the previous Tuesday's positions. Widely used as a sentiment and positioning input; its lag, its coarse categories and its mixed test record are the caveats.
- Commodityalso: physical commodity, commodity futuresFutures
A raw material traded in standardised grades: energy, metals, grains, softs, livestock. Retail exposure is almost always through futures or funds that hold futures, so a commodity chart is a futures chart, complete with contract months, rolls and the curve. Seasonality is real in some agricultural markets and much less reliable than the seasonal charts sold to trade it suggest.
- CompositeBreadth
An artificial symbol built by
AddToComposite()during a Scan, storing a value accumulated across a universe. Composites are stored data, not live calculations, so they must be rebuilt after every data update.- Composite tickeralso: ~ symbol, ~~~EQUITYAmiBroker
An artificial symbol whose bars are computed rather than imported — a breadth series built with
AddToComposite(), or the backtester's own~~~EQUITY, which holds the last backtest's equity curve and can be read withForeign(). The documentation advises a leading tilde in the name, and new composites land in group 253 by default. What actually stops a composite feeding itself is theatcFlagCompositeGroupflag, which parks it in group 253 and excludes every other ticker from that group; it is part of the default flags, but a hand-written flag expression that omits it loses the protection.- Concentrationalso: concentration risk, correlation riskRisk
Exposure clustered in one instrument, sector, factor or theme, so that one event moves the whole portfolio. A screen that returns ten stocks from the same industry has produced a concentrated portfolio however it is sized. Limits per sector and a look at pairwise correlations are the ordinary defences.
- Confidence intervalResearch
The range within which a quantity — average trade, win rate, annual return — plausibly lies, given the sample. A backtest reports a point estimate; the interval is what it should report. For fifty trades the interval around the average trade is usually wide enough to include zero, which is the honest summary of most backtests.
- ConfirmationChart reading
A second piece of evidence that a signal is genuine: a close beyond a level rather than an intraday poke, a volume increase, a second indicator agreeing. Waiting for it trades a later entry for fewer false signals. Whether the trade is worth it is a question about the specific rule, and indicators derived from the same price series rarely add independent confirmation.
- Consecutive lossesalso: losing streak, max consecutive losersSystems
The longest run of losing trades in a backtest. For a given win rate, long streaks are a matter of arithmetic: at 40% wins, a run of ten losses is expected within a few hundred trades. The number matters because it is what the trader will have to sit through, and it is where discretionary overrides begin.
- Consolidated tapeMarket structure
In US equities, the single feed on which every venue reports its trades and quotes, so a symbol's volume and last price reflect all markets rather than one exchange. Other regions consolidate less completely, and forex not at all. When a data vendor says consolidated or primary-exchange only, the volume figures differ and are not comparable.
- Consolidationalso: base, basingChart reading
A period of narrowing range and shrinking volatility, often after a strong move. Consolidations resolve in a breakout, in one direction or the other, and the tightness of the consolidation is a measurable input to breakout rules. Which direction is a separate question, and usually the harder one.
- ContangoFutures
A futures curve in which later months trade above nearer ones — the normal shape when storage, financing and insurance cost money. For a long position it means each roll buys higher and sells lower, a steady drag. The word also describes a volatility term structure that slopes upward.
- ContextChart reading
What surrounds a signal: the trend on a higher timeframe, the distance from a level, the volatility regime, the time of day. A hammer at support in an uptrend and a hammer in the middle of nowhere are the same candle and different bets. Context is what makes a pattern's base rate vary, and conditioning on it is how a scan becomes selective.
- Continuous contractalso: continuous futures, rolled seriesFutures
A single price series built by chaining successive contract months so that a futures market can be charted over years. The join is the problem: each roll produces a price jump that never traded. A back-adjusted contract removes the jumps by shifting history; an unadjusted continuous series keeps them. Neither is the price anyone paid.
- Contract for differencealso: CFDMarket structure
A leveraged contract with a broker that pays the difference between an instrument's price at entry and at exit, without owning the instrument. Popular outside the United States, where it is not permitted for retail customers. The broker is usually the counterparty, spreads and financing are the cost, and the leverage on offer is the main way accounts are lost.
- Contract monthalso: delivery month, expiry monthFutures
The month in which a futures contract expires or delivers, written with a letter code: H for March, M for June, U for September, Z for December. Each product lists several months at once, each a separate instrument with its own price and volume. A chart of the crude oil price is a chart of one month, or of a continuous contract stitched from many.
- Contract multiplieralso: multiplierOptions
The number of units of the underlying one contract controls — 100 shares for a standard US equity option, a fixed dollar amount per index point for index options and futures. A quoted premium of 2.50 on a 100-share contract costs 250. Position sizing in contracts has to go through the multiplier or it is wrong by a factor of a hundred.
- Contract specificationsalso: contract specsFutures
The exchange's definition of a futures contract: the underlying and quantity, the quotation unit, tick size and tick value, trading hours, listed months, last trading day, settlement method and price limits. Read them before charting or sizing a contract; the point value alone changes a position's risk by an order of magnitude between products.
- ContrarianTrader jargon
Positioning against prevailing sentiment on the grounds that crowded views are already priced in. Contrarian signals — extreme sentiment surveys, put/call ratios, magazine covers — have a real basis and a timing problem: the crowd can stay wrong for a long time, and a contrarian who is early is indistinguishable from one who is wrong.
- Corporate actionMarket data
A split, dividend, consolidation, merger or similar event that changes an instrument's price series for reasons unconnected with supply and demand. Unadjusted data records these as price moves.
- CorrelationResearch
The degree to which two series move together, from −1 to +1;
Correlation()in AFL. Correlations between instruments rise sharply in crises, when diversification is needed most. Correlation is also not causation and not stable, and a strategy built on a correlation that held for five years is a bet that it holds for a sixth.- Cost basisalso: average price, average costExecution
The average price paid for a position, including any fees included in the calculation, from which profit and loss is measured. Scaling in changes it; so does a partial exit under some accounting conventions. Tax rules define cost basis their own way, which is not always the trader's.
- Cost of carryalso: carryFutures
What it costs to hold the underlying until the future's expiry — financing, storage, insurance — less any income it pays, such as dividends. It sets the theoretical gap between spot and futures prices and explains why a futures curve is usually in contango. In forex, carry is the interest-rate differential between the two currencies.
- Costsalso: transaction costsSystems
Everything that makes a trade cost more than the quoted price: commission (a fee), spread (you buy at the ask and sell at the bid) and slippage (a worse price than you aimed at). A commission is deducted from the account; spread and slippage change the trade's own arithmetic and therefore belong in the price arrays.
- Counterparty riskMarket structure
The risk that the other side of a contract fails to perform. Exchange-traded instruments push it onto a clearing house; over-the-counter products such as CFDs and retail forex leave it with the broker, whose solvency then matters as much as your strategy.
- Covered callalso: buy-writeOptions
Holding the underlying and writing a call against it. The premium is kept whatever happens; the upside above the strike is given away. It is the most common retail option structure and is sold as income, which understates the fact that it is a bet that the stock will not rise far.
- CrossAFL
Cross( a, b )returns 1 on the one bar whereacrosses aboveb, and 0 on every other bar; for a cross below, swap the arguments. What it does when the two arrays are exactly equal on a bar, or touch and separate without a strict crossing, is not documented — check it before building a rule on ties. The difference between it anda > bis the difference between an event and a state.- Cross ratealso: minor pairsForex
A pair that does not involve the US dollar, such as EUR/GBP or AUD/JPY. Historically derived from the two dollar rates, hence the name; now quoted directly in liquid crosses. Spreads are wider than on the majors, and the pair's behaviour is partly the arithmetic of its two dollar legs.
- Crossoveralso: moving average crossoverIndicators
The event of one series passing through another — price through a moving average, a fast average through a slow one, an oscillator through a threshold. Crossovers are the simplest way to turn a state into a signal, which is why
Cross()is the most used function in trading AFL and why whipsaws are its most common result.- Cum and Sumalso: Cum, SumAFL
Cum()is the running total of an array from the first bar;Sum( array, N )the total over the last N bars. Both count when given a boolean, since true is 1.Cum()depends on every bar loaded, so under QuickAFL its value changes with the number of bars in view unlessSetBarsRequired()says otherwise.- Cup and handleChart reading
A rounded decline and recovery (the cup) followed by a smaller pullback (the handle) before a breakout above the cup's rim. Popularised by growth-stock methods, and one of the harder patterns to define precisely enough to scan for, since rounded has no arithmetic.
- Currency correlationForex
The tendency of pairs to move together or in opposition because they share a currency or a driver: EUR/USD and USD/CHF have moved almost as mirror images for long stretches. Holding several correlated pairs is one position in disguise, a fact position-sizing arithmetic does not see unless it is told.
- Currency pairalso: pairForex
The unit of forex quotation: one currency priced in another, written base/quote as in EUR/USD. The price is how many units of the quote currency one unit of the base currency buys. Buying a pair means buying the base and selling the quote; every forex position is therefore two positions, and one of them is short.
- Curve fittingResearch
Adding complexity to a model until it describes the particular wiggles of one sample rather than any general behaviour. A rule that excludes exactly the three worst trades is curve fitting. Distinct from optimisation, which becomes curve fitting when the number of things tried grows large relative to the independent information in the data.
- Custom backtesteralso: CBT, custom backtester interfaceAmiBroker
An object interface that lets AFL intervene in the backtester's second phase — the portfolio pass that turns the signals collected from every symbol into trades. Set up with
SetCustomBacktestProc(), it can add metrics, modify position sizes, or reject signals. It runs in a different pass from the formula body, which is the source of most confusion about it.- Cut losses and let profits runTrader jargon
The oldest maxim in trading: exit losing positions quickly and hold winning ones. It describes the shape of a trend-following payoff — many small losses, a few large gains — rather than a law. Whether it beats its opposite depends entirely on the instrument and the horizon, which is a question a backtest can answer and a proverb cannot.
D
- Dark poolalso: dark venue, undisplayed liquidityMarket structure
A trading venue that does not display its order book. In US regulation a dark pool is one kind of alternative trading system (ATS); other ATSs display their quotes. Institutions use dark pools to work large orders without showing size; trades are reported to the tape after they happen. A meaningful share of equity volume executes this way, so the displayed book understates the interest at a price.
- Data qualityMarket data
Whether the data says what happened. Missing bars, bad prints, zero volumes, unadjusted corporate actions and misaligned time stamps all produce confident and wrong conclusions, and a study is a very efficient machine for converting bad data into them.
- Data snoopingalso: data dredgingResearch
A property of a whole research process: how many specifications were evaluated against one dataset in total, including every abandoned attempt, every universe swapped and every date range moved. Test enough ideas and something will look excellent whether or not anything is there.
- DatabaseAmiBroker
AmiBroker's store of symbols and quotes, with a base time interval fixed at creation. The base interval determines what can be compressed from it: higher intervals are built upward from the base, never downward.
- Database Settingsalso: Database Settings windowAmiBroker
The per-database dialog that sets the data source (a plugin or the local files), whether data is cached, the base interval and the number of bars to load. It opens automatically when a database is created. The base interval chosen here cannot be made finer later without rebuilding the database, which makes it the most consequential setting in the program.
- DateTime and Nowalso: DateTime(), Now(), TimeNum(), DateNum()AFL
DateTime()returns each bar's timestamp as an array;Now()returns the computer's clock.TimeNum()andDateNum()give bar time and date as plain numbers such as 93000 for 9:30. The bar's clock is the exchange's andNow()is yours, and every session rule must say which it means.- Day tradingTrader jargon
Opening and closing positions within a single session, holding nothing overnight. It removes gap risk and adds everything else: the cost of many trades, the intraday noise of every instrument, and in US equities a regulatory minimum account size for frequent traders. The evidence on retail day-trading outcomes, where it has been studied, is not encouraging.
- Dead cat bounceTrader jargon
A brief recovery after a steep fall, followed by further decline. The name is a judgement made afterwards: while the bounce is happening it is indistinguishable from a bottom, which is what makes the phrase useless as a forecast and popular as a description.
- Dead moneyTrader jargon
Capital tied up in a position that is going nowhere, earning nothing and unavailable for anything else. The opportunity cost of holding, which a closed-trade profit-and-loss never shows. Time stops exist to convert dead money back into capital.
- Dealing deskalso: market-maker broker, B-bookForex
A forex or CFD broker that takes the other side of its customers' trades rather than passing them to the market. The broker profits when the customer loses, a conflict of interest managed by regulation and, at reputable firms, by hedging aggregate exposure. Requotes and slippage against the customer are the symptoms when it is managed badly.
- Decision logResearch
A written record of each decision made at a live or replayed decision point: what the alert said, the context, the decision, the reason, and what would have changed your mind — all written before the outcome is known. The only evidence in a research process about the discretionary layer sitting on top of the rules.
- Defensive AFLAFL
Writing formulas that fail loudly rather than producing a plausible wrong answer: validating parameters, guarding division, handling Null explicitly, checking bar counts, and choosing — per condition — what a missing value should mean.
- DegradationResearch
How much worse an out-of-sample result is than the in-sample result that produced its parameters. Some degradation is expected; the useful question is how much, and whether the selected parameters were stable.
- Degrees of freedomResearch
Every choice in a strategy that could have been made differently: each numeric parameter, each rule included or excluded, the universe, the date range, the exit design, the sizing rule, the ranking rule and the costs assumed. Routinely undercounted by an order of magnitude.
- Delayed dataReal-time
A live feed that arrives a fixed time after the exchange — fifteen or twenty minutes for most equity exchanges — because the real-time licence has not been paid for. It updates continuously and looks live. It is fine for end-of-day work and for learning the real-time tools, and useless for any decision inside the delay.
- DelistingMarket structure
Removal of an instrument from an exchange, through acquisition, bankruptcy, failure to meet listing standards or a move elsewhere. Delisted symbols vanish from many databases, taking their final declines with them. A universe assembled from today's listings has already excluded them, which flatters every backtest run on it.
- DeltaOptions
The change in an option's price for a one-unit change in the underlying, between 0 and 1 for calls and 0 and −1 for puts. An at-the-money option has a delta near 0.5. Delta is also read, loosely, as the probability of expiring in the money, and a position's total delta is its equivalent exposure in shares of the underlying.
- Depth of marketalso: DOM, Level 2, market depthMarket structure
A display of the order book beyond the best quote: the size resting at each price level on both sides. Level 1 data is the best bid and offer plus the last trade; Level 2 is the depth. Reading depth for intent is a popular pastime with weak evidence behind it, because large participants have every reason not to show their hand.
- Direct market accessalso: DMAExecution
An arrangement in which the customer's orders go to the exchange's book under the broker's membership, rather than being handled by the broker's desk or a wholesaler. It offers control over venue and order type, and typically per-share pricing rather than zero commission. The distinction from ordinary retail routing is who decides where the order goes.
- Discretionary and systematicalso: discretionary trading, systematic tradingSystems
Two ways of deciding: by judgement applied case by case, or by rules applied without exception. Only the second can be backtested, and only the second can be told apart from luck in a reasonable number of trades. Most practice is a mixture, and the honest version writes down which decisions are which.
- Distributionalso: return distributionResearch
The set of outcomes and how often each occurs — of daily returns, of trade results, of drawdowns across Monte Carlo runs. A summary statistic is one number extracted from it, and a system is understood from the shape of the distribution rather than from any one number. Histograms are the first thing to plot.
- DivergenceChart reading
Price making a new extreme while an indicator or a breadth measure does not — a higher high in price with a lower high in RSI, or a new index high with fewer stocks participating. Read as weakening momentum. Divergences can persist for a long time before anything happens, so the setup needs a trigger.
- DiversificationRisk
Holding positions whose outcomes are not fully correlated, so that the portfolio's variance is less than the sum of its parts. It is the only free reduction in risk, and it is smaller than it looks: correlations rise in crises, and twenty stocks in one sector are one position. The number of positions is not the measure; the correlation between them is.
- DojiChart reading
A candle whose open and close are nearly equal, leaving almost no body. It records a bar in which neither side won, and it is read as indecision or, after a trend, a possible turning point. How nearly equal counts as a doji is a threshold you must choose to test it — and the result depends on that choice.
- Dollar indexalso: DXY, USDXForex
An index of the US dollar against a fixed basket of six currencies, more than half of it the euro. It is a convenient single chart of dollar strength and a very incomplete one, since the basket ignores most of the world's trade. Futures on it exist; the index itself is a benchmark.
- Donchian channelalso: price channel breakout, N-day highIndicators
The highest high and lowest low of the last N bars, drawn as a channel;
HHV( High, N )andLLV( Low, N )in AFL. A close above the upper line is the classic breakout entry of trend-following systems, including the Turtle rules. It has no smoothing and therefore no lag beyond the lookback itself.- Double top and double bottomChart reading
Two swing highs at about the same level with a trough between (double top), or two lows with a peak between (double bottom), completed by a break of the middle point. Read as a failed attempt to continue the trend. About the same level is the parameter, and small changes to it change how many patterns a scan finds.
- Drag-and-drop chartingAmiBroker
Building a chart by dragging indicators from the Charts pane onto a pane, with AmiBroker generating the AFL. It is how most users meet their first indicator, and the generated formula is worth opening in the Formula Editor: reading what the program wrote is a painless introduction to what the language looks like.
- DrawdownRisk
The decline from a peak in the equity curve to the subsequent trough, expressed in currency or as a percentage. Maximum system drawdown is the worst such decline over a test. It is the number that decides whether a strategy is survivable, and it is systematically understated by optimistic fill assumptions.
- Drawdown durationalso: underwater period, time to recoverySystems
How long equity stays below its previous peak — the width of a drawdown, where max drawdown is its depth. Long, shallow drawdowns end more systems than deep, brief ones, because the trader gives up. An underwater curve, equity's distance below its running high, shows both at once.
- Drawing toolsalso: studies, study IDAmiBroker
Hand-drawn objects on a chart — trendlines, channels, Fibonacci levels, text — that can be moved, copied and deleted, and that a formula can read back through their study ID. That last part matters: a trendline drawn by hand can be turned into a number an AFL rule tests, which is how a subjective line becomes a testable claim.
- DriftTrader jargon
The slow average tendency of a price series over time — the reason equity indexes have risen over decades. Drift is small relative to daily noise, which is why it is invisible on a chart and decisive over years, and why any long-only system tested on a rising market must be compared with buy-and-hold before its returns are called skill.
E
- Early exerciseOptions
Exercising an American-style option before expiration. It forfeits any remaining time value, so it is rarely rational — the exceptions are a deep in-the-money put where the interest on the strike outweighs the time value, and a call on a stock about to pay a dividend larger than the call's time value.
- Easy AlertsReal-time
AmiBroker's dialog for defining simple price-level alerts without writing a formula: pick a symbol and a price field, set a high and/or low trigger, and choose text, pop-up, e-mail or sound output. It works only on a live plugin feed, never in end-of-day mode, and an alert that has fired stays inactive until you press Reset. Anything conditional, multi-symbol or rate-limited is written with
AlertIf()instead, whose output lands in the same Alert Output window.- ECN brokeralso: STP broker, no dealing desk, A-bookForex
A broker that routes customer orders to a network of liquidity providers and charges a commission rather than widening the spread. The broker's revenue comes from commission and turnover rather than from customer losses. In most retail forex and CFD accounts it remains the counterparty to your contract and hedges the exposure rather than keeping it, which is not the same as being an agent. The distinction from a dealing desk is real but often blurred in marketing; execution statistics say more than labels.
- EdgeTrader jargon
A positive expected return after costs, from some persistent feature of a market or of other participants' behaviour. It is the thing every trader claims and few can demonstrate, since demonstrating it means a large out-of-sample sample and honest accounting. Where it exists it is usually small, and it decays as it is found.
- Editionsalso: Standard edition, Professional editionAmiBroker
AmiBroker ships as Standard and Professional. The documented differences are few: Professional adds tick and sub-minute intervals, the 64-bit build,
GetRTData(), more than ten symbols in the Real-Time Quote window, more than one Time & Sales window, more than two Analysis threads, the Wait-for-backfill option, and the MAE/MFE excursion distribution charts in the portfolio backtest report. One more, the QuickGFX render engine, is called Professional-only in the release notes but never appears in the edition table, so cite it carefully. Real-time plugins and one-minute charts work in both. This course badges only those documented items.- Efficient market hypothesisalso: EMHResearch
The proposition that prices already reflect available information, so that no method using that information can earn excess returns after costs. In its weak form it says past prices are useless — a direct challenge to technical analysis. The evidence is mixed and the hypothesis is best treated as a strong prior: an edge must be demonstrated against it, not assumed.
- End-of-day dataalso: EOD dataMarket data
One bar per trading day. Sufficient for every part of this course except live intraday work, available free from several sources, and the basis of the Level A path.
- Engulfing patternalso: bullish engulfing, bearish engulfingChart reading
A two-candle pattern in which the second body completely covers the first, in the opposite direction. A bullish engulfing after a decline is read as buyers overwhelming sellers. It is one of the few candlestick patterns with an unambiguous definition, which makes it one of the few that can be tested cleanly.
- Entryalso: entry rule, entry signalSystems
The rule that opens a position: a setup that qualifies the instrument and a trigger that fires on one bar, together with the price and delay at which the fill is assumed. Entries get most of the attention and, in most systems tested honestly, explain the least of the result. Exits and sizing do the rest.
- Envelopealso: moving average envelope, percentage bandsIndicators
Bands a fixed percentage above and below a moving average. The ancestor of Bollinger Bands, with a constant width that ignores changes in volatility. Its simplicity is the argument for it; its blindness to volatility is the argument against.
- Equity curveSystems
Account value over time in a simulation. A smoothly exponential equity curve is usually a warning rather than a triumph: real portfolio equity is lumpy, and the smooth version often means positions grew into instruments that could not have absorbed them.
- Equity()AFL
The old single-symbol backtester, kept for compatibility: it computes an equity array for the current symbol from the signal arrays, without a portfolio. New work uses the portfolio backtester and reads its equity through
Foreign( "~~~EQUITY", "C" ).Equity()ignores scaling signals and portfolio limits, so its numbers and the report's disagree.- Error 32also: syntax error, missing semicolonAFL
The parser's syntax error, most often a missing semicolon. It is reported on the line after the fault, because that is where the parser noticed, so the habit to build is looking up one line. Errors 701 and 702 are the Analysis window's complaints that
Buy/SellorShort/Coverwere never assigned.- Error 42AmiBroker
AmiBroker's error when an
#includefails: wrong path, unset standard include path, or a different extension. The correct response is to fix the path, never to paste the file's contents in — which creates a second copy that will silently diverge.- ETFalso: exchange-traded fundMarket structure
A fund whose shares trade on an exchange like a stock. Most track an index; authorised participants create and redeem shares against the underlying basket, which keeps the price close to net asset value. An ETF is a convenient single-symbol proxy for a universe or a sector, and its own price history is much shorter than the index it follows.
- EventAFL
Something that is true on one bar — the bar on which a condition first became true.
Cross()produces events. The counterpart of a state.- Ex-dividend datealso: ex-date, ex-dividendMarket structure
The first day a share trades without the right to a declared dividend. The price drops by roughly the dividend at the open, mechanically, because the cash is leaving the company. Unadjusted data shows that drop as a price move; an adjusted series removes it. A short position pays the dividend rather than receiving it.
- ExchangeMarket structure
An organised marketplace with published rules: who may trade, what is listed, how orders are matched and how trades are reported. A listed instrument has one primary exchange and may trade on many venues; the tape you see is usually consolidated across them. Contrast over-the-counter markets, where dealers quote prices bilaterally and there is no central book.
- Execution algorithmalso: VWAP algo, TWAP, POVExecution
A broker-provided program that slices a large order into small pieces and feeds them to the market to a schedule: matching the day's volume profile (VWAP), spreading evenly over time (TWAP), or keeping to a set share of traded volume (percentage of volume). Institutions trade this way, which is why intraday volume patterns are partly the footprint of other people's algorithms.
- ExerciseOptions
Using the right an option confers: buying the underlying at the strike for a call, selling it for a put. Cash-settled options pay the intrinsic value instead. Brokers exercise in-the-money options automatically at expiration unless instructed otherwise, which has surprised holders who expected a small option to simply expire.
- Exitalso: exit rule, exit signalSystems
The rule that closes a position: a signal in the opposite direction, a stop, a profit target, a time limit, or a change in rank in a rotational system. A system with several exits fires whichever comes first, and AmiBroker's report records which one it was. Changing the exit changes the distribution of trade outcomes more than changing the entry usually does.
- ExitAtStopSystems
The fourth argument of
ApplyStop(), and the setting that most often makes a backtest fiction. Value 0 checks the trade price only; value 1 checks the bar's high–low range and fills at exactly the stop level, including on bars that gapped straight past it; value 2 checks the range but exits on the next bar at the regular trade price. On daily data, 2 is the defensible default.- Exotic pairsalso: exoticsForex
Pairs involving a currency from a smaller or emerging economy — USD/TRY, USD/ZAR, EUR/PLN. Wide spreads, thin liquidity, large rollover charges and exposure to capital controls and policy shocks. The gaps in an exotic's history are often data gaps rather than market gaps.
- expandLastAFL
The default and causally safe expansion mode: a compressed value appears on the last bar of its period, which is when it exists.
expandFirstpublishes it on the first bar — a weekly high on Monday — and is the mode that can look into the future.expandPointwrites only the last bar and leaves the rest Null.- Expectancyalso: expected value per tradeSystems
The average profit per trade: win rate times average win minus loss rate times average loss, in currency or in R. It is the number that says whether a system has an edge at all, before anything about risk or return is discussed. A positive expectancy over a small sample is an estimate with wide error bars, not a fact.
- Expirationalso: expiry, expiration dateOptions
The date after which an option no longer exists. Standard US equity options expire on the third Friday of the month; many liquid names also list weekly and, for a few, daily expiries. Time value goes to zero at expiration, and an option that is in the money is usually exercised automatically.
- ExplorationAmiBroker
An Analysis mode that produces a table defined by
FilterandAddColumn(). Distinct from a Scan, which reports where signal arrays are true. Explorations are how this course measures things.- Exponential moving averagealso: EMAIndicators
A moving average that weights recent prices more heavily, each value being a blend of today's price and yesterday's average;
EMA( Close, N )in AFL. It responds faster than a simple average of the same length and never quite forgets any past price. The N is a conventional label for the weighting, not a window.- ExposureSystems
The fraction of the test period during which capital was actually at work. Two systems with different exposures cannot be compared on return alone — which is what Risk Adjusted Return exists to correct. Read it before any return figure.
- ExRemalso: ExRemSpanAFL
Removes excessive signals:
ExRem( Buy, Sell )keeps the first Buy and drops the rest until a Sell occurs, then the reverse. It cleans a state into a sequence of alternating events for plotting and alerting. The backtester does its own signal handling, soExRem()is for charts and scans rather than a substitute for correct logic.- Extended hoursalso: pre-market, after-hours, ETHMarket structure
Trading outside the main session, on electronic venues only. Volume is thin, spreads are wide and a few trades can print far from where the regular session will open. Earnings releases and macro news land in these hours, so the extended-hours range is where a gap is formed before the regular session shows it.
- Extrinsic valuealso: time valueOptions
The part of an option's premium above its intrinsic value — the price of the possibility that the option becomes worth more before expiration. It rises with implied volatility and with time to expiry, and it decays to zero at expiration. At-the-money options are almost entirely extrinsic value.
F
- Fadealso: fading a moveTrader jargon
Trading against a move — selling a rally, buying a sell-off — on the expectation that it will reverse. A fade is a mean-reversion trade and a bet that the crowd is wrong. It is the natural instinct of market makers and the expensive habit of many discretionary traders.
- Fair valueFutures
The theoretical price of an index future given the spot index, interest rates, dividends and time to expiry — spot plus cost of carry. Financial television quotes futures relative to fair value before the open to suggest the opening direction. The word is a model output, not an appraisal of what the index is worth.
- Feedalso: data feed, market data feedReal-time
A vendor's delivery of market data — quotes, trades, bars — into AmiBroker through a plugin. Feeds differ in latency, in whether they are consolidated across venues, in whether they include extended hours, in how far back they backfill, and in what they cost. The course's data-provider appendices are dated comparisons of exactly those properties.
- Fibonacci retracementalso: Fibonacci levels, fib levelsChart reading
Horizontal levels at fixed fractions of a prior swing — 38.2%, 50%, 61.8% — where a pullback is expected to stop. The fractions come from the Fibonacci sequence; nothing in the market does. Careful tests find pullbacks stop at those levels about as often as at any other, which makes them a good subject for a reality check and a poor rule.
- Fillalso: executionExecution
The completion of an order, in whole or in part, at a price. An order can fill in several pieces at different prices; the average fill price is what the position actually cost. Every backtest is a claim about fills, and the fill assumption is where that claim should be written down.
- Fill assumptionExecution
The statement of at what price and with what delay a backtest assumes each signal became a trade: next bar's open, this bar's close, a limit at a level, with or without slippage. It belongs in the formula and in the report, because the same rules with two different fill assumptions are two different systems, and one of them may not be tradable at all.
- FilterAFL
The reserved AFL variable that decides which bars an Exploration reports.
Filter = Status( "lastbarinrange" )gives one row per symbol;Filter = Conditiongives one row per qualifying bar.- First notice dayalso: FNDFutures
The first date on which the holder of a long position in a physically delivered contract can be notified that delivery is coming. Speculators exit or roll before it. In grains, metals and Treasury futures it falls before the last trading day; in several energy contracts, crude oil among them, trading terminates first and notices follow. Which way round it is belongs in the contract specifications you read before trading a new market.
- Fixed fractional sizingalso: percent risk sizing, fixed fractionRisk
Risking a constant fraction of current equity on each trade — one percent, say — so that the position size is the risk amount divided by the stop distance. Size falls as equity falls, which slows the approach to ruin, and rises as it rises. It is the default sizing model in this course and the one
SetPositionSize()expresses most naturally.- Fixingalso: the fix, London 4 p.m. fixForex
A benchmark exchange rate set once a day from trading in a short window, most famously at 4 p.m. London time. Funds that value themselves at the fix trade into it, producing a burst of volume and, on month-ends, sharp moves. It is one of the few forex events with a known clock.
- Flag and pennantalso: flag, pennant, bull flagChart reading
A short, shallow pause after a sharp move — a small parallel channel (flag) or small triangle (pennant) — read as a continuation pattern, with the sharp move as the pole. The measured-move target projects the pole's length from the breakout. Flags are frequent, and frequency is not the same as reliability.
- Flatalso: squareExecution
Holding no position in an instrument, or none at all. Traders go flat before a weekend, an announcement or a holiday to avoid exposure they cannot manage. A backtest report does not measure this directly: AmiBroker's
Exposure %is value-weighted per bar, so it is the share of capital at work rather than the share of time in the market.- FlipAFL
The opposite of
ExRem():Flip( Buy, Sell )is true from a Buy until a Sell, a state built from two events. It is how in a position is expressed in array code for a chart or a scan, and how a setup that should stay armed until cancelled is written.- Floatalso: free float, shares outstandingMarket structure
The shares actually available to trade, after excluding holdings that do not circulate: insiders, governments, locked-up allocations. Shares outstanding is the larger total. A small float makes a stock easier to move and easier to squeeze, and most cap-weighted indexes weight by float rather than by shares outstanding.
- FOMOalso: fear of missing outTrader jargon
The urge to enter a move that has already happened, because others are profiting from it. It produces late entries near the top of moves and is one of the two emotions that a written rule set exists to overrule. The other is the wish not to realise a loss.
- ForeignAFL
Reads one price field from another symbol, aligned to the current symbol's bars. That alignment is the part people forget: bars the current symbol did not trade are silently dropped from the foreign series.
- Forexalso: FX, foreign exchange, currency marketForex
The market in which one currency is exchanged for another. It is the largest market by turnover, decentralised, open around the clock from Monday morning in Asia to Friday evening in New York, and traded over-the-counter between banks, dealers and their customers. There is no exchange, no central tape and no true volume figure.
- Formula EditorAmiBroker
The window in which AFL is written, syntax-checked, and applied — to a chart pane, to the Analysis window, or to Commentary. It has a debugger, code snippets, and in version 7.00 an AI code assistant. Its Verify Syntax command is the first check any formula gets; the second is reading the chart it produces.
- Forward contractalso: forwardFutures
A privately negotiated agreement to trade something at a future date and price. The over-the-counter ancestor of the futures contract: customised, not exchange-cleared, and carrying counterparty risk. Currency forwards are the main kind a trader meets.
- Forward testalso: incubation, paper-trading periodResearch
Running a finished system on new data as it arrives, without changing it, before committing capital. It is the only out-of-sample test that cannot have been contaminated by looking, because the data did not exist when the rules were fixed. Its weakness is time: a year of forward testing is a small sample.
- Front monthalso: nearby, spot month, back monthFutures
The contract month closest to expiration, usually the most actively traded; the months beyond it are the back months. Liquidity migrates from the front month to the next as expiration approaches, and the date at which it does is where a continuous contract must decide to roll.
- Futures contractalso: future, futuresFutures
A standardised, exchange-traded agreement to buy or sell a set quantity of something at a set date. Everything except the price is fixed by the exchange in the contract specifications. Futures are traded on margin and settled daily, exist on commodities, currencies, rates and equity indexes, and are what most people mean when they chart a commodity.
- Futures spreadalso: calendar spread (futures), intermarket spreadFutures
A position long one futures contract and short a related one — two months of the same product, or two related products such as crude and gasoline. Spreads trade the relationship rather than the level, usually carry reduced margin, and behave differently enough from outright positions that they deserve their own backtest.
G
- GammaOptions
The rate at which delta changes as the underlying moves. It is largest for at-the-money options close to expiration, which is why such positions can swing from worthless to deep in the money in an afternoon. Market makers who are short gamma must buy as prices rise and sell as they fall, a mechanical flow that can amplify moves.
- Gamma squeezeOptions
A rally amplified by option market makers hedging short call positions: as the stock rises, their delta exposure grows and they must buy more of it, pushing it higher. Named after gamma, which measures how fast that hedge requirement changes. A real mechanism, and also a phrase used far more often than the mechanism is demonstrably at work.
- GapMarket data
An opening price away from the previous close, with no trading in between. Gaps are why a stop is not a guarantee: an order resting at a level that the market opened beyond was never available at that level.
- Gap fillalso: gap and go, filling the gapTrader jargon
Price returning to the level from which it gapped, closing the empty space on the chart. Gap and go is the opposite: the gap holds and the move continues. Whether gaps tend to fill is one of the most testable claims in technical analysis, and the answer depends heavily on the gap's size, direction and cause.
- Gap typesalso: breakaway gap, runaway gap, exhaustion gap, common gapChart reading
Traditional classification of gaps by where they occur: a breakaway gap leaves a consolidation, a runaway gap appears mid-trend, an exhaustion gap ends one, and a common gap is noise. The categories are assigned in hindsight, which limits their use in real time; the gap's size relative to normal range is the measurable part.
- GetRTDataalso: GetRTDataForeignReal-time
Returns a live quote field — last, bid, ask, sizes, day high and low, change — for the current symbol, or for another symbol with
GetRTDataForeign(), as it stood at the moment the formula ran. Both are documented as Professional-only and return Null in Standard. The values are refreshed with the chart, not with the tick, so they lag the Real-Time Quote window.- GlobalAFL
AFL's default scope. A variable assigned inside a function is visible outside it unless declared
local, which is the source of the most confusing bugs in reusable AFL.- Golden crossChart reading
A shorter moving average crossing above a longer one — conventionally 50 and 200 days. Widely reported as marking the start of a major uptrend, a claim that is untestable as stated and becomes testable only once the universe, holding period, costs and benchmark are specified.
- GreeksOptions
The sensitivities of an option's price to its inputs, named with Greek letters: Delta to the underlying price, gamma to delta itself, theta to time, vega to implied volatility, rho to interest rates. They are partial derivatives of a pricing model, so they are as good as the model, and they change constantly.
- Group and Marketalso: group, market (category)AmiBroker
Two independent, mutually exclusive classification axes in AmiBroker's category system: each symbol belongs to exactly one group and exactly one market, both numbered and named by you. Group 253 is conventionally reserved for composites, which is where
AddToComposite()files them by default; itsatcFlagCompositeGroupflag is what keeps every other ticker out of that group, so a composite is never fed back into its own calculation.
H
- Hammer and shooting staralso: hammer, shooting star, pin barChart reading
Single candles with a small body at one end and a long wick at the other: a hammer has the wick below after a decline, a shooting star has it above after a rise. Both record a rejection of the extreme. Traders call the same shape a pin bar. Its record as a reversal signal depends heavily on context and on what follows it.
- Head and shouldersChart reading
Three peaks with the middle one highest, over a neckline through the two intervening lows; a break below the neckline completes the pattern. The most famous reversal pattern and, in rigorous studies, one whose recognition is so subjective that two analysts rarely mark the same instances. Any test of it begins by defining it in rules.
- Hedgingalso: hedgeRisk
Taking a position whose gains offset the losses of another: a put against a holding, a short index future against a portfolio of longs, a currency forward against foreign exposure. A hedge reduces risk and return together, costs something to hold, and has its own basis risk. It is not the same as diversification, which relies on things not moving together.
- Heikin-AshiChart reading
Candles computed from averages of the current and previous bars rather than from raw prices, which smooths the chart and makes trends look cleaner. The smoothing is a lag: a Heikin-Ashi candle's close is not a price anything traded at, and a backtest that uses it as an exit price is using a number that did not exist.
- HHV and LLValso: HHV, LLV, HHVBars, LLVBarsAFL
Highest high value and lowest low value over the last N bars, including the current one;
HHVBars()andLLVBars()return how many bars ago the extreme occurred. They are the arithmetic of Donchian channels, breakouts and trailing stops. Because the current bar is included, a breakout test compares againstRef( HHV( H, N ), -1 ), yesterday's value.- High-frequency tradingalso: HFTMarket structure
Automated trading at horizons of microseconds to seconds, mostly market making and cross-venue arbitrage, competing on speed and co-location. It supplies much of the displayed liquidity in liquid markets and withdraws it fastest when volatility jumps. For a reader of daily and intraday bars it is part of the environment, not a competitor at the same game.
- Histogramalso: MACD histogramIndicators
The difference between an indicator and its signal line, drawn as bars around zero. The MACD histogram turns before the MACD line does, because it measures the gap closing rather than the cross itself, and it is read for divergence against price. It is a derivative of a derivative, and correspondingly noisy.
- Holding periodSystems
How long a position is held, from entry to exit, in bars or days. A system's average holding period sets its turnover, its cost sensitivity and how many trades a history can supply. Very short holding periods on daily bars mean the fill assumption is doing most of the work.
- Holy grailTrader jargon
The mythical system that wins consistently in every market. Traders use the phrase with irony, sellers of systems without it. It does not exist, for the reason this course spends thirty parts on: any rule that works is a claim about a particular market in a particular regime, and regimes change.
- HypothesisResearch
A claim stated so that it could be false, naming the population, the event and the measurable consequence. "Momentum works" is not one. The recurring spine of this course is hypothesis → rules → test → evidence → risk → decision.
I
- Iceberg orderalso: hidden size, reserve orderExecution
A large limit order that displays only a fraction of its size, replenishing the visible portion as it fills. It exists so that size can rest in the book without advertising itself, and it is one of several reasons that displayed depth understates what will actually trade at a price.
- Ichimokualso: Ichimoku Kinko Hyo, the cloudIndicators
A system of five lines built from midpoints of recent ranges over three lookbacks, two of them shifted forward to form a shaded cloud. It packages trend, support and momentum readings into one display. The forward shift is display only: the cloud drawn ahead of today is computed from today, and a rule that reads it as a forecast has misread a plotting offset.
- IIfAFL
The array conditional:
IIf( condition, valueIfTrue, valueIfFalse )evaluates all three arguments over every bar and picks per bar. It is a function, not a statement — both branches are always computed — and it is the way to write a condition that differs bar by bar. Theifstatement, by contrast, tests a single value once.- Implied volatilityalso: IVOptions
The volatility figure that makes an option pricing model reproduce the option's market price. It is the market's price for uncertainty over the option's life, not a forecast that has been shown to be accurate, and it rises before scheduled events and falls after them. Compared with realised volatility it says whether options are expensive relative to how the underlying has actually moved.
- In-samplealso: IS, training periodSystems
The data on which a system's rules and parameters were chosen. Performance on it is not evidence, because the rules were shaped to fit it; the more choices were made, the less it means. Everything a backtest on in-sample data can tell you is that the system is not obviously broken.
- Include fileAFL
A file of AFL brought into another formula by
#includeor#include_once. The one place in AFL where a path takes single backslashes. A failed include reports Error 42, and the correct response is to fix the path rather than paste the contents in.- Indexalso: market index, benchmark indexMarket structure
A rule-based basket of instruments summarised as one number. Weighting by market capitalisation is the norm; price-weighting and equal-weighting produce different indexes from the same members. Membership changes over time, and using today's members to study the past is how survivorship bias gets into a backtest.
- Index futuresalso: equity index futures, E-mini, micro E-miniFutures
Cash-settled futures on a stock index. The E-mini S&P 500 (ES) is worth 50 US dollars per index point; the micro version (MES) is one tenth of that. They trade almost around the clock, so their overnight moves are the most watched forecast of the cash open, and a system trading them must decide which session it lives in.
- Index rebalancingalso: reconstitution, index rebalanceMarket structure
The scheduled revision of an index's membership and weights. Funds that track the index must trade on the effective date, so additions and deletions see unusual volume and price pressure around it. It is a known, dated, mechanical flow — one of the few market events with a clear cause.
- IndicatorIndicators
A transformation of past market data into another series. Not a prediction machine, not a signal, and not independent evidence when several indicators are computed from the same price series.
- Indicator redundancyalso: indicator collinearityIndicators
The fact that most indicators are transformations of the same close series and therefore move together. RSI, stochastics, CCI and MFI agreeing is one piece of evidence, not four. Confirmation from a redundant indicator adds lag and filters signals without adding information — which a correlation between the indicators will show.
- Individual OptimizeAmiBroker
An optimization mode that runs each symbol separately and reports the best parameters per symbol, using multiple threads. It supports only the exhaustive search, not the smart engines. Its results are the purest form of curve fitting available in the program — one parameter set per instrument, chosen on that instrument's history — and they are useful mainly as a demonstration of that.
- Initial marginalso: performance bondFutures
The deposit the clearing house requires to open a futures position, set per contract and revised with volatility. It is not a down payment on the contract's value; it is collateral against one day's likely move. The ratio of contract value to initial margin is the leverage a futures position carries, typically ten to thirty times.
- Inside bar and outside baralso: inside bar, outside bar, haramiChart reading
An inside bar's range lies entirely within the previous bar's; an outside bar's range exceeds it on both sides. The candlestick harami is the same idea applied to the bodies rather than the ranges — the second body inside the first — so it does not mark the same bars as an inside bar. Inside bars mark contraction and are traded as breakout setups; outside bars mark expansion. Both are exact definitions, and both are easy to write in AFL.
- Interbank marketForex
The top tier of the forex market, where large banks trade with one another directly and through electronic platforms. Interbank prices are the reference that brokers mark up for their customers. A retail trader never trades there; the phrase in a broker's advertising means their prices are derived from it.
- Interest-rate differentialForex
The gap between the policy or market interest rates of a pair's two currencies. It determines rollover and drives the carry trade. Whether it also explains exchange rates over months and years is contested: uncovered interest parity says the high-yielding currency should fall by roughly the differential, and it does not reliably do so — which is exactly why the carry trade pays.
- IntervalMarket data
The concrete bar size —
inDaily, five-minute, weekly. Distinct from timeframe, which is the conceptual horizon.Interval()returns it in seconds;Interval( 2 )returns its name.- Intraday dataMarket data
Bars finer than daily. Storage grows quickly as the base interval shrinks, and history depth from any vendor is far shorter than for end-of-day data. Historical intraday data needs no live feed and supports the Level A path for most real-time topics.
- Intraday Settingsalso: Intraday Settings windowAmiBroker
The per-database dialog controlling how intraday bars are filtered and compressed: the session filter, weekend filtering, the trading-hours start and end, the time-zone shift, which clock the daily bar is built from, and whether the database may mix end-of-day and intraday bars. Bar timestamping is a separate control, in Tools → Preferences → Intraday. Two of these settings silently change every backtest on the database, which is why the course spends a lesson on them.
- Intrinsic valueOptions
The amount by which an option is in the money: for a call, the underlying price minus the strike; for a put, the strike minus the underlying; never less than zero. It is what the option would be worth if exercised this instant. Everything the option is worth above that is extrinsic value.
- IPOalso: initial public offering, new issueMarket structure
A company's first sale of shares to the public, after which the stock begins trading. A new listing has no price history, so it is invisible to any study with a lookback longer than its age, and its early months include a lock-up expiry when insiders become free to sell.
- Iron condorOptions
A written strangle with a further-out bought call and put that cap the loss on each side: four strikes, one expiration, entered for a credit. It profits if the underlying stays inside the inner strikes until expiration. A defined-risk way of selling volatility, and a structure whose maximum loss is typically several times its maximum gain.
- IsFiniteAFL
Returns non-zero when a value is not infinite. The guard for division, because a zero denominator produces an infinity that plots as a spike looking exactly like a discovery.
- IV rankalso: IV percentileOptions
Where today's implied volatility sits within its own range over the past year, as a percentage. IV rank scales between the year's low and high; IV percentile counts the share of days below today's value. Both exist because a raw implied-volatility number means little without knowing what is normal for that underlying.
K
- K-RatioSystems
A measure of the consistency of an equity curve: the slope of its linear regression, scaled by the slope's standard error and the number of bars. A straight, steadily rising curve scores high. AmiBroker implements a specific published version and other packages compute it differently, so K-Ratios from different software are not comparable.
- Kelly criterionRisk
The bet size that maximises the long-run growth rate of capital for a known edge: for a simple bet, the win probability minus the loss probability divided by the payoff ratio — p − q/b, not (p − q)/b. It assumes the edge is known exactly, which it never is, and full Kelly produces drawdowns few can tolerate. Practitioners who use it use a fraction of it.
- Keltner channelIndicators
A moving average with bands a multiple of ATR above and below it. Like Bollinger Bands but using average true range rather than standard deviation, which makes the width smoother and less sensitive to single large bars. Built in a few lines of AFL from
EMA()andATR().- Kurtosisalso: fat tails, heavy tailsResearch
The weight of a distribution's tails relative to a normal distribution. Market returns have fat tails: moves of five or more standard deviations, which a normal model says should happen once in millennia, happen every few years. Any risk measure that assumes normality understates the extremes by a lot.
L
- LagIndicators
The delay between a change in price and its appearance in an indicator computed from past prices. All smoothing lags; a longer lookback lags more. Lag is the price paid for noise reduction, and the search for an indicator with less lag and no more noise is the search for something that does not exist.
- Largest lossalso: largest losing tradeSystems
The single worst trade in a backtest. It tests the stop rules against the data: a largest loss much bigger than the intended risk per trade means gaps, halts or a bug got past the stop. Its size relative to the average trade is a check on whether the result depends on a few outliers.
- Last pricealso: last, print, last tradeMarket structure
The price of the most recent trade. On a thin instrument it can be minutes old and well away from the current quote, so a chart built from last prices can look active when nothing is tradable at those levels. Traders say a trade printed when it appears on the tape.
- Last trading dayalso: expiration (futures)Futures
The final day a futures month can be traded, after which open positions are settled in cash or go to delivery. For physically delivered contracts, first notice day is usually the date that matters, and in many products it comes earlier than the last trading day. A system that holds a futures position through these dates has a data problem, a delivery problem, or both.
- LastValueAFL
Returns the last element of an array as a scalar. The usual way to reduce an array to a number so that an
ifcan use it — and choosing which reduction to apply is choosing what the test means.- LatencyMarket structure
The delay between an event and your observation of it, or between your decision and its arrival at the market. A retail real-time feed is hundreds of milliseconds to seconds behind the exchange; a chart refresh adds more. Any intraday strategy whose edge lives inside that window does not exist for you.
- Layeralso: chart layerAmiBroker
A named group of hand-drawn studies — trendlines, text, shapes — that can be shown or hidden together, like sheets of transparent plastic over the chart. Layers organise drawings; they have nothing to do with the panes or formulas beneath them, and a drawing on a hidden layer is still there.
- Layoutalso: window layoutAmiBroker
A saved arrangement of open windows — which charts, on which symbols and intervals, docked or floating, on which monitor — restored from the Layouts pane. A trading screen is a layout. Multi-monitor setups are saved in it, so the arrangement comes back after a restart.
- Leading and lagging indicatorsIndicators
A distinction from the sales literature: lagging indicators (moving averages) confirm a move after it starts, leading indicators (oscillators) are said to anticipate it. Every indicator computed from past prices lags. An oscillator gives earlier signals because it reacts to smaller moves, and it pays for that with more false ones.
- LEAPSalso: long-dated optionsOptions
Options with more than a year to expiration. They behave more like the underlying than short-dated options do — higher delta for a given moneyness, slower decay — and are used as a leveraged, defined-loss substitute for holding stock.
- Level ACourse
This course's term for the no-subscription data path: free end-of-day data, any historical intraday data you have, and Bar Replay. Every part of the course, including the capstone, is completable at Level A.
- Leveragealso: gearingRisk
Controlling a position larger than the capital committed to it, through margin borrowing, futures, options or CFDs. It multiplies returns and losses alike and adds a way to lose that unleveraged holdings lack: the forced exit. A backtest on a leveraged account must model the margin call, or it has assumed the worst day never forced a sale.
- LibraryAFL
A file of reusable AFL functions brought in with
#include. Holds decisions you want to make once — safe division, warm-up guards, normalisation — and not trading rules, which become rules you forget you are running.- Limit orderExecution
An instruction to buy at or below, or sell at or above, a stated price. It buys certainty of price at the cost of certainty of execution: the order rests in the order book and fills only if the market comes to it, and even then only after the orders ahead of it. A backtest that assumes every limit order filled when its price traded is optimistic.
- Linear and logarithmic scalealso: log scale, semi-log chartChart reading
On a linear scale equal vertical distances are equal price changes; on a logarithmic scale they are equal percentage changes. Long histories and large moves are only readable on a log scale, where a doubling looks the same at 10 as at 1,000. AmiBroker sets the scale per chart pane, and a trendline drawn on one scale is a different line on the other.
- LiquiditySystems
Whether an instrument trades enough for a position to be entered and exited near the quoted price. Usually measured as median turnover —
Close * Volume— over a look-back window, and a median rather than a mean because one rebalance day can be twenty times a normal one.- Liquidity riskRisk
The risk that a position cannot be exited at anything near its quoted price when you need to leave it, because the market has thinned or your size exceeds it. It rises exactly when other risks are being realised. A backtest that trades at the close without checking volume has not priced it.
- LocalAFL
The AFL declaration that keeps a variable assigned inside a function invisible outside it. Without it, two library functions using the same variable name interfere depending on call order — the failure mode a naming convention cannot prevent.
- Longalso: long position, going longExecution
Owning the instrument, so that you gain if its price rises. The ordinary way of holding a stock. In AmiBroker a long trade is opened by the
Buyarray and closed by theSellarray. Being long volatility, gamma or a currency extends the word to any exposure that profits from a rise in the named thing.- Look-ahead biasalso: future leakResearch
Using information in a decision that was not available when the decision was made. The most common forms are a positive
Ref()shift, filling inside the bar that produced the signal, and a higher-timeframe value read without a negative shift. It produces spectacular results and invalidates everything downstream.- Lookback periodalso: period, length, windowIndicators
The number of bars an indicator reads to produce each value: the 14 in a 14-day RSI, the 200 in a 200-day moving average. Every lookback is a parameter, every parameter can be optimised, and the popular defaults are historical accidents rather than discoveries. Changing the lookback changes both the lag and the number of signals.
- Lotalso: standard lot, mini lot, micro lotForex
The unit of position size in forex: a standard lot is 100,000 units of the base currency, a mini lot 10,000, a micro lot 1,000. On a pair quoted in US dollars, one pip on a standard lot is worth 10 dollars. Position sizing in forex is choosing a lot size so that the stop distance in pips equals the intended risk.
M
- MACDalso: moving average convergence divergenceIndicators
The difference between two exponential moving averages, conventionally 12 and 26 periods, plotted with a 9-period signal line and a histogram;
MACD()andSignal()in AFL. It is a trend-following momentum measure in price units, so its level is not comparable across instruments or across time in a rising market.- MAE and MFEalso: maximum adverse excursion, maximum favourable excursionSystems
For each trade, the worst point it reached while open (maximum adverse excursion) and the best (maximum favourable excursion). Plotting them against final outcome shows how far winners went underwater before winning and how much of their peak they gave back — the empirical basis for setting stops and targets rather than guessing. AmiBroker's report includes them.
- Maintenance marginFutures
The minimum balance a futures account must hold per position after opening it, below the initial margin. If daily losses take the account under it, a margin call demands a top-up to the initial level. Exchanges raise both margins during volatile periods, which forces sales exactly when prices are already moving.
- Major pairsalso: majorsForex
The most traded pairs, each with the US dollar on one side: EUR/USD, USD/JPY, GBP/USD, USD/CHF, and usually AUD/USD, USD/CAD and NZD/USD. They carry the tightest spreads and the deepest liquidity, which is why a course's forex examples are almost always drawn from them.
- Maker and takeralso: maker-taker, adding and removing liquidityMarket structure
An order that rests in the book makes liquidity; an order that crosses the spread and executes against a resting order takes it. Many venues charge takers and rebate makers. The distinction matters for costs, and it explains why a limit order that fills was cheaper than a market order in the same spot — and why it may never fill at all.
- Marginalso: margin account, buying powerRisk
Borrowed funds from the broker to hold positions larger than cash, secured on the account. In equities it is a loan with interest; in futures the word means the collateral deposit instead. Both create the possibility of a margin call. AmiBroker's backtester has a margin setting that lets equity exceed cash by a stated ratio.
- Margin callFutures
The broker's demand for additional funds when an account falls below its required margin, with liquidation of positions if the funds do not arrive. It is the mechanism that turns a leveraged drawdown into a forced exit at the worst moment. Position sizing that never contemplates a margin call is sizing for a market that does not gap.
- Mark-to-marketalso: marking, open equityExecution
Valuing an open position at the current market price rather than at cost, so that unrealised gains and losses appear in equity as they occur. Futures accounts settle this way every day. An equity curve marked to market shows drawdowns that a closed-trade curve hides until the trade ends — and the marked version is the one you would have lived through.
- Market capitalisationalso: market capMarket structure
Share price multiplied by shares outstanding: what the market values the whole company at. Size buckets — large, mid, small, micro — are cap ranges, and they behave differently enough that a universe defined by cap is a research decision rather than a detail.
- Market makeralso: dealer, liquidity providerMarket structure
A participant who continuously quotes both a bid and an offer, earning the spread in exchange for standing ready to trade. Some venues assign formal obligations; on most, market making is simply a strategy. Market makers widen or withdraw quotes when uncertainty rises, which is why spreads blow out around news — exactly when a system most wants to act.
- Market manipulationalso: spoofing, painting the tape, pump and dump, wash tradingTrader jargon
Illegal conduct that creates a false picture of supply, demand or price: spoofing (placing orders meant to be cancelled), painting the tape (trades made to show activity), wash trading (trading with oneself) and pump and dump (promoting a stock to sell into the buying). Small, illiquid instruments are where a retail trader is most likely to be on the receiving end.
- Market orderExecution
An instruction to trade immediately at the best price available. It buys certainty of execution at the cost of certainty of price: a market order walks through the book until it is filled, and in a thin or fast market the average price can be far from the quote you saw. Most backtests assume market-order fills without modelling that walk.
- Market regimeSystems
A classification of overall market conditions used as a gate on a strategy. Read from a benchmark rather than from each candidate, so that every instrument is classified the same way on the same date. A definition, not a discovery.
- Market structurealso: price structure, higher highs and higher lowsChart reading
The pattern of swing highs and lows on a chart, read as a sequence: higher highs and higher lows, lower highs and lower lows, or neither. It is the indicator-free description of trend and range, and a change in it — a lower low in an uptrend — is the earliest structural sign that the trend may be over.
- Market-on-close orderalso: MOC, limit-on-close, LOCExecution
An order submitted before the exchange's cut-off to execute in the closing auction at the official closing price; the limit-on-close version participates only if the auction price satisfies its limit. It is the live counterpart of a backtest that trades on the close, and it is the honest way to test such a system in practice.
- Market-on-open orderalso: MOO, limit-on-open, LOOExecution
An order that executes in the opening auction at the official opening price. It is what a backtest is assuming when it fills signals at the next bar's open — a common and reasonable assumption for daily systems, provided the order is in before the cut-off and the instrument actually has an opening auction.
- Matrixalso: matrices, @ operatorAFL
A two-dimensional numeric type created with
Matrix( rows, cols, initvalue )— a fourth argument,increment, defaults to 0 and otherwise fills the matrix with increasing values — indexed asm[ row ][ col ], with element-wise arithmetic and a true matrix product via the@operator. Matrices are for tables and linear algebra, not for bar data, which stays in arrays.- Max drawdownalso: maximum drawdown, MaxDD, max system drawdownSystems
The largest peak-to-trough fall in equity over the test, in currency or as a percentage of the peak. It is the single most important risk number in a backtest and it is a minimum: the future contains a drawdown the past did not. AmiBroker reports both system and trade drawdowns; the system figure includes open positions.
- MaxOpenPositionsSystems
The cap on simultaneously open positions. It does nothing on its own: a position size of 100% of equity means the account can hold exactly one position however high the cap is set.
- McClellan oscillatoralso: McClellan summation indexBreadth
The difference between a 19-day and a 39-day exponential moving average of daily net advances, with the summation index its running total. It is a MACD of breadth, read for extremes and divergences against the index. Its published thresholds were set on one exchange's data decades ago and deserve re-examination on any other.
- Mean and medianalso: mean, median, averageResearch
The arithmetic average, and the middle value when sorted. For trade results they differ a lot, because a few large trades pull the mean while leaving the median alone. A system whose mean trade is positive and whose median is negative makes its money in a handful of outliers — a fact to know before relying on it. AFL provides
Median().- Mean reversionSystems
Betting that a price which has moved far from some reference — a moving average, a range, a related instrument — will move back towards it. The profile is the mirror of trend following: high win rate, small gains, and rare large losses when the reversion does not come. Which regime a market is in decides which approach is losing this year.
- Measured movealso: pattern target, price objectiveChart reading
A price target projected from a pattern's own height — the depth of a head and shoulders subtracted from the neckline, the length of a flagpole added to a flag breakout. It is a convention, not a law, and it is easy to test: what fraction of completed patterns reached their measured move, and how long did it take?
- Melt-upTrader jargon
A rapid, accelerating rise driven more by fear of missing out than by any change in fundamentals. The term is applied in hindsight to the late stage of a bull market, and in real time by people who expect one. It has no operational definition.
- MFIalso: money flow indexIndicators
An RSI computed on volume-weighted price changes rather than on price alone, from 0 to 100;
MFI()in AFL. Marketed as a volume-aware RSI. Whether the volume weighting adds information over RSI is a question a comparison on your own data answers quickly.- Momentumalso: momentum indicatorIndicators
The change in price over a lookback, as a difference or as the rate of change ratio. Also the name of the cross-sectional finding that recent winners tend to keep winning for months — one of the best-documented regularities in finance, and a different thing from the indicator, though they share a word.
- Momentum strategyalso: cross-sectional momentum, relative momentumSystems
Buying the instruments that have performed best over the last several months and holding them for a month or so, rebalancing on a schedule. Distinct from the momentum indicator: this is a ranking across a universe, not a reading on one chart. It is among the most replicated findings in the finance literature, and it has its crashes.
- Moneynessalso: in the money, at the money, out of the money, ITM, ATM, OTMOptions
Where the strike sits relative to the underlying price. A call is in the money when the underlying is above the strike, out of the money below it, at the money near it; a put is the reverse. Moneyness governs intrinsic value, the size of delta, and how much of the premium is time value.
- Monte CarloResearch
Resampling a trade sequence many times to produce a distribution of outcomes rather than one path. It addresses sequence risk, not regime risk: it can only rearrange the trades you got, and standard resampling assumes an independence that correlated, time-clustered trades do not have.
- Monte Carlo settingsalso: Monte Carlo tabAmiBroker
The Analysis Settings tab that enables the built-in simulation, sets the number of runs — a thousand or more — and chooses whether to resample the trade list or the portfolio's bar-by-bar equity changes. The choice matters: the guide recommends trade-list mode only for systems with no overlapping trades and equity-changes mode for systems that hold overlapping positions, because only the latter handles them, and it warns against percent-of-equity sizing in trade-list mode, which reintroduces the serial dependence a bootstrap is meant to remove.
- Moving averagealso: MAIndicators
The mean of a price series over a look-back window, recomputed each bar. A smoother of past data. It lags by construction — that is arithmetic, not a defect — and it is undefined until it has its full look-back.
- Multi-threadingalso: Analysis threads, #pragma maxthreadsAmiBroker
AmiBroker runs each chart pane's formula on its own thread and runs Analysis-window symbols in parallel: up to two threads per Analysis window in Standard, up to thirty-two in Professional, and never more than the machine's logical processors. Code that shares state between symbols — static variables, files — must be written for that, and
#pragma maxthreadscan only reduce the count.- Multiple comparisonsalso: multiple testing, the garden of forking pathsResearch
The problem that testing many rules on one history will produce some that look excellent by chance. With twenty independent rules, one is expected to pass a 5% significance test with no edge at all. Every optimisation, every indicator tried and discarded, every universe adjusted is a comparison, and the count is what determines how much the survivor's result means.
N
- NBBOalso: National Best Bid and OfferMarket structure
In US equities, the highest bid and lowest offer across all lit venues at a moment. Brokers are obliged to route market orders so that they do not execute at a worse price than the NBBO. It says nothing about size at those prices, which is where execution cost actually lives for anyone trading more than a round lot.
- Net asset valuealso: NAVMarket structure
The value of a fund's holdings per share. An ETF's market price can trade at a premium or discount to it, briefly for liquid funds and persistently for funds holding illiquid or foreign assets. The gap is information about the fund's plumbing, not about the assets.
- New highs and new lowsalso: 52-week highs, new high–new low indexBreadth
The number of instruments in a universe making a new high or low over a lookback, conventionally 52 weeks, and the difference between the two counts. A healthy advance has expanding new highs; an ageing one has fewer and fewer while the index still rises. Built in AmiBroker with
AddToComposite()across the universe.- NoiseResearch
Movement in price that carries no information about future movement. Most bar-to-bar change is noise, and every indicator is an attempt to remove it without removing the signal. A pattern found in noise is the ordinary outcome of looking, which is what base rates and null models exist to catch.
- Normal distributionalso: Gaussian, bell curveResearch
The symmetric bell-shaped distribution that much of classical statistics assumes. Daily returns are not normal: they have fat tails and clustered volatility. The assumption survives because it is convenient, and it is the reason the two-standard-deviation rule of thumb, Bollinger Band probabilities and textbook value-at-risk all understate the frequency of extreme days.
- NormalisationResearch
Making a measurement comparable, in one of two distinct ways: against the instrument's own price (ATR as a percentage of price), or against the instrument's own history (a percentile of its own recent values). Mixing the two up is how a screen quietly selects one kind of instrument.
- Notional exposurealso: gross exposure, net exposureRisk
The full market value controlled by positions, regardless of the margin used to hold them. Gross exposure adds longs and shorts; net exposure subtracts shorts from longs. A futures account with 20,000 of margin and 400,000 of notional exposure is a leveraged account whatever the cash balance says.
- NullAFL
AFL's empty value. It propagates through arithmetic and makes comparisons false — which is the dangerous half, because false is an ordinary answer nothing flags.
Nz()replaces it,IsNull()tests it, and deciding what a Null should mean for each condition is the whole of defensive AFL.- Null modelResearch
A system carrying no information at all — random entries — run on the same universe, costs, sizing and trade frequency as the real one. The distribution of its results is what a real result has to stand out from. In a rising market it frequently makes money.
- Number of bars to loadalso: bars to loadAmiBroker
A Database Settings value capping how many bars per symbol AmiBroker loads from a plugin-fed source and holds in memory. Too few and long-lookback indicators have no warm-up; too many and a large intraday database exhausts memory. It is a cap on data, not a chart zoom, and it has no effect at all on a database whose data source is
(local)— which is why students who test it on the bundled sample database conclude it is broken.- NzAFL
Converts Null, NaN and infinity to zero or to a value you choose. Convenient and dangerous in screening filters:
Nz( x )makes a missing value zero, and zero often passes a "less than" test — promoting a broken symbol rather than removing it.
O
- OBValso: on-balance volumeIndicators
A running total that adds the bar's volume on up days and subtracts it on down days;
OBV()in AFL. Its level is arbitrary; its direction and its divergence from price are what is read. The assignment of a whole day's volume to one side on the basis of the close is the crude part.- OHLCVMarket data
Open, high, low, close and volume — the five fields that summarise a bar. What they omit is the sequence of prices inside the bar, which is why a daily backtest cannot know whether the high or the low came first.
- Open interestOptions
The number of contracts outstanding — opened and not yet closed, exercised or expired — for an option strike or a futures month. Unlike volume it is a stock, not a flow: a trade between a new buyer and a new seller raises it, a trade that closes both sides lowers it. High open interest means a liquid strike; reading it for direction is folklore.
- Opening rangealso: opening range breakout, ORBTrader jargon
The high and low of the first minutes of a session — five, fifteen or thirty, by taste. An opening range breakout enters when price leaves that range. It is a well-defined intraday setup, which makes it testable, and its dependence on the exact session start time makes it the classic victim of a time-zone error.
- OptimizationSystems
Repeated backtests across a parameter range, driven by
Optimize(). Legitimate as a way to understand a parameter surface; a route to overfitting when the best cell of hundreds is reported as though it were the only specification tried.- Optimization targetalso: objective functionAmiBroker
The metric an optimization maximises, set on the Walk-Forward settings tab and used by the smart engines and by walk-forward runs; the default is CAR/MaxDD. Net profit rewards leverage and long tests; CAR/MaxDD rewards smoothness; a custom metric rewards whatever you wrote. The target is a statement of what you want, and optimisers deliver exactly that.
- OptimizeAFL
Optimize( name, default, min, max, step )declares a parameter the optimizer will sweep and returns the default everywhere else. The number of combinations across allOptimize()calls is the size of the exhaustive search, and it is the number of comparisons being made against one history — the count that decides how much the best result means.- Optionalso: option contractOptions
A contract giving its holder the right, but not the obligation, to buy (Call option) or sell (Put option) an underlying at a set strike price on or before an expiration date, in exchange for a premium paid to the writer. This course does not trade options; these entries exist so that their vocabulary, which pervades market commentary, is not a barrier.
- Option chainalso: chainOptions
The table of every listed option on an underlying: each expiration, each strike, calls on one side and puts on the other, with bid, ask, volume, open interest and implied volatility. It is the options market's order book at a glance, and reading it is the first skill in the subject.
- Option pricing modelalso: Black–Scholes, binomial modelOptions
A formula relating an option's price to the underlying price, strike, time to expiry, interest rate, dividends and volatility. Black–Scholes is the reference model; binomial trees handle early exercise. The models are used backwards more than forwards — given the price, find the implied volatility — and their assumptions, constant volatility above all, are known to be false in ways the volatility skew records.
- Order bookalso: limit order book, the bookMarket structure
The list of resting limit orders at each price, bids on one side and offers on the other. The best bid and best offer are the quote; everything behind them is depth. An order book is a picture of stated intentions, not commitments: a resting order can be cancelled in microseconds, so displayed size is weak evidence of what will actually trade.
- Order flowTrader jargon
The stream of orders arriving at a market, and the analysis of trades by whether they hit the bid or lifted the offer. Cumulative delta, footprint charts and volume profile are its instruments. The underlying quantity is real; the predictive claims made for reading it are of very mixed quality, and the good ones concern the next minutes, not the next month.
- Order imbalancealso: MOC imbalance, closing imbalanceMarket structure
The excess of buy over sell orders, or the reverse, submitted to an auction before it runs. Exchanges publish closing imbalances in the minutes before the close, and offsetting orders arrive in response. Strategies built on the published figure exist; their edge, if any, is small, fast and crowded.
- Order routingalso: smart order routingMarket structure
The broker's decision about which venue receives an order. Retail orders are often routed to a wholesaler rather than an exchange; larger orders may be split across venues by a smart order router. Routing shapes fill quality in ways a customer rarely sees, which is why execution-quality reports exist and why they are worth reading.
- OscillatorIndicators
An indicator bounded within a fixed range, such as RSI between 0 and 100. Boundedness makes readings comparable across instruments; it says nothing about whether an extreme reading means anything.
- Out-of-samplealso: OOS, hold-outResearch
Data deliberately not used to develop a model, tested on once. The moment you look at the result and change the model, that data has joined the training set and cannot be recovered — which is how walk-forward analysis quietly becomes in-sample fitting.
- OutlierResearch
An observation far from the rest. In a trade list, the one or two results that made the year. Removing outliers to see the typical behaviour is legitimate analysis; removing them to improve the backtest is curve fitting. The test is whether the rule that excludes them was written before you saw them.
- Over-the-counteralso: OTCMarket structure
Trading that happens between dealers and their customers rather than on a central exchange. Spot forex and most bonds trade this way. There is no single order book, no official last price and no consolidated volume, which is why forex volume in a chart is only ever one broker's view.
- Overbought and oversoldalso: overbought, oversoldIndicators
Labels for an oscillator above or below conventional thresholds — RSI over 70 or under 30 — carrying the implication that a reversal is due. The implication is the claim; the reading is a fact. The course's reality check on RSI above 70 exists because the claim, tested, does not say what the label says.
- OverfittingResearch
The outcome: a model that performs well on the data it was built from and poorly on data it has not seen. Data snooping is about the process and curve fitting is about the model; overfitting is what they produce.
- Overnight riskalso: gap riskTrader jargon
The exposure of a position to whatever happens while the market is closed: earnings, news, a foreign session, a weekend. It is unmanageable by stops, since nothing can fill, and it is the reason day traders go flat and swing traders size for a gap rather than for their stop distance.
- OvertradingTrader jargon
Trading more often than the method calls for — from boredom, from the wish to recover a loss, or because the screen is on. Its cost is measurable: every unplanned trade pays the spread and the commission for an expected return of roughly zero. A trading journal is the instrument that makes it visible.
P
- p-valueResearch
The probability of seeing a result at least as extreme as the one observed if the null model were true. It is not the probability that the strategy works. A small p-value from one test on one sample is weak evidence, and a small p-value after searching a thousand rules is no evidence at all.
- Pairs tradingalso: spread trading, relative-value tradeSystems
Going long one instrument and short a related one when the gap between them is unusually wide, expecting it to close. A mean-reversion strategy on a spread rather than a price, which removes market direction and adds the risk that the relationship breaks. It is the simplest case of statistical arbitrage, which more generally means the same idea run across many instruments at once. In AmiBroker it is built with
Foreign()and a spread series.- Paper tradingalso: simulated trading, demo accountExecution
Running a strategy on live data with simulated orders and no money at risk. It tests the plumbing — data, signals, timing, your ability to follow the rules — and it is a genuine out-of-sample period. It does not test fills, because a simulated order always fills, and it does not test you, because nothing is at stake.
- Parabolic SARalso: SAR, stop and reverseIndicators
A trailing stop that accelerates towards price as a trend continues, drawn as dots below an uptrend and above a downtrend;
SAR()in AFL. It is always in the market, flipping direction when hit, which makes it a complete system and a poor one in ranges. The acceleration factor is its parameter.- Paramalso: ParamToggle, ParamList, ParamColor, ParamStrAFL
The family of functions that declare a formula's inputs — a number with a range, a toggle, a list, a colour, a string — and expose them in the Parameters window. On a chart the values are edited live; in Analysis they are set for the run.
Optimize()has the same shape and is the version the optimizer sweeps.- Parameter stabilityalso: robust region, plateauSystems
The property that neighbouring parameter values perform similarly, so that the chosen value sits on a plateau of the parameter surface rather than on a spike. A spike is a fit to noise. Choosing the centre of a plateau over the single best value gives up in-sample return for a better chance that the out-of-sample result resembles it.
- Parameter surfaceSystems
How a performance metric varies across a parameter grid. A broad plateau suggests a property of the idea; a single spike surrounded by mediocrity is what curve fitting looks like from outside; a flat surface is a result too.
- Parameters windowalso: Param windowAmiBroker
The dialog that lets you change a formula's inputs without editing it, populated by the
Param()family of functions. On a chart the values are live and per pane; in the Analysis window they are set once for the run. Anything worth tuning by eye belongs in a parameter, and anything in a parameter is something you might later be tempted to over-tune.- Partial fillExecution
An order that executes for less than its full size, the remainder either resting or cancelling depending on its time in force. Common for limit orders on thin instruments and for any order larger than the displayed size. A backtest with a fixed position size has assumed there are no partial fills.
- ParticipationSystems
How large an intended position is relative to what actually traded — as a share of the entry bar's volume or of median turnover. A backtest whose positions are a large fraction of daily turnover is reporting profits from trades that could not have been established.
- Payment for order flowalso: PFOFMarket structure
A wholesaler paying a broker for the right to execute the broker's retail orders. The wholesaler profits from the spread and often fills the order slightly inside the NBBO; whether the customer is better or worse off than on an exchange is contested and depends on the order. It is one of the mechanisms behind zero-commission trading, and it is prohibited in some jurisdictions.
- Payoff ratioalso: average win to average lossSystems
The average winning trade divided by the average losing trade, one of AmiBroker's standard report metrics. With the win rate it determines expectancy. A system can survive a low win rate with a high payoff ratio or the reverse; it cannot survive both being low, and it cannot have both high for long.
- Percentage above moving averageBreadth
The share of a universe's members trading above a given moving average, typically the 50- or 200-day. It is bounded, comparable across time, and one of the cleanest measures of how broadly a trend is shared. Extremes near 0 and 100 are rare and are among the more robust breadth readings.
- Percentilealso: PercentRankResearch
Where a value sits within its own recent history, on a 0–100 scale.
PercentRank( array, range )answers "unusual for this instrument" rather than "large in absolute terms", which is what makes readings comparable across instruments and across time.- Pin riskOptions
The uncertainty an option writer faces at expiration when the underlying settles very close to the strike: whether the option will be exercised, and therefore what position will exist on Monday morning, is not known until after the close. Related to the observation that prices sometimes cluster near large strikes into expiry, a pattern called pinning.
- Pipalso: point (forex), percentage in pointForex
The conventional smallest price move in a currency pair: 0.0001 for most pairs and 0.01 for pairs quoted in Japanese yen. Spreads, stops and daily ranges are all discussed in pips. Its money value depends on the lot size and the quote currency, so a ten-pip stop is a different risk on every pair and account.
- Pipettealso: fractional pip, point (fifth decimal)Forex
One tenth of a pip, the fifth decimal place on most pairs and the third on yen pairs. Brokers quote in pipettes so that spreads can be fractions of a pip, and charting platforms sometimes report ranges in them, which makes a move look ten times larger than it is if the reader has pips in mind.
- Pivot pointsalso: floor pivots, daily pivotsChart reading
Levels computed from the previous session's high, low and close — a central pivot and support and resistance lines above and below — used by intraday traders as reference levels. The arithmetic is fixed and simple. Their reputed influence is partly self-fulfilling, since many participants watch the same numbers, and partly untested.
- Plotalso: PlotOHLC, Plot()AFL
The function that draws an array in a chart pane:
Plot( array, name, colour, style ), withPlotOHLC()for candles and bars and a set ofstyleconstants for lines, histograms and areas. A formula with noPlot()draws nothing. Everything visible on an AmiBroker chart is a call to this function or to its relatives.- PlotShapesAFL
Draws a shape — arrow, circle, star — on the bars where a boolean array is true, above or below price. It is the visual form of a signal, and the fastest way to see whether a rule fires where you think it does. A chart of
PlotShapes()arrows is the first test of any entry rule, before any backtest.- Plug-inalso: data plug-inReal-time
The DLL that connects AmiBroker to a data vendor.Tools → Plugins lists which plugins are loaded and at which version, and is the only reliable statement about your own installation; the plugin's own settings live behind the Configure button in File → Database Settings.
- PnLalso: P&L, profit and lossTrader jargon
Profit and loss, realised or marked to market, for a trade, a day or an account. Booking PnL means closing the position that carries it. It is the number everyone watches and, on its own, the least informative one about whether a method is working.
- Point and figurealso: P&FChart reading
A chart of columns of X (rising) and O (falling), each box a fixed price increment, with a new column started only after a reversal of a set number of boxes. Time and volume are absent. The oldest Western charting method, with its own pattern vocabulary and its own price-target conventions.
- Portfolio backtestSystems
A simulation in which every symbol shares one cash balance and a maximum number of open positions, so candidates compete. The competition is what a single-symbol test cannot show — including whether your selection rule is any good, since it never has to select.
- Portfolio heatalso: total open risk, risk budgetRisk
The sum of the risk per trade across all open positions — what the portfolio loses if every stop is hit at once. Ten positions at one percent each is ten percent of heat, and correlated positions can realise it together. A heat limit is the portfolio-level rule that per-trade sizing does not provide on its own.
- Positionalso: open position, holdingExecution
An open holding in an instrument, described by direction, size and average cost. A position is what the market can hurt; a signal is only an intention. In AmiBroker's backtester a position is opened by a
BuyorShortsignal and closed bySell,Coveror a stop, and the portfolio backtester limits how many may be open at once.- Position sizingRisk
How much of the account goes into each trade. Fixed shares varies both money and risk; percent of equity equalises money and leaves risk unequal; ATR risk-based equalises risk and leaves money unequal. Identical signals under three sizing models produce three different systems.
- Position tradingTrader jargon
Holding for weeks to months, following a trend or a thesis and ignoring most daily movement. Costs matter least here and patience most; the trade-off is that a position trader sits through drawdowns a shorter horizon would have exited, and has far fewer trades from which to judge whether the method works.
- PositionScoreSystems
The array that decides which candidates are taken when signals outnumber slots or cash. Ranked on its absolute value, which is the trap in long-and-short systems. It is a second strategy sitting on top of the first, and deserves the same scrutiny.
- Power houralso: lunch lull, the closeTrader jargon
The last hour of the US equity session, when volume rises into the close and institutional orders are worked. The lunch lull is its opposite, the thin middle of the day. Intraday volume has a U-shaped profile that is one of the most robust regularities in market data; the names attached to its ends are less important than the shape.
- Preferencesalso: Tools → PreferencesAmiBroker
The program-wide settings dialog, as opposed to the per-database Database Settings and the per-formula Parameters. Its pages cover charting defaults, colours, the editor, data and intraday behaviour, and the real-time refresh interval that governs how often a chart formula re-runs on a live feed.
- Price actionChart reading
Analysis from price structure alone — swings, levels, bars, patterns — without indicators. The phrase is used honestly to mean reading the chart and dishonestly to imply that doing so is a method. Everything price action claims can be written as a rule and tested; the discipline is in doing so.
- Price arraysalso: BuyPrice, SellPrice, ShortPrice, CoverPriceAFL
The reserved arrays that say at what price each signal is filled:
BuyPrice,SellPrice,ShortPriceandCoverPrice, defaulting to the values set in the Analysis settings. Assigning them is how a fill assumption is written into the formula — and AmiBroker clamps any assigned price back inside the bar's high–low range, so an impossible fill is silently made possible.- Price identifiersalso: O, H, L, C, V, Open, High, Low, Close, VolumeAFL
The built-in arrays holding the current symbol's bars:
Open,High,Low,Close,VolumeandOpenInt, with one-letter aliasesO H L C V OI, plusAvgfor the typical price. Each holds one value per bar, which is the first fact of the array model.- Price improvementExecution
A fill at a better price than the quote at the time the order was sent — inside the spread, or better than the limit. Wholesalers advertise it as the benefit of routing retail orders to them. It is real, usually small, and not the same as a good fill for an order of any size.
- Price limitalso: limit up, limit down, LULDFutures
The maximum a futures price may move from the previous settlement in a session, beyond which trading pauses or continues only within the limit. Equity index futures have overnight limits and tiered daytime halts; agricultural contracts can lock limit for days, with no trading possible at all. The equity-market cousin is the limit-up/limit-down band that pauses a single stock.
- Price-time priorityalso: FIFO matchingMarket structure
The rule most exchanges use to match orders: the best price trades first, and among orders at the same price the earliest trades first. It is why queue position exists, why a limit order placed late at a busy price may watch others fill ahead of it, and why a backtest that assumes every limit at the low filled is assuming something the rules do not promise.
- printf and StrFormatalso: printf, StrFormatAFL
StrFormat()builds a string from a format template and values;printf()does the same and writes the result to the output window — Commentary, Interpretation, or the debugger's Output window, depending on where the formula is running. Both use C-style placeholders such as%.2f. They are how numbers become readable text in titles, columns and traces, and the selected bar's value is what they format when given an array.- ProcedureAFL
A user-defined routine declared with
procedurerather thanfunction: it runs for its side effects and returns nothing. The distinction is documentation as much as mechanics — a procedure announces that it plots, traces or stores something rather than computing a value.- Profit factorSystems
Gross profit divided by gross loss over a backtest — total winnings over total losses. A value of 1 is break-even on whatever basis the trades were recorded, and AmiBroker's figure is computed from net trade results, so costs are already in it; values much above 2 or 3 in a long test deserve suspicion rather than celebration. It is in AmiBroker's report and is a common optimisation target, with the usual risk of optimising the sample rather than the system.
- Profit targetalso: take-profitSystems
An exit at a predefined gain — a fixed percentage, a multiple of the risk, an ATR distance, a pattern's measured move. AmiBroker's
ApplyStop()provides it as one of its four stop types. A target caps the winners, which raises the win rate and lowers the payoff ratio; whether the trade-off helps depends on the distribution of moves after entry.- Protective putalso: married putOptions
Holding the underlying and buying a put against it: insurance with a known premium and a floor at the strike. Unlike a stop order it survives a gap, because the right to sell at the strike does not depend on a fill. The cost is the premium, paid whether or not the insurance is used.
- Pullbackalso: retracement, correction, dipChart reading
A move against the prevailing trend that does not break the structure — a lower swing inside an uptrend that holds above the previous swing low. Buying pullbacks is the most common trend-following entry. How deep a pullback can go before it is a reversal instead has no fixed answer, which is what Fibonacci levels pretend to supply.
- Put optionalso: putOptions
The right to sell the underlying at the strike. A put gains value when the underlying falls and when implied volatility rises. Bought against a holding it is insurance (Protective put); written naked it obliges the writer to buy the underlying at the strike however far it has fallen.
- Put/call ratioOptions
Put volume divided by call volume, for one underlying or a whole market, sometimes computed on open interest instead. It is read as a sentiment gauge — many puts, much fear — and used as a contrarian signal at extremes. Tested carefully, its record is mixed, and it is one of the claims the course's methods are designed to check.
Q
- Queue positionMarket structure
Where a resting limit order sits among the others at the same price. Under price-time priority, orders ahead of yours must fill before yours does. A price can trade without your order filling — the classic reason a backtested limit entry at the bar's low did not happen in real life.
- QuickAFLAFL
The engine's optimisation of calculating only the bars a chart shows or an Analysis range covers, plus whatever lookback the formula appears to need. It makes charts fast and it changes results:
Cum(),BarCountand long lookbacks see a different number of bars on a zoomed chart than in a backtest.SetBarsRequired()is the control.- Quotealso: bid/ask quote, Level 1Market structure
The current best bid and best ask, each with a size, at one instant. A quote is not a trade: the last price may sit anywhere relative to it, and nothing has changed hands until an order crosses the spread. AmiBroker's Real-Time Quote window shows these fields for the symbols in a watch list.
- Quote currencyalso: counter currency, terms currencyForex
The second currency in a pair, in which the price is expressed. EUR/USD at 1.0850 means one euro costs 1.0850 US dollars. A pip is a fixed fraction of the quote currency, which is why pip value in account terms depends on which currency the account is kept in.
R
- R-multiplealso: RRisk
A trade's result expressed in units of its initial risk: a trade that risked 500 and made 1,000 is +2R, one stopped out at the planned level is −1R. Measuring in R makes trades comparable across instruments and account sizes, and it makes the expectancy a number in R per trade. A largest loss below −1R means the stop did not hold.
- Random walkResearch
A series whose next change is independent of its past, so that no pattern in the history says anything about the future. It is the null model every technical claim must beat, and it is very hard to distinguish from a real market by eye. Random walks produce trends, ranges, heads and shoulders and support levels in abundance.
- Rangealso: trading range, sideways marketChart reading
A period in which price oscillates between a rough ceiling and floor without making new extremes. Ranges are where trend rules lose and mean-reversion rules win, and their edges are the levels a later breakout is measured from. Most of any long price history is range, not trend.
- RankingSystems
Ordering a universe by a score, as opposed to filtering it by a threshold. A filter answers "is this eligible"; a rank answers "which is preferred". A ranking rule is a strategy and should be tested like one.
- Rate of changealso: ROCIndicators
The percentage change in price over N bars;
ROC( Close, N )in AFL. The simplest momentum measure and, because it is a percentage, comparable across instruments — which is why it is the usual basis for ranking a universe by relative strength.- Real body and wickalso: body, wick, shadow, tailChart reading
The parts of a candlestick: the real body spans open to close, the wicks (or shadows) extend to the high and low. A long wick shows that price travelled somewhere and came back within the bar. In AFL these are arithmetic on
O,H,LandC, which is how a pattern becomes a rule.- Real-time dataReal-time
Streaming market data pushed by a vendor as it arrives.Both editions can connect to a real-time data source. Standard is restricted to one-minute-and-up intervals, ten streaming symbols, one Time & Sales window, no
GetRTData()and no Wait for backfill;GetRTData()returns Null for every field on Standard. Every real-time topic in this course also has a Level A path.- Real-Time Quote windowalso: RT Quote windowReal-time
AmiBroker's streaming quote table for the symbols in a watch list, refreshed many times a second directly from the plugin, independent of any chart formula. Standard edition shows up to ten symbols, Professional any number. It is the fastest view of the market the program offers, and the one a formula cannot read directly.
- Realised volatilityalso: historical volatility, statistical volatilityOptions
The volatility the underlying actually exhibited over a past window, usually the annualised standard deviation of daily log returns. It is measured, where implied volatility is priced.
StDev()of returns in AFL gives the unannualised version; ATR is a different, price-unit measure of the same idea.- Reality checkCourse
This course's recurring exercise: take a popular market claim, replace every undefined word with a number, define the outcome and the comparison, measure it, and describe the result without deciding in advance what you wanted it to be. The usual finding is that the difference is small relative to the noise.
- RebalancingSystems
Returning a portfolio to its target weights or holdings on a schedule or when it drifts past a threshold. Every rebalance is a set of trades with costs, and the schedule is a parameter: monthly and quarterly versions of the same system can differ materially. Index funds rebalance on announced dates, which is where index-rebalancing flows come from.
- Recovery factorSystems
Net profit divided by maximum drawdown: how many times over the system earned back its worst loss. A crude cousin of CAR/MaxDD that does not annualise, so it grows with the length of the test. It is in AmiBroker's report.
- RefAFL
Shifts an array in time. A negative period references the past; a positive period references the future. A positive shift is legitimate in a study measuring what followed an event, and is look-ahead bias the moment it reaches a signal array.
- Refreshalso: chart refresh, refresh interval, RequestTimedRefreshReal-time
The re-execution of a chart formula so that its display catches up with new data. On a live feed, charts refresh at the interval set in Preferences;
RequestTimedRefresh( seconds )asks for more frequent refreshes for one pane, at the cost of running the whole formula each time. Data arriving and the chart redrawing are separate events, and the gap between them is where a real-time formula reads stale values.- Refutation criterionResearch
The result that would make you abandon an idea, written down and dated before the test is run. If no result would have changed your mind, the study was decorative.
- Regime dependenceResearch
A result that holds in one kind of market and not others. A fifteen-year backtest of a largely rising market is one observation of a market, however many bars and trades it contains.
- Regressionalso: linear regression, regression lineResearch
Fitting a line, or a more complex function, to data so as to minimise the squared errors. A regression line through prices is a trend estimate —
LinearReg()andLinRegSlope()in AFL — and a regression of returns on a factor is how alpha and beta are estimated. More parameters fit better and generalise worse, which is the whole of overfitting in one sentence.- Regular trading hoursalso: RTH, core session, main sessionMarket structure
The exchange's primary session, bounded by the opening and closing auctions. Daily bars conventionally cover this session only. Whether a database includes extended-hours trades in its intraday bars is a setting, not a given, and two feeds that answer it differently produce different opens, highs, lows and volumes for the same day.
- Relative strengthSystems
How an instrument has performed compared with a benchmark or with its peers over the same window. A cross-sectional comparison, not the Relative Strength Index, which is a different thing with a confusingly similar name.
- Renkoalso: brick chartChart reading
A chart of equal-sized bricks drawn only when price moves by a set amount, with no time axis. It filters small movements and shows trends as runs of same-coloured bricks. Because bricks form at arbitrary times, a Renko bar's timestamp is unreliable for anything that touches the clock, and its construction from intraday data varies between platforms.
- ReplicationResearch
Reproducing a result independently — on another market, another period, another data vendor, or from a fresh implementation of the rules. A result that replicates is evidence; one that appears once is an anecdote with a spreadsheet. This course's insistence on stating universe, period, costs and data source exists to make replication possible.
- ReproducibilityResearch
Whether somebody else, given your files, universe, date range and settings, would get the same number. Half of a run lives in dialogs rather than in the formula, which is why an APX file and a research log matter more than any technique.
- RequoteForex
A dealing-desk broker declining to fill an order at the requested price and offering another, usually in a fast market. It is the forex analogue of slippage, with the difference that the customer is asked rather than filled. Frequent requotes are a reason to change brokers.
- Research logResearch
A dated list of every specification evaluated, including the abandoned ones and why. It is what makes "how many things did you try?" answerable, and it is the only record of how many times a hold-out has been looked at.
- Reserved variablealso: predefined variable, keywordAFL
A name AFL already owns: the signal and price arrays,
Title,Filter,PositionSize,PositionScore,Excludeand others, plus the seventeen keywords such asif,functionandlocal. Assigning to a reserved variable is how you talk to the engine; naming your own variable after one is a bug that compiles.- RestorePriceArraysAFL
Restores the current symbol's price arrays after
SetForeign(). Omitting it is a silent error: the formula continues to run and every later line describes a different instrument.- Retail and institutionalalso: retail trader, institutional investorTrader jargon
Individuals trading their own money, and organisations trading pools of other people's — funds, pensions, banks, insurers. Institutions dominate volume and move slowly; retail is small, fast and, in aggregate, a favourite contrarian indicator with a patchy record. A retail trader's real advantages are the freedom to stay flat and to trade instruments too small for a fund to bother with.
- Revenge tradingalso: tiltTrader jargon
Trading larger or more aggressively after a loss in order to win it back. Borrowed from poker, where the state is called being on tilt. It is the fastest route from a survivable drawdown to an unsurvivable one, and the rule against it — stop for the day after a set loss — is worth writing down before it is needed.
- RhoOptions
The change in an option's price for a one-point change in interest rates. The least discussed Greek, and negligible for short-dated options, but material for long-dated ones and for anyone comparing an option position with the cost of holding the underlying outright.
- RiskRisk
The possibility and size of loss. Traders use the word for several things at once: the amount at stake on one trade, the volatility of returns, the chance of ruin, and the exposure to events outside the sample. Managing it means naming which one is meant and putting a number on it, which is what the rest of this category does.
- Risk adjusted returnSystems
In AmiBroker's report, annual return divided by exposure. The figure designed for comparing systems that are in the market for different fractions of the time — which is why exposure is read first.
- Risk of ruinRisk
The probability of losing enough capital to be unable to continue. Depends on the size of the edge, the size of the bets and the number of them — and on whether the losses are independent, which for a portfolio of correlated positions they are not.
- Risk per tradeRisk
How much of the account a single trade can lose if the stop is honoured. The conditional clause is the whole point: a gap through the stop is unbounded, and a backtest using ExitAtStop = 1 has never shown you one.
- Risk-on and risk-offalso: risk-on, risk-off, ROROTrader jargon
Shorthand for the two moods in which equities, commodities and high-yielding currencies rise together (risk-on) or fall together while bonds, the dollar and the yen rise (risk-off). It describes a real correlation regime and is used as if it were a cause.
- Risk-Reward Ratio (report metric)also: RRRSystems
In AmiBroker's backtest report, the slope of the equity line divided by its standard error — a statistic about the whole curve's steadiness, where higher is better. It has nothing to do with a trade's risk–reward ratio of target distance to stop distance, and the shared name is one of the most misexplained things in the report.
- Risk–reward ratioalso: reward-to-risk, R:RTrader jargon
The distance to the profit target divided by the distance to the stop, stated before a trade is taken. A ratio of 2:1 means risking one unit to make two. It is half of the arithmetic: a ratio means nothing without the probability of reaching the target, and the two trade off against each other in ways that only measurement resolves.
- RobustnessResearch
Whether a result survives changes that should not matter: small parameter changes, a different period, a different subset of the universe, a different ordering of trades. Not the same as being profitable — a robustly mediocre system is a real finding.
- Role reversalalso: support becomes resistance, polarityChart reading
The observation that a broken support level often acts as resistance afterwards, and vice versa. It has a plausible mechanism — participants who bought at the level now sell to get out even — and enough evidence to take seriously, as long as often is measured rather than assumed.
- Rollalso: rolling, rollover (futures)Futures
Closing a position in an expiring contract month and opening the same position in a later one. Rolling costs a spread and a commission and, in a market in contango, buys the later month at a higher price. A backtest on a continuous contract has to model the roll or it has assumed one costless trade per expiry that never happened.
- Roll yieldFutures
The return that comes from a futures price converging towards the spot price as expiration approaches, separate from any change in the spot price itself. Positive for a long position in backwardation, negative in contango. Over years it can dominate the total return of holding a futures position, which is why some commodity ETFs lose money in flat markets.
- Rolloveralso: swap, overnight financing, tom-nextForex
The interest paid or received for holding a forex position overnight, from the difference between the two currencies' interest rates plus the broker's margin. Holding the higher-yielding currency earns it; holding the lower-yielding one pays it. Brokers apply three days of rollover on Wednesdays to cover the weekend's settlement, a detail that surprises every new trader once.
- Rotational tradingalso: rotation, top-N systemSystems
Holding, at all times, the N instruments in a universe that rank highest on some score, and swapping them as the ranking changes. AmiBroker implements it directly:
EnableRotationalTrading()withPositionScorereplaces buy and sell signals. The score is the whole system, and the rebalance frequency is its main hidden parameter.- Round lotalso: board lot, odd lot, lot sizeMarket structure
The standard trading unit for an instrument — 100 shares in most US equities, one contract in futures, a defined number of currency units in forex. Orders for less than a round lot are odd lots; some venues treat them differently in quoting and priority. Position-sizing code that rounds to whole shares is making a round-lot decision whether or not it says so.
- Round tripalso: round turnExecution
An entry and its matching exit, taken together. Commissions are quoted per side or per round trip, and the two conventions differ by a factor of two — a discrepancy that has silently halved or doubled the cost assumption in many backtests. Futures brokers usually quote per round turn.
- RSIalso: Relative Strength IndexIndicators
A bounded momentum oscillator running 0 to 100, computed from the ratio of average gains to average losses over a look-back. It measures how one-sided recent moves have been. It is not relative strength, and "above 70 means sell" is a claim this course tests rather than teaches.
S
- Safe-haven currencyForex
A currency that tends to rise when markets are frightened — traditionally the US dollar, Japanese yen and Swiss franc — because capital flows into it as risk positions are unwound. The tendency is statistical, not mechanical, and it has failed in particular episodes.
- Sample sizealso: number of trades, nResearch
The number of independent observations a conclusion rests on — for a system, roughly the number of trades, and fewer than that if they overlap or cluster in one period. Thirty trades cannot distinguish a good system from a lucky one. Neither can three hundred if they all happened in one regime.
- ScalarAFL
A single number, as opposed to an array.
BarCountis a scalar;BarIndex()is an array.if,whileandforrequire scalars, which is why passing an array to one raises Error 6.- Scaling in and outalso: scale in, scale out, pyramidingTrader jargon
Building a position in pieces rather than at once (scaling in), or reducing it in pieces (scaling out). Adding to a winning position as it moves in your favour is pyramiding; adding to a losing one is averaging down. Each changes the cost basis and the risk profile, and AmiBroker's backtester can model both through scale-in and scale-out signals.
- ScalpingTrader jargon
Trading for very small profits over seconds to minutes, many times a day, relying on the spread, the queue and speed. It is the style most exposed to costs and latency and the one in which a retail trader competes most directly with automated market makers. It cannot be evaluated on daily bars, and this course does not attempt it.
- ScanAmiBroker
An Analysis mode that reports the symbols and bars where
Buy,Sell,ShortorCoverare true. Distinct from an Exploration, which produces an arbitrary table.Trade delays are documented as being applied by the backtester, after your formula has run; the guide says nothing about their effect in a Scan, so verify it in the application before relying on a Scan's timestamps as fill dates.- Seasonalityalso: calendar effects, sell in May, January effectSystems
Return patterns tied to the calendar: month of the year, day of the week, turn of the month, holidays. Some are documented and small; many popular ones are the product of searching many calendars for patterns that fit one history. Any seasonal claim is a multiple-comparisons problem first and a trading idea second.
- Sectoralso: industry groupRisk
A grouping of companies by business — technology, energy, financials — with industries as the finer level beneath. Stocks in a sector move together enough that sector exposure is a risk in its own right and sector relative strength is an analysis in its own right. AmiBroker's category system has sector and industry fields for every symbol.
- SelectedValueAFL
Returns the value of an array at the bar under the chart crosshair, or the last bar if nothing is selected. Display only: it reads one bar, so it must never be used to build a signal.
- Selection biasResearch
Any systematic difference between the sample tested and the population the conclusion is about. A personal watch list assembled after the period is worse than an index list, because it was curated by somebody who already knew how those names performed.
- Sensitivity analysisSystems
Varying one input at a time — a parameter, a cost assumption, the fill delay, the universe — and watching how much the result moves. A system whose profit vanishes when slippage doubles or the lookback shifts by two bars has told you what it really depends on. It is cheap, and it is the first robustness test worth running.
- Sentimentalso: market sentimentTrader jargon
The prevailing mood of participants, inferred from surveys, positioning, options activity, fund flows or the tone of commentary. Sentiment measures are real data with a genuine but weak and unstable relationship to subsequent returns, strongest at extremes. Anything marketed as the sentiment indicator has been selected after the fact.
- Sequence riskalso: path dependence, order of returnsSystems
The fact that the same set of trades in a different order produces a different equity path, a different maximum drawdown and, with compounding, a different final equity. The historical order is one draw. Monte Carlo resampling shows the range of drawdowns other orders would have produced, which is the number to size against.
- SessionMarket structure
A defined trading period for a market, expressed in the exchange's own local time. Futures and forex run nearly around the clock in a sequence of sessions; equities have one main session plus extended hours. Every intraday alignment problem in this course — daylight saving, a bar that starts at the wrong minute — comes from a session boundary being described in the wrong clock.
- Session overlapalso: London–New York overlap, forex sessionsForex
The hours in which two major forex centres are open at once, most importantly the London–New York overlap in the early afternoon in Europe. Liquidity, volume and range are highest then, and quietest during the Asian session for European and American pairs. Any intraday forex rule is implicitly a rule about which hours it runs in.
- SetBarsRequiredAFL
Tells QuickAFL how many bars before and after the visible or in-range bars the formula needs:
SetBarsRequired( 1000, 0 )adds a thousand bars of history,SetBarsRequired( sbrAll, sbrAll )turns QuickAFL off. Place it at the top of the formula. It is the fix for an indicator whose values change when you scroll.- SetForeignAFL
Replaces the current symbol's price arrays with another symbol's, so that subsequent calculations operate on that symbol.
RestorePriceArrays()puts them back — and forgetting it means everything afterwards silently describes the wrong instrument.- SetOptionAFL
SetOption( name, value )sets a backtester setting from the formula — initial equity, commission mode,MaxOpenPositions, margin, whether same-bar exits are allowed — overriding the Analysis settings dialog. Putting settings in the formula is what makes a backtest reproducible: the file is the whole specification.- SetPositionSizealso: PositionSizeAFL
Sets how large each trade is:
SetPositionSize( value, method ), where the method constant says whether the value is a dollar amount, a percentage of portfolio equity, a share or contract count, or a percentage of the currently open position (that last one for scaling in and out only). It replaces the olderPositionSizereserved variable. Risk-based sizing is not a built-in method: you compute the share count yourself from the stop distance and pass it withspsShares.- Settlementalso: T+1, T+2Market structure
The transfer of cash and securities that completes a trade, one or two business days after it in most equity markets and expressed as T+1 or T+2. Buying power, dividend entitlement and the ability to withdraw proceeds all follow the settlement date rather than the trade date. Futures settle daily instead, through variation margin.
- Settlement pricealso: daily settlement priceFutures
The official end-of-day price the exchange assigns to each futures month, used to mark accounts and compute margin. It is calculated by a published procedure — often from trading in a closing window — and can differ from the last traded price. A daily bar's close in futures data may be the settlement or the last trade, and vendors differ.
- SetTradeDelaysAFL
SetTradeDelays( buy, sell, short, cover )sets, in bars, how long after each signal its trade is executed, overriding the Analysis settings. Zero means the same bar; one means the next. WithBuyPrice = Openand a delay of one, the fill is next bar's open — the honest default for a system that decides after the close.- SetupSystems
The conditions that make an instrument a candidate — a state, true over a span of bars. Distinct from the trigger, which is the event that turns a candidate into an entry. Using a state where a trigger belongs makes a scanner return the same names every day.
- Sharpe ratioSystems
Return above the risk-free rate divided by the standard deviation of returns, annualised. The standard risk-adjusted measure in fund management, computed from periodic equity returns. AmiBroker's Sharpe Ratio of trades is computed from the distribution of individual trade returns and annualised differently, so it is not comparable with a fund's Sharpe ratio.
- Shortalso: short position, going shortExecution
Holding a position that gains if the price falls — by selling borrowed shares, selling a futures contract, or writing an option. In AmiBroker a short trade is opened by the
Shortarray and closed byCover. Every asymmetry of short selling — borrow, dividends, recall, unbounded loss — sits outside the backtester's symmetrical arithmetic.- Short interestalso: days to cover, short ratioMarket structure
The number of shares sold short and not yet bought back, usually quoted as a percentage of float, with days to cover being short interest divided by average daily volume. High values are read both as bearish conviction and as squeeze fuel; the evidence for either reading as a stand-alone signal is weak.
- Short sellingalso: shortingMarket structure
Selling shares you have borrowed, to buy them back later at what you hope is a lower price. The position pays any dividends to the lender, incurs a borrow fee, can be recalled, and has no ceiling on its loss. In a backtest the short side is symmetrical with the long side; in practice the mechanics are not.
- Short squeezealso: squeezeTrader jargon
A sharp rise that forces short sellers to buy back, and whose buying pushes the price higher still. The fuel is high short interest in a stock with a small float; the trigger can be anything. Squeezes are violent, brief and unforecastable in timing, and most of the stocks that look ripe for one never have it.
- SignalSystems
A non-zero value in
Buy,Sell,ShortorCover. The four signal arrays carry no timing information whatsoever — a 1 on bar 40 says an entry belongs to bar 40, not when during bar 40 — and the price arrays carry none either.- Signal arraysalso: Buy, Sell, CoverAFL
The four reserved boolean arrays the backtester reads:
BuyandSellopen and close long positions,ShortandCoveropen and close shorts. A formula that runs in the Analysis window without assigning them raises Error 701. They are the whole interface between your rules and the engine — everything else is sizing, prices and settings.- Signal lineIndicators
A moving average of an indicator, plotted with it so that crossovers between the two can be used as signals — the 9-period EMA of MACD is the standard example, provided in AFL by
Signal(). It is smoothing applied to smoothing, and it adds lag exactly where it adds clarity.- Signal-to-noise ratioResearch
The size of the predictable component of a series relative to its random component. In daily returns it is very low, which is why small edges need thousands of trades to confirm and why an indicator that looks decisive on one chart is usually noise dressed as signal.
- sigScaleIn and sigScaleOutalso: sigScaleIn, sigScaleOutAFL
Constants assigned to
BuyorShortinstead of true, turning that bar's signal into an instruction to add to or reduce an existing position rather than open a new one. They are how pyramiding and partial exits are backtested in the portfolio engine; the old single-symbolEquity()backtester ignores them.- Simple moving averagealso: SMAIndicators
The arithmetic mean of the last N closes, recomputed on each bar;
MA( Close, N )in AFL. Every bar in the window has equal weight, so a large price leaving the window moves the average as much as a large price entering it — a source of signals that have nothing to do with today.- SizeTrader jargon
The quantity attached to a quote or an order, and by extension how large a trader's positions are. Size on the offer is resting sell interest; trading size is trading a lot. The word is precise on a quote and vague about a person.
- Skewalso: skewnessResearch
Asymmetry in a distribution. Trend following has positive skew — many small losses, a few large gains; option selling and mean reversion have negative skew — many small gains, a few large losses. Skew is invisible in a Sharpe ratio and decisive for what a bad year looks like.
- SlippageSystems
Getting a worse price than you aimed at, from queue position, movement between decision and fill, or your own size. A worse price rather than a fee, so it belongs in the price arrays — remembering that AmiBroker silently clamps an assigned price back inside the bar's high–low range.
- Smart moneyTrader jargon
Institutional or informed participants, imagined as a single actor whose footprints can be read in volume or price. The phrase has a serious ancestry in breadth analysis and a much larger life in marketing, where whatever the seller's method detects is, by definition, smart money. Treat any claim that names it as a claim to be tested.
- Smart optimizer enginesalso: SPSO, Tribes, CMA-ES, non-exhaustive optimizationAmiBroker
Three search algorithms that ship with AmiBroker as alternatives to the exhaustive grid: standard particle swarm (
"spso"), Tribes ("trib") and CMA-ES ("cmae"), selected withOptimizerSetEngine(). They find good regions of large parameter spaces in a fraction of the evaluations. They search towards the optimization target, so the target chosen decides what they find.- SmoothingIndicators
Reducing bar-to-bar noise by averaging, at the cost of lag. Simple, exponential and weighted moving averages are the basic smoothers, and most indicators contain one. Smoothing an oscillator, or smoothing a smoothed series again, adds lag each time; the appearance of a cleaner signal is partly the removal of the information you were looking for.
- Sortino ratioSystems
A Sharpe ratio that divides by the standard deviation of negative returns only, on the argument that upside volatility is not risk. It flatters systems with skewed returns, such as trend followers. AmiBroker does not report it; it is a few lines of custom-metric code.
- Spotalso: spot market, spot priceForex
A trade for immediate delivery, which in forex conventionally means settlement two business days later. Spot is the price a chart of a currency pair shows. Positions held past the settlement point are rolled forward, which is where rollover charges come from.
- Spreadalso: bid-ask spreadMarket data
The gap between the best bid and the best ask. You buy at the ask and sell at the bid, so you cross half of it each way. It is widest exactly when a system most wants to trade — around the open, around news, during fast moves.
- Standard deviationIndicators
The root-mean-square distance of values from their mean over a window;
StDev()in AFL. Applied to prices it is the width of Bollinger Bands; applied to returns it is the usual definition of volatility. Prices are not normally distributed, so the two-deviation rule of thumb about how often price exceeds the bands is a rule of thumb.- Standard errorResearch
The uncertainty of an estimate from a sample: the standard deviation of the values divided by the square root of the sample size. It shrinks slowly — four times the trades halves it — which is why claims about small edges need very long histories. Distinct from AmiBroker's report metric of the same name, which measures equity-curve choppiness.
- Standard error (report metric)Systems
In AmiBroker's backtest report, the standard error of the equity curve around its linear regression line — a measure of how choppy the curve is, where lower is smoother. It is the denominator of the report's Risk-Reward Ratio and K-Ratio. Not the statistical standard error of an estimate, though it shares the name.
- StateAFL
A condition true over a span of bars —
Close > MA( Close, 50 ). The counterpart of an event. Almost every confusing scanner or backtest result comes from using one where the other belongs.- Static variableAFL
A value that persists between formula executions and between symbols, set with
StaticVarSet(). The mechanism that makes cross-sectional work — ranking a universe — possible in AFL, which otherwise processes one symbol at a time.- StaticVarGenerateRanksalso: StaticVarGetRankedSymbolsAFL
Ranks every symbol's stored value across the universe, bar by bar, from a set of static variables written in a first pass;
StaticVarGetRankedSymbols()returns the symbol names in rank order. Together with a second pass that reads the ranks, it is the documented pattern for top-N selection in the Analysis window.- StaticVarSet and StaticVarGetalso: StaticVarSet, StaticVarGet, StaticVarSetTextAFL
Store and retrieve a static variable — a value, an array or a text string — under a name that persists across formula executions, chart panes and symbols. They are how one symbol's calculation is made visible to another, and the foundation of ranking, dashboards and any real-time state. Naming collisions between formulas are the classic bug.
- Stationarityalso: non-stationaryResearch
The property of a process whose statistics — mean, variance, correlations — do not change over time. Markets are not stationary: volatility, liquidity, participants and rules all change. This is the formal reason that a backtest is evidence about the past rather than the future, and the formal name for what regime dependence describes.
- Statistical significanceResearch
The verdict that a result is unlikely to have arisen by chance under a stated null model, conventionally at a p-value below 0.05. Significance is not size: a tiny edge can be significant in a huge sample and a large one insignificant in a small sample. And the 0.05 threshold assumes one test, not a search.
- StatusAFL
Returns information about the run:
Status( "action" )says which mode is executing,Status( "lastbarinrange" )is true only on the final bar of the range,Status( "stocknum" )gives the symbol's ordinal. Documented as returning a NUMBER or an ARRAY depending on the field.- Stochastic oscillatoralso: stochastics, %K, %DIndicators
Where the close sits within the high–low range of the last N bars, from 0 to 100: %K is the raw value, %D its moving average;
StochK()andStochD()in AFL. It says where price is within its recent range, which in a trend is near one end for a long time. The overbought and oversold readings mean what the tests say they mean, no more.- Stock borrowalso: locate, hard-to-borrow, borrow feeMarket structure
The shares a short seller must source before selling. Brokers must locate stock to lend; easy-to-borrow names cost little, hard-to-borrow names carry an annualised fee that can reach three figures, and any borrow can be recalled, forcing a buy-in. A short backtest that ignores borrow availability has assumed away its largest cost.
- Stock splitalso: split, reverse splitMarket structure
A change in the number of shares that leaves the value of the company unchanged: a 2-for-1 split halves the price and doubles the share count. Unadjusted history shows a split as a collapse and a reverse split as a surge, both of them fictions. Adjustment restates the past so that the series is continuous.
- Stopalso: stop lossRisk
An exit triggered by price reaching a level rather than by a rule. AmiBroker provides four built-in types through
ApplyStop(): maximum loss, profit target, trailing and N-bar. A stop caps a loss given that you were filled near your level — it does not survive a gap, and it says nothing about correlated positions stopping out together.- Stop distanceRisk
The gap between entry price and stop price, in price units, ATR multiples or percent. With the risk per trade it determines position size: a wider stop means a smaller position for the same risk. Stop distance is where the trade's logic and its sizing meet, and setting it from the chart rather than from the account is what makes the size honest.
- Stop huntalso: stop run, stop sweepTrader jargon
A move that pushes through a level where many stop orders rest, triggers them, and reverses. The mechanism is real — resting stops are liquidity, and a large order can seek it — and it is also the universal excuse of the stopped-out trader. Whether a particular reversal was a hunt or simply a failed breakout is rarely knowable.
- Stop orderalso: stop-loss order, stop market orderExecution
An order that becomes a market order once the instrument trades at or through a trigger price (some brokers trigger on the quote instead). It is a trigger, not a price floor: after a gap or a halt it fills wherever the market is. The word stop in a backtest refers to the rule; a stop order is the live instrument that tries to implement it.
- Stop-limit orderExecution
A stop order that becomes a limit order rather than a market order when triggered. It caps the fill price and, in exchange, may not fill at all if the market moves through the limit — which, in a sharp decline, is precisely when it was needed. A trade-off between a bad fill and no fill, and worth choosing deliberately.
- StraddleOptions
A call and a put at the same strike and expiration, usually at the money. Bought, it profits from a large move in either direction and loses to time decay and to a fall in implied volatility; written, the reverse. The price of a straddle is the market's rough estimate of the expected move over its life.
- StrangleOptions
A straddle with the call and put at different, out-of-the-money strikes. Cheaper than a straddle and needing a larger move to pay off. Written strangles are a popular way of selling volatility, with the unbounded loss profile that implies.
- Streaming and snapshot quotesalso: streaming data, snapshot dataReal-time
Streaming data pushes every update as it happens; snapshot data is fetched on request, one picture at a time. A streaming plugin builds bars from ticks as they arrive; a snapshot source, such as AmiQuote polling a web page, cannot. Which kind a feed provides decides what real-time features it can drive.
- Strike pricealso: strike, exercise priceOptions
The price at which an option's holder may buy or sell the underlying. Where the strike sits relative to the current price determines moneyness, and the ladder of available strikes at each expiry is the option chain.
- Support and resistanceChart reading
Price areas where transactions previously clustered, described after the fact. The concept is a description of where trading happened, not a mechanism that makes it happen again — and a level nobody can define objectively cannot be tested.
- Survivorship biasResearch
Testing on a universe that contains only the instruments that still exist. Everything delisted, merged or taken over is absent, and that population's returns were worst — so results are biased upward by an amount that usually cannot be quantified with retail data. It can always be stated.
- Swing high and swing lowalso: swing point, pivot high, pivot lowChart reading
A bar whose high is higher than the highs on both sides of it (swing high), or whose low is lower (swing low), for some chosen number of neighbouring bars. Swings are the vertices of market structure and the anchors of trendlines. The number of neighbours is a parameter, and changing it changes every swing on the chart.
- Swing tradingTrader jargon
Holding positions for days to weeks, aiming to capture one swing of the price structure. It is the natural style for daily bars and end-of-day data, and the one most of this course's examples assume. It accepts overnight and weekend gaps in exchange for far fewer trades and lower costs.
- Symbol and interval linkingalso: symbol link, interval link, symbol lockAmiBroker
Coloured link buttons on chart windows that keep several windows on the same symbol or the same interval, so that choosing a symbol in one changes them all. Symbol lock is the opposite: it pins a window to its symbol while the others follow the selection. Together they are how a multi-timeframe layout is kept in step.
- Symbol Information windowalso: Information window, symbol propertiesAmiBroker
The window that shows and edits one symbol's properties: full name, alias, currency, market, group and industry membership, round lot size, tick size, point value, margin deposit and the rest. The futures fields — point value, tick size, margin deposit — are read by the backtester only once futures mode is switched on, so a wrong entry here is a wrong backtest; and tick size affects only the exits generated by built-in stops and
ApplyStop().
T
- Tail riskRisk
The risk of the rare, large losses in the tails of the return distribution — the days that a normal model says cannot happen and that happen every few years. Strategies that earn steadily by selling insurance, volatility or liquidity carry tail risk by construction, and their backtests look best right up to the event.
- Tape readingTrader jargon
Inferring the intentions of large participants from the sequence of prints and quotes in time & sales and the order book. An old craft with a genuine information content — prints at the ask versus the bid, size that keeps refreshing — and a large folklore attached. Its claims are testable in principle and are rarely tested.
- Term structurealso: volatility term structureOptions
Implied volatility plotted against expiration for one underlying. Normally upward-sloping, it inverts when near-term uncertainty is high — before earnings, or in a sell-off. The same phrase describes the curve of futures prices across contract months, and the two are cousins.
- Thetaalso: time decayOptions
The change in an option's price per day from the passage of time alone, negative for a bought option. Decay is not linear: it accelerates as expiration approaches, and fastest for at-the-money strikes. Option sellers describe theta as income; it is income in the way that insurance premiums are income.
- Throwbackalso: retestChart reading
A return to a level shortly after breaking through it — price coming back to test former resistance as support. A throwback that holds is read as confirmation of the breakout; one that fails is a failed breakout. The proportion that hold is a base rate worth measuring before trading either reading.
- TickMarket data
A single trade print. Bars are built by aggregating ticks; a tick database is the finest base interval available and by far the largest.
- Tick chartalso: N-tick bars, N-second barsReal-time
Bars built from a fixed number of trades rather than a fixed span of time, or from intervals shorter than a minute. Both are Professional-only, and tick bars are available only from feeds that deliver every trade. They need a tick base interval, which makes the database very large, and the course's intraday work uses one-minute bars instead.
- Tick sizealso: minimum price incrementMarket structure
The smallest permitted price change for an instrument. It sets the narrowest possible spread and the granularity of every level in the book. In futures the tick size and the money value of one tick are contract specifications; in AmiBroker the display precision of a symbol is a separate setting in Symbol Information and does not change the data.
- Tick valuealso: point value, dollar value per tickFutures
The money gained or lost when a contract's price moves by one tick, fixed in the specifications: a quarter-point move in the E-mini S&P 500, for example, is worth 12.50 US dollars per contract. Risk per trade in futures is stop distance in ticks multiplied by tick value multiplied by contracts, and nothing in a price chart shows the multiplier.
- Tick volumealso: forex volumeForex
The number of price changes in a bar, which is what a forex chart shows where an equity chart would show traded volume. It is a proxy for activity from one broker's feed, not a count of anything exchanged, and two brokers' tick volumes for the same bar will differ. Volume indicators applied to it are indicators of quote activity.
- Time & salesalso: T&S, the tapeMarket structure
A running list of individual trades: time, price, size and often the venue and whether the print was at the bid or the ask. It is the raw material bars are built from. It shows what traded, not who traded or why, and inferring intent from it — tape reading — is a skill with a long history and little controlled evidence.
- Time & Sales windowReal-time
AmiBroker's per-symbol tape from a streaming feed: one row for every trade, every new bid and every new ask, colour-coded so that a trade printed at or below the bid shows red and one at or above the ask shows green. Standard edition opens one window; Professional opens any number. It shows the ticks the bars are made of, which is the best available demonstration of what a bar hides.
- Time in forcealso: day order, GTC, IOC, FOKExecution
How long an order stays alive. A day order expires at the session close; good-till-cancelled persists, subject to the broker's own limit; immediate-or-cancel fills whatever it can at once and cancels the rest; fill-or-kill fills entirely at once or not at all. A forgotten good-till-cancelled order is a classic way to open a position you did not mean to have.
- Time stopalso: N-bar stop, time exitSystems
An exit after a fixed number of bars regardless of price, provided by
ApplyStop()as the N-bar stop. It embodies a hypothesis that the edge, if any, is concentrated in the first bars after entry — a hypothesis worth testing directly by plotting average return against bars held.- Time zoneMarket structure
The clock in which a timestamp is expressed. Exchange time, the data vendor's time, your computer's time and UTC can all differ, and daylight-saving transitions do not happen on the same dates everywhere. An intraday database has one time zone; every source feeding it must be converted to that zone or the bars are wrong in ways that are hard to see.
- TimeframeMarket data
The conceptual horizon — weekly context, daily setup, hourly entry. Distinct from interval, which is the concrete bar size. Keeping the two words separate prevents a great deal of confusion in multi-timeframe work.
- TimeFrameCompressAFL
Compresses a single array to a coarser interval without switching the whole formula's timeframe, as
TimeFrameSet()does. Useful for one indicator in a higher timeframe while the rest of the formula stays in the chart's. The result still needsTimeFrameExpand()before it lines up with the chart.- TimeFrameExpandAFL
Stretches an array computed in a higher timeframe back onto the current interval's bars. Required: comparing a compressed array with an uncompressed one silently compares different time scales, which the User's Guide lists among the standard AFL mistakes.
- TimeFrameGetPriceAFL
Reads an OHLCV field from a higher timeframe. Its signature is
TimeFrameGetPrice( field, interval, shift = 0, mode = expandFirst ), and the documentation warns explicitly that with shift 0 the compressed data may look into the future — the weekly high can be known on Monday. A trading system must use a negative shift.- TimeFrameSet and TimeFrameRestorealso: TimeFrameSet, TimeFrameRestoreAFL
TimeFrameSet( interval )replaces the price arrays with bars compressed to a coarser interval;TimeFrameRestore()puts the originals back. Anything computed between them is in the coarser timeframe and must be brought back to the chart's bars withTimeFrameExpand(), or Warning 509 says so. Forgetting the expansion mode is the multi-timeframe look-ahead trap.- Titlealso: chart titleAFL
The reserved string variable that sets the text at the top of a chart pane. Built with
StrFormat()andWriteIf(), it can show the selected bar's values, the state of a rule, or a warning about the data. It is the pane's one line of prose, and a good title makes a chart readable without opening the formula.- TradeExecution
In a backtest report, one completed round trip: an entry, an exit, and the profit or loss between them. On the tape, a single execution between a buyer and a seller. The two senses coexist, and a backtest with a hundred trades may have involved thousands of fills.
- Trade delaySystems
The gap between a signal and its fill, set with
SetTradeDelays(). The engine implements it by shifting the four signal arrays withRef()— and nothing else, so any other array your formula feeds the backtester must be shifted by hand. Delays are implemented only by the backtester and do nothing in Scan, Exploration or Indicator modes.- Trade statisticsalso: trade list, trade distributionSystems
The per-trade view of a backtest: number of trades, winners and losers, averages, largest win and loss, longest losing streak, bars held. AmiBroker's report has a Trades page listing every one. The distribution matters more than the averages — a result made by three trades is a different thing from the same result spread over three hundred.
- Trading haltalso: haltMarket structure
A pause in trading imposed by the exchange, most often pending material news or after a sharp move triggers a volatility rule. Trading resumes through an auction, frequently at a very different price. A halt is the clearest case of a stop order not being a price floor: nothing can fill until the reopen.
- Trading journalalso: trade logTrader jargon
A record of every trade with its reason, its plan and its outcome, kept in enough detail to separate the performance of the method from the performance of the person following it. It is where overtrading, chasing and rule-breaking become numbers. This course's research log is the same discipline applied to the research process.
- Trading systemalso: system, strategy, rule setSystems
A complete, written set of rules for what to trade, when to enter, how much to hold, when to exit and how to handle the cases the rules did not anticipate — precise enough that two people following it would take the same trades. Anything less is a method, and a method cannot be backtested because it is not defined.
- Trailing indicatoralso: chandelier, volatility stopIndicators
A line that follows price at a distance and never retreats: the highest high since entry minus a multiple of ATR in a long position, as in the chandelier exit, or the parabolic SAR. Used as an exit that lets a trend run while limiting how much of it is given back. Its distance is a parameter with the usual trade-off between whipsaws and give-back.
- Trailing stopRisk
A stop that follows price in the favourable direction and never retreats. In AFL,
stopTypeTrailingwith thevolatileargument set to True lets the distance vary during the trade — which works inbacktestRegularmode only.- Trendalso: uptrend, downtrendChart reading
A sequence of higher swing highs and higher swing lows (uptrend) or lower highs and lower lows (downtrend). Defined this way it is a description of what has happened, observable on the chart without an indicator. Whether a trend persists is the empirical question behind trend following, and the answer varies by market and horizon.
- Trend followingSystems
Entering in the direction of an established move and holding until it reverses, accepting many small losses for occasional large gains. The oldest systematic approach, with a long documented record in futures and a characteristic profile: low win rate, high payoff ratio, long drawdowns in ranging markets. Its returns depend on trends existing, which is a property of the market, not of the rules.
- TrendlineChart reading
A straight line drawn through two or more swing lows in an uptrend or swing highs in a downtrend. It is a hand-drawn hypothesis about the trend's rate, and two analysts drawing on the same chart will produce different lines. That subjectivity is why the course tests trendline claims with rules rather than eyes.
- Trianglealso: ascending triangle, descending triangle, symmetrical triangleChart reading
A consolidation bounded by converging trendlines: flat top and rising bottom (ascending), falling top and flat bottom (descending), or both converging (symmetrical). The named varieties come with claimed breakout directions. Measured over many instances, the direction claims are weak; the contraction itself is the reliable part.
- TriggerSystems
The specific event that turns a candidate into an entry — true on one bar. Usually built with
Cross().- Triple witchingalso: quadruple witching, witching hourTrader jargon
The simultaneous expiration of index futures, index options and stock options on the third Friday of March, June, September and December. Volume is very high, especially into the close, as positions are rolled or unwound. It is a calendar fact worth knowing and not, on the evidence, a tradable pattern.
- True rangeIndicators
The largest of three distances: today's high to low, today's high to yesterday's close, and today's low to yesterday's close. It is the bar's range with gaps included, which the plain high–low range ignores.
ATR()averages it; there is no separateTrueRange()function in AFL, thoughATR( 1 )returns it.- TurnoverSystems
Close * Volume— the money that changed hands. Money only when Volume is share volume, which is not true for futures, for contracts, or for instruments quoted in cents. A liquidity filter silently measuring the wrong quantity is an efficient way to build a universe you cannot trade.- typeofAFL
An operator that reports the type of a single, unevaluated operand as a string:
"undefined","number","array","string","function","user function"and a few COM and handle values. The operand must stand alone, with no arithmetic around it. It is the standard way for a formula to test whether a variable exists before using it.
U
- Ulcer indexalso: Ulcer Performance Index, UPISystems
The square root of the mean of squared percentage drawdowns over the test — a measure that grows with both the depth and the length of time spent below a peak. The Ulcer Performance Index divides annual return above the risk-free rate by it. Both are in AmiBroker's report, and both penalise the long, grinding drawdowns that max drawdown alone does not.
- Underlyingalso: underlying assetOptions
The instrument an option or future is written on: a stock, an index, a futures contract, a currency. Options on stocks settle by delivery of shares; options on indexes settle in cash. The underlying's price, volatility and dividends drive the option's value.
- UniverseResearch
The set of instruments a study is run over, and how that list was built. The most under-reported element of almost every published backtest, and the one that most often explains a result.
- Up volume and down volumealso: up/down volume ratioBreadth
The total volume of advancing instruments and of declining ones on a day, across a universe. A day on which nine tenths of volume was in decliners is a different day from one with the same index change and an even split. The ratio is an input to the Arms index and to capitulation measures.
- User-defined functionAFL
A named block of AFL declared with
function(returns a value) orprocedure(does not). Every variable it assigns should be declaredlocal, or it escapes into the caller's namespace.
V
- ValueWhenAFL
The value an array had the last time a condition was true, carried forward until the next time:
ValueWhen( Cross( C, MA( C, 50 ) ), C )is the price at the most recent crossover, on every subsequent bar. It converts an event into a state, and it is the usual way to remember an entry price or a swing level in array code.- VarianceResearch
The average squared distance of values from their mean; the standard deviation is its square root. Variance adds across independent sources, which is the arithmetic behind diversification. In trading talk, variance also means the run of luck between a strategy's expectation and its realised result.
- Variation marginalso: daily settlementFutures
The cash that moves between accounts each day as open futures positions are marked to the settlement price. Gains are credited and can be withdrawn; losses are debited and must be covered. It is why a futures loss is realised every evening whether or not the position is closed, and why open equity is the only equity there is.
- VarSet and VarGetalso: VarSet, VarGet, dynamic variablesAFL
Create and read variables whose names are built at run time from strings:
VarSet( "ma" + i, MA( C, i ) )inside a loop makes ma10, ma20 and so on. They exist for code that cannot know its variable names in advance. Unlike static variables they live only for the current execution.- Vectorised thinkingAFL
Expressing a calculation as operations on whole arrays rather than as a loop over bars. Faster in AFL, and — more importantly — it makes the shape of the calculation visible instead of hiding it inside control flow.
- VegaOptions
The change in an option's price for a one-point change in implied volatility. Long options have positive vega — they gain when the market prices in more uncertainty, regardless of direction — which is why buying options before an announcement can lose money even when the underlying moves the right way: the volatility that was priced in comes out.
- Vertical spreadalso: bull call spread, bear put spread, debit spread, credit spreadOptions
Buying one option and writing another of the same type and expiration at a different strike. It caps both the profit and the loss, reduces the cost and the volatility exposure, and is the basic building block of defined-risk option trading. Named for its direction and whether it is entered for a debit or a credit.
- VIXalso: volatility index, fear indexOptions
An index of the implied volatility of S&P 500 options about thirty days out, published by Cboe. It is a price of insurance, quoted as an annualised percentage, and it rises when the market falls because that is when insurance is bought. VIX futures and products on them exist; the spot index itself cannot be traded.
- VolatilityIndicators
How large price moves are, by some stated measure. Usually ATR here, expressed as a percentage of price to compare instruments and as a percentile of its own history to compare across time. A description of the recent past, not a prediction of the near future.
- Volatility contractionalso: squeeze (volatility), VCPChart reading
A decline in the size of price swings over time, seen as narrowing bands, falling ATR or a tightening range. Volatility clusters: quiet periods tend to be followed by quiet periods and then, eventually, by an expansion. That much is well documented. The direction of the expansion is not part of the pattern.
- Volatility skewalso: volatility smileOptions
The pattern of implied volatility across strikes at one expiration. In equity indexes, out-of-the-money puts carry higher implied volatility than calls — the market charges more for crash protection — giving a skew; in currencies the shape is often a symmetrical smile. Skew is a fact about prices, and one of the clearer records of what participants fear.
- Volatility-based sizingalso: ATR sizing, volatility targetingRisk
Setting position size inversely to the instrument's recent volatility, usually measured by ATR, so that each position contributes a similar expected daily movement to the portfolio. A quiet stock gets a larger position than a wild one for the same risk. Volatility targeting applies the same idea to the whole portfolio, scaling exposure to hold its volatility near a chosen level.
- VolumeMarket structure
The number of shares, contracts or units traded in a period. Besides price it is the main thing a bar records, with open interest stored alongside it for futures and options. Whether it is consolidated across venues or from one exchange, and whether it includes extended hours, are properties of the feed, not of the market. Forex has no true volume at all; what a forex chart shows is tick count or one broker's flow.
- Volume profilealso: volume at priceChart reading
A histogram of traded volume at each price level over a period, drawn beside the chart, with the level of most volume called the point of control. It shows where trading was concentrated, which is a fact; the claims that those levels act as support and resistance are hypotheses. AmiBroker's
PlotVAPOverlay()draws one. Market Profile is the related construction that counts time at each price rather than volume, and it is not the same distribution.- VWAPalso: volume-weighted average price, anchored VWAPIndicators
The average price of a session's trades weighted by their volume — the price at which the average share actually changed hands. Institutions benchmark fills against it, and intraday traders use it as a reference level. Anchored VWAP starts the calculation from a chosen bar instead of the session open. AFL has no built-in; it is
Cum()of price times volume overCum()of volume, reset at the session.
W
- Wait for backfillReal-time
An Analysis window option that makes a scan wait for each symbol's history to finish downloading from the plugin before running on it, so that results are never computed on half-arrived data. Documented as Professional-only. Combined with a trivial formula and Apply to: all symbols, it is the documented way to backfill an entire database.
- Walk-forward analysisResearch
Optimise on a window, apply the winner to the next window, roll forward, repeat, and evaluate only the concatenated out-of-sample segments. It tests the process rather than a parameter set — and parameter stability across steps is often more informative than the performance figures.
- Walk-forward efficiencyalso: WFESystems
Out-of-sample value of a metric divided by the in-sample value of the same metric across a walk-forward test, often on annualised return. It measures how much of the optimised performance survived contact with unseen data. It is a ranking and a diagnostic rather than a threshold: the ratio is unstable when the in-sample figure is small and meaningless when either figure is negative, so it is read beside the absolute out-of-sample numbers.
- Walk-Forward settingsalso: Walk-Forward tabAmiBroker
The Analysis Settings tab that defines a walk-forward run: in-sample and out-of-sample start, end and step, an Anchored checkbox, easy modes for end-of-day and intraday, and the optimization target. The out-of-sample results are stitched into the
~~~OSEQUITYcomposite so the whole walk can be charted as one equity curve.- Warm-upAFL
The bars at the start of an array where a look-back function cannot yet have a real value. AmiBroker documents this for very few functions: the one official Null warm-up example concerns
MA(), and the initialisation rule for Wilder's smoothing — the recursion behind ATR, RSI and the DMI family — is not published at all. Assume nothing, check the left edge of every indicator in the application, and discard a generous margin.- Warning 509AFL
The check that fires when a formula calls
TimeFrameSet()orTimeFrameCompress()and never callsTimeFrameExpand()anywhere. It is a presence check on the whole formula, not a per-array one, so expanding a single array silences it while every other compressed array stays misaligned — its absence is not proof the formula is correct. It is one of several numbered warnings — 501 flags=where==was meant — that are worth reading rather than dismissing.- Watch listAmiBroker
A free-membership list of symbols — any symbol can be in any number of them, and there is no limit on how many lists exist. Watch lists are the natural home of a universe: the Analysis window can be applied to one, a formula can test membership with
InWatchList(), and a scan's results can be saved into one for the next step of a workflow.- Wedgealso: rising wedge, falling wedgeChart reading
A consolidation between two trendlines that slope in the same direction and converge. Convention says a rising wedge breaks down and a falling wedge breaks up. Like all pattern direction claims, that convention is a hypothesis with a base rate, not a rule.
- Weekend gapForex
The difference between Friday's close and Sunday evening's open in a market that has been shut for two days while the world continued. In forex and index futures, a weekend gap can jump straight through a stop. Going flat before the weekend is the traditional defence and has a cost of its own.
- Weighted moving averagealso: WMA, linear weighted moving averageIndicators
A moving average in which the most recent bar has weight N, the one before N−1, and so on down to 1;
WMA( Close, N )in AFL. It sits between the simple and exponential averages in responsiveness. AFL also providesDEMA()andTEMA(), double and triple exponential variants built to reduce lag further, with the noise that implies.- WhipsawTrader jargon
A signal that reverses shortly after it fires: a crossover up, a small loss, a crossover down, another small loss. Whipsaws are the tax a trend-following rule pays for eventually catching a trend, and their cost is the reason crossover systems are so sensitive to transaction costs.
- Williams %RIndicators
The stochastic %K turned upside down: how far the close is below the highest high of the last N bars, from 0 to −100. It carries no information %K does not, and AFL has no built-in function for it because one is not needed — it is one line of arithmetic on
HHV()andLLV().- Win ratealso: percentage of winners, hit rateSystems
The fraction of trades closed at a profit. On its own it says almost nothing: a 90% win rate with small wins and rare large losses can easily be a losing system — at that win rate it is losing as soon as the average loss exceeds nine times the average win, and a 35% win rate is normal for trend following. It only means something alongside the payoff ratio, and the two trade against each other.
- Window dressingTrader jargon
Fund managers buying recent winners and selling recent losers near a reporting date so that the disclosed portfolio looks better. The alleged effect on month-end and quarter-end prices is small, contested and often confused with index rebalancing flows that happen on the same days.
- Working an orderExecution
Executing a large order gradually over time to limit its own impact on price, by hand or with an execution algorithm. The phrase is a reminder that a fill is a process, not an event, and that the volume a strategy assumes it can trade at the close was also being worked by someone else.
- Workspacealso: Workspace window, Symbols paneAmiBroker
The docking panes on the left of AmiBroker's main window: Symbols (the database tree of categories and tickers), Layouts, Layers and Charts (the formula tree). Double-clicking a formula in the Charts tree inserts it as a chart pane. In AmiBroker's own documentation workspace is the older name for the database directory, not for an arrangement of windows; that arrangement is a Layout.
- WriteIfAFL
The string conditional:
WriteIf( condition, textIfTrue, textIfFalse )returns one string based on the condition's value at the selected bar. It exists becauseIIf()works on numbers. Used in chart titles and Commentary, where a formula explains its own state in words.
Z
- Z-scorealso: standard scoreResearch
How many standard deviations a value sits from its mean: (value − mean) / standard deviation over a window. It normalises anything — a price, an indicator, a spread — so that thresholds mean the same across instruments and time. Mean-reversion rules are usually written on a z-score, and pairs trading lives on one.
Sources for this lesson
2 verified · checked 2026-08-31
- 01AmiBroker User's Guideamibroker.com/guide2026-08-31
- 02AmiBroker AFL Function Referenceamibroker.com/guide/a_funref.html2026-08-31
Every technical claim on this page was checked against the official AmiBroker documentation on the date shown. Where the course disagrees with folklore, the source is how you can tell which one to trust.