//@version=5
indicator("Dominant side Probability By Vibe", overlay=false)
// Define variables
greenCount = 0
redCount = 0
// Calculate RSI
rsiLength = input(14, title="RSI Length")
rsi = ta.rsi(close, rsiLength)
// Calculate Volume Moving Average
volLength = input(20, title="Volume MA Length")
volMa = ta.sma(volume, volLength)
// Loop through historical data
for i = 1 to 100
if close[i] > close[i-1] and rsi[i] > 50 and volume[i] > volMa[i]
greenCount := greenCount + 1
else if close[i] < close[i-1] and rsi[i] < 50 and volume[i] > volMa[i]
redCount := redCount + 1
// Calculate probabilities
totalCount = greenCount + redCount
greenProbability = greenCount / totalCount * 100
redProbability = redCount / totalCount * 100
// Plot probabilities
plot(greenProbability, title="Green Candle Probability", color=color.green, linewidth=2)
plot(redProbability, title="Red Candle Probability", color=color.red, linewidth=2)
Comments
Post a Comment
"We value your thoughts and opinions! Whether you found our blog informative and useful or you have feedback on how we can improve, we'd love to hear from you. Please share your insights and comments below. Your contributions will help us create better content and provide more valuable information to our readers."