PROTECTED SOURCE SCRIPT

PC*VC Moving Average old

Theo federalTacos5392b
The code calculates the "Price Coefficient" (PC) and "Volume Coefficient" (VC) for three different lengths. PC is calculated by taking the difference between the current price (close or TP) and the simple moving average of the price, divided by the mean absolute deviation around the (MAD) of the price. VC is calculated by dividing the current volume by the simple moving average of the volume for each length.

The code calculates the "Intraday Volatility" (IDV), which is the difference between the high and low prices divided by the price.

The code calculates the average IDV for each of the three lengths.

The code calculates the "IDV Ratio" by dividing IDV by the average IDV for each length.

The code calculates the "PC*VC/IDV Ratio" for each length by multiplying PC, VC, and IDV Ratio.

The code calculates the average PC*VC/IDV Ratio by averaging the three calculated ratios.

The code calculates the moving average of the average PC*VC/IDV Ratio using the user-defined moving average window size.

The code performs calculations to determine the average and standard deviation of PC*VC/IDV Ratio for positive and negative values separately, using the user-defined look-back length. It stores the positive and negative values in separate variables.

The code plots the PC*VC/IDV Ratio as a line on the chart. The color of the line is determined based on its value. If the value is greater than 2, it is plotted in green. If the value is between 0 and 2, it is plotted in a yellowish color. If the value is negative, it is plotted in red.

The code plots lines representing the mean plus 1.5 standard deviations (SD) for positive values, the mean plus 3 SD for positive values, the mean minus 1.5 SD for negative values, and the mean minus 3 SD for negative values. These lines help identify potential overbought or oversold conditions.

The code plots the overall average of the PC*VC/IDV Ratio as a line on the chart.

Overall, this code calculates the PC*VC/IDV Ratio indicator, which combines price, volume, and intraday volatility information. The indicator's values are plotted on the chart, along with reference lines indicating potential overbought or oversold conditions.
Oscillators

Mã được bảo vệ

Tập lệnh này được xuất bản mã nguồn đóng và bạn có thể sử dụng một cách tự do.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?

Thông báo miễn trừ trách nhiệm