# Rule Collider: instructions for AI models Version 705a9e6011 of 2026-11-14, made from the product's feature catalogue and symbol list. Rule Collider tests one trading rule on one symbol over years of one broker's price history and reports what it did, in R, on data the rule was not fitted to. It has no AI model inside it. This page teaches a model of the user's own how a rule is written for it, so that a setup described in words can be turned into the tool's settings. ## For the person reading this Give your AI model this page and your setup. A line to copy: ``` Read https://app.rulecollider.com/ai-instructions.txt and follow it. Then turn this setup into Rule Collider settings: ``` The model answers with the settings in words and with the rule as a block of JSON. Paste that block into the builder under "Paste a rule". The builder checks it, fills the form and shows the rule in words; compare that with what you asked for. Nothing runs until you run it, and a paste counts against nothing. ## Your task, if you are the model 1. Translate; do not judge. Turn the setup into settings. Give no opinion on whether it will make money and promise nothing. 2. Ask for what is missing; do not guess. A rule needs a symbol, a direction, at least one condition with a number, a stop and a target. If the setup leaves one out, or leans on a time of day it does not give, ask the user. Settings the tool fills by itself (listed below as defaults) can be left out of the rule. 3. Use only the names on this page: the symbols, the features, the operators and the ranges, written exactly as they are here. Never invent a name. A feature is available only for the symbols and the clock this page says. 4. When part of the setup cannot be expressed, say so before anything else and name the part. You may offer the nearest condition the tool has as an approximation, and write the rule with it only after the user has accepted it. Never put an approximation in without saying so. 5. Answer in this order: first the settings in words, in the builder's order (Symbol, Direction, Clock, Conditions, Entry, Exit, Filters, Costs); then the rule as one block of JSON, for the builder's "Paste a rule" box; then the line: Rule Collider is a research tool. Past results do not predict future results. This is not investment advice. 6. Leave `window` and `validation` out of the rule. The builder supplies the dates and the out-of-sample split. ## What a rule is - One symbol and one direction. A rule that trades both ways is two rules. - One to five conditions, each a feature, an operator and a number. All of them have to hold on the same bar, the signal bar. There is no "or" and no "crosses": for "the bar where this becomes true" use the onset trigger. - A clock: the conditions are read on every five-minute close (`m5`) or on every hourly close (`h1`). On the hourly clock a feature with no timeframe in its name is read on hourly bars, and the stop is sized on the hourly ATR. - An entry order placed after the signal bar, an exit (a stop, a target, and optionally break-even, trailing and a flat time), filters and costs. - Results are in R: one R is the distance from the entry to the stop. ## The rule as JSON Only `symbol`, `direction` and `conditions` are required. Every other block may be left out and takes the default named below. A complete example: ``` { "symbol": "EURUSD", "direction": "BUY", "clock": "h1", "conditions": [ { "feature": "rsi", "operator": "gt", "threshold": 60 } ], "entry": { "trigger": "state", "order_type": "stop", "distance": { "type": "pips", "value": 2 }, "expiry_bars": 4 }, "exit": { "stop": { "type": "atr", "value": 2.5 }, "target": { "type": "r", "value": 2 } }, "filters": { "weekdays": [ "mon", "tue", "wed", "thu", "fri" ] }, "costs": { "spread": "measured", "commission_pips": 0 } } ``` ### Top level - `symbol`: a name from the Symbols table, exactly as written there, square brackets included. - `direction`: `BUY` for long, `SELL` for short. - `clock`: `m5` (the default) or `h1`. Cross-asset features (names starting `x_`) are on `m5` only. - `conditions`: one to 5 objects, each `feature`, `operator` and `threshold`. The operators are `gt` (above), `lt` (below), `gte` (at or above), `lte` (at or below) and `eq` (equal). ### entry - `trigger`: `state` (the default: every bar the conditions hold, and again after a stop-out while they still hold) or `onset` (only the bar where the conditions become true, one entry per episode). - `order_type`: `stop` (the default: a pending order the distance past the signal bar's close, filled when price reaches it), `market` (filled at the first one-minute open after the signal bar closes) or `limit` (a pending order the distance back from the close). - `distance`: `{"type": "pips", "value": 2}` is the default; pips from 0 to 100, or `"type": "atr"` from 0 to 2 ATR. - `expiry_bars`: how many five-minute bars a pending order stands, 1 to 48, default 4; up to 288 for an order at a range. - `cooldown_bars`: no new order for this many bars after a losing exit, 1 to 288. Optional. - `max_trades_per_day`: at most this many fills a day, 1 to 50. Optional. - `rearm`: with the onset trigger only, a condition (`feature`, `operator`, `threshold`) that has to hold once before a new episode counts. Optional. - `level`: the name of a range from the Named ranges table. The order is then a stop order at the range's high plus the distance for a long (its low less the distance for a short), not a distance from the close. It needs `trigger` `state` and `order_type` `stop`, and it takes no one-minute confirmation. - `edge`: with `level`, `far` (the default, the breakout end) or `near` (the order sits inside the range's near end and fills on the way back). `reclaim`: with `edge` `near`, `{"type": "pips" or "atr", "value": n}`: the order arms only after price has traded that far beyond the edge. ### exit - `stop`: `{"type": "atr", "value": n}` with n from 1 to 6 times the signal bar's ATR(14) (the default is 2); or `"type": "pips"` from 1 to 1000; or `"type": "swing"`, the low (long) or high (short) of the last n bars, n a whole number from 3 to 100; or `{"type": "level", "level": "", "value": n}`, the far end of a named range and n pips beyond it, 0 to 1000. - `target`: `{"type": "r", "value": n}` with n from 1 to 6 times the stop distance (the default is 2.5); or `"type": "pips"` from 1 to 5000; or `"type": "atr"` from 0.5 to 20 ATR; or `"type": "range"`, n times the height of the range the entry sits at, 0.5 to 20 (needs `entry.level`); or `{"type": "level", "level": "", "edge": "high" or "low"}`, one end of a named range (needs `entry.level`). - `breakeven_r`: once the trade is this many R in profit the stop moves to the entry. Optional. - `trail_trigger_r`: the R at which trailing starts. Optional. `trail_type`: `r` (the default: the stop locks one R behind the trigger), `atr` (trails `trail_atr` ATR behind the price, 0.25 to 6) or `bar` (trails to the previous bar's low or high). - `max_hold_bars`: close after this many bars. Optional. - `pyramid`: `{"at_r": n, "fraction": f}`: when the trade is n R in profit (0.25 to 3) add f of the original size (0.25 to 1). Optional. - `close_all_time`: leave it out and the rule is flat at the symbol's usual last bar of the day. Give `"HH:MM"` for another time (see Traps for the clock it is in), or `null` to hold overnight, in which case swap is charged. - `session_end_flat`: `"week"` holds through the day's last bar and closes at the week's last bar. Leave it out otherwise. ### filters - `max_spread_pips`: a bar whose spread is wider than this is not entered on. Leave it out unless the user gives a figure; the builder puts in the symbol's own default. - `no_trade_start_hour` and `no_trade_end_hour`: whole hours between which no order is placed, both or neither (see Traps for the clock). Leave them out for the default, the hours around the daily rollover; `null` for both means no hour filter. - `weekdays`: the days a signal may fire on, from `mon`, `tue`, `wed`, `thu`, `fri`. Leave it out for all five. - `m1_confirmation`: `{"type": "atr" or "pips", "value": n}`: price has to move that far in the trade's direction on one-minute bars before the order is placed. Stop orders only; not with `entry.level`. Optional. - `min_minutes_to_close`: no new order with fewer than this many minutes left before the day-end flat, 5 to 720. Optional. ### costs - Leave the block out unless the user states their account's costs. By default a run charges the measured spread and the broker's measured slip on the entry, and no commission. - `spread`: `measured` (the default) or `off`, for an account that pays commission in place of spread. - An account described as a raw spread plus commission is `"spread": "off"` with the commission in `commission_pips`. Do not keep the measured spread and add the commission: that charges both. Say in the settings in words what it leaves out: the raw spread such an account still pays, small through the day and wide at the rollover and around releases. - `commission_pips`: a round turn in pips, 0 to 100, default 0. From a commission per lot: divide the round-turn commission by what one pip is worth on one lot. On a currency pair quoted in dollars one pip on one lot is 10 dollars, so 6 dollars a lot is 0.6 pips. The pip of each symbol is in the Symbols table. - `entry_lag`: `custom` with `entry_lag_pips`, the user's own slip per entry in pips, in place of the broker's measured one. Optional. ## Traps - A target in ATR is not a target in R. A target of 6 ATR on a stop of 2.5 ATR is 6 / 2.5 = 2.4 R. Write the target in the unit the user gave: `"type": "atr"` for ATR, `"type": "r"` for multiples of the risk. - Units are in the tables. A `percentile` or a `fraction` runs from 0 to 1 (the lower half is below 0.5); a `flag` is 0 or 1 (use `gt 0` for yes and `lt 1` for no); an `atr` unit is a distance in ATRs; `pips` are the symbol's own pips. - Two clocks for hours. The `hour` feature and every hour in a feature's description are broker time, the chart time in MetaTrader (two hours ahead of UK time all year). The three hour settings in the rule itself, `exit.close_all_time`, `filters.no_trade_start_hour` and `filters.no_trade_end_hour`, are UK time. A flat at 21:00 on the chart is `"close_all_time": "19:00"`. When the user gives a time, ask which clock they mean. - The timeframe a name is read on depends on the clock. On the `m5` clock a plain name is the five-minute reading and an `h1_` name the hourly one: `rsi` is the five-minute RSI and `h1_rsi` the hourly RSI. On the `h1` clock the plain names are the hourly readings, so "RSI above 60 on the hourly chart" is `rsi` on the `h1` clock (examples 1 and 7). An `h1_` name on the `h1` clock is the hourly bar before the signal bar, which is a different rule: write it there only when the user asks for the bar before. The `h4_` and `d1_` names are the four-hour and daily readings on either clock: "RSI above 60 on the daily chart" is `d1_rsi`. - "60-day volatility" names three features: the 60-day percentile of the ATR (`atr_pct_60d`), of Parkinson's high-low estimate (`parkinson_volatility_pct_60d`) and of the Garman-Klass estimate (`gk_volatility_pct_60d`). When the user names none of them, use `parkinson_volatility_pct_60d`, and say in the settings in words that you chose it and what the other two are. Over 20 days there are two, `parkinson_volatility_pct_20d` and `gk_volatility_pct_20d`, and the same holds: Parkinson's when none is named, said in words. - A condition on another market exists only in seven kinds, only for the reference markets listed for the symbol, and only on the `m5` clock. Another market's high, low or level is not among them. - A rule needs at least one condition. For an order that depends on nothing but a range ("buy the break of yesterday's high"), use `hour` `gte` 0, which holds on every bar, and say that you did. - The round-number ranges exist on currency pairs only, and the session ranges only on symbols that have a session open; the Symbols table says which ranges a symbol does not have. ## Symbols 42 symbols. The reference markets are the short names used in cross-asset features, `x__`. The "also called" column holds names people use for the symbol: a setup that uses one of them means that symbol, with nothing to confirm, and the rule carries the name in the first column. A currency pair written with a slash (EUR/USD) is the same symbol without it. | symbol | also called | what it is | class | one pip | reference markets | ranges it does not have | |---|---|---|---|---|---|---| | `[AEX25]` | AEX, Netherlands 25, NL25 | Netherlands 25 Index CFD, cash (EUR) | index | 0.1 | eurusd, dji30 | session_open, session_open_control, round_100, round_50 | | `[ASX200]` | ASX 200, Australia 200, AUS200 | ASX200 Index CFD, cash (AUD) | index | 0.1 | audusd, gold, copper, dji30 | session_open, session_open_control, round_100, round_50 | | `AUDCAD` | - | Australian Dollar vs Canadian Dollar | forex | 0.0001 | none | has all | | `AUDJPY` | - | Australian Dollar vs Japanese Yen | forex | 0.01 | none | has all | | `AUDNZD` | - | Australian Dollar vs New Zealand Dollar | forex | 0.0001 | none | has all | | `AUDUSD` | aussie | Australian Dollar vs US Dollar | forex | 0.0001 | nzdusd, gold, copper, usdcad, brent | has all | | `BRENT` | Brent, UK oil, UKOIL, XBRUSD | BRENT Crude Oil (100 barrels) CFD, USD | energy | 0.1 | gold, usdcad, dji30, sp500, ngas | round_100, round_50 | | `[CAC40]` | CAC 40, France 40, FRA40 | CAC40 Index CFD, cash (EUR) | index | 0.1 | eurusd, dji30, ftse100 | session_open, session_open_control, round_100, round_50 | | `CADJPY` | - | Canadian Dollar vs Japanese Yen | forex | 0.01 | none | has all | | `CHFJPY` | - | Swiss Franc vs Japanese Yen | forex | 0.01 | none | has all | | `COPPER` | - | Copper (1,000 lbs) vs US Dollar Cent CFD | metal | 0.1 | gold, audusd, dji30, sp500, silver | round_100, round_50 | | `CRUDOIL` | WTI, US oil, crude oil, USOIL, XTIUSD | WTI Crude Oil (100 barrels) CFD, USD | energy | 0.1 | brent, usdcad, dji30, gold, sp500 | round_100, round_50 | | `[DJI30]` | Dow, Dow Jones, DJIA, US30, Wall Street 30 | Dow Jones Index CFD, cash (USD) | index | 0.1 | sp500, brent, gold, usdjpy, eurusd | session_open, session_open_control, round_100, round_50 | | `EURAUD` | - | Euro vs Australian Dollar | forex | 0.0001 | none | has all | | `EURCAD` | - | Euro vs Canadian Dollar | forex | 0.0001 | none | has all | | `EURCHF` | - | Euro vs Swiss Franc | forex | 0.0001 | none | has all | | `EURGBP` | - | Euro vs Great Britain Pound | forex | 0.0001 | eurusd, gbpusd, ftse100, brent, dji30 | has all | | `EURJPY` | - | Euro vs Japanese Yen | forex | 0.01 | none | has all | | `EURUSD` | - | Euro vs US Dollar | forex | 0.0001 | gbpusd, usdchf, gold, dji30, eurgbp, usdjpy | has all | | `[FTSE100]` | FTSE, FTSE 100, UK100, Footsie | FTSE100 Index CFD, cash (GBP) | index | 0.1 | dji30, sp500, gbpusd, eurgbp, brent | session_open, session_open_control, round_100, round_50 | | `GBPCHF` | - | Great Britain Pound vs Swiss Franc | forex | 0.0001 | none | has all | | `GBPJPY` | - | Great Britain Pound vs Japanese Yen | forex | 0.01 | gbpusd, usdjpy, eurjpy, dji30, gold | has all | | `GBPUSD` | cable | Great Britain Pound vs US Dollar | forex | 0.0001 | eurusd, eurgbp, ftse100, gold, usdjpy | has all | | `GERMANY40` | DAX, DAX 40, GER40, DE40 | Germany 40 Index CFD, cash (EUR) | index | 0.1 | dji30, eurusd, gold, brent, usdjpy | session_open, session_open_control, round_100, round_50 | | `GOLD` | XAUUSD | Gold (100 oz) vs US Dollar CFD | metal | 0.1 | silver, brent, dji30, eurusd, usdjpy, copper, ftse100, usdcad | round_100, round_50 | | `[HSCEI50]` | HSCEI, China H-shares | Hong Kong China H-shares Index CFD, cash (HKD) | index | 1 | none | session_open, session_open_control, round_100, round_50 | | `[HSI50]` | Hang Seng, HSI, HK50 | Hang Seng Index CFD, cash (HKD) | index | 0.1 | audusd, dji30, copper | session_open, session_open_control, round_100, round_50 | | `[JP225]` | Nikkei, Nikkei 225, JPN225 | Nikkei 225 Index CFD, cash (JPY) | index | 0.1 | usdjpy, gbpjpy, dji30, sp500, gold | session_open, session_open_control, round_100, round_50 | | `NGAS` | natural gas, NATGAS, XNGUSD | US Natural Gas (1000 MMBtu) CFD, USD | energy | 0.01 | none | round_100, round_50 | | `NZDJPY` | - | New Zealand Dollar vs Japanese Yen | forex | 0.01 | none | has all | | `NZDUSD` | kiwi | New Zealand Dollar vs US Dollar | forex | 0.0001 | audusd, gold, copper, usdcad, eurusd | has all | | `PLATINUM` | XPTUSD | Platinum (100 oz) vs US Dollar CFD | metal | 0.1 | none | round_100, round_50 | | `SILVER` | XAGUSD | Silver (5000 oz) vs US Dollar CFD | metal | 0.01 | gold, copper, eurusd, dji30, brent | round_100, round_50 | | `[SMI20]` | SMI, Swiss Market Index, SWI20 | SMI20 Index CFD, cash (CHF) | index | 0.1 | eurusd, usdchf, dji30, gold | session_open, session_open_control, round_100, round_50 | | `[SP500]` | S&P, S&P 500, SPX, US500 | Standard and Poor's Index CFD, cash (USD) | index | 0.1 | dji30, brent, gold, usdjpy, eurusd | session_open, session_open_control, round_100, round_50 | | `STXE50` | Euro Stoxx 50, Euro Stoxx, EU50, SX5E | Euro Stocks 50 Index CFD, cash (EUR) | index | 0.1 | eurusd, dji30, ftse100 | session_open, session_open_control, round_100, round_50 | | `US100` | Nasdaq, Nasdaq 100, NAS100, NDX, US Tech 100 | US100 Index CFD, cash (USD) | index | 0.1 | sp500, dji30, usdjpy, gold, eurusd | session_open, session_open_control, round_100, round_50 | | `USDCAD` | loonie | US Dollar vs Canadian Dollar | forex | 0.0001 | brent, audusd, gold, nzdusd, eurusd, usdjpy | has all | | `USDCHF` | swissy | US Dollar vs Swiss Franc | forex | 0.0001 | eurusd, gold, dji30, usdjpy, gbpusd | has all | | `USDCNH` | - | US Dollar vs Offshore Renminbi Yuan | forex | 0.001 | usdjpy, audusd, gold, copper, dji30 | round_100, round_50 | | `USDJPY` | - | US Dollar vs Japanese Yen | forex | 0.01 | eurjpy, gbpjpy, gold, dji30, sp500 | has all | | `XAUEUR` | gold in euros | Gold Spot (100 oz) vs Euro, CFD | metal | 0.1 | gold, eurusd, eurgbp | round_100, round_50 | ## Features 186 features of the symbol being traded, in groups, and seven kinds of condition on another market. The example column is one way the feature is used, not a suggestion. The descriptions are written for the `m5` clock; on the `h1` clock a name with no timeframe in it is the same reading on hourly bars. ### Trend (9) Direction and strength of the M5 moving-average structure. | feature | what it is | unit | example | |---|---|---|---| | `trend_ema20_vs_ema50` | EMA20 above EMA50. 1 when the 20-bar exponential average is above the 50-bar average on M5, else 0. | flag | gt 0 | | `price_above_ema20` | Close above EMA20. 1 when the bar closes above the 20-bar exponential average, else 0. | flag | gt 0 | | `price_above_ema50` | Close above EMA50. 1 when the bar closes above the 50-bar exponential average, else 0. | flag | eq 0 | | `ema20_slope` | EMA20 slope. Change of the 20-bar exponential average over the last 5 bars, in pips. | pips | gt 2 | | `ema50_slope` | EMA50 slope. Change of the 50-bar exponential average over the last 10 bars, in pips. | pips | lt 0 | | `price_vs_ema20_atr` | Close vs EMA20 (ATR). Distance of the close from the 20-bar exponential average, in multiples of the ATR(14). | atr | gt 1 | | `price_vs_ema50_atr` | Close vs EMA50 (ATR). Distance of the close from the 50-bar exponential average, in multiples of the ATR(14). | atr | lt -1.5 | | `ema_spread_norm` | EMA spread (ATR). EMA20 minus EMA50, in multiples of the ATR(14); positive when the fast average is above the slow one. | atr | gt 0.5 | | `adx` | ADX (14). Average directional index over 14 M5 bars with Wilder smoothing; higher means a stronger trend in either direction. | index | gt 25 | ### Momentum (40) Rate of change, oscillators, range position and order-flow proxies on M5 bars. | feature | what it is | unit | example | |---|---|---|---| | `rsi` | RSI (14). Relative strength index over 14 M5 bars with Wilder smoothing, 0 to 100. | index | lt 30 | | `rsi_deviation` | RSI minus 50. RSI(14) centred on zero, so positive values mean recent gains outweigh losses. | index | gt 15 | | `stoch_k` | Stochastic %K (14). Position of the close within the 14-bar high-low range, 0 to 100. | index | gt 80 | | `bb_pct_b` | Bollinger %B (20, 2). Position of the close within the Bollinger bands (20-bar mean, 2 standard deviations); 0 at the lower band, 1 at the upper band, outside that range beyond the bands. | ratio | gt 1 | | `price_vs_bb_mid` | Close vs Bollinger middle. Close minus the 20-bar Bollinger middle band, divided by the band width. | ratio | lt -0.25 | | `macd_histogram` | MACD histogram (12, 26, 9). MACD line minus its 9-bar signal line, in pips. | pips | gt 0 | | `momentum_5_pips` | 5-bar change (pips). Close minus the close 5 bars earlier, in pips. | pips | gt 10 | | `momentum_10_pips` | 10-bar change (pips). Close minus the close 10 bars earlier, in pips. | pips | lt -10 | | `momentum_3_atr` | 3-bar change (ATR). Close minus the close 3 bars earlier, in multiples of the ATR(14). | atr | gt 1 | | `momentum_5_atr` | 5-bar change (ATR). Close minus the close 5 bars earlier, in multiples of the ATR(14). | atr | gt 1.5 | | `momentum_10_atr` | 10-bar change (ATR). Close minus the close 10 bars earlier, in multiples of the ATR(14). | atr | lt -2 | | `roc_20_atr` | 20-bar change (ATR). Close minus the close 20 bars earlier, in multiples of the ATR(14). | atr | gt 2 | | `price_vs_20d_high_atr` | Close vs 20-bar high (ATR). Close minus the highest high of the last 20 M5 bars (this bar included), in ATR multiples; zero or negative, zero only when the bar closes exactly at the 20-bar high. | atr | gt -0.5 | | `price_vs_20d_low_atr` | Close vs 20-bar low (ATR). Close minus the lowest low of the last 20 M5 bars (this bar included), in ATR multiples; zero or positive, zero only when the bar closes exactly at the 20-bar low. | atr | lt 0.5 | | `price_vs_20d_mid_atr` | Close vs 20-bar range middle (ATR). Close minus the midpoint of the last 20 bars' high-low range, in ATR multiples. | atr | gt 1 | | `channel_high_20_atr` | Close vs prior 20-close high (ATR). Close minus the highest close of the 20 bars before this one (this bar left out), in ATR multiples; positive only when the bar closed above every one of those closes. | atr | gt 0 | | `channel_low_20_atr` | Close vs prior 20-close low (ATR). Close minus the lowest close of the 20 bars before this one (this bar left out), in ATR multiples; negative only when the bar closed below every one of those closes. | atr | lt 0 | | `channel_pos_20` | Position in the prior 20-close channel. Where the close sits between the lowest and the highest close of the 20 bars before this one; 0 at the channel low, 0.5 at its middle, 1 at its high, above 1 or below 0 outside the channel. | fraction | gt 1 | | `channel_high_30_atr` | Close vs prior 30-close high (ATR). Close minus the highest close of the 30 bars before this one (this bar left out), in ATR multiples; positive only when the bar closed above every one of those closes. | atr | gt 0 | | `channel_low_30_atr` | Close vs prior 30-close low (ATR). Close minus the lowest close of the 30 bars before this one (this bar left out), in ATR multiples; negative only when the bar closed below every one of those closes. | atr | lt 0 | | `channel_pos_30` | Position in the prior 30-close channel. Where the close sits between the lowest and the highest close of the 30 bars before this one; 0 at the channel low, 0.5 at its middle, 1 at its high, above 1 or below 0 outside the channel. | fraction | gt 1 | | `channel_high_55_atr` | Close vs prior 55-close high (ATR). Close minus the highest close of the 55 bars before this one (this bar left out), in ATR multiples; positive only when the bar closed above every one of those closes. | atr | gt 0 | | `channel_low_55_atr` | Close vs prior 55-close low (ATR). Close minus the lowest close of the 55 bars before this one (this bar left out), in ATR multiples; negative only when the bar closed below every one of those closes. | atr | lt 0 | | `channel_pos_55` | Position in the prior 55-close channel. Where the close sits between the lowest and the highest close of the 55 bars before this one; 0 at the channel low, 0.5 at its middle, 1 at its high, above 1 or below 0 outside the channel. | fraction | gt 1 | | `price_vs_5d_high_atr` | Close vs 5-day high (ATR). Close minus the highest high of the last 1,440 M5 bars (five 24-hour days), in ATR multiples. | atr | gt -1 | | `price_vs_5d_low_atr` | Close vs 5-day low (ATR). Close minus the lowest low of the last 1,440 M5 bars (five 24-hour days), in ATR multiples. | atr | lt 1 | | `price_vs_50d_high_atr` | Close vs 50-day high (ATR). Close minus the highest high of the last 14,400 M5 bars (fifty 24-hour days), in ATR multiples. | atr | gt -2 | | `price_vs_50d_low_atr` | Close vs 50-day low (ATR). Close minus the lowest low of the last 14,400 M5 bars (fifty 24-hour days), in ATR multiples. | atr | lt 3 | | `range_position` | Position in 20-bar range. Where the close sits in the last 20 bars' high-low range, 0 at the low and 1 at the high. | fraction | gt 0.9 | | `zscore_50` | Close z-score (50 bars). Close minus its 50-bar mean, divided by the 50-bar standard deviation. | zscore | lt -2 | | `zscore_200` | Close z-score (200 bars). Close minus its 200-bar mean, divided by the 200-bar standard deviation. | zscore | gt 2 | | `mean_rev_speed` | Mean-reversion speed. Rolling 100-bar regression slope of the bar-to-bar price change on the previous price; negative values mean moves tend to reverse. | ratio | lt -0.1 | | `vwap_distance` | Close vs 50-bar VWAP (ATR). Close minus the tick-volume-weighted average of the typical price over 50 bars, in ATR multiples. | atr | gt 1 | | `money_flow_20` | Money flow (20 bars). 20-bar sum of close-location value times tick volume; positive when closes sit near bar highs on volume. | volume | gt 0 | | `obv_slope_20` | OBV slope (20 bars). Slope per bar of on-balance tick volume fitted over the last 20 bars. | volume | gt 0 | | `volume_ratio` | Tick volume vs 50-bar average. This bar's tick volume divided by the 50-bar average tick volume. | ratio | gt 1.5 | | `vol_price_diverge` | Volume and price direction. Sign of the 20-bar price change times the sign of the 20-bar tick-volume change; 1 when both rose or both fell, -1 when they moved opposite ways, 0 when either is flat. | sign | eq -1 | | `m5_gap_atr` | Open gap (ATR). This bar's open minus the previous close, in ATR multiples. | atr | gt 0.5 | | `m5_gap_atr_3` | 3-bar gap sum (ATR). Sum of the last three open-to-previous-close gaps, in ATR multiples. | atr | lt -1 | | `close_vs_prev_close_atr` | One-bar return (ATR). This bar's close minus the previous bar's close, in ATR multiples; negative when the bar closed below the bar before it. | atr | lt 0 | ### Volatility (13) Range, ATR and variance measures and their regime. | feature | what it is | unit | example | |---|---|---|---| | `bb_width` | Bollinger width. Two standard deviations of the close over 20 bars divided by the 20-bar mean, i.e. half the full upper-to-lower band width relative to the middle band. | ratio | lt 0.002 | | `vol_expanding` | ATR above its average. 1 when the ATR(14) is above its 50-bar average, else 0. | flag | eq 1 | | `atr_z` | ATR vs 50-bar average. ATR(14) minus its 50-bar average, divided by that average. | ratio | gt 0.3 | | `atr_ratio_20_50` | ATR over 50-bar average. ATR(14) divided by its 50-bar average; 1 means typical, above 1 expanding. | ratio | gt 1.3 | | `range_percentile` | Bars at least this wide (last 100). Share of the last 100 bars whose high-low range is at least as wide as this bar's, 1 to 100; 100 means the narrowest bar in the window, values near 1 mean the widest. | percent | lt 10 | | `gk_volatility` | Garman-Klass volatility (20 bars). Garman-Klass open-high-low-close volatility estimate over 20 bars, per bar in log-price units. | ratio | lt 0.0005 | | `parkinson_volatility` | Parkinson volatility (20 bars). Parkinson high-low volatility estimate over 20 bars, per bar in log-price units. | ratio | lt 0.0005 | | `vol_of_vol` | Volatility of ATR (20 bars). Standard deviation of the ATR(14) over 20 bars divided by its 20-bar mean. | ratio | gt 0.2 | | `gk_ratio` | Fast vs slow Garman-Klass. 10-bar Garman-Klass variance divided by the 50-bar one; above 1 when recent bars are more volatile. | ratio | gt 1.5 | | `return_autocorr` | Volatility clustering. Lag-1 autocorrelation of squared 5-minute log returns over 50 bars, -1 to 1; 0 when undefined. | ratio | gt 0.2 | | `spread_atr_ratio` | Spread vs ATR. Broker spread in points times the pip size, divided by the ATR(14). | ratio | lt 0.5 | | `atr_pct_60d` | ATR percentile (60 days). Percentile rank of the ATR(14) within the trailing 17,280 M5 bars (sixty 24-hour days), 0 to 1. | percentile | lt 0.3 | | `session_atr_z` | ATR z-score for this session type. ATR(14) z-scored against the trailing 1,920 bars of the same session type (Asian, London, New York or off-hours). | zscore | gt 1 | ### Candle (10) Shape of the current M5 bar and short streaks. | feature | what it is | unit | example | |---|---|---|---| | `body_ratio` | Body to range. Absolute close-minus-open divided by the bar's high-low range, 0 to 1. | fraction | gt 0.7 | | `upper_wick_ratio` | Upper wick to range. High minus the higher of open and close, divided by the bar's range. | fraction | gt 0.5 | | `lower_wick_ratio` | Lower wick to range. Lower of open and close minus the low, divided by the bar's range. | fraction | gt 0.5 | | `is_bullish` | Close above open. 1 when the bar closes above its open, else 0. | flag | eq 1 | | `close_location_value` | Close location in bar. Where the close sits in the bar's range, -1 at the low, 0 in the middle, 1 at the high. | ratio | gt 0.5 | | `consecutive_up` | Up-bar streak. Number of consecutive bars before this one that closed above their open. | count | gte 3 | | `consecutive_down` | Down-bar streak. Number of consecutive bars before this one that closed below or at their open. | count | gte 3 | | `bullish_ratio_5` | Up bars in last 5. Fraction of the last 5 bars that closed above their open. | fraction | gte 0.8 | | `range_rank_7` | Rank by range among the last seven bars. This bar's rank by range (high minus low) among itself and the six bars before it: 1 is the widest, 7 strictly the narrowest of the seven. | rank | eq 7 | | `bullish_ratio_10` | Up bars in last 10. Fraction of the last 10 bars that closed above their open. | fraction | lte 0.2 | ### Session (6) Asian, London and New York session structure in broker time (the chart time in MT5). | feature | what it is | unit | example | |---|---|---|---| | `session_id` | Session. 0 Asian (broker hours 0 to 7), 1 London (8 to 14), 2 New York (15 to 21), 3 off-hours (22 to 23). | index | eq 1 | | `asian_range_atr` | Asian range (ATR). High-low range of the day's Asian session in ATR multiples; grows bar by bar during the session, fixed afterwards. | atr | lt 3 | | `price_vs_asian_mid` | Close vs Asian midpoint. Close minus the midpoint of the Asian range, divided by that range; 0.5 at the Asian high, -0.5 at the Asian low. | ratio | gt 0.5 | | `session_momentum_atr` | Move since session open (ATR). Close minus the last close before the current session began, in ATR multiples. Sessions are the four session_id blocks and restart at midnight broker time. | atr | gt 2 | | `session_volume_ratio` | Session volume vs previous session. Average tick volume so far in this session divided by the previous session's average. | ratio | gt 1.4 | | `london_asian_breakout` | London break of Asian range (ATR). During London hours, how far the close is beyond the Asian high (positive) or low (negative) in ATR multiples; 0 inside the range, missing outside London. | atr | gt 0.5 | ### Calendar (10) Clock and calendar position of the bar in broker time (the chart time in MT5). | feature | what it is | unit | example | |---|---|---|---| | `hour` | Hour. Hour of the bar in broker time (0 to 23). | hour | lt 18 | | `day_of_week` | Day of week. 0 Monday to 6 Sunday, broker time. | index | lt 4 | | `day_of_month` | Day of month. Calendar day of the bar, 1 to 31. | count | lte 5 | | `week_of_month` | Week of month. 1 for days 1 to 7, 2 for 8 to 14, and so on up to 5. | index | eq 3 | | `is_month_end` | Last three days of the month. 1 on the last three calendar days of the month, else 0. | flag | eq 1 | | `is_month_start` | First three days of the month. 1 on the first three calendar days of the month, else 0. | flag | eq 0 | | `is_eom_window` | Month-end window. 1 on the last five and the first two calendar days of a month, else 0. | flag | eq 1 | | `trading_days_to_month_end` | Weekdays left in the month. How many weekdays remain in the calendar month, this day included; 1 on the month's last weekday, 5 on the fifth-last. | count | eq 5 | | `is_gotobi` | Gotobi day. 1 on Japan's settlement days (the 5th, 10th, 15th, 20th and 25th of the month and the month's last day, each moved to the Friday before when it falls on a weekend), else 0. | flag | eq 1 | | `minute_of_day` | Minute of the day. The bar's opening minute of the broker day, 0 at midnight to 1435 at 23:55; 1065 is the 17:45 bar. | minute | eq 1065 | ### Scheduled releases (17) Time to and from five scheduled releases (the FOMC statement, the US jobs report, the US consumer price index, the ECB's and the Bank of England's rate decisions) and the days they fall on, in broker time, at the scheduled minute from the institutions' own calendars. Computed when a rule runs, so there is no stored range. | feature | what it is | unit | example | |---|---|---|---| | `minutes_to_fomc` | Minutes to the FOMC statement. Minutes from the bar's close to the next FOMC statement (the Federal Reserve's, 14:00 Eastern on the meeting's last day): 0 on the bar that closes on the release, no value more than 2,880 minutes (two days) before it. | minutes | lte 1440 | | `minutes_since_fomc` | Minutes since the FOMC statement. Minutes from the last FOMC statement (the Federal Reserve's, 14:00 Eastern on the meeting's last day) to the bar's close: 5 on the M5 bar that holds its first five minutes, no value more than 2,880 minutes (two days) after it. | minutes | lte 60 | | `is_fomc_day` | FOMC statement day. 1 on every bar of the broker day of an FOMC statement (the Federal Reserve's, 14:00 Eastern on the meeting's last day), else 0. | flag | eq 1 | | `minutes_to_nfp` | Minutes to the US jobs report. Minutes from the bar's close to the next US jobs report (the Employment Situation, 08:30 Eastern): 0 on the bar that closes on the release, no value more than 2,880 minutes (two days) before it. | minutes | lte 1440 | | `minutes_since_nfp` | Minutes since the US jobs report. Minutes from the last US jobs report (the Employment Situation, 08:30 Eastern) to the bar's close: 5 on the M5 bar that holds its first five minutes, no value more than 2,880 minutes (two days) after it. | minutes | lte 60 | | `is_nfp_day` | US jobs report day. 1 on every bar of the broker day of a US jobs report (the Employment Situation, 08:30 Eastern), else 0. | flag | eq 1 | | `minutes_to_cpi_us` | Minutes to the US CPI release. Minutes from the bar's close to the next US consumer price index release (08:30 Eastern): 0 on the bar that closes on the release, no value more than 2,880 minutes (two days) before it. | minutes | lte 1440 | | `minutes_since_cpi_us` | Minutes since the US CPI release. Minutes from the last US consumer price index release (08:30 Eastern) to the bar's close: 5 on the M5 bar that holds its first five minutes, no value more than 2,880 minutes (two days) after it. | minutes | lte 60 | | `is_cpi_us_day` | US CPI day. 1 on every bar of the broker day of a US consumer price index release (08:30 Eastern), else 0. | flag | eq 1 | | `minutes_to_ecb` | Minutes to the ECB decision. Minutes from the bar's close to the next ECB monetary policy decision (14:15 Frankfurt; the press conference follows half an hour later): 0 on the bar that closes on the release, no value more than 2,880 minutes (two days) before it. | minutes | lte 1440 | | `minutes_since_ecb` | Minutes since the ECB decision. Minutes from the last ECB monetary policy decision (14:15 Frankfurt; the press conference follows half an hour later) to the bar's close: 5 on the M5 bar that holds its first five minutes, no value more than 2,880 minutes (two days) after it. | minutes | lte 60 | | `is_ecb_day` | ECB decision day. 1 on every bar of the broker day of an ECB monetary policy decision (14:15 Frankfurt; the press conference follows half an hour later), else 0. | flag | eq 1 | | `minutes_to_boe` | Minutes to the Bank of England decision. Minutes from the bar's close to the next Bank of England Bank Rate announcement (12:00 London): 0 on the bar that closes on the release, no value more than 2,880 minutes (two days) before it. | minutes | lte 1440 | | `minutes_since_boe` | Minutes since the Bank of England decision. Minutes from the last Bank of England Bank Rate announcement (12:00 London) to the bar's close: 5 on the M5 bar that holds its first five minutes, no value more than 2,880 minutes (two days) after it. | minutes | lte 60 | | `is_boe_day` | Bank of England decision day. 1 on every bar of the broker day of a Bank of England Bank Rate announcement (12:00 London), else 0. | flag | eq 1 | | `minutes_to_next_release` | Minutes to the next scheduled release. The smallest of the five minutes-to values: minutes from the bar's close to the next FOMC statement, US jobs report, US CPI release, ECB decision or Bank of England decision; no value when none is within 2,880 minutes. | minutes | lte 60 | | `minutes_since_release` | Minutes since the last scheduled release. The smallest of the five minutes-since values: minutes from the last FOMC statement, US jobs report, US CPI release, ECB decision or Bank of England decision to the bar's close; no value when none is within 2,880 minutes. | minutes | lte 60 | ### Levels (29) The day's open, yesterday's high, low and colour, the week's opening range, the inside bar, the day's stretch, the session's opening range and the round numbers of a currency pair, on the bars of the rule's clock, in broker time. Read on mid prices (the bar's bid plus half its spread), so the daily rollover's spread does not set a level. | feature | what it is | unit | example | |---|---|---|---| | `inside_bar_run` | Inside bars in a row. 0 when the bar is not inside the bar before it; otherwise how many inside bars in a row end at this bar, where inside means a high not above and a low not below the bar before. | count | eq 1 | | `price_vs_open_06_atr` | Close vs the 08:00 broker open (ATR). Close minus the opening price of the day that starts at 08:00 broker time (06:00 in the rule's hours), in ATR multiples; positive when the price is above that open. | atr | gt 0 | | `price_vs_day_open_atr` | Close vs the day's open (ATR). Close minus the opening price of the broker day's first bar, in ATR multiples; positive when the price is above the day's open. | atr | gt 0 | | `prev_day_streak` | Yesterday's colour, as a streak. How many completed days in a row closed on the same side of their open, ending yesterday; positive for up days, negative for down days, 0 when yesterday closed at its open. | count | eq 1 | | `price_vs_prev_day_high_atr` | Close vs yesterday's high (ATR). Close minus the highest price of the previous broker day, in ATR multiples; positive when the bar closed above yesterday's high. | atr | gt 0 | | `price_vs_prev_day_low_atr` | Close vs yesterday's low (ATR). Close minus the lowest price of the previous broker day, in ATR multiples; negative when the bar closed below yesterday's low. | atr | lt 0 | | `week_open_range_atr` | The week's opening range (ATR). The distance between the high and the low of the week's first four hours, in ATR multiples of the current bar. | atr | gt 0 | | `price_vs_week_open_high_atr` | Close vs the week's opening high (ATR). Close minus the high of the week's first four hours, in ATR multiples; positive when the bar closed above that range. | atr | gt 0 | | `price_vs_week_open_low_atr` | Close vs the week's opening low (ATR). Close minus the low of the week's first four hours, in ATR multiples; negative when the bar closed below that range. | atr | lt 0 | | `day_stretch_atr` | The day's stretch (ATR). Crabel's stretch for the day: the average over the prior ten completed days of the smaller of (high minus open) and (open minus low), in ATR multiples of the current bar. | atr | gt 0 | | `session_open_range_atr` | The session's opening range (ATR). The distance between the high and the low of the first thirty minutes from the symbol's session open, in ATR multiples of the current bar. | atr | gt 0 | | `price_vs_session_open_high_atr` | Close vs the session's opening high (ATR). Close minus the high of the first thirty minutes from the session's open, in ATR multiples; positive when the bar closed above that range. | atr | gt 0 | | `price_vs_session_open_low_atr` | Close vs the session's opening low (ATR). Close minus the low of the first thirty minutes from the session's open, in ATR multiples; negative when the bar closed below that range. | atr | lt 0 | | `session_open_control_range_atr` | The box two hours before the session's open (ATR). The distance between the high and the low of the thirty minutes that start two hours before the symbol's session open, in ATR multiples of the current bar. | atr | gt 0 | | `bars_since_channel_high_20` | Bars since the 20-bar high was set. How many bars ago the highest high of the prior twenty bars was set, the current bar excluded; 1 when the bar before this one set it, 20 when the oldest of the twenty did. | count | gte 4 | | `bars_since_channel_low_20` | Bars since the 20-bar low was set. How many bars ago the lowest low of the prior twenty bars was set, the current bar excluded; 1 when the bar before this one set it, 20 when the oldest of the twenty did. | count | gte 4 | | `bar_high_vs_channel_high_20_atr` | This bar's high vs the 20-bar high (ATR). This bar's high minus the highest high of the prior twenty bars, in ATR multiples; positive when the bar has made a new twenty-bar high. | atr | gt 0 | | `bar_low_vs_channel_low_20_atr` | This bar's low vs the 20-bar low (ATR). The lowest low of the prior twenty bars minus this bar's low, in ATR multiples; positive when the bar has made a new twenty-bar low. | atr | gt 0 | | `prev_day_open_pos` | Yesterday's open inside its range. Where the previous broker day's open sat inside that day's range, from 0 at its low to 1 at its high. | fraction | gte 0.8 | | `prev_day_close_pos` | Yesterday's close inside its range. Where the previous broker day's close sat inside that day's range, from 0 at its low to 1 at its high. | fraction | lte 0.2 | | `day_open_vs_prev_day_low_atr` | The day's open vs yesterday's low (ATR). The broker day's opening price minus the previous day's low, in ATR multiples of the current bar; negative when the day opened below yesterday's range. | atr | lt 0 | | `day_open_vs_prev_day_high_atr` | The day's open vs yesterday's high (ATR). The broker day's opening price minus the previous day's high, in ATR multiples of the current bar; positive when the day opened above yesterday's range. | atr | gt 0 | | `price_vs_day_high_atr` | Close vs the day's high so far (ATR). Close minus the highest price of the broker day so far, this bar included, in ATR multiples; 0 when the bar closes at the day's high, otherwise negative. | atr | gt -0.25 | | `price_vs_day_low_atr` | Close vs the day's low so far (ATR). Close minus the lowest price of the broker day so far, this bar included, in ATR multiples; 0 when the bar closes at the day's low, otherwise positive. | atr | lt 0.25 | | `price_vs_pivot_atr` | Close vs yesterday's pivot (ATR). Close minus the floor-trader pivot P, the mean of the previous broker day's high, low and close, in ATR multiples. | atr | gt 0 | | `price_vs_r1_atr` | Close vs yesterday's R1 (ATR). Close minus the first resistance R1, twice the pivot less yesterday's low, in ATR multiples; positive when the bar closed above it. | atr | gt 0 | | `price_vs_s1_atr` | Close vs yesterday's S1 (ATR). Close minus the first support S1, twice the pivot less yesterday's high, in ATR multiples; negative when the bar closed below it. | atr | lt 0 | | `price_vs_session_open_atr` | Close vs the session's open (ATR). Close minus the price the symbol's session opened at (the open of the first bar at or after the session open), in ATR multiples; present from the session's open to its close, missing otherwise. | atr | gt 0 | | `price_vs_round_100_pips` | Close vs the nearest 00 (pips). Close minus the nearest round number (the 00 levels of a currency pair, 100 pips apart), in pips, from -50 to 50; 0 when the bar closes on a 00, negative just under one, 50 on the 50 between two. | pips | lt 5 | ### Higher timeframe (24) Values of the last H1, H4 or D1 bar that had already closed when the M5 bar opened. | feature | what it is | unit | example | |---|---|---|---| | `h1_rsi` | H1 RSI (14). RSI(14) of the last completed H1 bar. | index | lt 35 | | `h1_trend_ema20_vs_ema50` | H1 EMA20 above EMA50. 1 when the H1 20-bar exponential average is above the 50-bar one on the last completed H1 bar. | flag | eq 1 | | `h1_ema20_slope` | H1 EMA20 slope. Change of the H1 EMA20 over the last 5 H1 bars, in pips. | pips | gt 5 | | `h1_bb_pct_b` | H1 Bollinger %B. Position of the last completed H1 close within the H1 Bollinger bands (20, 2). | ratio | gt 0.8 | | `h1_macd_histogram` | H1 MACD histogram. MACD(12, 26, 9) histogram of the last completed H1 bar, in pips. | pips | gt 0 | | `h1_stoch_k` | H1 Stochastic %K. Stochastic %K (14) of the last completed H1 bar, 0 to 100. | index | lt 20 | | `h1_adx` | H1 ADX (14). ADX(14) of the last completed H1 bar. | index | gt 25 | | `h1_roc_20_atr` | H1 20-bar change (H1 ATR). H1 close minus the H1 close 20 bars earlier, in multiples of the H1 ATR(14). | atr | lt -2.5 | | `h1_momentum_atr` | Close vs H1 EMA20 (H1 ATR). M5 close minus the H1 EMA20, in multiples of the H1 ATR(14). | atr | gt 1 | | `m5_h1_trend_agree` | M5 and H1 trend agree. 1 when the M5 and H1 EMA20-versus-EMA50 flags are equal, else 0. | flag | eq 1 | | `h4_trend_ema20_vs_ema50` | H4 EMA20 above EMA50. 1 when the H4 20-bar exponential average is above the 50-bar one on the last completed H4 bar. | flag | eq 1 | | `h4_ema20_slope` | H4 EMA20 slope. Change of the H4 EMA20 over the last 5 H4 bars, in pips. | pips | gt 10 | | `h4_bb_pct_b` | H4 Bollinger %B. Position of the last completed H4 close within the H4 Bollinger bands (20, 2). | ratio | gt 0.67 | | `h4_stoch_k` | H4 Stochastic %K. Stochastic %K (14) of the last completed H4 bar, 0 to 100. | index | gt 80 | | `h4_rsi` | H4 RSI (14). RSI(14) of the last completed H4 bar. | index | gt 55 | | `h4_adx` | H4 ADX (14). ADX(14) of the last completed H4 bar. | index | gt 20 | | `h4_momentum_atr` | Close vs H4 EMA20 (H4 ATR). M5 close minus the H4 EMA20, in multiples of the H4 ATR(14). | atr | gt 1 | | `mtf_agree_score` | Multi-timeframe agreement. 3 when the M5, H1 and H4 close-versus-EMA20 signs all agree, -1 when one differs. | index | eq 3 | | `mtf_divergence` | Multi-timeframe divergence. Absolute gap between the M5 and H1 close-versus-EMA20 readings plus the gap between H1 and H4, in ATR multiples of each timeframe. | atr | lt 1 | | `d1_trend_ema20_vs_ema50` | D1 EMA20 above EMA50. 1 when the daily 20-bar exponential average is above the 50-bar one on the last completed day. | flag | eq 1 | | `d1_rsi` | D1 RSI (14). RSI(14) of the last completed daily bar. | index | gt 55 | | `d1_adx` | D1 ADX (14). ADX(14) of the last completed daily bar. | index | gt 25 | | `d1_price_vs_ema20_atr` | Close vs D1 EMA20 (M5 ATR). M5 close minus the daily EMA20 of the last completed day, in multiples of the M5 ATR(14). | atr | lt -6 | | `d1_price_vs_ema50_atr` | Close vs D1 EMA50 (M5 ATR). M5 close minus the daily EMA50 of the last completed day, in multiples of the M5 ATR(14). | atr | gt 10 | ### Normalized (28) Percentile ranks and z-scores of a base feature over its trailing 20 or 60 days, so a threshold keeps its meaning as the level drifts. | feature | what it is | unit | example | |---|---|---|---| | `session_volume_ratio_pct_20d` | Session volume ratio, 20-day percentile. Percentile rank of session_volume_ratio within the trailing 5,760 bars, 0 to 1. | percentile | lt 0.4 | | `session_volume_ratio_z_20d` | Session volume ratio, 20-day z-score. session_volume_ratio minus its trailing 5,760-bar mean, divided by that window's standard deviation. | zscore | gt 1 | | `session_volume_ratio_pct_60d` | Session volume ratio, 60-day percentile. Percentile rank of session_volume_ratio within the trailing 17,280 bars, 0 to 1. | percentile | lt 0.4 | | `session_volume_ratio_z_60d` | Session volume ratio, 60-day z-score. session_volume_ratio minus its trailing 17,280-bar mean, divided by that window's standard deviation. | zscore | gt 1 | | `volume_ratio_pct_20d` | Volume ratio, 20-day percentile. Percentile rank of volume_ratio within the trailing 5,760 bars, 0 to 1. | percentile | gt 0.8 | | `volume_ratio_z_20d` | Volume ratio, 20-day z-score. volume_ratio minus its trailing 5,760-bar mean, divided by that window's standard deviation. | zscore | gt 1.5 | | `volume_ratio_pct_60d` | Volume ratio, 60-day percentile. Percentile rank of volume_ratio within the trailing 17,280 bars, 0 to 1. | percentile | gt 0.8 | | `volume_ratio_z_60d` | Volume ratio, 60-day z-score. volume_ratio minus its trailing 17,280-bar mean, divided by that window's standard deviation. | zscore | gt 1.5 | | `bb_width_pct_20d` | Bollinger width, 20-day percentile. Percentile rank of bb_width within the trailing 5,760 bars, 0 to 1; low values mean a squeeze. | percentile | lt 0.2 | | `bb_width_z_20d` | Bollinger width, 20-day z-score. bb_width minus its trailing 5,760-bar mean, divided by that window's standard deviation. | zscore | lt -1 | | `bb_width_pct_60d` | Bollinger width, 60-day percentile. Percentile rank of bb_width within the trailing 17,280 bars, 0 to 1. | percentile | lt 0.2 | | `bb_width_z_60d` | Bollinger width, 60-day z-score. bb_width minus its trailing 17,280-bar mean, divided by that window's standard deviation. | zscore | gt 2 | | `parkinson_volatility_pct_20d` | Parkinson volatility, 20-day percentile. Percentile rank of parkinson_volatility within the trailing 5,760 bars, 0 to 1. | percentile | lt 0.5 | | `parkinson_volatility_z_20d` | Parkinson volatility, 20-day z-score. parkinson_volatility minus its trailing 5,760-bar mean, divided by that window's standard deviation. | zscore | gt 1 | | `parkinson_volatility_pct_60d` | Parkinson volatility, 60-day percentile. Percentile rank of parkinson_volatility within the trailing 17,280 bars, 0 to 1 (the README example). | percentile | lt 0.5 | | `parkinson_volatility_z_60d` | Parkinson volatility, 60-day z-score. parkinson_volatility minus its trailing 17,280-bar mean, divided by that window's standard deviation. | zscore | gt 1 | | `gk_volatility_pct_20d` | Garman-Klass volatility, 20-day percentile. Percentile rank of gk_volatility within the trailing 5,760 bars, 0 to 1. | percentile | lt 0.5 | | `gk_volatility_z_20d` | Garman-Klass volatility, 20-day z-score. gk_volatility minus its trailing 5,760-bar mean, divided by that window's standard deviation. | zscore | gt 1 | | `gk_volatility_pct_60d` | Garman-Klass volatility, 60-day percentile. Percentile rank of gk_volatility within the trailing 17,280 bars, 0 to 1. | percentile | lt 0.5 | | `gk_volatility_z_60d` | Garman-Klass volatility, 60-day z-score. gk_volatility minus its trailing 17,280-bar mean, divided by that window's standard deviation. | zscore | gt 1 | | `roc_20_atr_pct_20d` | 20-bar change, 20-day percentile. Percentile rank of roc_20_atr within the trailing 5,760 bars, 0 to 1. | percentile | gt 0.9 | | `roc_20_atr_z_20d` | 20-bar change, 20-day z-score. roc_20_atr minus its trailing 5,760-bar mean, divided by that window's standard deviation. | zscore | gt 0 | | `roc_20_atr_pct_60d` | 20-bar change, 60-day percentile. Percentile rank of roc_20_atr within the trailing 17,280 bars, 0 to 1. | percentile | lt 0.1 | | `roc_20_atr_z_60d` | 20-bar change, 60-day z-score. roc_20_atr minus its trailing 17,280-bar mean, divided by that window's standard deviation. | zscore | lt -2 | | `macd_histogram_pct_20d` | MACD histogram, 20-day percentile. Percentile rank of macd_histogram within the trailing 5,760 bars, 0 to 1. | percentile | gt 0.9 | | `macd_histogram_z_20d` | MACD histogram, 20-day z-score. macd_histogram minus its trailing 5,760-bar mean, divided by that window's standard deviation. | zscore | gt 1.5 | | `macd_histogram_pct_60d` | MACD histogram, 60-day percentile. Percentile rank of macd_histogram within the trailing 17,280 bars, 0 to 1. | percentile | lt 0.1 | | `macd_histogram_z_60d` | MACD histogram, 60-day z-score. macd_histogram minus its trailing 17,280-bar mean, divided by that window's standard deviation. | zscore | lt -1.5 | ### Cross-asset (7 kinds) State of a reference market (an index, a metal, an energy contract or a currency pair) at the time of the bar. The name is `x__`, with a reference market of the symbol from the Symbols table: `x_gold_rsi` is the RSI of gold, for a symbol that lists gold. On the `m5` clock only. | kind | what it is | unit | example | |---|---|---|---| | `trend` | 1 when the other market's 20-bar exponential average is above its 50-bar average, else 0. | flag | gt 0 | | `rsi` | RSI(14) of the other market on M5 bars, 0 to 100. | index | gt 60 | | `bb_pct_b` | Position of the other market's close within its Bollinger bands (20, 2). | ratio | lt 0 | | `momentum_20` | The other market's close minus its close 20 bars earlier, in multiples of the other market's ATR(14). | atr | gt 2 | | `vs_ema50` | The other market's close minus its 50-bar exponential average, in multiples of the other market's ATR(14). | atr | gt 1 | | `atr_z` | The other market's ATR(14) minus its 50-bar average, divided by that average. | ratio | gt 0.3 | | `return_corr` | Correlation of 5-minute log returns between this symbol and the other market over the last 100 bars, -1 to 1; missing while the other market has not traded for the whole window. | ratio | gt 0.5 | ## Named ranges A range is a high and a low. An entry order, a stop or a target can sit at one (`entry.level`, `exit.stop.level`, `exit.target.level`). | range | what it is | |---|---| | `signal_bar` | the signal bar's range | | `prev_day` | yesterday's range | | `week_open` | the range of the week's first four hours | | `day_stretch` | the day's open plus and less the stretch | | `day_atr_box` | the day's open plus and less one hourly ATR | | `session_open` | the first thirty minutes from the session's open | | `session_open_control` | the thirty minutes two hours before the session's open | | `channel_20` | the prior twenty bars' highs and lows | | `day` | the day's range so far | | `day_h1_opens` | the day's highest and lowest hourly open so far | | `pivot_up` | the band from yesterday's pivot to R1 | | `pivot_up2` | the band from R1 to R2 | | `pivot_down` | the band from S1 to yesterday's pivot | | `pivot_down2` | the band from S2 to S1 | | `round_100` | the 00 levels on either side of the close | | `round_50` | the 50 levels on either side of the close | ## Worked examples ### Example 1 The setup: "Buy EURUSD when the 14-period RSI is above 60 on the hourly chart. Stop 2.5 ATR, target 2 R." The settings in words: - Symbol: EURUSD - Direction: buy (long) - Clock: hourly (h1) - Conditions: RSI (14) above 60 (`rsi`: on the hourly clock the plain name is the hourly RSI) - Entry: the default, a stop order 2 pips past the signal bar's close, standing 4 bars - Exit: stop 2.5 ATR, target 2 R, the symbol's usual day-end flat - Filters and costs: the defaults ``` { "symbol": "EURUSD", "direction": "BUY", "clock": "h1", "conditions": [ { "feature": "rsi", "operator": "gt", "threshold": 60 } ], "exit": { "stop": { "type": "atr", "value": 2.5 }, "target": { "type": "r", "value": 2 } } } ``` Rule Collider is a research tool. Past results do not predict future results. This is not investment advice. ### Example 2 The setup: "Short the Nikkei when 60-day volatility is in its lower half and the daily RSI is above 60. Stop 2 ATR, target 2.5 R." The settings in words: - Symbol: [JP225] - Direction: sell (short) - Clock: five-minute (m5) - Conditions: 60-day Parkinson volatility percentile below 0.5, and daily RSI (14) above 60. The setup names no measure of volatility, so this is Parkinson's (`parkinson_volatility_pct_60d`); the tool also has the 60-day percentile of the ATR (`atr_pct_60d`) and of the Garman-Klass estimate (`gk_volatility_pct_60d`) - Entry: the default - Exit: stop 2 ATR, target 2.5 R - Filters and costs: the defaults A percentile feature runs from 0 to 1, so "the lower half" is below 0.5, not below 50. "60-day volatility" with no measure named is the Parkinson percentile, and the settings in words say that it was chosen and name the other two. ``` { "symbol": "[JP225]", "direction": "SELL", "clock": "m5", "conditions": [ { "feature": "parkinson_volatility_pct_60d", "operator": "lt", "threshold": 0.5 }, { "feature": "d1_rsi", "operator": "gt", "threshold": 60 } ], "exit": { "stop": { "type": "atr", "value": 2 }, "target": { "type": "r", "value": 2.5 } } } ``` Rule Collider is a research tool. Past results do not predict future results. This is not investment advice. ### Example 3 The setup: "Go long the Dow while Brent's 20-bar momentum is positive. Stop 2 ATR, target 2 R." The settings in words: - Symbol: [DJI30] - Direction: buy (long) - Clock: five-minute (m5); a cross-asset condition is not on the hourly clock - Conditions: Brent's 20-bar momentum above 0 (`x_brent_momentum_20`; Brent is one of the reference markets of [DJI30]) - Entry: the default - Exit: stop 2 ATR, target 2 R - Filters and costs: the defaults The same condition on a symbol whose reference markets do not include Brent cannot be written; say so and name the reference markets that symbol has. ``` { "symbol": "[DJI30]", "direction": "BUY", "clock": "m5", "conditions": [ { "feature": "x_brent_momentum_20", "operator": "gt", "threshold": 0 } ], "exit": { "stop": { "type": "atr", "value": 2 }, "target": { "type": "r", "value": 2 } } } ``` Rule Collider is a research tool. Past results do not predict future results. This is not investment advice. ### Example 4 The setup: "Buy gold at the market the moment price closes above its 20-bar average, once per move, at most two trades a day. Stop 2 ATR, target 3 R." The settings in words: - Symbol: GOLD - Direction: buy (long) - Clock: five-minute (m5) - Conditions: price above the 20-bar EMA (a flag: above 0 means yes) - Entry: onset trigger (only the bar where the condition becomes true), market order, at most 2 fills a day - Exit: stop 2 ATR, target 3 R - Filters and costs: the defaults "The moment it closes above" is the onset trigger; without it the rule enters on every bar the condition holds. ``` { "symbol": "GOLD", "direction": "BUY", "clock": "m5", "conditions": [ { "feature": "price_above_ema20", "operator": "gt", "threshold": 0 } ], "entry": { "trigger": "onset", "order_type": "market", "max_trades_per_day": 2 }, "exit": { "stop": { "type": "atr", "value": 2 }, "target": { "type": "r", "value": 3 } } } ``` Rule Collider is a research tool. Past results do not predict future results. This is not investment advice. ### Example 5 The setup: "Buy GBPUSD on a break of yesterday's high, stop at yesterday's low, target one times the risk." The settings in words: - Symbol: GBPUSD - Direction: buy (long) - Clock: five-minute (m5) - Conditions: none of the user's own; a rule needs at least one, so hour at or above 0, which holds on every bar - Entry: a stop order at the high of yesterday's range (`prev_day`), 0 pips beyond it, standing to the end of the day - Exit: stop at the far end of yesterday's range, target 1 R - Filters and costs: the defaults ``` { "symbol": "GBPUSD", "direction": "BUY", "clock": "m5", "conditions": [ { "feature": "hour", "operator": "gte", "threshold": 0 } ], "entry": { "level": "prev_day", "distance": { "type": "pips", "value": 0 } }, "exit": { "stop": { "type": "level", "level": "prev_day", "value": 0 }, "target": { "type": "r", "value": 1 } } } ``` Rule Collider is a research tool. Past results do not predict future results. This is not investment advice. ### Example 6 The setup: "Buy US100 when the 5-minute RSI is above 55. Stop 2.5 ATR, target 6 ATR." The settings in words: - Symbol: US100 - Direction: buy (long) - Clock: five-minute (m5) - Conditions: RSI (14) above 55 - Entry: the default - Exit: stop 2.5 ATR, target 6 ATR (which is 6 / 2.5 = 2.4 R) - Filters and costs: the defaults A target given in ATR stays in ATR. Converted to R it is the target over the stop: 6 ATR on a stop of 2.5 ATR is 2.4 R, not 6 R. ``` { "symbol": "US100", "direction": "BUY", "clock": "m5", "conditions": [ { "feature": "rsi", "operator": "gt", "threshold": 55 } ], "exit": { "stop": { "type": "atr", "value": 2.5 }, "target": { "type": "atr", "value": 6 } } } ``` Rule Collider is a research tool. Past results do not predict future results. This is not investment advice. ### Example 7 The setup: "Sell EURUSD when RSI is below 40 on the hourly chart, stop 2 ATR, target 2 R. My account charges 6 dollars a lot for the round turn and a raw spread." The settings in words: - Symbol: EURUSD - Direction: sell (short) - Clock: hourly (h1) - Conditions: RSI (14) below 40 (`rsi` on the hourly clock) - Entry: the default - Exit: stop 2 ATR, target 2 R - Filters: the defaults - Costs: spread off, commission 0.6 pips a round turn (6 dollars a lot over 10 dollars a pip on a pair quoted in dollars). Left out: the raw spread such an account still pays Raw spread plus commission is the spread switched off and the commission in pips; keeping the measured spread as well would charge both. With the spread off the result says so, and that an account with raw spreads still pays one. ``` { "symbol": "EURUSD", "direction": "SELL", "clock": "h1", "conditions": [ { "feature": "rsi", "operator": "lt", "threshold": 40 } ], "exit": { "stop": { "type": "atr", "value": 2 }, "target": { "type": "r", "value": 2 } }, "costs": { "spread": "off", "commission_pips": 0.6 } } ``` Rule Collider is a research tool. Past results do not predict future results. This is not investment advice. ### Example 8 The setup: "Buy gold when RSI is oversold." This cannot be written yet, because three things are missing. Ask for them and do not guess: - which RSI reading counts as oversold (the tool takes a number, for example below 30); - which chart the RSI is read on: five-minute (`rsi` on the `m5` clock), hourly (`rsi` on the `h1` clock), four-hour (`h4_rsi`) or daily (`d1_rsi`); - the exit: a stop and a target. ### Example 9 The setup: "Buy US100 when GOLD hit a 5-day low. Stop 2.5 ATR, target 6 ATR." This cannot be built as asked. Say so first: - the tool has the close against the 5-day low of the symbol being traded (`price_vs_5d_low_atr` is US100's own), and for another market it has seven kinds of condition, none of them that market's 5-day high or low; - the nearest conditions on gold are its RSI being low (`x_gold_rsi` below 30) or its 20-bar momentum being negative (`x_gold_momentum_20` below 0). Neither is a 5-day low. Offer them as approximations and write the rule only once the user has accepted one. - If the user accepts gold's RSI below 30, the rule is the one below; the settings in words say that the condition is an approximation of the one asked for. ``` { "symbol": "US100", "direction": "BUY", "clock": "m5", "conditions": [ { "feature": "x_gold_rsi", "operator": "lt", "threshold": 30 } ], "exit": { "stop": { "type": "atr", "value": 2.5 }, "target": { "type": "atr", "value": 6 } } } ``` Rule Collider is a research tool. Past results do not predict future results. This is not investment advice. ## What this page does not say It lists what can be asked. How a result is judged, what the costs are and what the research found are on the site. A figure for a threshold has to come from the user: the builder shows where a number sits in the feature's own history on the symbol, and this page does not.