This indicator is called "RSIOMA with Volume Index Confirmation". It is a technical analysis tool that plots buy and sell signals on a chart based on the Relative Strength Index (RSI) and the Negative Volume Index (NVI) and Positive Volume Index (PVI) indicators.
The indicator has the following input parameters:
- RSI Length: determines the number of periods used to calculate the RSI. Default value is 14.
- Overbought Level: determines the RSI level at which a security is considered overbought. Default value is 70.
- Oversold Level: determines the RSI level at which a security is considered oversold. Default value is 30.
- NVI Length: determines the number of periods used to calculate the Negative Volume Index. Default value is 255.
- PVI Length: determines the number of periods used to calculate the Positive Volume Index. Default value is 255.
The indicator calculates the RSI using the RSI Length input parameter and the close price of the security. It also calculates the NVI and PVI by looping through the volume data and the close price data of the security over the specified periods.
The indicator then uses the RSI, NVI, and PVI to determine buy and sell signals. A bearish divergence signal is generated when the RSI from one period ago is greater than the Overbought Level, the current RSI is less than the Overbought Level, and the close price from one period ago is greater than the current close price. A bullish divergence signal is generated when the RSI from one period ago is less than the Oversold Level, the current RSI is greater than the Oversold Level, and the close price from one period ago is less than the current close price. A sell signal is generated when a bearish divergence signal occurs and the current NVI is less than the previous NVI value. A buy signal is generated when a bullish divergence signal occurs and the current PVI is greater than the previous PVI value.
The indicator plots the buy and sell signals on the chart as green and red triangles, respectively. The "overlay=true" parameter in the indicator function indicates that the signals are plotted on top of the security's price chart.