PINE LIBRARY
업데이트됨 TAIndicators

This library offers a comprehensive suite of enhanced technical indicator functions, building upon TradingView's built-in indicators. The primary advantage of this library is its expanded flexibility, allowing you to select from a wider range of moving average types for calculations and smoothing across various indicators.
The core difference between these functions and TradingView's standard ones is the ability to specify different moving average types beyond the default. While a standard ta.rsi() is fixed, the rsi() in this library, for example, can be smoothed by an 'SMMA (RMA)', 'WMA', 'VWMA', or others, giving you greater control over your analysis.
█ FEATURES
This library provides enhanced versions of the following popular indicators:
█ HOW TO USE
To use this library in your scripts, import it using its publishing link. You can then call the functions directly.
For example, to calculate a Weighted Moving Average (WMA) and then smooth it with a Simple Moving Average (SMA):
Pine Script®
█ Why Choose This Library?
If you're looking for more control and customization than what's offered by the standard built-in functions, this library is for you. By allowing for a variety of smoothing methods across multiple indicators, it enables a more nuanced and personalized approach to technical analysis. Fine-tune your indicators to better fit your trading style and strategies.
The core difference between these functions and TradingView's standard ones is the ability to specify different moving average types beyond the default. While a standard ta.rsi() is fixed, the rsi() in this library, for example, can be smoothed by an 'SMMA (RMA)', 'WMA', 'VWMA', or others, giving you greater control over your analysis.
█ FEATURES
This library provides enhanced versions of the following popular indicators:
- Moving Average (ma): A versatile MA function that includes optional secondary smoothing and Bollinger Bands.
- RSI (rsi): Calculate RSI with an optional smoothed signal line using various MA types, plus built-in divergence detection.
- MACD (macd): A MACD function where you can define the MA type for both the main calculation and the signal line.
- ATR (atr): An ATR function that allows for different smoothing types.
- VWAP (vwap): A comprehensive anchored VWAP with multiple configurable bands.
- ADX (adx): A standard ADX calculation.
- Cumulative Volume Delta (cvd): Provides CVD data based on a lower timeframe.
- Bollinger Bands (bb): Create Bollinger Bands with a customizable MA type for the basis line.
- Keltner Channels (kc): Keltner Channels with selectable MA types and band styles.
- On-Balance Volume (obv): An OBV indicator with an optional smoothed signal line using various MA types.
- ... and more to come! This library will be actively maintained, with new useful indicator functions added over time.
█ HOW TO USE
To use this library in your scripts, import it using its publishing link. You can then call the functions directly.
For example, to calculate a Weighted Moving Average (WMA) and then smooth it with a Simple Moving Average (SMA):
import ActiveQuants/TAIndicators/1 as tai
// Calculate a 20-period WMA of the close
// Then, smooth the result with a 10-period SMA
[myWma, smoothedWma] = tai.ma("WMA", close, 20, "SMA", 10)
plot(myWma, color = color.blue)
plot(smoothedWma, color = color.orange)
█ Why Choose This Library?
If you're looking for more control and customization than what's offered by the standard built-in functions, this library is for you. By allowing for a variety of smoothing methods across multiple indicators, it enables a more nuanced and personalized approach to technical analysis. Fine-tune your indicators to better fit your trading style and strategies.
릴리즈 노트
v2Updated:
Please be aware that these are BREAKING CHANGES. You will need to update any of your existing scripts that use these functions to ensure they continue to work correctly.
1. Standardized Returns for ma(), atr(), and obv()
To make the library more predictable and robust, the ma(), atr(), and obv() functions have been refactored.
Old Behavior: These functions used to return a single value or a list of values depending on the parameters used.
New Behavior: They will always return a complete list (a tuple) of all possible outputs. If an output is not applicable (e.g., you don't request smoothing), its place in the list will now be filled with na.
Action Required: You must update how you call these functions to receive a list.
Example for ma():
- Old Code:
// This will no longer work
mySimpleMa = calc.ma("SMA", close, 20)
- New Code:
// You must now receive the full list of returned values.
// Use the underscore _ to ignore any values you don't need.
[mySimpleMa, _, _, _] = calc.ma("SMA", close, 20)
The same logic applies to the atr() and obv() functions. This change ensures a consistent and predictable output every time you call the function.
2. New Pivot Outputs for rsi()
The rsi() function has been enhanced to be even more useful for divergence and price action analysis.
New Feature: In addition to divergence booleans, rsi() now also returns two new booleans at the end of its output list:
- A boolean indicating a pivot low has been found on the RSI.
- A boolean indicating a pivot high has been found on the RSI.
Action Required: Because new values have been added to the output list, you must update your code to account for them.
Example for rsi():
- Old Code:
// This will cause a compiler error now
[rsiVal, smoothRsi, _, _, bullDiv, bearDiv] = calc.rsi(close, 14, "EMA", 10)
- New Code:
// Add variables for the new pivot outputs at the end.
[rsiVal, smoothRsi, _, _, bullDiv, bearDiv, isPivotLow, isPivotHigh] = calc.rsi(close, 14, "EMA", 10)
Please update your scripts accordingly to take advantage of these improvements. These changes make the library more stable and feature-rich for everyone.
As always, thank you for your support, and feel free to ask any questions in the comments below!
파인 라이브러리
진정한 트레이딩뷰 정신에 따라 작성자는 이 파인 코드를 오픈 소스 라이브러리로 공개하여 커뮤니티의 다른 파인 프로그래머들이 재사용할 수 있도록 했습니다. 작성자에게 건배! 이 라이브러리는 개인적으로 또는 다른 오픈 소스 출판물에서 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰의 적용을 받습니다.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
파인 라이브러리
진정한 트레이딩뷰 정신에 따라 작성자는 이 파인 코드를 오픈 소스 라이브러리로 공개하여 커뮤니티의 다른 파인 프로그래머들이 재사용할 수 있도록 했습니다. 작성자에게 건배! 이 라이브러리는 개인적으로 또는 다른 오픈 소스 출판물에서 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰의 적용을 받습니다.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.