Skip to main content

Dominant side probability

 //@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

Popular posts from this blog

AI ARTICAL WRITING TOOL

Article Writing Tool Article Writing Tool Category Lifestyle Technology Travel Food Personal Finance Health & Wellness Personal Development Entrepreneurship Art & Design Music Photography Education Environment Politics Social Issues Default (English) Assamese Bengali Gujarati Hindi Kannada Kashmiri Konkani Malayalam Marathi Nepali Odia Punjabi Sanskrit Sindhi Tamil Telugu Urdu Generate Article Thinking... Thinking...

"Exploring the Potential Uses and Implications of Blockchain Technology"

                        What are the potential uses and implications of blockchain technology?

Heikin-Ashi Color Change with RSI Scalping Strategy

  // @version=5 strategy ( "Heikin-Ashi Color Change with RSI Scalping Strategy" , overlay = false ) // Calculate Heikin-Ashi open and close prices haOpen = ( open [ 1 ] + close [ 1 ]) / 2 haClose = ( open + high + low + close ) / 4 isColorChange = ta.change ( haClose ) > 0 // RSI rsiLength = input ( 14 , title = "RSI Length" ) rsi = ta.rsi ( close , rsiLength ) // Variables to track buy/sell conditions var bool shouldBuy = na var bool shouldSell = na // Strategy conditions shouldBuy := isColorChange and haOpen < haClose and rsi > 50 shouldSell := isColorChange and haOpen > haClose and rsi < 50 // Buy and sell orders if shouldBuy     strategy.entry ( "Buy" , strategy.long ) if shouldSell     strategy.entry ( "Sell" , strategy.short ) // Plotting Heikin-Ashi colors for visualization plotshape ( shouldBuy , title = "Buy Signal" , color = color.green , style = shape.t...