OPEN-SOURCE SCRIPT
更新済

Troy H v1

1 168
Troy H is a companion pane for the Troy accumulation model. It plots the internal readings that drive Troy's entries and exits, so you can see why a signal fired instead of only that it fired.

It must be run alongside the Troy overlay. Troy places its markers on price; Troy H shows the state underneath them. Neither is complete on its own — the overlay tells you what happened, this pane tells you what the model was reading at the time. This is why the published chart carries both.

What the pane shows

The histogram — volume-weighted spread. This is the distance between price and its own smoothed anchor, weighted by the volume that moved it. Amber columns above zero mean price is stretched above the anchor on real participation. Teal below zero means stretched below. Darker patches mark bars where the move happened on thin volume, which the model treats as less trustworthy than the same distance on heavy volume.

The point of weighting by volume is that a two percent move on quiet tape and a two percent move on heavy tape are not the same event, but a plain spread reading scores them identically.

The magenta line — the smoothed signal. A short moving average of the spread. Crossings between the histogram and this line are what the model reads as a turn in the stretch, rather than a fixed level being touched.

The horizontal levels. These are the model's current arming thresholds, drawn live. They are not fixed numbers. They are learned from this symbol's own recent distribution of spread readings, so the same code arms at different absolute values on a quiet stock and a volatile one. Watching them move is the clearest way to see the model recalibrating to the instrument.

The zero line is the anchor. Above it price is extended, below it price is discounted, relative to the model's own reference rather than to a fixed average.

The vertical bands mark bars where the model's gates were open. Teal for the accumulation side, magenta for the harvest side.

The triangles mirror the overlay's entries and exits, on the same bars, so you can line a marker up against the reading that produced it. They come from a shadow position tracker inside this pane that reproduces the overlay's position rules exactly. If a triangle here does not land on the same bar as the overlay, the two are out of sync and neither should be trusted until that is resolved.

The readings table

Regime — whether the model currently classifies the tape as trending up, trending down, or neither. Entries are only permitted outside an established uptrend.

Spread — the current volume-weighted distance from the anchor, in the same units as the histogram.

PnL Z — how unusual the shadow position's current profit or loss is against its own history, in standard deviations. This is a measure of the position, not of price. It is what lets the model tell an ordinary drawdown from an exceptional one on the same instrument.

VFI — the volume flow reading and the size multiplier it is currently contributing.

DMFI — a directional money-flow reading, centred at zero, and its current multiplier. Oversold readings increase conviction. Overbought readings do not reduce it below the base — the multiplier only ever adds.

Buy$ — the size the model would commit on an entry right now, given all the multipliers above. This is a relative figure showing how conviction stacks, not a recommendation of how much anyone should trade.

Zone — which arming zone, if any, the spread currently sits in. A dash means no zone is active.

How to read it

Watch three things together: where the histogram sits against the learned thresholds, whether the regime permits action, and what the position reading is doing. An entry marker appearing while the spread is deeply negative, the regime is not up, and the position reading is stretched is the model's clearest case. A marker appearing with only one of those in place is a weaker one, and the pane is what lets you tell them apart.

The size row is the other reason to run this pane. Troy does not commit the same amount to every entry. Watching Buy$ move as the multipliers change shows you how much the model actually thinks of a given setup, which the overlay's marker alone cannot tell you.

Limitations, and what this will not do

This pane does not trade and does not issue advice. It is a display of one model's internal state.

The position readings come from a hypothetical book held inside the script, not from any real account. It assumes fills at the close of the signal bar, with no slippage, spread, or commission. Real results will differ, and on thin instruments they will differ substantially.

The learned thresholds need history to settle. On a chart with few bars loaded, or immediately after adding the script, the levels will move around before stabilising. Give it a full data set before reading anything into them.

The volume-weighted components require meaningful volume data. On instruments where volume is synthetic, aggregated across venues, or simply absent, those readings degrade and the multipliers they feed will be less informative.

Nothing here is a forecast. The readings describe what has already happened. Past behaviour of any model, including this one, does not indicate what it will do next.

This is a decision-support display, not a system to follow. Use it to understand what a model is reading, and make your own decisions.
リリースノート
Troy H is the companion pane for the Troy indicator, and this release is the biggest one it has had. The short version: the pane now runs the exact same signal engine as the current Troy overlay, line for line, so the two can never disagree again. Everything you liked about the display is unchanged. A few things you asked for are better.

ONE ENGINE, TWO VIEWS

Until now, Troy and Troy H each carried their own copy of the signal logic, and over time the overlay moved ahead. This update rebuilds Troy H directly from the current Troy source, so every gate, every filter, and every piece of position math in the pane is identical to the overlay — not similar, identical. Load them together and every triangle in the pane lands on the same bar as the triangle on price. If you ever see them differ, one of the two is simply an old version.

WHAT THE NEWER ENGINE DOES BETTER

Three upgrades ride along with the shared engine, and each one shows up in real signals.

Smarter downtrend timing. Troy waits for a decline to mature before buying into it. The old pane reset that patience clock to zero on any single green flicker, which made it skip good entries in choppy declines. The current engine lets the clock decay gradually instead, so a one-bar bounce no longer erases a mature downtrend.

Adaptive entry spacing. Each new buy must sit a minimum distance from the last one, measured in ATR. That distance now stretches automatically when price is falling hard and fast — so in a steep cascade the engine buys less often but lower, instead of stacking entries at nearly the same price.

Correct cycle handling. The buy that closes one accumulation cycle and opens the next is now handled in the proper order and is always allowed through, with the per-cycle buy cap applied everywhere else. This is why the pane's markers now reconcile perfectly with the overlay's trade accounting.

A COLOR FIX THAT READS THE RIGHT WAY

The red and green mountains behind the histogram show how stretched the open position's profit is compared to its own recent history — the engine's built-in fear and greed gauge. Those colors are now intuitive: green when the position is unusually fat with profit, red when it is unusually deep underwater. Watch the red mountain reach down toward the lower guide line and you are watching the capitulation buy zone arm itself in real time.

WHAT DID NOT CHANGE

The whole look you know: gold columns in bullish regimes and blue in bearish ones, bright while momentum is building and dimmed the moment it starts to fade; the magenta signal line; the guide lines for the two override thresholds; the cyan and magenta zone backgrounds with their color and opacity settings; the divergence dots; and the compact state table with Regime, Spread, PnL Z, VFI, DMFI, Buy$, and Zone.

UPGRADING

Use this version of Troy H together with the current Troy overlay — they are built as a pair and share the same version stamp. Your chart settings carry over; a couple of new inputs simply appear alongside the old ones. If a marker location surprises you after updating, it is the newer engine being smarter, not the pane being wrong — the overlay will show the same thing on the same bar.

免責事項

これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。