The indicator displays support and resistance levels based on volume and the Relative Strength Index (RSI).
Variable and Input Assignment:
lookback: Determines the period for data lookback. RsiVisible, RsilabelSize, OversoldForRsi, OverboughtForRsi: Various inputs to adjust RSI indicator parameters. Indicator Calculation:
highestVol: Finds the highest volume within a certain period. Rsi: Calculates the RSI value with a period of 14. roc: Calculates the Rate of Change. Support and Resistance Level Determination:
Uses a comparison between price change (roc) and RSI value to determine whether the price is rising or falling. If the price is rising and the current volume is greater than the previous highest volume, a new resistance level is established. If the price is falling and the current volume is greater than the previous highest volume, a new support level is established. Support and Resistance Lines:
Creates lines indicating the latest support and resistance levels. These lines are updated whenever there is a change in support or resistance levels. RSI Labels:
Displays the RSI value above or below the price chart depending on whether the RSI is above or below the overbought or oversold levels. If the RSI value is above the overbought level, the label is displayed above the price. If the RSI value is below the oversold level, the label is displayed below the price. Labels are removed if the corresponding conditions are not met. Additional RSI Label:
Adds an additional label displaying the RSI value next to the price chart on the last bar. The main purpose of this script is to assist traders in identifying support and resistance levels based on price movement, volume, and the RSI indicator. Thus, traders can use this information to make better trading decisions.