BTC 1H Inside Candle Breakout (1:1 RR) — Strategy by Ajeet95A

By version

Performance Metrics

Description

//version=6strategy("BTC 1H Inside Candle Breakout (1:1 RR + Time Filter IST)", overlay=true)// === Time Filter (IST 12:30 to 19:30) ===startHour = 12startMinute = 30endHour = 19endMinute = 30// Get current time in ISTinSession = (hour(time, "Asia/Kolkata") > startHour or (hour(time, "Asia/Kolkata") == startHour and minute(time, "Asia/Kolkata") >= startMinute)) and (hour(time, "Asia/Kolkata") low[1]// Store levelsvar float icHigh = navar float icLow = naif inside icHigh := high icLow := low// === Conditions (ONLY during session) ===longCondition = inSession and not na(icHigh) and close > icHighshortCondition = inSession and not na(icLow) and close < icLow// === Risk Reward 1:1 ===longSL = icLowlongTP = icHigh + (icHigh - icLow)shortSL = icHighshortTP = icLow - (icHigh - icLow)// === Entries ===if (longCondition and strategy.position_size == 0) strategy.entry("Long", strategy.long) strategy.exit("Long Exit", from_entry="Long", stop=longSL, limit=longTP)if (shortCondition and strategy.position_size == 0) strategy.entry("Short", strategy.short) strategy.exit("Short Exit", from_entry="Short", stop=shortSL, limit=shortTP)// === Plot ===plot(icHigh, title="IC High", color=color.green, linewidth=2)plot(icLow, title="IC Low", color=color.red, linewidth=2)// Highlight sessionbgcolor(inSession ? color.new(color.green, 90) : na)

Browse all 5,900+ TradingView Pine Script strategies

View on TradingView