Indicators and strategies
9 EMA Angle + Price % Filter//@version=5
indicator("9 EMA Angle + Price % Filter", overlay=true)
length = 9
emaLine = ta.ema(close, length)
// === INPUTS ===
angleThreshold = input.float(20, "EMA Angle Threshold (°)")
pricePercentThreshold = input.float(80, "Price % Above/Below EMA")
// === PRICE DISTANCE FROM EMA IN % ===
percentAbove = close >= emaLine ? ((close - emaLine) / emaLine) * 100 : 0
percentBelow = close < emaLine ? ((emaLine - close) / emaLine) * 100 : 0
// === ANGLE CALCULATION ===
lookbackBars = input.int(5, "Bars for Angle Calculation")
p1 = emaLine
p2 = emaLine
deltaY = p1 - p2
deltaX = lookbackBars
angleRadians = math.atan(deltaY / deltaX)
angleDegrees = angleRadians * 180 / math.pi
// === CONDITIONS ===
isFlat = percentAbove < pricePercentThreshold and percentBelow < pricePercentThreshold and angleDegrees > -angleThreshold and angleDegrees < angleThreshold
isPriceAbove = percentAbove >= pricePercentThreshold
isPriceBelow = percentBelow >= pricePercentThreshold
isAngleUp = angleDegrees >= angleThreshold
isAngleDown = angleDegrees <= -angleThreshold
// === EMA COLOR LOGIC ===
emaColor = isFlat ? color.black :
isAngleUp or isPriceAbove ? color.green :
isAngleDown or isPriceBelow ? color.red : color.gray
// === PLOT EMA ===
plot(emaLine, "9 EMA", color=emaColor, linewidth=2)
6-Month Average High/Lows Trend LineThis is an indicator that tracks the 6 month high/low average as a MA and the 6 month high/low average as a flat line.
I added alerts if the price action crosses the high or low line. Also makes a great dynamic channel.
If combined with other confirming indicator like the RSI and/or MACD this could be a very effective tool with respect to levels and 6 month high/lows
PRO Investing - ATR Quant.algo by proinvesting.coATR Quant.algo by PROInvesting.co
A powerful and visually intuitive trend-following system designed to capture high-momentum moves and avoid market chop.
Quant.algo combines a dynamic trend-following EMA with multi-level ATR volatility zones to provide a complete trading framework with clear entry signals, stop-loss levels, and take-profit targets.
Key Features:
Dynamic Trend EMA: A thick baseline that turns Green for uptrends and Red for downtrends. Only trade in the direction of the trend.
Multi-Level ATR Zones: Automatically adapting channels that define ideal zones for entries, stops, and profit-taking.
Volatility Filter: A smart filter that tints the background when volatility is expanding, helping you avoid sideways markets and only trade when the market is ready to move.
Pullback Entry Signals: Clear BUY and SELL arrows appear after a pullback to the EMA, providing high-probability entry points.
Simple Trading Rules:
Go LONG: When the baseline is Green, wait for a Green BUY arrow, and aim for the upper TP Zone. Place your stop below the orange Stop Zone line.
Go SHORT: When the baseline is Red, wait for a Red SELL arrow, and aim for the lower TP Zone. Place your stop above the orange Stop Zone line.
Best For:
Traders: Swing Traders & Position Traders.
Timeframes: 4-Hour (H4) and Daily (D1).
Assets: Trending markets (Indices, Forex, Crypto).
Candles by Day, Time, Month + StatsThis Pine Script allows you to filter and display candles based on:
📅 Specific days of the week
🕒 Custom intraday time ranges (e.g., 9:15 to 10:30)
📆 Selected months
📊 Shows stats for each filtered block:
🔼 Range (High – Low)
📏 Average candle body size
⚙️ Key Features:
✅ Filter by day, time, and month
🎛 Toggle to show/hide the stats label
🟩 Candles are drawn only for selected conditions
📍 Stats label is positioned above session high (adjustable)
⚠️ Important Setup Instructions:
✅ 1. Use it on a blank chart
To avoid overlaying with default candles:
Open the chart of your preferred symbol
Click on the chart type (top toolbar: "Candles", "Bars", etc.)
Select "Blank" from the dropdown (this will hide all native candles)
Apply this indicator
This ensures only the filtered candles from the script are visible.
Adjust for your local timezone
This script uses a hardcoded timezone: "Asia/Kolkata"
If you are in a different timezone, change it to your own (e.g. "America/New_York", "Europe/London", etc.) in all instances of:
time(timeframe.period, "Asia/Kolkata")
timestamp("Asia/Kolkata", ...)
Use Cases:
Opening range behavior on specific weekdays/months
Detecting market anomalies during exact windows
Building visual logs of preferred trade hours
Capital Risk OptimizerCapital Risk Optimizer 🛡️
The Capital Risk Optimizer is an educational tool designed to help traders study capital efficiency, risk management, and scaling strategies when using leverage.
This script calculates and visualizes essential metrics for managing leveraged positions, including:
Entry Price – The current market price.
Stop Loss Level – Automatically derived using the 30-bar lowest low minus 1 ATR (default: 14-period ATR), an approach designed to create a dynamic, volatility-adjusted stop loss.
Stop Loss Distance (%) – The percentage distance between entry and stop.
Maximum Safe Leverage – The highest leverage allowable without risking liquidation before your stop is reached.
Margin Required – The amount of collateral necessary to support the desired position size at the calculated leverage.
Position Size – The configurable notional value of your trade.
These outputs are presented in a clean, customizable table overlay so you can quickly understand how position sizing, volatility, and leverage interact.
By default, the script uses a 14-period ATR combined with the lowest low of the past 30 bars, providing an optimal balance between sensitivity and noise for defining stop placement. This methodology helps traders account for market volatility in a systematic way.
The Capital Risk Optimizer is particularly useful as a portfolio management tool, supporting traders who want to study how to scale into positions using risk-adjusted sizing and capital efficiency principles. It pairs best with backtested strategies, and does not directly produce signals of any kind.
How to Use:
Set your desired position size.
Adjust the ATR and lookback settings to fine-tune stop loss placement.
Study the resulting leverage and margin requirements in real time.
Use this information to simulate and visualize potential trade scenarios and capital allocation models.
Disclaimer:
This script is provided for educational and informational purposes only. It does not constitute financial advice and should not be relied upon for live trading decisions. Always do your own research and consult with a qualified professional before making any trading or investment decisions.
Objective Congestion Zones (Price Density)Automatically calculates congestion zones on multiple timezones and can be modified to add more zones
9 EMA Angle Color Indicator//@version=5
indicator("9 EMA Angle Color Indicator", overlay=true)
// === INPUTS ===
emaLength = input.int(9, title="EMA Length")
angleThreshold = input.float(20.0, title="Angle Threshold (Degrees)", minval=0.1)
lookbackBars = input.int(5, title="Bars to Calculate Angle", minval=1)
// === EMA CALCULATION ===
emaValue = ta.ema(close, emaLength)
// === ANGLE CALCULATION (in degrees) ===
// Use simple slope * 100 and arc tangent conversion to degrees
slope = (emaValue - emaValue ) / lookbackBars
angle = math.atan(slope) * (180 / math.pi)
// === COLOR LOGIC ===
var color emaColor = color.black
// Initial color: black when angle is within range
emaColor := color.black
// Price and angle-based color change
if angle > angleThreshold and close > emaValue
emaColor := color.green
else if angle < -angleThreshold and close < emaValue
emaColor := color.red
else
emaColor := color.black
// === PLOT EMA ===
plot(emaValue, color=emaColor, linewidth=2, title="9 EMA Colored")
Smooth MTF CloudsThe smoothness of the "clouds" in the script you provided comes from the combination of plotting moving averages (typically EMA or SMA) and using the fill() function to visually create smooth, overlapping areas between two lines. Additionally, EMAs naturally create smoother curves as they respond to price changes in a lagged, less abrupt way compared to traditional plots.
Zero Clutter Scalper (ZCS) 🔒//@version=5
indicator("Zero Clutter Scalper (ZCS) 🔒", overlay=true)
// ==== SETTINGS ====
length = input.int(14, title="Momentum Length")
threshold = input.float(5, title="Momentum Threshold")
showSignals = input.bool(true, title="Show Buy/Sell Signals")
enableAlerts = input.bool(true, title="Enable Alerts")
// ==== MOMENTUM CALC ====
mom = close - close
mom_smooth = ta.ema(mom, 5)
// ==== PRICE ACTION CONFIRMATION ====
bullCandle = close > open and close > high
bearCandle = close < open and close < low
// ==== CONDITIONS ====
buyCond = mom_smooth > threshold and bullCandle
sellCond = mom_smooth < -threshold and bearCandle
// ==== PLOTTING ====
plotshape(showSignals and buyCond ? low : na, title="Buy Signal", location=location.belowbar, color=color.lime, style=shape.labelup, text="BUY")
plotshape(showSignals and sellCond ? high : na, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL")
// ==== ALERTS ====
alertcondition(buyCond and enableAlerts, title="ZCS Buy Alert", message="ZCS Buy Signal on {{ticker}} ({{interval}})")
alertcondition(sellCond and enableAlerts, title="ZCS Sell Alert", message="ZCS Sell Signal on {{ticker}} ({{interval}})")
DIP BUYING by HAZEREAL BUY THE DIP - Educational Price Movement Indicator
This technical indicator is designed for educational purposes to help traders identify potential price reversal opportunities in equity markets, particularly focusing on NASDAQ-100 index tracking instruments and technology sector ETFs.
Key Features:
Monitors price movements relative to recent highs over customizable lookback periods
Identifies two distinct price decline thresholds: standard (5%+) and extreme (12.3%+)
Visual signals with triangular markers and background color zones
Real-time data table showing current metrics and status
Customizable alert system with webhook-ready JSON formatting
Clean overlay design that doesn't obstruct price action
How It Works:
The indicator tracks the highest price within a specified lookback period and calculates the percentage decline from that high. When price drops below the minimum threshold, it generates visual buy signals. The extreme threshold triggers enhanced alerts for more significant market movements.
Best Use Cases:
Educational analysis of market volatility patterns
Identifying potential support levels during market corrections
Studying historical price behavior around significant declines
Risk management and position sizing education
Important Note: This is a technical analysis tool for educational purposes only. All trading decisions should be based on comprehensive analysis and appropriate risk management. Past performance does not guarantee future results.
Greer Book Value Yield📘 Script Title
Greer Book Value Yield – Valuation Insight Based on Balance Sheet Strength
🧾 Description
Greer Book Value Yield is a valuation-focused indicator in the Greer Financial Toolkit, designed to evaluate how much net asset value (book value) a company provides per share relative to its current market price. This script calculates the Book Value Per Share Yield (BV%) using the formula:
Book Value Yield (%) = Book Value Per Share ÷ Stock Price × 100
This yield helps investors assess whether a stock is trading at a discount or premium to its underlying assets. It dynamically highlights when the yield is:
🟢 Above its historical average (potentially undervalued)
🔴 Below its historical average (potentially overvalued)
🔍 Use Case
Analyze valuation through asset-based metrics
Identify buy opportunities when book value yield is historically high
Combine with other scripts in the Greer Financial Toolkit:
📘 Greer Value – Tracks year-over-year growth consistency across six key metrics
📊 Greer Value Yields Dashboard – Visualizes multiple valuation-based yields
🟢 Greer BuyZone – Highlights long-term technical buy zones
🛠️ Inputs & Data
Uses Book Value Per Share (BVPS) from TradingView’s financial database (Fiscal Year)
Calculates and compares against a static average yield to assess historical valuation
Clean visual feedback via dynamic coloring and overlays
⚠️ Disclaimer
This tool is for educational and informational purposes only and should not be considered financial advice. Always conduct your own research before making investment decisions.
Bullish & Bearish Wick MarkerMarks bullish and bearish engulfing candles
Bullish engulfing candle:
when the low is lower than the previous candle low and the body close is higher than the previous candle body
Bearish engulfing cande:
when the high is higher than the previous candle high and the body close is lower than the previous candle body
Momentum SNR VIP [3 TP + Max 50 Pip SL]//@version=6
indicator("Momentum SNR VIP ", overlay=true)
// === Settings ===
pip = input.float(0.0001, "Pip Size", step=0.0001)
sl_pip = 50 * pip
tp1_pip = 40 * pip
tp2_pip = 70 * pip
tp3_pip = 100 * pip
lookback = input.int(20, "Lookback for S/R", minval=5)
// === SNR ===
pivotHigh = ta.pivothigh(high, lookback, lookback)
pivotLow = ta.pivotlow(low, lookback, lookback)
supportZone = not na(pivotLow)
resistanceZone = not na(pivotHigh)
plotshape(supportZone, title="Support", location=location.belowbar, color=color.blue, style=shape.triangleup, size=size.tiny)
plotshape(resistanceZone, title="Resistance", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.tiny)
// === Price Action ===
bullishEngulfing = close < open and close > open and close > open and open <= close
bearishEngulfing = close > open and close < open and close < open and open >= close
bullishPinBar = close < open and (low - math.min(open, close)) > 1.5 * math.abs(close - open)
bearishPinBar = close > open and (high - math.max(open, close)) > 1.5 * math.abs(close - open)
buySignal = supportZone and (bullishEngulfing or bullishPinBar)
sellSignal = resistanceZone and (bearishEngulfing or bearishPinBar)
// === SL & TP ===
rawBuySL = low - 10 * pip
buySL = math.max(close - sl_pip, rawBuySL)
buyTP1 = close + tp1_pip
buyTP2 = close + tp2_pip
buyTP3 = close + tp3_pip
rawSellSL = high + 10 * pip
sellSL = math.min(close + sl_pip, rawSellSL)
sellTP1 = close - tp1_pip
sellTP2 = close - tp2_pip
sellTP3 = close - tp3_pip
// === Plot Lines ===
plot(buySignal ? buySL : na, title="Buy SL", color=color.red, style=plot.style_line, linewidth=1)
plot(buySignal ? buyTP1 : na, title="Buy TP1", color=color.green, style=plot.style_line, linewidth=1)
plot(buySignal ? buyTP2 : na, title="Buy TP2", color=color.green, style=plot.style_line, linewidth=1)
plot(buySignal ? buyTP3 : na, title="Buy TP3", color=color.green, style=plot.style_line, linewidth=1)
plot(sellSignal ? sellSL : na, title="Sell SL", color=color.red, style=plot.style_line, linewidth=1)
plot(sellSignal ? sellTP1 : na, title="Sell TP1", color=color.green, style=plot.style_line, linewidth=1)
plot(sellSignal ? sellTP2 : na, title="Sell TP2", color=color.green, style=plot.style_line, linewidth=1)
plot(sellSignal ? sellTP3 : na, title="Sell TP3", color=color.green, style=plot.style_line, linewidth=1)
// === Floating Labels on Right Side ===
if buySignal
label.new(x=bar_index + 50, y=buySL, text="SL", style=label.style_label_right, color=color.red, textcolor=color.white)
label.new(x=bar_index + 50, y=buyTP1, text="TP1", style=label.style_label_right, color=color.green, textcolor=color.white)
label.new(x=bar_index + 50, y=buyTP2, text="TP2", style=label.style_label_right, color=color.green, textcolor=color.white)
label.new(x=bar_index + 50, y=buyTP3, text="TP3", style=label.style_label_right, color=color.green, textcolor=color.white)
if sellSignal
label.new(x=bar_index + 50, y=sellSL, text="SL", style=label.style_label_right, color=color.red, textcolor=color.white)
label.new(x=bar_index + 50, y=sellTP1, text="TP1", style=label.style_label_right, color=color.green, textcolor=color.white)
label.new(x=bar_index + 50, y=sellTP2, text="TP2", style=label.style_label_right, color=color.green, textcolor=color.white)
label.new(x=bar_index + 50, y=sellTP3, text="TP3", style=label.style_label_right, color=color.green, textcolor=color.white)
// === Signal Markers ===
plotshape(buySignal, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY")
plotshape(sellSignal, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL")
// === Alerts ===
alertcondition(buySignal, title="Buy Alert", message="🟢 BUY at Support Zone + Price Action")
alertcondition(sellSignal, title="Sell Alert", message="🟡 SELL at Resistance Zone + Price Action")
GX Credit Spread SignalThe GX Credit Spread Signal is an advanced indicator designed for traders who trade options strategies on the SPX index, especially using vertical credit spreads. It combines traditional technical analysis with volatility and option pricing concepts to provide relevant signals and projections on the chart.
Main features:
Trend analysis: Uses opening gap, position relative to VWAP and simple moving average (SMA 50) to indicate bullish or bearish bias right after the first 15-minute candle.
Safe range projection: Calculates a range based on the ATR (Average True Range) multiplied by a safety factor, suggesting potential strikes for credit spreads.
Quantitative estimates:
Calculates the estimated delta of options via the Black-Scholes formula approximation.
Estimated probability of expiring out of the money (OTM).
Chart visualizations: Displays projected ATR lines, previous day's levels (high, low, close) and an informative panel with strikes, delta, OTM probability, ATR and VWAP data.
Configurable alerts: Notifications for detected bullish or bearish bias, helping the trader to identify opportunities quickly.
This indicator is ideal for those who day trade with SPX options, facilitating decision-making by combining technical analysis, volatility and option probabilities in one place.
Momentum SNR VIP (Step 2)//@version=6
indicator("Momentum SNR VIP (Step 2)", overlay=true)
// === Inputs ===
lookback = input.int(20, "Lookback for S/R", minval=5)
rr_ratio = input.float(2.0, "Risk-Reward Ratio", minval=0.5, step=0.1)
plot(close, color=color.orange)
LinearRegfressionL'indicatore fornisce una semplice regressione lineare dei valori High, Low, Open, Close
TVI-3 Z-Score: MA + VWAP + BB Composite🔧 Overview:
It combines:
Z-score of price relative to the 200-period simple moving average (MA)
Z-score of price relative to the 200-period VWAP (volume-weighted average price)
Z-score of Bollinger Band width
The result is an average of these three Z-scores, plotted as a composite indicator for identifying overvalued and undervalued conditions.
Nến Tô Màu Theo Volume / MA(21)Condition
Point color
Volume ≥ 3× MA(24)
Violet
Volume ≥ 1.5× MA(24)
Red
Volume < 1.5× MA(24) & bullish
White
Volume < 1.5× MA(24) & bearish
Black