Scalp & Swing MTF — Strategy by rishiatoul

By version

Performance Metrics

Description

//version=5strategy("Narrow Dash MTF Alignment", overlay=true, initial_capital=10000)// --- Inputs ---adxThresh = input.int(25, "ADX Threshold")// --- Heikin Ashi Calculation ---haTicker = ticker.heikinashi(syminfo.tickerid)haClose = request.security(haTicker, timeframe.period, close)haOpen = request.security(haTicker, timeframe.period, open)// --- EMA Multi-Timeframe ---f_ema(tf) => request.security(haTicker, tf, ta.ema(close, 9))ema3 = f_ema("3")ema15 = f_ema("15")ema60 = f_ema("60")emaD = f_ema("1D") // Daily EMA// --- Indicators ---vwapVal = ta.vwap(close)[str, direction] = ta.supertrend(3, 10)[_, _, adx] = ta.dmi(14, 14)rsiVal = ta.rsi(close, 9)wmaVal = ta.wma(rsiVal, 21)emaRsi = ta.ema(rsiVal, 3)// --- Plotting ---plot(ema3, color=color.green, linewidth=1, title="3m")plot(ema15, color=color.yellow, linewidth=1, title="15m")plot(vwapVal, color=color.red, linewidth=2, title="VWAP")// --- Scalping Logic ---if haClose > haOpen and haClose > haOpen and haClose > ema3 strategy.entry("L", strategy.long)if haClose 0 and haClose ema3) strategy.close_all()// --- Dashboard Logic ---f_add(tab, row, label, val, bg) => table.cell(tab, 0, row, label, text_size=size.tiny, text_color=color.white, bgcolor=color.black) table.cell(tab, 1, row, val, text_size=size.tiny, text_color=color.black, bgcolor=bg)if barstate.islast or barstate.isrealtime dash = table.new(position.top_right, 2, 9, border_width=1, border_color=color.white) // STR Status Logic strStat = (direction ema3) ? "Strong" : (direction > 0 and haClose 50 and emaRsi > wmaVal hm_dn = rsiVal emaD ? "Strong" : "Weak" dayCol = haClose > emaD ? color.green : color.red // Build Table f_add(dash, 0, "ITEM", "BIAS", color.gray) f_add(dash, 1, "15m", haClose > ema15 ? "Strong" : "Weak", haClose > ema15 ? color.green : color.red) f_add(dash, 2, "60m", haClose > ema60 ? "Strong" : "Weak", haClose > ema60 ? color.green : color.red) f_add(dash, 3, "Day", dayStat, dayCol) f_add(dash, 4, "STR", strStat, strCol) f_add(dash, 5, "H-M", hmStat, hmCol) f_add(dash, 6, "ADX", adx > adxThresh ? "Strong" : "Normal", adx > adxThresh ? color.green : color.rgb(211, 211, 211))

Browse all 5,900+ TradingView Pine Script strategies

View on TradingView