//@version=5 strategy("Sheldon Crypto Leverage Strategy 2026", overlay=true, initial_capital=400, default_qty_type=strategy.cash, default_qty_value=100, commission_type=strategy.commission.percent, commission_value=0.06) // Inputs riskRewardRatio = input.float(3.0, title="Risk-to-Reward Ratio") fibLookback = input.int(50, title="Fib/Range Lookback Period") useTrendFilter = input.bool(true, title="Use Trend Break Filter") // Range finding for Mid-Range Target and Fibonacci / Pullback mechanics highestPrice = ta.highest(high, fibLookback) lowestPrice = ta.lowest(low, fibLookback) midRange = (highestPrice + lowestPrice) / 2.0 // Oversold/Overbought proxy via RSI rsiValue = ta.rsi(close, 14) isOversold = rsiValue < 40 isOverbought = rsiValue > 60 // Trend breakout conditions emaFast = ta.ema(close, 9) emaSlow = ta.ema(close, 21) trendBullish = ta.crossover(emaFast, emaSlow) trendBearish = ta.crossunder(emaFast, emaSlow) // Entry Conditions based on video checklist: // 1. Pullback/Oversold into support or trend shift // 2. Risk to Reward setup targeting Mid-Range longCondition = isOversold and trendBullish and (useTrendFilter ? true : true) shortCondition = isOverbought and trendBearish and (useTrendFilter ? true : true) // Execution Variables var float longStopPrice = na var float longTpPrice = na var float shortStopPrice = na var float shortTpPrice = na if (longCondition and strategy.position_size == 0) longStopPrice := low - (ta.atr(14) * 1.5) riskDistance = close - longStopPrice longTpPrice = midRange // Target mid-range as per strategy if (longTpPrice <= close) longTpPrice := close + (riskDistance * riskRewardRatio) strategy.entry("Long", strategy.long) strategy.exit("Exit Long", "Long", stop=longStopPrice, limit=longTpPrice) if (shortCondition and strategy.position_size == 0) shortStopPrice := high + (ta.atr(14) * 1.5) riskDistance = shortStopPrice - close shortTpPrice = midRange // Target mid-range as per strategy if (shortTpPrice >= close) shortTpPrice := close - (riskDistance * riskRewardRatio) strategy.entry("Short", strategy.short) strategy.exit("Exit Short", "Short", stop=shortStopPrice, limit=shortTpPrice) // Plotting levels for visual verification plot(midRange, color=color.orange, title="Mid-Range Target", style=plot.style_line) plot(emaFast, color=color.blue, title="Fast EMA") plot(emaSlow, color=color.red, title="Slow EMA")