BASEtrading knowledge base
RU

A trend held by two lines

Golden trend золотой тренд · Andrey's trend

A golden trend is when price stubbornly moves one way and does not give up after a single push back. It ends only when price breaks both safety lines.

A run from a reference candle (body ≥ 70 % of range) until a close beyond both lines of “Andrey's trend”: the open of the last with-trend candle (gold) and the body midpoint of the reference candle (blue). M5 and H1.

⟳ being refined

An ordinary trend breaks at the first push back. A golden one holds until price breaks through both of its “safety ropes” at once.

A climber on two safety ropes. Slip and hang on one rope, and the climb goes on. The climb is only over when both ropes let go.

Two safety-rope lines

Price rises and the gold and blue lines step up behind it; one pullback breaks only the gold line and the trend lives on; then price breaks both, and it's over uptrend broke only the gold line — trend alive both broken —the end gold blue
Price (black) rises, and two lines step up behind it. A pullback below the gold line but above the blue one: the trend goes on. Below both: the trend is over.
  • The gold line (“level 1”) creeps right behind price, at the level where the last candle in the trend's direction opened.
  • The blue line (“level 2”) sits lower: the middle of the last especially confident step.

How it starts

A candle is price over 5 minutes or an hour. A golden trend starts with a confident candle: it has a big body and almost no wicks (the body is at least 70% of the whole candle). It's like a strong, decisive step up or down.

Then the program looks at every candle and checks just one thing: did it close on the other side of both lines? If yes, the trend is over.

RTS, 4 November 2026, 5-minute candles: gold and blue stepped lines, red background — golden downtrend from 18:15 to 20:50
A real example shown by the person who came up with the idea: the RTS index future, 4 November. The red background is a golden downtrend: 31 candles, price moved 1,610 points. The usual “one line” rule would have closed the trend 10 minutes earlier.

What we learned from checking thousands of trends

  • A third of “trends” fizzle out right away: price doesn't get past the start.
  • Really big trends do happen, but you can hardly tell them apart in advance.
  • If you just enter on every golden trend and wait for it to end, on average it doesn't make money.
  • It's useful as a hint that “a trend has just been born”, together with segments and DH. That rule is being checked on new days right now.

Remember: a climber starting up the wall doesn't tell you how high they'll get. The golden trend shows well that a move is happening, but it doesn't promise the move will be big.

Definition

A golden trend is a stretch where every candle's close stays on one side of at least one of the two lines of the “Andrey's trend” indicator. The trend ends only when the close moves beyond both lines in the opposite direction. Idea and name by Andrey, call of 5 Nov 2026; the same day the “Andrey's trend” tab was renamed and the break beyond both lines became the default mode.

LineColourWhat it isWhen it moves
Level 1gold #bfa257open of the last with-trend candle (for a counter-trend candle that makes a new extreme — the open of its “with-trend half”)on every with-trend candle
Level 2light blue #7fb8ffbody midpoint of the anchor candle, (open + close)/2on a new with-trend anchor

Parameters

