peacefulLizard50262

Pivot Point Moving Average (PPMA)

The script is an implementation of an indicator called "PPMA", which stands for "Pivot Point Moving Average." This indicator is designed to be used as a overlay, meaning that it will be plotted on top of the underlying asset's price chart.

The main function of the PPMA indicator is to calculate a moving average based on pivot points of the underlying asset. Pivot points are commonly used in technical analysis to identify key levels of support and resistance, and this indicator uses the pivot points in a unique way to calculate the moving average.

The indicator's main function, "ppma()," is defined as taking two input parameters, "left" and "right." These parameters determine the number of bars to the left and right of a pivot point that will be used to calculate the moving average. The function uses the "ta.pivothigh()" and "ta.pivotlow()" functions to identify pivot points for the high and low prices, respectively. Then the function uses the "ta.change()" function to identify if there is a change in pivot point.

The function keeps track of the number of bars and their sum from the last pivot point until the next pivot point is reached. If there is a change in pivot point, it will reset the count and sum. It will return the sum divided by the count, which is the moving average of the prices between the two pivot points.

The script then uses the PPMA function to plot the moving average on the chart using the "plot()" function. The user is able to adjust the number of bars to the left and right of the pivot point using the "left" and "right" input parameters.

In summary, the PPMA indicator is a unique moving average that uses pivot points to calculate the average. It is designed to be used as an overlay on top of an underlying asset's price chart and can be adjusted by the user to suit their needs. It can help traders identify key levels of support and resistance in the underlying asset.

Script open-source

Dans le véritable esprit de TradingView, l'auteur de ce script l'a publié en open-source, afin que les traders puissent le comprendre et le vérifier. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais la réutilisation de ce code dans une publication est régie par le règlement. Vous pouvez le mettre en favori pour l'utiliser sur un graphique.

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.

Vous voulez utiliser ce script sur un graphique ?