AggBands (v1) [qrsq]

qrsq Uppdaterad   
The "AggBands" indicator is a custom trading indicator designed to provide a consolidated view of the price action across multiple assets or trading pairs. It combines the price data from multiple tickers and calculates an aggregated price using user-defined weights for each ticker.

The indicator starts by defining the tickers to be included in the aggregation. You can choose from predefined configurations such as "BTC PAIRS," "CRYPTO TOTAL MARKET CAP," "TOP 5 PAIRS," "TOP 5 MEMECOINS," "SPX," "DXY," or "FANG." Each configuration includes specific tickers or indices relevant to the chosen category.

The indicator then fetches the closing, high, and low prices for each ticker and applies the user-defined weights to calculate the aggregated prices. The aggregated prices are normalized within a specified length to provide a consistent scale across different assets or pairs.

Next, the indicator calculates the midpoint, which is the average of the highest high and lowest low of the aggregated prices over a specified aggregation period.

To assess the volatility, the indicator calculates the price range and applies the Average True Range (ATR) indicator to determine the volatility value. The standard deviation is then computed using the price range and aggregation period, with an additional scaling factor applied to the volatility value.

Based on the standard deviation, the indicator generates multiple bands above and below the midpoint. By default, three standard deviation bands are calculated, but the user can choose between one and five bands. The upper and lower bands are smoothed using various moving average (MA) types, such as Simple Moving Average (SMA), Exponential Moving Average (EMA), Smoothed Moving Average (SMMA/RMA), Weighted Moving Average (WMA), Volume Weighted Moving Average (VWMA), Volume Weighted Average Price (VWAP), or Arnaud Legoux Moving Average (ALMA). The user can also adjust the length, offset, and sigma parameters for the moving averages.

The indicator can optionally smooth the midpoint, upper bands, and lower bands using a separate set of moving average parameters.

The indicator can be useful for traders and analysts who want to gain a consolidated view of price movements across multiple assets or trading pairs. It helps identify trends, volatility, and potential support and resistance levels based on the aggregated price and standard deviation bands. Traders can use this information to make informed decisions about trading strategies, risk management, and market analysis.
Update the chart and some default values.
Update the chart and some default values.
Updated version. Fixed issues, more presets, cleaner UI.

Skript med en öppen källkod

I sann TradingView-anda har författaren publicerat detta skript med öppen källkod så att andra handlare kan förstå och verifiera det. Hatten av för författaren! Du kan använda det gratis men återanvändning av den här koden i en publikation regleras av våra ordningsregler. Du kan ange den som favorit för att använda den i ett diagram.

Frånsägelse av ansvar

Informationen och publikationerna är inte avsedda att vara, och utgör inte heller finansiella, investerings-, handels- eller andra typer av råd eller rekommendationer som tillhandahålls eller stöds av TradingView. Läs mer i Användarvillkoren.

Vill du använda det här skriptet i ett diagram?