Mis à jour

Titpaud Hose

885
Titpaud Hose draws "rigid hoses" on the chart: an upper hose resting on the highs and a lower hose resting under the lows, extended into the future. Think of a garden hose of a given stiffness pressed against the candles from outside: a soft hose follows every wiggle, a stiff hose only touches the big turning points. The stiffest upper and lower hoses frame the market structure and mark where price has reached the outer edge of its recent path.

The indicator is meant as an attention tool. It shows where price is near or beyond an extreme of its own structure, so you can look for confirmation with your other tools. It is not a buy or sell signal on its own (see "What the numbers say" below).


HOW IT IS CALCULATED

- Math: asymmetric penalized smoothing (Whittaker smoother with asymmetric weights, a method published by Paul Eilers), computed in log price. Candles outside the hose get a heavy weight and candles inside a tiny one, so the hose is pushed against the extremes; the stiffness penalizes bending. The stiffness is expressed in bars (higher = more rigid).
- Candles are grouped automatically (highest high / lowest low of each group, about 300 points per hose) so a window of up to 5000 bars stays light.
- Projection: the hose is extended a number of bars into the future. In Curved mode it keeps its bend but never turns back (it goes flat instead); in Straight mode it continues along its last tangent.
- All the code is original.


STIFFNESS MODES

- Auto (default): the last confirmed swings are found with an ATR zigzag (a swing is confirmed when price reverses by 4 x ATR50 by default). For each of the last N swings ("swings to touch", 4 by default), the script searches the stiffest hose that still touches it (tolerance 0.3 x ATR50), from 400 bars down. One hose is drawn per distinct stiffness: big swings give stiff hoses, intermediate swings softer ones. The upper and lower sides are computed separately. The info table lists the stiffnesses in use.
- Manual: a center stiffness, a step and a number of hoses on each side (example: 30, 40, 50, 60, 70).


ATTENTION ZONE (beyond the stiffest hose)

- Fan: the hose of the current stiffest stiffness is recomputed as if price went 1.2, 2.5 and 4.5 x ATR50 beyond the edge on the current bar. The space between the edge and these recomputed hoses is filled with a gradient that fades outward; the 4.5 hose is drawn as a thin "stop" line. Because these are real recomputed hoses, the zone takes the natural shape of the hose bending around where it rests, and opens into the projection.
- Why these distances: on the contacts with the stiffest hose that were followed by a real swing (see below), the overshoot beyond the edge before the turn was 1.2 x ATR50 at the median, 2.5 in 3 cases out of 4 and 4.5 in 9 cases out of 10, about the same on every timeframe tested. The zone is tighter (-15 % by default) when the hose rests on 2 or more real swings, which overshot a little less.
- Inner gradient: a lighter gradient inside the hose, from 2 and 1 x ATR50 up to the edge, where real swings become more frequent.
- A very stiff hose (400) may not bend all the way to the pushed price, so the fan can be narrower than the nominal distances.


NEXT AND INNER HOSES (scenarios, dotted)

- "next N": the stiffest hose that Auto would choose if price went 1.2 x ATR50 (adjustable) beyond the stiffest edge now and turned there. It shows in advance how the hose would be redrawn.
- "inner N": the stiffest hose that Auto would choose if price made a swing 0.5 or 1 x ATR50 before the edge, without touching it. Shown only when it differs from the current stiffest hose (this happens when the oldest swing in the list was the only one the hose touched).
- These are what-if drawings recomputed on every bar, not fixed levels.


OTHER FEATURES

- Midline: middle (in log) between the stiffest upper and lower hoses.
- Cloud: fill between neighbouring hoses of each side, darker toward the stiffest.
- Afterglow (off by default): past positions of the stiffest hoses, each recomputed with only the candles known at that time, faded with age. Useful to see how the hose evolved without the benefit of hindsight.
- Supports label (off by default): number of real swings among the last 6 that the stiffest hose touches. A real swing here is an extreme followed by a 38.2 % return of the leg in 3 bars or more (leg of 3+ bars and at least 1 x ATR50).
- Retest marks (real time and replay only): triangle = stiffest hose touched and held, cross = close beyond it. A new touch counts only after price went 1 x ATR50 away.
- Visibility (%) at the top of the menu multiplies the opacity of everything drawn.
- Screener mode (Advanced): only for the Pine Screener; nothing is drawn and 9 hidden values are output (position in the hose, distances, state, slopes, width, stiffnesses).


ALERTS

- Contact with the stiffest upper / lower hose (real time, once per bar) and close above / below it (bar close), through "Any alert() function call" or the alert list.
- Alerts and retest marks use the stiffest hose level frozen at the open of each bar (computed on closed bars only), so the free right end of the hose cannot bend toward the live wick and trigger a false contact.


IMPORTANT: THE HOSES REDRAW

The whole hose is recomputed on the last bar. Its right end and its projection move as new candles arrive, and in Auto mode the stiffness can jump when a new swing is confirmed or when price pushes the hose away from the swings it was touching. The past part of the hose is therefore drawn with hindsight. Only the alerts, the retest marks and the afterglow traces use information available at the time.


WHAT THE NUMBERS SAY (honest use)

Tests in Python on 8 cryptocurrencies (BTC, ETH, SOL, XRP, BNB, DOGE, ADA, AVAX) from 15 minutes to 1 day, plus gold and the Nasdaq 100 on 4h to 1D, with the stiffest hose frozen at each bar (no future data), compared with shuffled prices and with the previous 20-bar high / low:
- About 4 contacts out of 10 with the stiffest hose are followed by a real swing within 10 bars. The overshoot figures above apply only to those.
- Beyond the edge, the chance of turning is roughly constant at about 8 to 10 % per 0.5 x ATR50 step; it does not grow with distance, and a simple 20-bar high / low does at least as well. 30 to 40 % of the contacts go straight through.
- Inside the hose, the chance of a real swing rises in the last ATR before the edge (about 7 % per step at 1 x ATR50, 11 % at 0.5, 25 % at the edge), but the same happens on shuffled prices: it comes from the shape of the hose, not from a reaction specific to it.
In short: the Hose describes where price stands relative to the extremes of its structure. Use it to know when to pay attention, and combine it with your own confirmation (structure, volume, momentum). It does not predict turns by itself. Past behaviour does not guarantee future results.


SETTINGS (menu order)

Main: Visibility, Stiffness mode, Swings to touch.
Show: upper / lower hose, projection, labels, midline, info table, attention zone, supports label, cloud, afterglow, next hose, retest marks, inner gradient, inner scenarios.
Alerts: contact, close beyond.
Attention zone: next hose distance, band 1 / band 2 / stop line distances, length, tightening with supports, transparencies, gradient steps, stop line style, inner gradient distances and transparencies, inner scenario distances.
Auto stiffness: swing size, touch tolerance.
Manual stiffness: center, step, hoses on each side.
Hose: source (wicks / bodies), type (curved / straight), window, projection.
Afterglow: number of traces, spacing, stiffness of the traces, fade, tail.
Style and colours, Advanced (Screener mode).
Notes de version
New setting "Max stiffness (bars)" in the Auto stiffness group: 400 (as before) or 800 (new default). With 800, Auto also tries stiffnesses 566 and 800, which finds straighter outer hoses on long swings. A window of 2000 bars or more is recommended with 800 (with 1000 bars a 800 hose uses only about 20 points). The Next hose, inner scenarios and afterglow searches follow the same cap.

Clause de non-responsabilité

Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.