OPEN-SOURCE SCRIPT

Metallic Retracement Tool

291
I made a version of the Metallic Retracement script where instead of using automatic zig-zag detection, you get to place the points manually. When you add it to the chart, it prompts you to click on two points. These two points become your swing range, and the indicator calculates all the metallic retracement levels from there and plots them on your chart. You can drag the points around afterwards to adjust the range, or just add the indicator to the chart again to place a completely new set of points.

The mathematical foundation is identical to the original Metallic Retracement indicator. You're still working with metallic means, which are the sequence of constants that generalize the golden ratio through the equation x² = kx + 1. When k equals 1, you get the golden ratio. When k equals 2, you get silver. Bronze is 3, and so on forever. Each metallic number generates its own set of retracement ratios by raising alpha to various negative powers, where alpha equals (k + sqrt(k² + 4)) / 2. The script algorithmically calculates these levels instead of hardcoding them, which means you can pick any metallic number you want and instantly get its complete retracement sequence.

What's different here is the control. Automatic zig-zag detection is useful when you want the indicator to find swings for you, but sometimes you have a specific price range in mind that doesn't line up with what the zig-zag algorithm considers significant. Maybe you're analyzing a move that's still developing and hasn't triggered the zig-zag's reversal thresholds yet. Maybe you want to measure retracements from an arbitrary high to an arbitrary low that happened weeks apart with tons of noise in between. Manual placement lets you define exactly which two points matter for your analysis without fighting with sensitivity settings or waiting for confirmation.

The interactive placement system uses TradingView's built-in drawing tools, so clicking the two points feels natural and works the same way as drawing a trendline or fibonacci retracement. First click sets your starting point, second click sets your ending point, and the indicator immediately calculates the range and draws all the metallic levels extending from whichever point you chose as the origin. If you picked a swing low and then a swing high, you get retracement levels projecting upward. If you went from high to low, they project downward.

Moving the points after placement is as simple as grabbing one of them and dragging it to a new location. The retracement levels recalculate in real-time as you move the anchor points, which makes it easy to experiment with different range definitions and see how the levels shift. This is particularly useful when you're trying to figure out which swing points produce retracement levels that line up with other technical features like previous support or resistance zones. You can slide the points around until you find a configuration that makes sense for your analysis.

Adding the indicator to the chart multiple times lets you compare different metallic means on the same price range, or analyze multiple ranges simultaneously with different metallic numbers. You could have golden ratio retracements on one major swing and silver ratio retracements on a smaller correction within that swing. Since each instance of the indicator is independent, you can mix and match metallic numbers and ranges however you want without one interfering with the other.

The settings work the same way as the original script. You select which metallic number to use, control how many power ratios to display above and below the 1.0 level, and adjust how many complete retracement cycles you want drawn. The levels extend from your manually placed swing points just like they would from automatically detected pivots, showing you where price might react based on whichever metallic mean you've selected.

What this version emphasizes is that retracement analysis is subjective in terms of which swing points you consider significant. Automatic detection algorithms make assumptions about what constitutes a meaningful reversal, but those assumptions don't always match your interpretation of the price action. By giving you manual control over point placement, this tool lets you apply metallic retracement concepts to exactly the price ranges you care about, without requiring those ranges to fit someone else's definition of a valid swing. You define the context, the indicator provides the mathematical framework.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.