Pine Script® indicator
Indicators and strategies
DJukson PAR_SAR + MACDthis is just for me and my brothers (niko nisi taj pusi ga). I have to write this to announce it like this,
CHORUS x2
In a city where champions are loved
The grandstand connects our rocks and the sea
There crazy nights await the dawn
For the blue and white flags are flying!
BRIDGE x2
And all those Stuttgarts, Madrids
In Vienna, Salzburg, Seville
We shine like Rabuzini
When they hear us in the grandstand!
Pine Script® indicator
XAUUSD Trend Breakout ScalperXAUUSD PDH/PDL Trend Scalper is a rule-based breakout strategy designed specifically for XAUUSD.
The strategy uses the previous trading session’s high and low to build Fibonacci-based breakout levels for the next session.
Core logic:
- Buy entry: Previous Day High / Fib 1.0 breakout
- Buy TP: Fib 1.1
- Buy SL: Fib 0.9
- Sell entry: Previous Day Low / Fib 0.0 breakout
- Sell TP: Fib -0.1
- Sell SL: Fib 0.1
- Risk/Reward: 1:1
Trend score filter:
- Long trades require a 3/3 EMA score
- Short trades require at least 2/3 EMA score
- EMA score is based on:
- D1 20 EMA
- H1 100 EMA
- M15 50 EMA
- Score day is calculated from 01:00 to 01:00 Turkey time.
Risk and session filters:
- 1% risk per trade based on 100K account size
- No trading between 20:00 and 02:00 Turkey time
- No trade if stop distance is below $3
- Open positions are closed at 20:00 Turkey time
- Only one completed trade per day
Visual features:
- Previous day Fibonacci levels
- Entry, SL and TP levels
- EMA score table
- No Trade zone background
- Stop distance labels
Backtest summary:
- Total Balance : $ 100.000
- Test period: 27 Jan 2023 – 24 Apr 2026
- Total trades: 208
- Win rate: 64.90%
- Net profit: +$61,006
- Profit factor: 1.835
- Max drawdown: -6.53%
- Longest losing streak: 4
This script is for educational and backtesting purposes only. It is not financial advice. Always forward test before using any strategy in live markets.
Pine Script® strategy
FVG Inverse (IFVG) All TimeframesTracks standard Fair Value Gaps (FVGs) and Inverse Fair Value Gaps (IFVGs) automatically on any chart timeframe.
The indicator detects bullish and bearish FVGs based on classic 3-candle imbalance structure, draws the zone with its Consequent Encroachment (CE) as a dotted midpoint line, and labels each setup clearly as BULL FVG or BEAR FVG.
When price fully closes through an opposing FVG, the zone automatically converts into an IFVG and is relabeled accordingly, helping traders quickly identify potential shifts in market structure and support/resistance flips.
Designed as a clean, strategy-neutral tool for all markets and timeframes, with customizable colors, opacity, and a simplified visual layout that keeps only the most recent zones on screen for clarity.
Pine Script® indicator
Alpha Fusion X-Ray V3.2 [Whale Tracker]ema 144 bazlı hissenin kurumsal hacim analizi ile piyasa yapısının takip edildiği bir indikatör.
Pine Script® indicator
TP_Ephem_LibLibrary "TP_Ephem_Lib"
Cowan-tailored heliocentric ephemeris (VSOP87D) for TradingView.
@description Returns heliocentric ecliptic longitudes for Mercury through Neptune
@description (tropical or sidereal/Lahiri), synodic phases between any two planets,
@description and Cowan-canon helpers: 3-Step Astro cumulative advance (V4:L5079),
@description pentagram vertex dates (V4:L449), and cube-face boundary dates
@description (V1:L2106-2114, V1:L2962-2997). All math validated to <0.01 deg vs
@description Swiss Ephemeris (DE441) across 1899-2026. Frame: ecliptic of date.
jd_to_t_millennia(jd)
Parameters:
jd (float)
jd_from_timestamp(unix_ms)
Parameters:
unix_ms (int)
timestamp_from_jd(jd)
Parameters:
jd (float)
normalize_longitude(deg)
Parameters:
deg (float)
get_ayanamsa(jd)
Parameters:
jd (float)
get_helio_longitude(planet, jd, useSidereal)
Parameters:
planet (simple Planet)
jd (float)
useSidereal (simple bool)
get_sun_geo_longitude(jd, useSidereal)
Parameters:
jd (float)
useSidereal (simple bool)
get_synodic_phase(p1, p2, jd)
Parameters:
p1 (simple Planet)
p2 (simple Planet)
jd (float)
get_aspect_angle(p1, p2, jd)
Parameters:
p1 (simple Planet)
p2 (simple Planet)
jd (float)
average_speed_deg_per_day(planet)
Parameters:
planet (simple Planet)
speed_deg_per_day(planet, jd)
Parameters:
planet (simple Planet)
jd (float)
is_retrograde(planet, jd)
Parameters:
planet (simple Planet)
jd (float)
cumulative_advance_deg(planet, origin_jd, target_jd, useSidereal)
Parameters:
planet (simple Planet)
origin_jd (float)
target_jd (float)
useSidereal (simple bool)
cumulative_synodic_advance_deg(p1, p2, origin_jd, target_jd)
Parameters:
p1 (simple Planet)
p2 (simple Planet)
origin_jd (float)
target_jd (float)
find_advance_jd(planet, origin_jd, target_advance_deg, useSidereal)
Parameters:
planet (simple Planet)
origin_jd (float)
target_advance_deg (float)
useSidereal (simple bool)
find_synodic_advance_jd(p1, p2, origin_jd, target_synodic_advance_deg)
Parameters:
p1 (simple Planet)
p2 (simple Planet)
origin_jd (float)
target_synodic_advance_deg (float)
pentagram_vertex_jd(planet, origin_jd, n, useSidereal)
Parameters:
planet (simple Planet)
origin_jd (float)
n (simple int)
useSidereal (simple bool)
cube_face_boundary_jd(origin_jd, face_n)
Parameters:
origin_jd (float)
face_n (simple int)
Pine Script® library
Previous High/Low Anchored VWAPs D/W/M + 2 VWAPs + PD RaysThis indicator plots anchored VWAPs from the previous Day, Week, and Month highs and lows, giving a clear view of where key buying and selling activity originated.
Each VWAP is anchored to the first occurrence of the prior period’s high and low, allowing you to track how price interacts with those levels over time. This provides insight into:
Trend vs rotation
Acceptance vs rejection
Trap conditions (failed moves)
Market structure across multiple timeframes
The indicator also includes:
Optional daily VWAPs drawn from the exact high/low anchor point
Two customizable VWAP lines (rolling or session-based)
Previous day high/low rays and structure labels (HH, HL, LH, LL)
A multi-timeframe table (D/W/M) showing price position, structure, bias, and readiness
Pine Script® indicator
XAUUSD VWAP [MatsukazeAlgo]🇬🇧 ENGLISH
A fully customizable VWAP tool built for Gold (XAUUSD) traders. Supports multiple anchor periods, standard deviation bands, value area levels, and session awareness — all in one script.
Three Display Modes
Bands — Standard deviation bands (1σ/2σ/3σ) with gradient fill. See where price sits relative to VWAP at a glance.
Levels — Clean VAH/VWAP/VAL lines with price labels. No clutter.
Both — Full view with bands and level labels combined.
Dual VWAP
Display two VWAPs simultaneously with different anchor periods. Example: Weekly VWAP + Monthly VWAP on the same chart. Each has independent color settings.
Anchor Period Selection
Choose from Session, Week, Month, Quarter, or Year. Most VWAP tools lock you into one period — this lets you switch instantly.
Source Selection
HLC3 (default), HLCC4, Open, Close, HL2, OHLC4. Some traders prefer VWAP anchored from the candle Open — now you can.
Previous Period Levels
Automatically plots the previous period's VWAP, VAH, and VAL as reference levels. See where last week's value area was and how price reacts to it.
Gold-Specific Features
Session background coloring (Tokyo / London / NY) for XAUUSD traders who trade session-based strategies.
Psychological price levels ($25/$50/$100 intervals) — Gold respects round numbers.
Daily Range and ATR14 dashboard — know if today's move is extended.
Full Color Customization
Every element has its own color input. VWAP, bands, previous levels, session backgrounds — all adjustable. Dark theme and light theme compatible.
Alerts
VWAP cross, VAH breakout, VAL breakdown, 2σ/3σ crosses, and previous VWAP cross. Set alerts and walk away.
---
Inspired by VWAP by [ mandonomics ]. This script is 100% original code with no shared codebase.
---
🇯🇵 日本語
ゴールド(XAUUSD)トレーダーのための高機能VWAPツールです。複数の基準期間、標準偏差バンド、バリューエリアレベル、セッション対応を1つのスクリプトに統合しました。
3つの表示モード
Bands — 標準偏差バンド(1σ/2σ/3σ)をグラデーション塗りで表示。価格がVWAPに対してどの位置にあるか一目でわかります。
Levels — VAH/VWAP/VALのラインと価格ラベルだけのクリーンな表示。
Both — バンドとレベルラベルの両方を同時表示。
デュアルVWAP
異なる基準期間のVWAPを2本同時に表示できます。例:週足VWAP + 月足VWAPを同じチャートに。それぞれ独立した色設定。
基準期間の選択
セッション、週、月、四半期、年から選択可能。多くのVWAPツールは1つの期間に固定されますが、このツールは即座に切り替えられます。
ソース選択
HLC3(デフォルト)、HLCC4、Open、Close、HL2、OHLC4。ローソク足のOpenからVWAPを計算したい方にも対応。
前期間レベル
前期間のVWAP、VAH、VALを自動的に参照レベルとして表示。前週のバリューエリアがどこにあったか、価格がどう反応しているかが見えます。
ゴールド専用機能
セッション背景色(東京/ロンドン/NY)— セッションベースの戦略を使うXAUUSDトレーダー向け。
心理的価格帯($25/$50/$100刻み)— ゴールドはラウンドナンバーを強くリスペクトします。
日足レンジとATR14ダッシュボード — 今日の値動きが伸びきっているか確認できます。
全色カスタマイズ対応
すべての要素に個別の色設定があります。VWAP、バンド、前期間レベル、セッション背景 — すべて調整可能。ダークテーマ・ライトテーマ両対応。
アラート
VWAPクロス、VAHブレイクアウト、VALブレイクダウン、2σ/3σクロス、前期間VWAPクロス。アラートを設定してチャートから離れられます。
---
Inspired by VWAP by [ mandonomics ]. コードは100%オリジナルです。
Pine Script® indicator
Bitcoin Market Regime Detector [RegimeRisk]█ WHAT THIS INDICATOR DOES
Most indicators answer "when should I buy or sell?" This one answers a different question: "what type of market am I in right now?"
Bitcoin Market Regime Detector classifies BTC into three market states:
BULL — Trend and momentum aligned to the upside. Trend-following
and breakout strategies have an edge here.
BEAR — Trend and momentum aligned to the downside. Shorts, hedging,
and risk reduction belong here.
RANGE — No dominant trend. Breakout strategies get chopped up.
Mean-reversion and range-bound setups work better.
The premise is simple: strategy selection should come after regime identification, not before. A moving average crossover strategy that prints money in a Bull regime will bleed you dry in a Range. A mean-reversion setup that works in Range will get steamrolled in a Bear. Knowing the regime first changes everything downstream.
█ HOW IT WORKS
The indicator combines four dimensions into a composite trend score:
1. Trend Direction — Fast/slow EMA crossover determines baseline bias
2. Trend Strength — ADX filters low-conviction environments
3. Momentum — RSI confirms buyer or seller control
4. Directional Index — DI+ vs DI- casts a final directional vote
Each dimension contributes to a score ranging from -2.5 (strong bearish) to +2.5 (strong bullish). The classification logic:
• ADX below threshold → Range (regardless of other signals)
• Strong positive score + RSI confirmation → Bull
• Strong negative score + RSI confirmation → Bear
• Conflicting or weak signals → Range
This layered approach prevents false regime calls during choppy, low-conviction periods where a single indicator would flip back and forth.
█ WHAT'S ON THE CHART
• Colour-coded bars — green (Bull), red (Bear), indigo (Range)
• Background shading — subtle regime colouring across the chart
• Regime change labels — flags appear when the regime shifts
• Info panel — current regime, duration in bars, and trend score
• Optional EMAs — toggle the underlying fast/slow EMAs on or off
█ ALERTS
Four alert conditions are built in:
• Regime → Bull
• Regime → Bear
• Regime → Range
• Any Regime Change
Set these through TradingView's alert menu to get notified on your phone or email when the market regime shifts.
█ SUGGESTED USE
Apply to BTCUSDT on the 4H or Daily timeframe. Use the regime as a filter for your existing strategy:
• In Bull: favour long entries, trend-following setups, breakout trades
• In Bear: favour short entries, hedging, reduced position sizes
• In Range: favour mean-reversion, avoid breakout strategies, tighten stops
The indicator works on other assets and timeframes, but the default parameters (21/55 EMA, 14-period ADX/RSI) are calibrated for BTC on higher timeframes. Adjust the inputs if applying to different instruments or lower timeframes.
█ INPUTS
Trend
• Fast EMA Length (default 21)
• Slow EMA Length (default 55)
Trend Strength
• ADX Length (default 14)
• ADX Range Threshold (default 20) — below this, market is classified as Range
Momentum
• RSI Length (default 14)
• RSI Bull Threshold (default 60)
• RSI Bear Threshold (default 40)
Display
• Background colour, regime labels, info panel, and EMAs can each be toggled independently
█ LIMITATIONS
This is a simplified regime classifier using indicators available natively in Pine Script. It does not have access to derivatives data (funding rates, open interest, liquidation flows) or cross-asset correlations that would improve classification accuracy, particularly for detecting volatility spikes and regime transitions. It is a trend/momentum-based classification tool — not a signal generator. Use it to inform your strategy selection, not as standalone buy/sell signals.
Pine Script® indicator
Clouds DailyClouds Daily (based on Ripster EMA Clouds) is a trend and extension dashboard built for daily swing trading, especially for stocks and options. It uses multiple moving-average clouds to show whether short-term momentum, recovery trend, swing trend, and long-term regime are aligned.
The indicator plots configurable MA clouds:
5/12 Fast Momentum Cloud
8/21 Short Trend Cloud
21/34 Recovery Cloud
34/50 Swing Trend Cloud
Optional 180/200 Regime Cloud
A top-right trend table summarizes the current state of each condition as bullish or bearish. The Extension row is designed to help avoid chasing extended moves. It measures price distance from the 21 EMA using ATR and combines that with a breakout check.
Extension states include:
Setup: price is not extended and has not broken out yet
High Base: price is elevated inside a base
Base Ext: price is stretched above the 21 EMA but has not broken out
Buyable: breakout confirmed without excessive ATR extension
Chase Risk: breakout confirmed while price is already extended
Pullback: price is below the 21 EMA by more than 1 ATR
Discount: deeper pullback zone
Damage: trend deterioration based on price, moving averages, and RSI
ATR risk markers can optionally plot 1, 2, and 3 ATR bands around the 21 EMA to visualize extension and pullback zones directly on the chart.
This indicator is intended as a visual decision-support tool for trend quality, breakout context, and entry risk. It is not a standalone buy/sell system. Always combine it with your own price action, volume, market context, and risk management.
Pine Script® indicator
Harmonic System PRO (Stable)//@version=5
indicator("Harmonic System PRO (Stable)", overlay=true, max_lines_count=500, max_boxes_count=100)
//========================
// INPUTS
//========================
pivotLen = input.int(10, "Pivot Length")
rr = input.float(2.0, "Risk:Reward", step=0.1)
//========================
// PIVOTS
//========================
ph = ta.pivothigh(high, pivotLen, pivotLen)
pl = ta.pivotlow(low, pivotLen, pivotLen)
var float X = na
var float A = na
var float B = na
var float C = na
var float D = na
var int xBar = na
var int aBar = na
var int bBar = na
var int cBar = na
var int dBar = na
newPivot = not na(ph) or not na(pl)
if newPivot
X := A
A := B
B := C
C := D
D := not na(ph) ? ph : pl
xBar := aBar
aBar := bBar
bBar := cBar
cBar := dBar
dBar := bar_index
//========================
// SAFE DIV
//========================
safeDiv(n, d) =>
d != 0 and not na(d) ? n / d : na
//========================
// FIB RATIOS
//========================
xab = safeDiv(math.abs(B - A), math.abs(X - A))
abc = safeDiv(math.abs(C - B), math.abs(A - B))
bcd = safeDiv(math.abs(D - C), math.abs(B - C))
xad = safeDiv(math.abs(D - A), math.abs(X - A))
valid = not na(xab) and not na(abc) and not na(bcd) and not na(xad)
//========================
// HARMONIC PATTERNS (SIMPLIFIED BUT CORRECT STRUCTURE)
//========================
// BAT
bat = valid and
xab >= 0.38 and xab <= 0.50 and
abc >= 0.38 and abc <= 0.886 and
bcd >= 1.618 and bcd <= 2.618 and
xad >= 0.85 and xad <= 0.92
// GARTLEY
gartley = valid and
xab >= 0.50 and xab <= 0.618 and
abc >= 0.38 and abc <= 0.886 and
bcd >= 1.27 and bcd <= 1.618 and
xad >= 0.75 and xad <= 0.80
// CYPHER
cypher = valid and
xab >= 0.382 and xab <= 0.618 and
abc >= 1.13 and abc <= 1.414 and
xad >= 1.27 and xad <= 1.414
pattern = bat or gartley or cypher
//========================
// TREND FILTER (IMPORTANT)
//========================
ema200 = ta.ema(close, 200)
bullTrend = close > ema200
bearTrend = close < ema200
//========================
// ONLY SIGNAL AT FINAL PIVOT (D)
//========================
signalBar = not na(dBar) and dBar == bar_index
buy = signalBar and pattern and D < C and bullTrend
sell = signalBar and pattern and D > C and bearTrend
//========================
// PRZ ZONE
//========================
przTop = D + math.abs(C - D) * 0.2
przBot = D - math.abs(C - D) * 0.2
if pattern and signalBar
box.new(dBar - 2, przTop, dBar + 2, przBot,
bgcolor=color.new(color.orange, 85), border_color=color.orange)
//========================
// STRUCTURE DRAWING
//========================
if pattern and not na(xBar)
line.new(xBar, X, aBar, A, color=color.gray)
line.new(aBar, A, bBar, B, color=color.gray)
line.new(bBar, B, cBar, C, color=color.gray)
line.new(cBar, C, dBar, D, color=color.yellow, width=2)
//========================
// SIGNALS
//========================
plotshape(buy, location=location.belowbar, color=color.green, style=shape.labelup, text="BUY")
plotshape(sell, location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL")
//========================
// EMA VISUAL
//========================
plot(ema200, "EMA 200", color=color.blue)
Pine Script® indicator
Pine Script® indicator
Pine Script® indicator
Financial Data Table📊 Multilingual Financial Data Table (EN + TR)
This indicator displays key fundamental financial metrics directly on your chart in a clean and structured table format. Designed for both local and international users, it presents all data in English and Turkish simultaneously, making analysis easier and more accessible.
🔍 What this script offers:
Real-time financial metrics pulled directly from TradingView data
Side-by-side English + Turkish terminology
Clean and minimal table design on chart
Essential valuation and balance sheet indicators
📈 Included metrics:
Current Ratio (Cari Oranı)
Price / Earnings (F/K)
Price / Book (PD/DD)
Return on Equity (ROE)
Revenue, Net Sales, Gross Profit
Total Shares, Float %, Equity, Liabilities
PEG Ratio and more
💡 This tool is especially useful for traders and investors who want to quickly evaluate a company’s fundamentals without leaving the chart.
🚀 Why I built this:
I wanted a fast, practical way to see fundamental data during technical analysis — and also make it accessible for both Turkish and global users.
📌 If you find this useful:
Add it to your favorites ⭐
Share it with others
And follow me from Youtube and X for more trading tools and strategies
Pine Script® indicator
Mauloa Ventures Clean Setup✅ 5m / 1H / Daily 200 EMA
✅ EMA plotted as circles
✅ EMA only shows over the last 50 candles
✅ ORB high + low
✅ Light blue session open line
Pine Script® indicator
BLUF_Regime_SignalThis is an extension of bluf_regime_overlay that includes built in alerts. designed by isaacbdavis for active traders. See blufterminal.com for free options levels daily.
Pine Script® indicator
Dwight Fraenk GC 5M (NQ & GC Tuned)The Dwight Fraenk GC 5M (NQ and GC Tuned) indicator is a specialized technical analysis tool designed for trading futures, specifically tailored to the 5-minute (5M) timeframe for Gold (GC) and Nasdaq (NQ) futures. It is engineered to identify high-probability momentum shifts and trend reversals.
Investopedia
Investopedia
+1
Key Characteristics and Features:
Custom Tuning: "GC Tuned" and "NQ Tuned" indicate that the formula is optimized specifically for the volatility and price action of Gold and Nasdaq, rather than a generic one-size-fits-all approach.
XS.com
XS.com
Timeframe Specificity: Optimized for 5-minute charts, making it suitable for intraday scalping and day trading.
Investopedia
Investopedia
Momentum Focus: It likely utilizes a combination of exponential moving averages (EMAs) and momentum oscillators to identify when price movement is losing or gaining strength, similar to common 5-minute scalping systems.
Investopedia
Investopedia
Trend Reversal Identification: The indicator helps traders identify the end of a pullback and the resumption of the main trend, or a complete change in market direction.
Investopedia
Investopedia
Common Use Cases:
Scalping: Capturing small, fast price movements.
Prop Firm Trading: Often used for its focus on high-probability setups to maintain low maximum drawdown.
Entry Confirmation: Used to confirm entry after a price action signal (e.g., waiting for a candle to close outside a band or moving average and getting a corresponding color change in the indicator).
YouTube
YouTube
+2
This indicator is typically used within a disciplined trading system that emphasizes waiting for high-volume periods to avoid false signals in low-liquidity environments.
Pine Script® indicator
Analyst Price TargetAnalyst targets & no of analysts
The format is: max, avg, min price, strong buy, buy, hold, sell, strong sell
Pine Script® indicator
49 EMA Titty BandsThe whole point of the custom indicator is that the EMAs stay anchored to 5-minute bars even when you drop to a 1-minute or 15-second chart. Normally if you put a 4/9 EMA on a 1-minute chart, it shows the last 4 and 9 one-minute bars — totally different data. Her indicator forces it to always show the 5-minute trend regardless of what timeframe you're on.
Pine Script® indicator
Covered Call Strike OptimizerCovered Call Strike Optimizer
A TradingView Pine Script (v6) that projects OTM covered call strike levels at the start of each period and scores each method's historical accuracy by measuring how close the predicted level was to the actual closing price at period end.
What It Does
At the beginning of each period the script snapshots a strike price for every enabled study method. At the end of each period it measures how far each projected level was from where price actually closed, accumulating the error over every period in your chart history. The results table shows which method has historically been the tightest predictor for the specific symbol and timeframe you are analyzing.
This answers the question: "Which strike selection method would have put my covered call closest to where price actually ended up?"
The Math
HV Expected Move (purple) — most rigorous
Uses the Black-Scholes 1-sigma expected move formula:
strike = open × (1 + HV_annualized × sqrt(DTE / 252))
sqrt(DTE / 252) correctly de-annualizes the volatility to the exact period length. This is the same math options market makers use to price contracts. The HV lookback measures the volatility regime and is always kept independent of DTE — it does not need to be auto-scaled because sqrt(DTE/252) already handles time-scaling.
ATR Levels (orange)
strike = period_open + (multiplier × ATR)
ATR measures the average range of one bar. The multiplier asks: how many typical bar-ranges might price travel over this entire period? For short-duration trades (e.g., 3-day or weekly), using ATR(14) measures volatility over a window 3–5× longer than the trade, which may reflect a stale regime. Auto-scaling sets the lookback to max(DTE, 10) so the smoothing window matches the trade horizon. A floor of 10 bars is enforced — fewer bars produces noisy estimates.
Standard Deviation (blue)
strike = period_open + (multiplier × StdDev(close, length))
SD measures the dispersion of closing prices over the lookback window. Same auto-scale logic as ATR — when enabled, length = max(DTE, 10).
Fixed % OTM (red)
strike = period_open × (1 + pct / 100)
No volatility adjustment. A simple directional assumption that price will not rise more than X% during the period.
Previous Period High (yellow)
The highest bar high from the prior completed period. Serves as a natural resistance level and potential OTM target on range-bound or mean-reverting symbols.
Results Table
Located in the top-right corner of the chart.
Column Description
Level Study name and multiplier
Price Current projected strike price
OTM % How far above today's close the strike sits right now
Avg Err% Average absolute % distance from the actual close across all periods
Avg $ Average absolute dollar distance from the actual close across all periods
Lower Avg Err% and Avg $ = the method historically predicted closest to where price actually closed.
Color Coding (Avg Err% and Avg $ columns)
Color Avg Error Interpretation
Lime < 10% Tight predictor — this level consistently landed close to close
Yellow 10–25% Moderate — useful directional guide but not precise
Red ≥ 25% Loose — strike was frequently far from where price closed
The footer row shows how many complete periods were analyzed. More periods = more reliable statistics.
Best-Row Highlight
The row with the lowest Avg Err% is highlighted with a faint white background glow — this is the method that historically placed the strike closest to where price actually closed. The highlight uses a 0.01% epsilon comparison to handle floating-point rounding.
Period Background Shading
Each period's final bar is shaded to show the covered call outcome relative to the HV 1-sigma level:
Green — price closed at or below HV 1σ (covered call likely expired worthless)
Red — price closed above HV 1σ (covered call was breached and likely required management)
Settings
Period
Setting Default Description
Expiration Cycle Monthly (21) Quick-select preset: 3-Day (3), Weekly (5), Monthly (21), Quarterly (63), or Custom
Custom DTE (bars) 21 Active only when Expiration Cycle = Custom
Auto-scale ATR & SD lookback to DTE ON When ON: ATR length = SD length = max(DTE, 10). Matches the smoothing window to your trade horizon. When OFF: use the manual length inputs in each study group. HV is never auto-scaled (already time-scaled via sqrt(DTE/252)).
DTE to bar count mapping (Daily chart):
Expiration Bars
3-Day 3
Weekly 5
Monthly 21
Quarterly 63
On a Weekly chart divide by 5. On an Hourly chart multiply by ~6.5.
ATR Levels (orange)
Setting Default Description
Show ATR Levels ON Toggle lines and table rows for all ATR levels
ATR Length (manual override) 14 Only used when Auto-scale is OFF
Multiplier 1 1.0x Strike = open + 1.0 × ATR
Multiplier 2 1.5x Strike = open + 1.5 × ATR
Multiplier 3 2.0x Strike = open + 2.0 × ATR
Multiplier 4 3.0x Strike = open + 3.0 × ATR
Standard Deviation Levels (blue)
Setting Default Description
Show SD Levels ON Toggle lines and table rows for all SD levels
SD Length (manual override) 20 Only used when Auto-scale is OFF
Multiplier 1 1.0σ Strike = open + 1.0 × SD
Multiplier 2 2.0σ Strike = open + 2.0 × SD
Multiplier 3 3.0σ Strike = open + 3.0 × SD
Historical Volatility / Expected Move (purple)
Setting Default Description
Show HV Expected Move ON Toggle HV lines and table rows
HV Lookback (bars) 30 Bars used to compute realized volatility. Not auto-scaled — HV is already time-adjusted via sqrt(DTE/252).
Fixed % OTM Levels (red)
Setting Default Description
Show % Levels ON Toggle fixed % lines and table rows
Level 1 % 5% Strike = open × 1.05
Level 2 % 10% Strike = open × 1.10
Level 3 % 15% Strike = open × 1.15
Previous Period High (yellow)
Setting Default Description
Show Prev High ON Toggle the prior period high line and table row
Display
Setting Default Description
Show Results Table ON Show/hide the accuracy table
Show Lines on Chart ON Master toggle for all dashed lines and labels. Turn OFF to see just the table without cluttering the chart. Individual study toggles still control their rows in the table.
Shade Period Background ON Green/red background shading at each period's close bar
Label Size Tiny Size of line labels: Tiny, Small, or Normal
How to Use
Step 1 — Select your expiration cycle
Set Expiration Cycle in the Period group to match your options strategy:
Trading 3-day options on a Daily chart → select 3-Day (3)
Trading weekly options on a Daily chart → select Weekly (5)
Trading monthly options on a Daily chart → select Monthly (21)
Trading monthly options on a Weekly chart → set Custom DTE to 4 or 5
Step 2 — Decide on auto-scaling
Leave Auto-scale ATR & SD lookback to DTE ON (recommended). This ensures ATR and SD are measuring volatility over the same number of bars as your trade lasts. For very short DTEs (3 or 5), the floor of 10 bars keeps estimates stable.
Turn it OFF if you prefer consistent, longer-term smoothing regardless of DTE — for example, if you always want ATR(14) as your baseline regardless of whether you're trading weeklies or monthlies.
Step 3 — Read the results table
Look at Avg Err% and Avg $. The rows with the lowest values (lime-colored) are the methods that historically placed the strike closest to where price actually closed. Use those as your primary strike selection candidates.
The Price and OTM % columns show where those same methods are projecting for the current active period.
Step 4 — Reduce chart clutter when needed
Toggle Show Lines on Chart OFF in Display settings to hide all dashed lines while keeping the results table. Individual study toggles (Show ATR Levels, Show SD Levels, etc.) let you focus on specific methods.
Tips
Run on a symbol with at least 50+ complete periods for statistically meaningful Avg Err% values. The footer shows the period count.
Compare cycles: switch between Weekly (5) and Monthly (21) presets to see which methods hold up across different time horizons.
HV Expected Move is the options-theory benchmark — it approximates what implied volatility is pricing in. If another method consistently beats it in Avg Err%, that is a meaningful signal for that symbol.
ATR and SD with auto-scale ON produce different lookback lengths for different cycles. A 3-day trade uses ATR(10) while a monthly trade uses ATR(21), giving each cycle an appropriately sized volatility window.
Prev Period High tends to work best on range-bound or mean-reverting symbols where prior resistance is respected.
Results are historical and backward-looking. Market regime changes (e.g., a volatility spike) can shift which method performs best going forward.
Pine Script® indicator
Momentum SetupMy first attempt at my own indicator. Using the 9ema, 21 ema, VWAP, above average volume and confirmation from a higher timeframe.
Pine Script® indicator
OT Bot trend ProOT Bot Supertrend Pro: The Ultimate Trading Guide
The OT Bot Supertrend Pro is an advanced trend-following system. It combines momentum (OT Bot), trend direction (SMA ), and volatility-based support/resistance (Supertrend), all filtered by trend intensity (ADX).
1. The Power of the ADX Filter (Trend Intensity)
Before looking for Buy/Sell signals, the indicator checks the ADX (Average Directional Index) to ensure you aren't trading in a "dead" or "exhausted" market.
• ADX < 20 (Sideways/Weak): The market is flat. Signals are hidden to prevent "Whipsaws" (losing trades in a range).
• ADX 25–40 (The Sweet Spot): The trend is healthy and active. Signals are visible and ready for entry.
• ADX > 40 (Overextended): The trend is too strong and likely to reverse soon. Signals are hidden to prevent "Buying the Top" or "Selling the Bottom."
2. Entry Strategy (The 4-Step Checklist)
To maximize accuracy, only enter a trade when all four conditions are met.
Buy Signal (Long Entry)
1. OT Bot: A "Buy" label appears, and candles turn Blue.
2. SMA : Price must be Above the Yellow line.
3. Supertrend: The dashed line must be Green (acting as support).
4. ADX: Current value must be between 20 and 40 (indicated by the Green dashboard).
Sell Signal (Short Entry)
1. OT Bot: A "Sell" label appears, and candles turn Purple.
2. SMA : Price must be Below the Yellow line.
3. Supertrend: The dashed line must be Red (acting as resistance).
4. ADX: Current value must be between 25 and 40 (indicated by the Green dashboard).
3. Precision Stop Loss (SL) Management
Your Stop Loss is dynamic, using the Supertrend line as a shield. We add a buffer of 100–200 points to avoid being stopped out by minor price spikes.
• For Buy Positions:$$Stop Loss = \text{Supertrend Price} - (100 \text{ to } 200 \text{ points})$$
• For Sell Positions:$$Stop Loss = \text{Supertrend Price} + (100 \text{ to } 200 \text{ points})$ OMXSTO:NOTE on "Points": > * Gold (XAUUSD): 1.00 USD movement = 100 points.
• Forex: The 5th decimal place (0.00001) = 1 point.
4. Exit & Take Profit (TP)
You can use two effective methods to lock in profits:
1. Fixed Risk/Reward: Target a ratio of 1:1.5 or 1:2. If your SL is 200 points, set your TP at 300–400 points.
2. Trend Transition: Close the trade if the candle color changes (e.g., Blue to Purple) or the Supertrend changes color, even if the OT Bot hasn't issued a new signal yet.
5. Pro-Tips for Success
• Recommended Timeframes: Best used on 15m, 1H, or 4H. Using very low timeframes (1m/5m) with ATR 1 may result in too many signals.
• Dashboard Check: Always look at the ADX Dashboard (Top Right). If it is Red, stay out of the market regardless of the "Buy/Sell" labels.
• Confirmation is King: Never "anticipate" a signal. Wait for the candle to Close to confirm the labels and colors before clicking buy or sell.
Pine Script® indicator
Liquidity Sweep ProbabilityStop-hunt detection with dynamic zone rendering and statistical edge validation
Identifies liquidity sweeps — moments when price briefly wicks beyond a significant high or low, clears resting stop orders, then reverses sharply back inside. Tracks whether each sweep type has historically produced a follow-through move and highlights the 3 most contextually relevant zones based on what is currently visible on your chart.
Sweep detection
A sweep is confirmed when:
Price wicks beyond the highest high or lowest low of the previous N bars by at least min_pts
The bar closes back inside that level
The wick represents stop orders being triggered (the liquidity grab). The close back inside confirms the reversal has begun.
Dynamic zone rendering
Rather than cluttering the chart with every historical sweep, the indicator identifies the 3 most recent sweep events within your current visible chart window and renders only those as blue horizontal zones. As you scroll or zoom, the zones update automatically to reflect the 3 most recent events in view. The zone spans the swept price range (wick extreme to close) and extends forward by a configurable number of bars.
Post-sweep confluence
After a sweep, two additional patterns are tracked:
Fair Value Gap (FVG) — a 3-candle price imbalance forming in the reversal direction while the scoring window is active. Represents unfilled price inefficiency that may act as support or resistance. Shown as dashed purple zones, also limited to 3 most recent in view.
Gap B — a traditional price gap where the bar opens completely beyond the previous bar's extreme. Rarer on MGC due to near-24-hour trading, but meaningful when it occurs around the 6 PM session open.
Statistical confidence
The same probability engine used across the suite: uncapped wins/total observation counts feed the binomial z-score and t-test. Zones are only rendered when the binomial z-score exceeds the significance threshold (default 1.282, p < 0.10). The dashboard shows both the all-history probability and the recent-3 probability, with dual display triggered automatically when they diverge by 10 percentage points or more.
Inputs
Level lookback (bars defining the significant high/low)
Minimum sweep size in points
Reversal window (minutes) and threshold (points)
Significance threshold for zone display
Zone width and transparency
FVG and Gap B toggles
Pine Script® indicator






















