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.

Скрипт с открытым кодом

В истинном духе TradingView автор этого скрипта опубликовал его с открытым исходным кодом, чтобы трейдеры могли понять, как он работает, и проверить на практике. Вы можете воспользоваться им бесплатно, но повторное использование этого кода в публикации регулируется Правилами поведения. Вы можете добавить этот скрипт в избранное и использовать его на графике.

Отказ от ответственности

Все виды контента, которые вы можете увидеть на TradingView, не являются финансовыми, инвестиционными, торговыми или любыми другими рекомендациями. Мы не предоставляем советы по покупке и продаже активов. Подробнее — в Условиях использования TradingView.

Хотите использовать этот скрипт на графике?