OPEN-SOURCE SCRIPT

Anchored Powered KAMA [LuxAlgo]

4737
The Anchored Powered KAMA tool is a new flavor of the famous Kaufman's Adaptive Moving Average (KAMA).

It adds 5 different anchoring periods, a power exponent to the original KAMA calculation to increase the degree of filtering during ranging trends, and standard deviation bands calculated against the KAMA itself.

🔶 USAGE

syot kilat

In the image above we can see the different parts of the tool, it displays the Anchored Powered KAMA surrounded by standard deviation bands at 2x (solid) and 1x (dashed) by default.

This tool provides a simple and easy way to determine if the current market is ranging or trending and where the market extremes are in the current period.

syot kilat

As a rule of thumb, traders may want to trade extremes in ranges and pullbacks in trends.

When the KAMA is flat, a range is in place, so traders may want to wait for the price to reach an extreme before opening a trade in the other direction.

Conversely, if the KAMA is moving up or down, a trend is in place and traders may want to wait for the price to pull back to the KAMA before opening a trade in the direction of the trend.

🔹 Anchor Period

syot kilat

On the above chart, we can see different anchor periods on different chart timeframes.

This option is very useful for those traders who use multi-timeframe analysis, allowing them to see how the market behaves over different timeframes.

The valid values for this parameter are:

  • Hourly
  • Daily
  • Weekly
  • Monthly
  • Yearly


The tool has a built-in Auto feature for traders convenience, it automatically selects the optimal Anchor Period in function of the chart timeframe.
  • timeframes up to 2m: Hourly
  • timeframes up to 15m: Daily
  • timeframes up to 1H: Weekly
  • timeframes up to 4H: Monthly
  • larger timeframes: Yearly


🔹 Choosing the Right Anchor Period

syot kilat

In the chart above we can see the custom error message that the tool displays when the Auto feature is disabled and the Anchor Period is too large for the current chart timeframe.

Traders can select a smaller Anchor Period or a larger chart timeframe for the tool to display correctly.

🔶 DETAILS

The tool uses Welford's algorithm to calculate the KAMA's standard deviation, then plots the outer bands at the multiplier specified in the settings panel, and the inner bands at the multiplier specified minus 1.

🔹 Power Exponent

syot kilat

The graph above shows how different values of this parameter can affect the output.

To display the original KAMA a value of 1 must be set, by default this parameter is set to 2.

The higher the value, the better the tool's ability to detect ranges.

🔶 SETTINGS

  • Anchor Period: Select up to 5 different time periods from Hourly, Daily, Weekly, Monthly, and Yearly.
  • Source: Choose the source for all calculations.
  • Power Exponent: Fine-tune the KAMA calculation, a value of 1 will output the original KAMA, and is set to 2 by default.
  • Band Multiplier: Select the multiplier for the standard deviation bands.

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.