OPEN-SOURCE SCRIPT
Updated [blackcat] L1 Trigger Variable Moving Average (TVMA)

TVMA is a special type of moving average that differs from the traditional usage of moving averages. TVMA is a lagging moving average, and the degree of lag is determined by the parameter "tvmaLength". When "tvmaLength" = 1, the TVMA line coincides completely with the data source curve without any lag. As the value of "tvmaLength" increases, the lagging effect of the moving average becomes more pronounced. Therefore, TVMA is a very unique type of moving average that aims to obtain lagging signals rather than leading signals.
The purpose of TVMA as a moving average is to provide crossover signals (golden cross and death cross) as reference signals for buying and selling decisions. This indicator is usually used in conjunction with other technical indicators to enhance the accuracy of trading signals. The lagging characteristic of TVMA allows it to generate better trading signals during major trend developments and helps traders avoid being influenced by short-term fluctuations. However, during periods of intense market volatility, this lagging feature may cause delayed signals and result in missed opportunities for good buy or sell points.
Therefore, when using TVMA for trading purposes, it's important to adjust parameters in order to obtain better lagging moving average signals. Additionally, combining other technical indicators and analyzing market trends can also improve the accuracy of trading signals generated by TVMA.
The script defines an indicator called "[blackcat] L1 Trigger Variable Moving Average (TVMA)" using the indicator() function. It also defines a function called tvma() that calculates the TVMA (Trigger Variable Moving Average) based on a given source, length, and alpha value.
The main logic of the script involves calculating the TVMA value using the tvma() function with user-defined inputs. The source data for calculation is taken from the closing price (close). The length of TVMA and its alpha value are also defined by user inputs.
Finally, the calculated TVMA values are plotted on the chart using the plot() function with specified color and title.
The purpose of TVMA as a moving average is to provide crossover signals (golden cross and death cross) as reference signals for buying and selling decisions. This indicator is usually used in conjunction with other technical indicators to enhance the accuracy of trading signals. The lagging characteristic of TVMA allows it to generate better trading signals during major trend developments and helps traders avoid being influenced by short-term fluctuations. However, during periods of intense market volatility, this lagging feature may cause delayed signals and result in missed opportunities for good buy or sell points.
Therefore, when using TVMA for trading purposes, it's important to adjust parameters in order to obtain better lagging moving average signals. Additionally, combining other technical indicators and analyzing market trends can also improve the accuracy of trading signals generated by TVMA.
The script defines an indicator called "[blackcat] L1 Trigger Variable Moving Average (TVMA)" using the indicator() function. It also defines a function called tvma() that calculates the TVMA (Trigger Variable Moving Average) based on a given source, length, and alpha value.
The main logic of the script involves calculating the TVMA value using the tvma() function with user-defined inputs. The source data for calculation is taken from the closing price (close). The length of TVMA and its alpha value are also defined by user inputs.
Finally, the calculated TVMA values are plotted on the chart using the plot() function with specified color and title.
Release Notes
OVERVIEWThe [blackcat] L1 Trigger Variable Moving Average (TVMA) indicator offers a unique approach to moving averages by introducing a variable smoothing factor. Unlike traditional moving averages, TVMA is designed to provide lagging signals, which can help traders identify major trends while filtering out short-term noise. This indicator plots the TVMA line on the chart, offering clear visual cues for potential buy and sell decisions based on golden crosses and death crosses 📉↗️.
FEATURES
Calculates a Time-Variable Moving Average (TVMA) using a custom function:
Source Series: Defaults to closing prices but can be customized.
Length: Determines the number of bars considered in the calculation.
Smoothing Factor: Controls the responsiveness of the moving average.
Plots the TVMA line on the chart with a distinctive fuchsia color for easy identification 🎨
Provides crossover signals (golden cross and death cross) for buy/sell references.
Offers flexibility through adjustable parameters for personalized use.
HOW TO USE
Add the indicator to your TradingView chart by selecting it from the indicators list.
Choose the desired source series (e.g., close, open, high, low).
Adjust the TVMA Length parameter to control the lagging effect:
Lower values reduce lag, aligning closely with the price curve.
Higher values increase lag, providing smoother transitions.
Monitor the TVMA line on the chart to observe smoothed price trends and crossover signals.
Combine this indicator with other tools for confirmation before making trading decisions.
LIMITATIONS
The indicator might lag behind rapid price movements due to its smoothing nature.
During periods of high volatility, delayed signals may occur, potentially missing good entry/exit points.
Users should experiment with different settings to optimize performance for their specific assets and timeframes.
NOTES
TVMA is particularly useful for identifying major trends and avoiding short-term fluctuations.
To enhance signal accuracy, combine TVMA with other technical indicators and analyze broader market trends.
Ensure that you have sufficient historical data available for accurate calculations.
Test the indicator thoroughly on demo accounts before applying it to live trading 🔍.
Customize the appearance and parameters as needed to fit your trading strategy.
TECHNICAL DETAILS
TVMA is calculated using a custom function that incorporates a variable smoothing factor.
The script defines the TVMA calculation based on user-defined inputs for source data, length, and alpha value.
The resulting TVMA values are plotted on the chart with specified colors and titles for clear visualization.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
For quick access on a chart, add this script to your favorites — learn more here.
Avoid losing contact!Don't miss out! The first and most important thing to do is to join my Discord chat now! Click here to start your adventure: discord.com/invite/ZTGpQJq 防止失联,请立即行动,加入本猫聊天群: discord.com/invite/ZTGpQJq
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
For quick access on a chart, add this script to your favorites — learn more here.
Avoid losing contact!Don't miss out! The first and most important thing to do is to join my Discord chat now! Click here to start your adventure: discord.com/invite/ZTGpQJq 防止失联,请立即行动,加入本猫聊天群: discord.com/invite/ZTGpQJq
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.