DevDashboardLibraryThis is a helper library designed to encapsulate the rendering logic for an information panel (dashboard) in Pine Script indicators.
Purpose
The main goal of this library is to streamline the main indicator code by offloading all the work of creating and populating a table into a separate, reusable function. This makes the main script cleaner, more readable, and easier to maintain.
How to Use
The library exports one main function: drawDashboard(). This function takes the ID of an existing table and a set of text and color data as input, then populates the table's cells to form a neat and informative dashboard.
Authorship
This library was created and modified by user Dev0880 for personal use in their projects.
指标和策略
Scalp Flags — Price Action EMA/RSI//@version=5
indicator("TEST FLAGS OVERLAY", overlay=true)
// simple EMAs
fast = ta.ema(close, 9)
slow = ta.ema(close, 21)
// signals
buy = ta.crossover(fast, slow)
sell = ta.crossunder(fast, slow)
// draw on price panel
plotshape(buy, title="BUY", location=location.belowbar, style=shape.labelup, color=color.green, text="BUY", size=size.small)
plotshape(sell, title="SELL", location=location.abovebar, style=shape.labeldown, color=color.red, text="SELL", size=size.small)
// show EMAs for verification
plot(fast, color=color.new(color.green, 0))
plot(slow, color=color.new(color.red, 0))
TAUtilityLibLibrary "TAUtilityLib"
Technical Analysis Utility Library - Collection of functions for market analysis, smoothing, scaling, and structure detection
log_snapshot(label1, val1, label2, val2, label3, val3, label4, val4, label5, val5)
Creates formatted log snapshot with 5 labeled values
Parameters:
label1 (string)
val1 (float)
label2 (string)
val2 (float)
label3 (string)
val3 (float)
label4 (string)
val4 (float)
label5 (string)
val5 (float)
Returns: void (logs to console)
f_get_next_tf(tf, steps)
Gets next higher timeframe(s) from current
Parameters:
tf (string) : Current timeframe string
steps (string) : "1 TF Higher" for next TF, any other value for 2 TFs higher
Returns: Next timeframe string or na if at maximum
f_get_prev_tf(tf)
Gets previous lower timeframe from current
Parameters:
tf (string) : Current timeframe string
Returns: Previous timeframe string or na if at minimum
supersmoother(_src, _length)
Ehler's SuperSmoother - low-lag smoothing filter
Parameters:
_src (float) : Source series to smooth
_length (simple int) : Smoothing period
Returns: Smoothed series
butter_smooth(src, len)
Butterworth filter for ultra-smooth price filtering
Parameters:
src (float) : Source series
len (simple int) : Filter period
Returns: Butterworth smoothed series
f_dynamic_ema(source, dynamic_length)
Dynamic EMA with variable length
Parameters:
source (float) : Source series
dynamic_length (float) : Dynamic period (can vary bar to bar)
Returns: Dynamically adjusted EMA
dema(source, length)
Double Exponential Moving Average (DEMA)
Parameters:
source (float) : Source series
length (simple int) : Period for DEMA calculation
Returns: DEMA value
f_scale_percentile(primary_line, secondary_line, x)
Scales secondary line to match primary line using percentile ranges
Parameters:
primary_line (float) : Reference series for target scale
secondary_line (float) : Series to be scaled
x (int) : Lookback bars for percentile calculation
Returns: Scaled version of secondary_line
calculate_correlation_scaling(demamom_range, demamom_min, correlation_range, correlation_min)
Calculates scaling factors for correlation alignment
Parameters:
demamom_range (float) : Range of primary series
demamom_min (float) : Minimum of primary series
correlation_range (float) : Range of secondary series
correlation_min (float) : Minimum of secondary series
Returns: tuple for alignment
getBB(src, length, mult, chartlevel)
Calculates Bollinger Bands with chart level offset
Parameters:
src (float) : Source series
length (simple int) : MA period
mult (simple float) : Standard deviation multiplier
chartlevel (simple float) : Vertical offset for plotting
Returns: tuple
get_mrc(source, length, mult, mult2, gradsize)
Mean Reversion Channel with multiple bands and conditions
Parameters:
source (float) : Price source
length (simple int) : Channel period
mult (simple float) : First band multiplier
mult2 (simple float) : Second band multiplier
gradsize (simple float) : Gradient size for zone detection
Returns:
analyzeMarketStructure(highFractalBars, highFractalPrices, lowFractalBars, lowFractalPrices, trendDirection)
Analyzes market structure for ChoCH and BOS patterns
Parameters:
highFractalBars (array) : Array of high fractal bar indices
highFractalPrices (array) : Array of high fractal prices
lowFractalBars (array) : Array of low fractal bar indices
lowFractalPrices (array) : Array of low fractal prices
trendDirection (int) : Current trend (1=up, -1=down, 0=neutral)
Returns: - change signals and new trend direction
ScalpZone — EMA+RSI+ATR (Nifty/Sensex)//@version=5
indicator("ScalpZone — EMA+RSI+ATR (Nifty/Sensex)", overlay=true, shorttitle="ScalpZone v2")
// === Inputs ===
fastLen = input.int(9, title="Fast EMA", minval=1)
slowLen = input.int(21, title="Slow EMA", minval=1)
rsiLen = input.int(7, title="RSI Length", minval=1)
rsi_high = input.int(70, title="RSI Overbought")
rsi_low = input.int(35, title="RSI Oversold (for entries)")
atrLen = input.int(14, title="ATR Length")
atrMult = input.float(1.5, title="ATR Multiplier (trailing stop)")
useStrictPullback = input.bool(true, title="Require pullback candle (close < fast EMA) for entry")
showStops = input.bool(true, title="Show trailing stop line")
showEMAs = input.bool(true, title="Show EMAs")
// === Core indicators ===
emaFast = ta.ema(close, fastLen)
emaSlow = ta.ema(close, slowLen)
rsiVal = ta.rsi(close, rsiLen)
atr = ta.atr(atrLen)
// === Trend detection ===
bullTrend = emaFast > emaSlow
bearTrend = emaFast < emaSlow
// Pullback
pullback = close < emaFast
// Entry conditions
longCondition = bullTrend and (not useStrictPullback or pullback) and (rsiVal > rsi_low and rsiVal < rsi_high) and close > open and close > emaFast
shortCondition = bearTrend and (not useStrictPullback or not pullback) and (rsiVal < rsi_high and rsiVal > rsi_low) and close < open and close < emaFast
// === Trailing stops ===
var float longTrail = na
var float shortTrail = na
if (longCondition)
longTrail := close - atr * atrMult
else if not na(longTrail)
longTrail := math.max(longTrail, close - atr * atrMult)
if (shortCondition)
shortTrail := close + atr * atrMult
else if not na(shortTrail)
shortTrail := math.min(shortTrail, close + atr * atrMult)
// Exit signals
longExit = not na(longTrail) and close < longTrail
shortExit = not na(shortTrail) and close > shortTrail
// === Dynamic EMA colors ===
emaFastColor = emaFast > emaSlow ? color.green : color.red
emaSlowColor = color.orange
// === Plots ===
// Signals
plotshape(longCondition, title="Long Entry", location=location.belowbar, color=color.green, style=shape.triangleup, size=size.tiny, text="LONG")
plotshape(shortCondition, title="Short Entry", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.tiny, text="SHORT")
plotshape(longExit, title="Long Exit", location=location.abovebar, color=color.orange, style=shape.xcross, size=size.tiny, text="EXIT")
plotshape(shortExit, title="Short Exit", location=location.belowbar, color=color.orange, style=shape.xcross, size=size.tiny, text="EXIT")
// EMAs (with visibility toggle)
plot(emaFast, title="EMA Fast", color=emaFastColor, linewidth=2,
display = showEMAs ? display.all : display.none)
plot(emaSlow, title="EMA Slow", color=emaSlowColor, linewidth=2,
display = showEMAs ? display.all : display.none)
// Trailing stops (with visibility toggle)
plot(longTrail, title="Long Trail", style=plot.style_linebr, linewidth=2, color=color.green,
display = showStops ? display.all : display.none)
plot(shortTrail, title="Short Trail", style=plot.style_linebr, linewidth=2, color=color.red,
display = showStops ? display.all : display.none)
// RSI (hidden panel — you can enable in Style menu)
plot(rsiVal, title="RSI", color=color.blue, display=display.none)
hline(rsi_high, "RSI High", color=color.gray, linestyle=hline.style_dotted)
hline(rsi_low, "RSI Low", color=color.gray, linestyle=hline.style_dotted)
// === Alerts ===
alertcondition(longCondition, title="ScalpZone Long", message="ScalpZone: LONG signal on {{ticker}} {{interval}} — Close: {{close}}")
alertcondition(shortCondition, title="ScalpZone Short", message="ScalpZone: SHORT signal on {{ticker}} {{interval}} — Close: {{close}}")
alertcondition(longExit, title="ScalpZone Long Exit", message="ScalpZone: EXIT LONG on {{ticker}} {{interval}} — Close: {{close}}")
alertcondition(shortExit, title="ScalpZone Short Exit", message="ScalpZone: EXIT SHORT on {{ticker}} {{interval}} — Close: {{close}}")
EMA 200 ± Adjustable %This script plots the 200-period EMA together with two customizable offset lines: EMA200 + % and EMA200 - %. The percentages can be adjusted independently, allowing traders to visualize potential dynamic support and resistance zones around the EMA200.
Today's 5min HH/LL LinesOverview
This indicator identifies the highest high (HH) and lowest low (LL) formed by the first 5 one-minute candles of the current trading day. Once calculated, it plots continuous horizontal lines at those price levels for the remainder of the day.
How it works
The script internally requests 1-minute data for the current symbol, regardless of your chart’s timeframe.
At the start of each new trading day, it resets counters.
It captures the highest high and lowest low across the first five completed 1-minute candles.
After the 5th one-minute bar closes, it draws:
A green horizontal line at the highest high.
A red horizontal line at the lowest low.
These lines extend to the right, covering the entire trading session, and automatically scale with zoom/pan.
At the next session, the old lines are deleted and recalculated for the new day.
Use cases
Helps spot early intraday support and resistance zones.
Useful for breakout or reversal strategies that monitor when price breaches the first 5-minute range (derived from 5x1m bars).
Can be combined with volume, momentum, or candlestick signals for high-probability entries.
Key features
Works on any timeframe — always uses 1-minute data for precision.
Shows lines only for the current day (no clutter from prior sessions).
Lines are dynamic and adaptive — they remain fixed at the calculated price but extend continuously across the chart.
Universal MA Playground🔥 Universal MA Playground — Test Any Moving Average Combo With Style
Experiment with 14 moving average types, crossovers, and themes in one flexible indicator
What it is
A universal moving average playground with 14 MA types, customizable auto/manual lengths, and multiple color themes.
It highlights crossovers with glowing lines, background tint, and theme-based styling. Intended as a flexible exploration tool, not a standalone trading system.
Why combine multiple MAs?
Each moving average has unique strengths:
EMA (Exponential) → reacts faster to price changes.
SMA (Simple) → smooth, classic trend measure.
HMA (Hull) → reduces lag, sharper turns.
TEMA/DEMA → smoother than EMA, responsive to reversals.
ALMA, McGinley, LSMA → adaptive, less noisy.
VWAP & Rolling VWAP → volume-weighted trend with session or rolling lookback.
By testing crossovers between any two types, traders can see where different smoothing methods align, helping filter weak or lagging signals.
How it works
MA1 & MA2: Choose any type (SMA, EMA, HMA, VWAP, etc.).
Lengths: Each MA defaults to its standard (e.g. EMA=21, SMA=20, HMA=21). Manual override option available.
Visuals:
Lines change color by theme.
Fill between MAs highlights when MA1 > MA2 (bull) or MA1 < MA2 (bear).
Optional background glow reinforces bias.
Themes: Classic, Neon, Dark Glow, Ice & Fire, Minimalist, Cyberpunk, Nature.
What’s original here
Full library of 14 MA types in one script.
Auto-length detection with manual override toggle.
Theme engine for line, fill, and glow styles.
VWAP handling: true session VWAP intraday, fallback VWMA on higher timeframes.
Clean visual crossover highlights without extra clutter.
Inputs & settings
MA Types: SMA, EMA, WMA, VWMA, RMA, DEMA, TEMA, T3, HMA, ALMA, McGinley, LSMA, VWAP, Rolling VWAP.
Lengths: Auto (standard defaults) or manual override.
Theme selector: 7 presets.
Background glow: ON/OFF.
How to read
Two selected MAs are plotted.
Fill between them shows bias (green for MA1 above, red for MA1 below).
Triangle markers show crossover points.
Background glow (optional) highlights overall state.
Suggested use
Test different MA pairs (e.g. EMA21 vs HMA50, VWAP vs SMA20).
Use as trend confirmation or visual exploration, not a standalone system.
Works on all timeframes; useful both intraday and swing.
Limitations
VWAP only works intraday; on higher TF it falls back to VWMA(20).
Not a trading system by itself. Use with structure, risk management, and confluence.
Signals may lag in sideways markets.
Credits
Standard MAs are public domain (SMA, EMA, HMA, VWAP, etc.).
Universal combination, auto/manual logic, and theme design: NICK789.
Disclaimer
Educational use only; not financial advice.
No guarantees of accuracy or profitability.
Markets involve risk; past performance does not guarantee results.
ATR Histogram vs High-Low//@version=5
indicator("RSI+Price Confluence", overlay=false)
rsiSrc = input(close)
rsiLen = input.int(14)
emaRSI = input.int(9)
wmaRSI = input.int(45)
tf = input.timeframe("60")
emaF = input.int(21)
emaS = input.int(52)
// Lấy EMA và WMA của RSI HTF chỉ trong 1 lần request
ema_rsi = request.security(syminfo.tickerid, tf, ta.ema(ta.rsi(rsiSrc, rsiLen), emaRSI))
wma_rsi = request.security(syminfo.tickerid, tf, ta.wma(ta.rsi(rsiSrc, rsiLen), wmaRSI))
// Xác định lực RSI
luc_up = ema_rsi > wma_rsi
luc_down = ema_rsi < wma_rsi
// Lực giá (EMA nhanh & chậm)
gia_up = ta.ema(close, emaF) > ta.ema(close, emaS)
gia_down = ta.ema(close, emaF) < ta.ema(close, emaS)
// Tín hiệu cuối cùng
isUP = luc_up and gia_up
isDOWN = luc_down and gia_down
isNEU = not isUP and not isDOWN
// Vẽ cột tín hiệu, color= đầy đủ
plot(isUP ? 1 : na, title="UP", style=plot.style_columns, color=color.green, linewidth=6)
plot(isDOWN ? -1 : na, title="DOWN", style=plot.style_columns, color=color.red, linewidth=6)
plot(isNEU ? 0 : na, title="NEU", style=plot.style_columns, color=color.yellow, linewidth=6)
// Đường zero
hline(0, "", color=color.gray, linestyle=hline.style_dotted)
9 EMA + VolumeBest use on 5 minute and 15 minutes timeframe.
Buy when cross over with volume, and retest.
RSI by Tamil harmonic trader rajRSI indicator - will display RSI value in the middle right chart as per timeframe
CHOCH & BOS with EMA200 with long and short signalsCHOCH & BOS with EMA200 when we have internal bos we have long or short signal
Auto Slope Extremes ChannelAuto Slope Extremes Channel
Expanding channel that locks onto the highest high and lowest low of the slope between A and B.
This indicator builds a dynamic channel between two anchors, A and B.
Unlike fixed-width channels, it adapts to the slope of the leg between A and B and expands until:
• The upper channel line touches the highest candle in that slope.
• The lower channel line touches the lowest candle in that slope.
This method ensures that the channel edges are defined only by the single most extreme high and the single most extreme low within the selected leg. No other candles in the range touch the edges.
A centerline is drawn midway between the two extremes, and small triangle markers highlight the exact candles that determine the upper and lower boundaries.
Features
• Anchored channel defined by two user-selected points (A and B).
• Expands to fit the highest high and lowest low of the slope between A and B.
• Optional centerline and channel fill.
• Extend lines left, right, or both.
• Customizable line widths and colours.
Alpha Trend ProThe Alpha Trend Pro indicator is a trend-following tool designed to capture market direction using ATR-based dynamic thresholds and smoothing.
✨ Key Features:
ATR-based calculation: Uses Average True Range (ATR) with a multiplier to define bullish and bearish zones.
Adaptive trend line: Plots a dynamic line that shifts according to price movement, turning green for bullish trends and red for bearish trends.
Buy & Sell signals: Generates signals when the trend direction changes (from bearish to bullish or vice versa).
Background highlighting: Optionally colors the chart background to quickly visualize bullish (green) or bearish (red) conditions.
Customizable inputs: Traders can adjust ATR period, multiplier, smoothing factor, and source (close, hl2, etc.).
Alerts ready: Includes built-in alerts for buy signals, sell signals, and trend continuation (bullish or bearish).
📊 How to use it:
Look for BUY signals when the indicator flips from bearish to bullish.
Look for SELL signals when the indicator flips from bullish to bearish.
Use background shading and the trend line color for confirmation of ongoing market direction.
This makes Alpha Trend Pro a powerful yet simple tool for spotting trend reversals and managing trades with confidence.
Tristan's Box: Pre-Market Range Breakout + RetestMarket Context:
This is designed for U.S. stocks, focusing on pre-market price action (4:00–9:30 AM ET) to identify key support/resistance levels before the regular session opens.
Built for 1 min and 5 min timelines, and is intended for day trading / scalping.
Core Idea:
Pre-market range (high/low) often acts as a magnet for price during regular hours.
The first breakout outside this range signals potential strong momentum in that direction.
Retest of the breakout level confirms whether the breakout is valid, avoiding false moves.
Step-by-Step Logic:
Pre-Market Range Identification:
Track high and low from 4:00–9:30 AM ET.
Draw a box spanning this range for visual reference and calculation.
Breakout Detection:
When the first candle closes above the pre-market high → long breakout.
When the first candle closes below the pre-market low → short breakout.
The first breakout candle is highlighted with a “YOLO” label for visual confirmation.
Retest Confirmation:
Identify the first candle whose wick touches the pre-market box (high touches top for short, low touches bottom for long).
Wait for the next candle: if it closes outside the box, it confirms the breakout.
Entry Execution:
Long entry: on the confirming candle after a wick-touch above the pre-market high.
Short entry: on the confirming candle after a wick-touch below the pre-market low.
Only the first valid entry per direction per day is taken.
Visuals & Alerts:
Box represents pre-market high/low.
Top/bottom box border lines show the pre-market high / low levels cleanly.
BUY/SELL markers are pinned to the confirming candle.
Added a "YOLO" marker on breakout candle.
Alert conditions trigger when a breakout is confirmed by the retest.
Strategy Type:
Momentum breakout strategy with confirmation retest.
Combines pre-market structure and risk-managed entries.
Designed to filter false breakouts by requiring confirmation on the candle after the wick-touch.
In short, it’s a pre-market breakout momentum strategy: it uses the pre-market high/low as reference, waits for a breakout, and then enters only after a confirmation retest, reducing the chance of entering on a false spike.
Always use good risk management.
Confirmed Reversals After Bollinger Band ExtremesMean reversion confirmation - it will give reversal entry when price will reach at distance from EMA and it will move to opposite direction
Global M2 Money Supply // Days Offset =global m2 money supply tracker: tracking North America,
// EUROZONE Data
// North America Data
// Non-EU Europe Data
// Pacific Data
// Asia Data
// Latin America Data
// Middle East Data
// Africa Data
// Calculate Global Money Supply M2
total = (EUM2D + USM2D + CAM2D + CHM2D + GBM2D + FIPOP + RUM2D + NZM2D + CNM2D + TWM2D + HKM2D + INM2D + JPM2D + PHM2D + SGM2D + BRM2D + COM2D + MXM2D + AEM2D + TRM2D + ZAM2D) / 1000000000000
EMA-RSI-MACD-Volume-Candle Combo HÂN HÂN//@version=5
indicator("EMA-RSI-MACD-Volume-Candle Combo", overlay=true)
// === EMA 20 & 50 ===
ema20 = ta.ema(close, 20)
ema50 = ta.ema(close, 50)
goldenCross = ta.crossover(ema20, ema50) // EMA20 cắt lên EMA50
plot(ema20, color=color.yellow, title="EMA 20")
plot(ema50, color=color.orange, title="EMA 50")
// === RSI (14) ===
rsi = ta.rsi(close, 14)
rsiCondition = rsi <= 30
// === MACD ===
macd = ta.ema(close, 12) - ta.ema(close, 26)
signal = ta.ema(macd, 9)
macdCondition = macd > 0
// === Volume breakout ===
volMA = ta.sma(volume, 20)
volCondition = volume > volMA * 1.5 // Volume > 150% so với MA20
// === Candlestick reversal patterns ===
// Bullish Engulfing
bullEngulf = close < open and close > open and close >= open and open <= close
// Hammer
hammer = (close > open) and ((high - low) > 3 * (open - close)) and ((close - low) / (0.001 + high - low) > 0.6)
candleCondition = bullEngulf or hammer
// === Combined Signal ===
buySignal = goldenCross and rsiCondition and macdCondition and volCondition and candleCondition
// Plot signals on chart
plotshape(buySignal, title="BUY Signal", style=shape.labelup, color=color.green, text="BUY", location=location.belowbar, size=size.large)
// Alerts
alertcondition(buySignal, title="BUY Signal Alert", message="EMA20>EMA50 + RSI≤30 + MACD>0 + Volume Breakout + Reversal Candle")
Volume Higher Than Previous CandlesThis indicator highlights a bar when the volume of the current candle is greater than the highest volume of the previous N candles, N is user defined (default is 25).
Simple Demand Indicator v3.1 (MA + RSI Kombinasi)//@version=5
indicator("Simple Demand Indicator v3.1 (MA + RSI Kombinasi)", overlay=true)
// Input
maLength = input.int(50, "Moving Average Length")
rsiLength = input.int(14, "RSI Length")
overSold = input.int(30, "RSI Oversold")
overBought = input.int(70, "RSI Overbought")
// Hitung MA & RSI
ma = ta.sma(close, maLength)
rsi = ta.rsi(close, rsiLength)
// Sinyal dasar crossing MA
buySignal = ta.crossover(close, ma)
sellSignal = ta.crossunder(close, ma)
// Warna panah sesuai RSI
buyColor = (rsi < overSold) ? color.lime : color.green
sellColor = (rsi > overBought)? color.red : color.orange
// Plot MA
plot(ma, color=color.orange, title="MA Trend")
// Plot panah BUY
plotshape(buySignal, title="BUY", style=shape.labelup,
color=buyColor, text="BUY", textcolor=color.white,
location=location.belowbar, size=size.small)
// Plot panah SELL
plotshape(sellSignal, title="SELL", style=shape.labeldown,
color=sellColor, text="SELL", textcolor=color.white,
location=location.abovebar, size=size.small)
// Alerts
alertcondition(buySignal, title="BUY Signal",
message="📈 BUY Signal pada {{ticker}} TF {{interval}} (RSI={{rsi}})")
alertcondition(sellSignal, title="SELL Signal",
message="📉 SELL Signal pada {{ticker}} TF {{interval}} (RSI={{rsi}})")