ParameterValue
Anchor candle (start)|close − open| ≥ 70% (high − low); direction by colour. Was 75% (#89), lowered in #92: Andrey's anchors had 73.7% and 74.4%
Crossingclose only; a wick merely “tests” the level
End (golden)close beyond level 1 and beyond level 2, using levels as of the previous candle
End (“Andrey's trend”)close beyond level 2
Min. lengthon the tab, < 3 candles is short and excluded from stats; in research all are counted, a “poke” is ≤ 2 candles (27% on M5)
TFM5; H1 is built from closed M5 bars by Moscow-time hour (an hour is closed once the :55 M5 bar exists)
Not in the rule“body ≥ 2 STEP” (min_body), “body ≥ k × median range of 20 candles” (rel_body)

Algorithm (up; down is mirrored)

  1. No trend. Wait for an anchor. It opens the trend: level 2 = its body midpoint, level 1 = its open.
  2. Each candle. Compare the close with the levels as of the previous candle: below both → break (the trend is closed on the previous candle; if the break candle is itself an anchor, a new trend starts right away in its direction). Below only one → the trend is alive; increment the “closes beyond one line” counter.
  3. Update. A with-trend candle moves level 1 to its open; if it is an anchor, level 2 moves to its body midpoint. A red candle with a new high moves level 1 to its open (the “green half”).

Code: mamba/lab/platform/s01/trend.py:61-101; golden mode changes a single condition, line 71: if past2 and (not golden or (c - l1) * d < 0).

RTS RIZ6 4 Nov 2026 M5: golden downtrend 18:15 → 20:50 with two stepped lines
Andrey's example: RTS RIZ6, 4 Nov 2026, M5. Anchor at 18:15 (close 93,530). At 19:20 close 93,260 — above gold (93,230), below blue (93,410), trend alive. Exit at 20:50: close 92,180 above both (92,170 and 92,045). 31 candles, best move 1,610 pts, net 1,350, giveback 260, 8 closes beyond one line. The regular tab would have closed at 20:40.

Link to segments and DH

  • Rule B (golden_seg). Entry into an s01 segment + a fresh with-trend golden M5 activation (anchor ≤ 3 candles ago — B3, ≤ 6 — B6) + an S DH bottom (D4: S min confirmed in the barrier, S still in the barrier). Forward-test cutoff: 2 Nov 20:45 UTC.
  • “Two chains” draws the golden M5 and H1 trends over the small and large chains.
  • A freshness timer, not a direction. In golden_seg the golden trend works as a “timer” inside an existing s01 entry; as a standalone source of direction it is negative.

What the tests showed

StudyResult
#115, M5, 10 instruments8,067 stretches, median 5 candles, 37% with no move. “Anchor to break”: −0.017% per trade (−0.027% after commission), all 10 instruments negative. Big ones (36%) give +0.132%, but are only visible in hindsight.
#121, H12,259 stretches; groups 34 / 23 / 43%. A big one: 11 hours, move 1.08% ≈ 8.2 STEP. “Hold until break”: +0.008%, p 0.78 (1st half +, 2nd half −).
super-trend #5, golden_segs01 baseline: 2,869 trades, −0.124 R. With D4, the result decays with golden-trend age: 0 candles +0.85 R … 12+ −0.81 R. Anchor ≤ 3 + D4: 79 trades, +0.644 R; ≤ 6 + D4: 124, +0.457 R. Not significant after correcting for 64 combinations.
Rule B forward testB3: 8 trades, +1.564 R, win rate 75%; B6: 13, +0.375 R; all 248 trades −0.314 R. Small sample.
#143 Fable, RTS + MIXGolden M5 start: −0.075 R. Against the large chain: 994 trades, −0.330 R, t −3.9 — the only significant result, and it is negative. Conclusion: “gives no direction… consistently harmful against the large chain” — useful as a veto filter.
cryptotrader #29 (“Andrey's trend”, not golden)5m–1h: net −4…−13 bp per trade. 4h candidate: 6,249 trades, +22.8 bp, PF 1.11 — picked from 24 variants.
RTS RIZ6 H1, 30 Oct – 5 Nov 2026: golden trend stretches, green up, red down
RTS RIZ6, H1, 30 Oct – 5 Nov: golden trend stretches. Andrey's M5 example sits inside an open hourly downtrend that began on 2 Nov at 13:00.

Open questions ⟳

  • Start of a stretch: the anchor candle (code) or any crossing of both lines (Andrey's words, 5 Nov)?
  • Size: “best close” or “exit close − entry close”? In points, %, median ranges or STEP?
  • How many groups: “three” by convention, or “no move + two” from the data (M5 has no three groups, H1 does)?
  • Exclude weekend sessions? Per the owner's decision, H1 alerts and trading are not being built yet.
Sources in the projects (9)
  • mamba/lab/research/cycles/golden_trend_115.md — #115: definition, Andrey's example, 8,067 M5 runs
  • mamba/lab/research/cycles/golden_trend_h1_121.md — #120–#121: H1
  • mamba/lab/research/cycles/golden_seg_dh.md — super-trend #5: segment + golden M5 + DH
  • mamba/lab/research/fable_rts_mix/README.md — #143: independent honest check
  • mamba/lab/research/andrey-20261105/summary.md — 5 Nov call — origin of the idea
  • mamba/lab/platform/s01/trend.py — mark(..., golden=True), break at l. 71; H1 from M5 at l. 121–128
  • mamba/lab/research/dh_filter/forward/RULE.md — rule B (B3/B6)
  • mamba/lab/SECTIONS.md — “Golden trend” section log
  • cryptotrader/step_prot/trend/README.md — “Andrey's trend” on crypto, without golden mode