CapitanAce

POC Indicator

This simplified Point of Control (POC) indicator for TradingView is designed to identify and plot the price level where the highest volume of trading occurred over a specified period. The script works as follows:

Input and Initialization: The user specifies a length for the analysis period. Variables highestVolPrice and highestVol are initialized to track the price with the highest volume and the highest volume encountered, respectively.

Volume Analysis Loop: For each bar in the specified period (up to length bars back from the current bar), the script compares the volume of the current bar (volume) to highestVol. If the current bar's volume is higher, highestVol and highestVolPrice are updated to reflect the volume and closing price of the current bar.

Plotting the POC: Instead of using a horizontal line (hline), which cannot be dynamically updated within the loop, the script uses plot to draw the POC. This plotting function draws a line on the chart that represents the closing price level associated with the highest volume observed within the analysis period.

Resetting Variables: To ensure the indicator updates correctly with each new bar, the script resets highestVol and highestVolPrice at the start of the analysis for each new period. This step is designed to recalculate the POC dynamically as new data comes in.

This approach offers a basic method for visualizing significant price levels where substantial trading activity occurred, potentially indicating areas of strong support or resistance. However, it's a simplified model and does not calculate the true POC based on a detailed volume profile across all price levels within the period.

开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?