SP2L RavaAcademy (poursamadi)Rava Academy - SP2L Strategy Assistant
This indicator is an assistive tool designed by Rava Academy to implement the SP2L trading strategy, which is a price action concept focused on identifying market exhaustion and potential reversals.
Core Concept:
The underlying logic of this script is to detect a specific price action pattern known as the "Spike and Two-Legged Pullback". The indicator identifies an initial strong price movement (the Spike) followed by a corrective phase with two distinct legs. The signals are generated near the completion of the second leg, which often represents a high-probability entry point as the initial momentum is expected to resume. This mechanical approach helps traders identify these complex patterns systematically.
Key Features:
Automatic Pattern Detection: The indicator automatically scans the chart for SP2L patterns.
Clear Visual Signals: It provides straightforward arrows to indicate potential setups.
Time-Saving Analysis: This tool minimizes the need for manual pattern identification.
Multi-Market Compatibility: Optimized for Forex and Cryptocurrencies.
How to Use:
Green Arrow (▲): Indicates a potential buy setup.
Red Arrow (▼): Indicates a potential sell setup.
Disclaimer:
This tool is for educational and analytical purposes only. Trading involves significant risk. All trading decisions are the sole responsibility of the user. Past performance is not indicative of future results.
Candlestick analysis
Advanced Swing Points Liquidity by BTTAdvanced Swing Points Liquidity Indicator by BTT
Identify key price reversals and liquidity zones with precision using the Advanced Swing Points Liquidity indicator. This tool automatically detects swing highs (Buy Side Liquidity) and swing lows (Sell Side Liquidity) based on customizable pivot logic, and visualizes these levels on your chart for enhanced trading decisions.
Core Features:
Swing Logic Choice: Instantly switch between classic 3-point (tight pivots) and broader 5-point (stronger swings) swing detection.
Visual Clarity: Each swing point is highlighted with your choice of colored labels and extended horizontal lines.
Custom Line Length: Define how far each liquidity line extends, making it easy to spot critical reversal and breakout zones across the chart.
Liquidity Zones: (Optional) Shaded boxes overlay the chart at swing highs/lows, helping you visualize supply and demand areas and optimize entries/exits.
Distinctive Labels: BSL (Buy Side Liquidity) at swing highs, SSL (Sell Side Liquidity) at swing lows, making institutional liquidity levels immediately visible.
How to Use:
Use swing labels and lines to spot potential price reaction zones, stop hunt areas, and trend reversals.
Combine with your price action, order blocks, or other SMC tools for confirmation and trade planning.
Adjust parameters for any market (indices, stocks, crypto, commodities), any timeframe.
Perfect For:
Smart money traders locating liquidity grabs and stop hunts
Supply & demand, market structure, and swing traders
Anyone wanting automated mapping and visual clarity for swing pivots and institutional levels
Customization:
Choose swing detection style (pivot window)
Toggle lines, labels, and liquidity boxes on/off
Set color, box height, and line length for maximum visual control
FintechFull — Next Candle Probability (EB, EWMA, Regime)Purpose
Developed by FintechFull as a quantitative assistant for day traders.
This indicator estimates the probability that the next candle will close green or red, using recent R/G color patterns of depth N = 1..7.
When a trader knows which side has higher probability, it becomes a powerful edge for trading in the direction of the dominant trend.
Methodology
- Strict no-lookahead counting (no repaint, doji removed)
- Hierarchical Empirical Bayes (EB) smoothing across depths (1→7)
- Optional exponential decay (EWMA) for time-adaptive weighting
- Higher-timeframe EMA regime filter (UP-only / DOWN-only / OFF)
- ALL / SELECTED scopes with single-decision voting (one clean signal per bar)
- On-chart tags (“R” = RAW freq, “E” = EB) and full alert system
How it helps day traders
You can see whether the next bar’s probability favors the bullish or bearish side — then trade in alignment with trend and probability, not emotion.
Learn More
📘 The full research article explaining the math, logic, and Pine implementation,
and the Next-Candle Prediction Bot, are both available on the FintechFull Telegram channel.
→ Just search “@FintechFull” on Telegram to read the full paper and try the bot.
Trend Profit Tracking——JackFinanceTrend Profit Tracking Indicator Usage Guide1. Chart Interpretation and UsageSignals: Green "Buy" (below bar) for long entry; red "Sell" (above bar) for short entry or close long. Based on ATR stop reversal.
Trend Line: Green = bullish (support); red = bearish (resistance); gray = neutral.
Background: Light green/red = trend environment.
Filter Band: Green fill confirms bullish; red confirms bearish. Signals more accurate when price is inside the band.
Volume: Yellow bars = unusual volume spike; combine with signals for reversal hints.
Table (top-right): Bullish; Bearish; Neutral.
2. Trading ApplicationEntry: Signal + matching filter band color (green for long, red for short).
Exit: Reverse signal or price hits trend line/band edge.
Stop-Loss: Use built-in trailing stop; ATR multiplier for position sizing.
Best For: Daily/4H trend charts; avoid choppy markets.
Backtest: Verify in strategy tester (~55-65% win rate with defaults).
3. TipsCombine with RSI for filters.
Trading involves risk; decide at your own discretion.
Elite Signals ProV4 OptimizedElite Signals Pro V4 is a sophisticated multi-factor trading indicator that combines price action, momentum, and market structure analysis to generate high-probability trading signals. Unlike traditional indicators that rely on single metrics, Elite Signals uses a weighted confidence scoring system across 7 key market dimensions to provide filtered, quality signals.
🎯 Core Philosophy
The indicator operates on the principle that multiple confirmations lead to higher probability setups. Instead of looking at isolated signals, it evaluates:
Price Action (Wick strength & rejection patterns)
Trend Alignment (Multiple timeframe confirmation)
Market Context (Zones, liquidity, volatility)
Momentum (RSI with slope confirmation)
Entry Rules:
Wait for STRONG confidence signals (>70%) for higher probability
Ensure trend alignment matches signal direction
Check RSI is not extreme unless slope confirms reversal
Verify candle is meaningful rejection pattern
Risk Management:
Stop Loss: Place below recent swing low (BUY) or above swing high (SELL)
Take Profit: 1.5-2x risk ratio, or use trailing stops
Position Size: Scale based on confidence strength
1. Adaptive Confidence Threshold
Automatically adjusts based on market volatility
Stricter in high volatility (fewer but higher quality signals)
More lenient in calm markets (more opportunities)
2. Multi-Timeframe Alignment
15-minute trend alignment ensures you're trading with higher timeframe momentum
Reduces false signals from counter-trend moves
3. Liquidity Sweep Detection
Identifies stop hunts and liquidity grabs
Provides early warning of potential reversals
Graduated confidence (0.5 for touch, 1.0 for full sweep)
4. Zone-Based Trading
Supply/Demand zone detection for key levels
Percentage-based proximity works across all instruments
Combines with rejection candles for high-probability entries
⚠️ Important Notes
Do:
✅ Use on multiple timeframes for confirmation
✅ Combine with price action and market context
✅ Adjust parameters for your trading style
✅ Use proper risk management always
Don't:
❌ Trade every signal - be selective
❌ Ignore higher timeframe context
❌ Over-optimize parameters
❌ Risk more than 1-2% per trade
🚨 Risk Disclaimer
This indicator is a tool for analysis and should not be the sole basis for trading decisions. Always:
Use proper risk management
Test strategies in demo accounts first
Understand that past performance doesn't guarantee future results
Consider multiple confirmation sources before entering trades
Heikin Ashi BarThis is an indicator that displays the Heikin‑Ashi chart simultaneously with candlestick bars. The Heikin‑Ashis are shown on a bar chart, with bullish bars colored green and bearish bars colored orange.
平均足をロウソク足と同時に表示するインジケータです。平均足はバーチャートで表示されます。陽線は緑色、陰線はオレンジ色で表示されます。
OTS Trend Suite (Open Trend System)OTS (Open Trend System)
Components
Trend Suite (overlay): Macro Trend Bars + Track, Micro Dots, Reversal “R” (+2 bar confirm), T/B (+1), (opt) Strength/Weakness arrows.
Confirmation (panel): RSI 3-line + momentum crosses, (opt) divergences; Thrust histogram (Blue/Green/Red/Orange via z-score).
Support/Resistance (overlay): pivot-temelli dinamik S/R çizgileri.
Presets & Micro-cap Notes
Equity-4H: ATR(14)×2.0 macro track, BB(20,2.0), wickFrac 0.65 — liquid US equities, intraday swing focus.
Equity-1D (small/micro): ATR(14)×2.2 macro track, BB(20,2.2), wickFrac 0.70 — dampens noise for thin micro-cap sessions.
FX-1H: Retains ATR(10)×2.2 profile for tighter FX structures; enable Custom for bespoke tuning.
RTH-only thrust: Panel default keeps 09:30–16:00 ET (session input) so after-hours volume spikes stop inflating micro-cap thrust z-scores.
Market Microstructure Notes (US Equities)
SIP / CTA-UTP plumbing: Consolidated tapes publish NBBO and LULD bands; thrust auto-cal keeps RTH default so AH/SIP hiccups do not distort robust z quantiles.
LULD reopen guard: Without a real-time halt feed we flag session-open gaps ≥ gapThresh as reopen-like and suppress entries for that bar; manual labels remain for review while Python backtests can plug in full halt datasets.
Survivorship-free calibration: Use Norgate/CRSP EOD universes when deriving quantile windows so delisted micro-caps do not bias thrust tails during auto-bucket calibration.
Non-repainting: Trade sinyali yalnız onay sonrası. Financial disclaimer: Eğitim amaçlıdır.
Operator Quickstart (US Equities – Small/Micro-cap)
Overlay: OTS Trend Suite → Preset = Equity-1D (small/micro) (günlük) veya Equity-4H (iç seans).
Panel: OTS Confirmation → Use RTH only açık (09:30–16:00). Micro-cap’te AH hacim sapmalarını ezer.
S/R: OTS Support/Resistance → max lines 8; range yoğunluklarında okunabilirlik için iyi.
Preset Mapping
Preset ATR× BB wickFrac pivotL Micro ATR×
Equity-4H 14×2.0 20×2.0 0.65 6 7×1.5
Equity-1D (small/micro) 14×2.2 20×2.2 0.70 6 7×1.5
FX-1H 10×2.2 20×2.2 0.60 6 7×1.5
Alert Reference
Alert Anlam İşlem Disiplini
Macro Trend Flip Ana trend rengi değişti Pozisyon yönünü yalnız trend yönünde tut
R / R✓ Tersine dönüş barı / onaylandı Yalnız R✓ sonrası trade
T / T✓ Lokal tepe / onaylandı T✓’de kar al/short araması
B / B✓ Lokal dip / onaylandı B✓’de long araması
RSI Bull/Bear Momentum kesişimi Sinyal teyidi
Thrust ORANGE Aşırı kurumsal baskı Breakout/kapitulasyon teyidi
Micro-cap Notları
RTH-only Thrust: AH sapmaları şişer; RTH filtre varsayılan.
Compact Mode: dot/etiket/ok spam’ini azaltır; tarama performansı için aç.
Halts/LULD: Re-open barı genelde işlem dışı bırakmak daha temiz sinyal verir (ileri sürümde toggle).
Manual QA (hızlı)
SPY 4H: Macro flip ve Strength/Weakness okları trend içinde kalıyor mu?
IWM 1D: RTH-only Thrust renkleri stabil mi?
3–5 micro-cap: Equity-1D preset + Compact Mode on/off görsel karşılaştır.
Testing
How to run: source .venv/bin/activate && make dev-setup && make lint && make test
What's covered: R-confirm window, macro flip debounce, robust thrust + RTH gating.
Environment Notes
Python 3.11 is the supported baseline. Python 3.13 is workable as long as pip resolves numpy>=2.1.0 (handled by the conditional pin).
Snapshots render charts with the non-interactive Matplotlib Agg backend (MPLBACKEND=Agg set by default).
yfinance downloads are chunked (<=25 tickers) with threads=True and paced sleeps to reduce rate-limit risk.
Snapshot (No-TradingView)
Calibrated quantiles → pGreen=0.70, pOrange=0.98 (micro-cap tails). gap_thresh=0.10 default. Use --interval (1d, 60m, 30m) to choose resolution; daily bars rely on first-of-day fallback for the guard. How to run:
source .venv/bin/activate
make dev-setup
python apps/py/snapshots/run_equities_snapshot.py --tickers-file data/inputs/microcaps.txt --start 2024-01-01
What it produces:
CSV exports under reports/snapshots// covering summary metrics, trade blotter, thrust buckets, and guard suppressions.
PNG charts in reports/snapshots//charts/ illustrating price, macro track, and entry/exit markers for active symbols.
guard_suppressed counts highlight bars skipped by the LULD reopen guard; thrust shares show time in each thrust regime; R-multiple aggregates trade efficiency relative to ATR risk.
Provider & Fallbacks
--provider yf|csv|synthetic selects the data backend (default yf).
--csv-dir should point at a folder containing .csv files with columns Date,Open,High,Low,Close,Volume (case-insensitive).
--tz controls the output timezone for timestamps (default America/New_York). Synthetic fallbacks respect US trading hours, DST shifts, and NYSE holiday/early-close calendars in the selected timezone.
Synthetic generation is controlled via --synthetic-seed, --synthetic-gap-prob, and --synthetic-gap-scale; the runner seeds a Laplace gap model around a 2%/√252 daily volatility baseline.
yfinance downloads automatically write CSV caches under --csv-dir and reuse them on subsequent 429 retries before falling back to synthetic data (provider_used=csv_cache/yf_synthetic_fallback).
India VIX Range Lines + Accurate Table//@version=5
indicator("India VIX Range Lines + Accurate Table", overlay=true, max_lines_count=500)
// === STYLE INPUTS ===
lineWidth = input.int(2, "Line Width", minval=1)
upperColor = input.color(color.green, "Upper Line Color")
lowerColor = input.color(color.red, "Lower Line Color")
midColor = input.color(color.yellow, "Today Open Line Color")
// === TABLE THEME INPUTS ===
tableBgColor = input.color(color.new(color.black, 80), "Table Background Color")
tableBorder = input.color(color.white, "Table Border Color")
headerBgColor = input.color(color.new(color.blue, 60), "Header Background Color")
headerTextColor = input.color(color.white, "Header Text Color")
cellBgColor = input.color(color.new(color.gray, 60), "Cell Background Color")
cellTextColor = input.color(color.white, "Cell Text Color")
// === PARAMETERS ===
vixDivisor = 19.1 // fixed divisor
// === DATA FETCH ===
// India VIX daily open
indiaVixOpen = request.security("INDIAVIX", "D", open)
// Today's index first bar open (intraday-friendly)
var float todayOpen = na
if ta.change(time("D"))
todayOpen := open
// === CALCULATIONS ===
var float x = na
var float y = na
var float upperLine = na
var float lowerLine = na
if not na(todayOpen)
x := indiaVixOpen / vixDivisor // exact x = IndiaVIX Open / 19.1
y := todayOpen * x / 100 // range offset
upperLine := todayOpen + y
lowerLine := todayOpen - y
// === PLOT LINES (Fixed for the Day) ===
plot(upperLine, color=upperColor, style=plot.style_line, linewidth=lineWidth, title="Upper Line")
plot(lowerLine, color=lowerColor, style=plot.style_line, linewidth=lineWidth, title="Lower Line")
plot(todayOpen, color=midColor, style=plot.style_line, linewidth=lineWidth, title="Today Open Line")
// === TABLE DISPLAY ===
var table infoTable = table.new(position=position.top_right, columns=2, rows=7, border_width=1, frame_color=tableBorder, frame_width=1, bgcolor=tableBgColor)
if barstate.islast
table.cell(infoTable, 0, 0, "India VIX Open", text_color=headerTextColor, bgcolor=headerBgColor)
table.cell(infoTable, 1, 0, str.tostring(indiaVixOpen, "#.##"), text_color=cellTextColor, bgcolor=cellBgColor)
table.cell(infoTable, 0, 1, "VIX Divisor", text_color=headerTextColor, bgcolor=headerBgColor)
table.cell(infoTable, 1, 1, str.tostring(vixDivisor, "#.##"), text_color=cellTextColor, bgcolor=cellBgColor)
table.cell(infoTable, 0, 2, "X Value (VIX / 19.1)", text_color=headerTextColor, bgcolor=headerBgColor)
table.cell(infoTable, 1, 2, str.tostring(x, "#.#####"), text_color=cellTextColor, bgcolor=cellBgColor)
table.cell(infoTable, 0, 3, "Today Open", text_color=headerTextColor, bgcolor=headerBgColor)
table.cell(infoTable, 1, 3, str.tostring(todayOpen, "#.##"), text_color=cellTextColor, bgcolor=cellBgColor)
table.cell(infoTable, 0, 4, "Y Value (Range Offset)", text_color=headerTextColor, bgcolor=headerBgColor)
table.cell(infoTable, 1, 4, str.tostring(y, "#.#####"), text_color=cellTextColor, bgcolor=cellBgColor)
table.cell(infoTable, 0, 5, "Upper Line", text_color=headerTextColor, bgcolor=headerBgColor)
table.cell(infoTable, 1, 5, str.tostring(upperLine, "#.##"), text_color=cellTextColor, bgcolor=cellBgColor)
table.cell(infoTable, 0, 6, "Lower Line", text_color=headerTextColor, bgcolor=headerBgColor)
table.cell(infoTable, 1, 6, str.tostring(lowerLine, "#.##"), text_color=cellTextColor, bgcolor=cellBgColor)
聪明钱指标// This work is licensed under a Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) creativecommons.org
// © robin_3910
//@version=5
indicator("聪明钱指标", "聪明钱指标"
, overlay = true
, max_labels_count = 500
, max_lines_count = 500
, max_boxes_count = 500
, max_bars_back = 500)
//-----------------------------------------------------------------------------{
//Constants
//-----------------------------------------------------------------------------{
color TRANSP_CSS = #ffffff00
//Tooltips
string MODE_TOOLTIP = '允许显示历史结构或仅显示最近的结构'
string STYLE_TOOLTIP = '指示器颜色主题'
string COLOR_CANDLES_TOOLTIP = '显示附加蜡烛,其颜色反映结构检测到的当前趋势'
string SHOW_INTERNAL = '显示内部市场结构'
string CONFLUENCE_FILTER = '过滤非重要的内部结构突破'
string SHOW_SWING = '显示波动市场结构'
string SHOW_SWING_POINTS = '在图表上将摆动点显示为标签'
string SHOW_SWHL_POINTS = '突出显示图表上最近的强弱高点/低点'
string INTERNAL_OB = '在图表上显示内部订单块 要在图表上显示的内部订单块数量'
string SWING_OB = '在图表上显示摆动订单块 要在图表上显示的内部摆动块数量'
string FILTER_OB = '用于过滤掉不稳定订单块的方法 当可用数据量较少时,建议使用累积均值范围方法'
string SHOW_EQHL = '在图表上显示相等的高点和相等的低点'
string EQHL_BARS = '用于确认相等高点和相等低点的柱数'
string EQHL_THRESHOLD = '用于检测相等高点和低点的范围 (0, 1) 内的灵敏度阈值 较低的值将返回较少但更相关的结果'
string SHOW_FVG = '在图表上显示公允价值差距'
string AUTO_FVG = '过滤掉不显着的公允价值差距'
string FVG_TF = '公允价值缺口时间范围'
string EXTEND_FVG = '确定在图表上扩展公允价值缺口框的数量'
string PED_ZONES = '在图表上显示溢价、折价和均衡区域'
// dailyHighAndLowLength = input.int(2, title = "近x日线高低点")
//-----------------------------------------------------------------------------{
//Settings
//-----------------------------------------------------------------------------{
//General
//----------------------------------------{
// mode = input.string('历史'
// , options =
// , group = '聪明的金钱概念'
// ,tooltip = MODE_TOOLTIP)
mode = "historical"
// style = input.string('彩色'
// , options =
// , group = '聪明的金钱概念'
// ,tooltip = STYLE_TOOLTIP)
style = "Colored"
// show_trend = input(false, '彩色K线'
// , group = '聪明的金钱概念'
// , tooltip = COLOR_CANDLES_TOOLTIP)
show_trend = false
//----------------------------------------}
//Internal Structure
//----------------------------------------{
// show_internals = input(true, '显示内部结构'
// , group = '实时内部结构'
// ,tooltip= SHOW_INTERNAL)
show_internals = false
// show_ibull = input.string('全部', '看涨结构'
// , options =
// , inline = 'ibull'
// , group = '实时内部结构')
show_ibull = "All"
// swing_ibull_css = input(#089981,''
// , inline = 'ibull'
// , group = '实时内部结构')
swing_ibull_css = color.rgb(8, 153, 80)
// bear结构体
// show_ibear = input.string('全部', '看跌结构'
// , options =
// , inline = 'ibear'
// , group = '实时内部结构')
show_ibear = "All"
// swing_ibear_css = input(#f23645,''
// , inline = 'ibear'
// , group = '实时内部结构')
swing_ibear_css = color.rgb(239, 54, 69)
// ifilter_confluence = input(false, '汇流过滤器'
// , group = '实时内部结构'
// ,tooltip= CONFLUENCE_FILTER)
ifilter_confluence = false
// internal_structure_size = input.string('Tiny', '内部标签大小'
// , options =
// , group = '实时内部结构')
internal_structure_size = "Tiny"
//----------------------------------------}
//Swing Structure
//----------------------------------------{
// show_Structure = input(true, '显示 Swing 结构'
// , group = '实时Swing结构'
// , tooltip = SHOW_SWING)
show_Structure = true
//Bull Structure
// show_bull = input.string('All', '看涨结构'
// , options =
// , inline = 'bull'
// , group = '实时Swing结构')
show_bull = "All"
// swing_bull_css = input(#089981, ''
// , inline = 'bull'
// , group = '实时Swing结构')
swing_bull_css = color.rgb(7, 153, 129)
//Bear Structure
// show_bear = input.string('All', '看跌结构'
// , options =
// , inline = 'bear'
// , group = '实时Swing结构')
show_bear = "All"
// swing_bear_css = input(#f23645, ''
// , inline = 'bear'
// , group = '实时Swing结构')
swing_bear_css = color.rgb(242, 54, 69)
// swing_structure_size = input.string('Small', 'Swing 标签大小'
// , options =
// , group = '实时Swing结构')
swing_structure_size = "Small"
//Swings
// show_swings = input(false, '展示 Swings 枢轴点'
// , inline = 'swings'
// , group = '实时Swing结构'
// , tooltip = SHOW_SWING_POINTS)
show_swings = true
// length = input.int(50, ''
// , minval = 10
// , inline = 'swings'
// , group = '实时Swing结构')
length = 50
// show_hl_swings = input(true, '展示 强弱、高低点'
// , group = '实时Swing结构'
// , tooltip = SHOW_SWHL_POINTS)
show_hl_swings = true
//----------------------------------------}
//Order Blocks
//----------------------------------------{
// show_iob = input(true, '内部结构订单块'
// , inline = 'iob'
// , group = '订单块'
// , tooltip = INTERNAL_OB)
show_iob = true
// iob_showlast = input.int(5, ''
// , minval = 1
// , inline = 'iob'
// , group = '订单块')
iob_showlast = 5
// show_ob = input(false, 'Swing订单块'
// , inline = 'ob'
// , group = '订单块'
// , tooltip = SWING_OB)
show_ob = false
// ob_showlast = input.int(5, ''
// , minval = 1
// , inline = 'ob'
// , group = '订单块')
ob_showlast = 5
// ob_filter = input.string('Atr', '订单块过滤'
// , options =
// , group = '订单块'
// , tooltip = FILTER_OB)
ob_filter = "Atr"
// ibull_ob_css = input.color(color.new(#3179f5, 80), 'Internal Bullish OB'
// , group = '订单块')
ibull_ob_css = color.rgb(49, 123, 248, 52)
// ibear_ob_css = input.color(color.new(#f77c80, 80), 'Internal Bearish OB'
// , group = '订单块')
ibear_ob_css = color.rgb(248, 125, 128,50)
// bull_ob_css = input.color(color.new(#1848cc, 80), 'Bullish OB'
// , group = '订单块')
bull_ob_css = color.rgb(27, 75, 207, 52)
// bear_ob_css = input.color(color.new(#b22833, 80), 'Bearish OB'
// , group = '订单块')
bear_ob_css = color.rgb(178, 40, 51,50)
//----------------------------------------}
//EQH/EQL
//----------------------------------------{
// show_eq = input(true, '双顶/双底'
// , group = 'EQH/EQL'
// , tooltip = SHOW_EQHL)
show_eq = true
// eq_len = input.int(3, 'Bars 确认'
// , minval = 1
// , group = 'EQH/EQL'
// , tooltip = EQHL_BARS)
eq_len = 3
// eq_threshold = input.float(0.1, '阈值'
// , minval = 0
// , maxval = 0.5
// , step = 0.1
// , group = 'EQH/EQL'
// , tooltip = EQHL_THRESHOLD)
eq_threshold = 0.1
// eq_size = input.string('Tiny', '标签大小'
// , options =
// , group = 'EQH/EQL')
eq_size = 'Tiny'
//----------------------------------------}
//Fair Value Gaps
//----------------------------------------{
// show_fvg = input(false, '公允价值区域'
// , group = 'Fair Value Gaps'
// , tooltip = SHOW_FVG)
show_fvg = true
// fvg_auto = input(true, "自动阈值区"
// , group = 'Fair Value Gaps'
// , tooltip = AUTO_FVG)
fvg_auto = true
// fvg_tf = input.timeframe('', "时间区间"
// , group = 'Fair Value Gaps'
// , tooltip = FVG_TF)
fvg_tf = ''
// bull_fvg_css = input.color(color.new(#00ff68, 70), 'Bullish FVG'
// , group = 'Fair Value Gaps')
bull_fvg_css = color.new(#00ff68, 70)
// bear_fvg_css = input.color(color.new(#ff0008, 70), 'Bearish FVG'
// , group = 'Fair Value Gaps')
bear_fvg_css = color.new(#ff0008, 70)
// fvg_extend = input.int(1, "Extend FVG"
// , minval = 0
// , group = 'Fair Value Gaps'
// , tooltip = EXTEND_FVG)
fvg_extend = 1
//----------------------------------------}
//Previous day/week high/low
//----------------------------------------{
//Daily
// show_pdhl = input(false, '日'
// , inline = 'daily'
// , group = '高低点展示')
show_pdhl = true
// pdhl_style = input.string('⎯⎯⎯', ''
// , options =
// , inline = 'daily'
// , group = '高低点展示')
pdhl_style = "----"
// pdhl_css = input(#2157f3, ''
// , inline = 'daily'
// , group = '高低点展示')
pdhl_css = color.rgb(34, 86, 244)
//Weekly
// show_pwhl = input(false, '周'
// , inline = 'weekly'
// , group = '高低点展示')
show_pwhl = true
// pwhl_style = input.string('⎯⎯⎯', ''
// , options =
// , inline = 'weekly'
// , group = '高低点展示')
pwhl_style = '····'
// pwhl_css = input(#2157f3, ''
// , inline = 'weekly'
// , group = '高低点展示')
pwhl_css = color.rgb(35, 87, 244)
//Monthly
// show_pmhl = input(false, '月'
// , inline = 'monthly'
// , group = '高低点展示')
show_pmhl = true
// pmhl_style = input.string('⎯⎯⎯', ''
// , options =
// , inline = 'monthly'
// , group = '高低点展示')
pmhl_style = '⎯⎯⎯'
pmhl_css = color.rgb(30, 84, 243)
// pmhl_css = input(#2157f3, ''
// , inline = 'monthly'
// , group = '高低点展示')
//----------------------------------------}
//Premium/Discount zones
//----------------------------------------{
// show_sd = input(false, '溢价折扣区'
// , group = '溢价折扣区'
// , tooltip = PED_ZONES)
show_sd = true
premium_css = color.rgb(241, 55, 70, 50)
// premium_css = input.color(#f23645, '溢价区'
// , group = '溢价折扣区')
eq_css = color.rgb(175, 178, 187, 50)
// eq_css = input.color(#b2b5be, '中间区域'
// , group = '溢价折扣区')
discount_css = color.rgb(8, 151, 127, 50)
// discount_css = input.color(#089981, '折扣区'
// , group = '溢价折扣区')
//-----------------------------------------------------------------------------}
//Functions
//-----------------------------------------------------------------------------{
n = bar_index
atr = ta.atr(200)
cmean_range = ta.cum(high - low) / n
//HL Output function
hl() =>
//Get ohlc values function
get_ohlc()=> [close , open , high, low, high , low ]
//Display Structure function
display_Structure(x, y, txt, css, dashed, down, lbl_size)=>
structure_line = line.new(x, y, n, y
, color = css
, style = dashed ? line.style_dashed : line.style_solid)
structure_lbl = label.new(int(math.avg(x, n)), y, txt
, color = TRANSP_CSS
, textcolor = css
, style = down ? label.style_label_down : label.style_label_up
, size = lbl_size)
if mode == 'Present'
line.delete(structure_line )
label.delete(structure_lbl )
//Swings detection/measurements
swings(len)=>
var os = 0
upper = ta.highest(len)
lower = ta.lowest(len)
os := high > upper ? 0 : low < lower ? 1 : os
top = os == 0 and os != 0 ? high : 0
btm = os == 1 and os != 1 ? low : 0
//Order block coordinates function
ob_coord(use_max, loc, target_top, target_btm, target_left, target_type)=>
min = 99999999.
max = 0.
idx = 1
ob_threshold = ob_filter == 'Atr' ? atr : cmean_range
//Search for highest/lowest high within the structure interval and get range
if use_max
for i = 1 to (n - loc)-1
if (high - low ) < ob_threshold * 2
max := math.max(high , max)
min := max == high ? low : min
idx := max == high ? i : idx
else
for i = 1 to (n - loc)-1
if (high - low ) < ob_threshold * 2
min := math.min(low , min)
max := min == low ? high : max
idx := min == low ? i : idx
array.unshift(target_top, max)
array.unshift(target_btm, min)
array.unshift(target_left, time )
array.unshift(target_type, use_max ? -1 : 1)
//Set order blocks
display_ob(boxes, target_top, target_btm, target_left, target_type, show_last, swing, size)=>
for i = 0 to math.min(show_last-1, size-1)
get_box = array.get(boxes, i)
box.set_lefttop(get_box, array.get(target_left, i), array.get(target_top, i))
box.set_rightbottom(get_box, array.get(target_left, i), array.get(target_btm, i))
box.set_extend(get_box, extend.right)
color css = na
if swing
if style == 'Monochrome'
css := array.get(target_type, i) == 1 ? color.new(#b2b5be, 80) : color.new(#5d606b, 80)
border_css = array.get(target_type, i) == 1 ? #b2b5be : #5d606b
box.set_border_color(get_box, border_css)
else
css := array.get(target_type, i) == 1 ? bull_ob_css : bear_ob_css
box.set_border_color(get_box, css)
box.set_bgcolor(get_box, css)
else
if style == 'Monochrome'
css := array.get(target_type, i) == 1 ? color.new(#b2b5be, 80) : color.new(#5d606b, 80)
else
css := array.get(target_type, i) == 1 ? ibull_ob_css : ibear_ob_css
box.set_border_color(get_box, css)
box.set_bgcolor(get_box, css)
//Line Style function
get_line_style(style) =>
out = switch style
'⎯⎯⎯' => line.style_solid
'----' => line.style_dashed
'····' => line.style_dotted
//Set line/labels function for previous high/lows
phl(h, l, tf, css)=>
var line high_line = line.new(na,na,na,na
, xloc = xloc.bar_time
, color = css
, style = get_line_style(pdhl_style))
var label high_lbl = label.new(na,na
, xloc = xloc.bar_time
, text = str.format('{0}H', tf)
, color = TRANSP_CSS
, textcolor = css
, size = size.small
, style = label.style_label_left)
var line low_line = line.new(na,na,na,na
, xloc = xloc.bar_time
, color = css
, style = get_line_style(pdhl_style))
var label low_lbl = label.new(na,na
, xloc = xloc.bar_time
, text = str.format('{0}L', tf)
, color = TRANSP_CSS
, textcolor = css
, size = size.small
, style = label.style_label_left)
hy = ta.valuewhen(h != h , h, 1)
hx = ta.valuewhen(h == high, time, 1)
ly = ta.valuewhen(l != l , l, 1)
lx = ta.valuewhen(l == low, time, 1)
if barstate.islast
ext = time + (time - time )*20
//High
line.set_xy1(high_line, hx, hy)
line.set_xy2(high_line, ext, hy)
label.set_xy(high_lbl, ext, hy)
//Low
line.set_xy1(low_line, lx, ly)
line.set_xy2(low_line, ext, ly)
label.set_xy(low_lbl, ext, ly)
//-----------------------------------------------------------------------------}
//Global variables
//-----------------------------------------------------------------------------{
var trend = 0, var itrend = 0
var top_y = 0., var top_x = 0
var btm_y = 0., var btm_x = 0
var itop_y = 0., var itop_x = 0
var ibtm_y = 0., var ibtm_x = 0
var trail_up = high, var trail_dn = low
var trail_up_x = 0, var trail_dn_x = 0
var top_cross = true, var btm_cross = true
var itop_cross = true, var ibtm_cross = true
var txt_top = '', var txt_btm = ''
//Alerts
bull_choch_alert = false
bull_bos_alert = false
bear_choch_alert = false
bear_bos_alert = false
bull_ichoch_alert = false
bull_ibos_alert = false
bear_ichoch_alert = false
bear_ibos_alert = false
bull_iob_break = false
bear_iob_break = false
bull_ob_break = false
bear_ob_break = false
eqh_alert = false
eql_alert = false
//Structure colors
var bull_css = style == 'Monochrome' ? #b2b5be
: swing_bull_css
var bear_css = style == 'Monochrome' ? #b2b5be
: swing_bear_css
var ibull_css = style == 'Monochrome' ? #b2b5be
: swing_ibull_css
var ibear_css = style == 'Monochrome' ? #b2b5be
: swing_ibear_css
//Labels size
var internal_structure_lbl_size = internal_structure_size == 'Tiny'
? size.tiny
: internal_structure_size == 'Small'
? size.small
: size.normal
var swing_structure_lbl_size = swing_structure_size == 'Tiny'
? size.tiny
: swing_structure_size == 'Small'
? size.small
: size.normal
var eqhl_lbl_size = eq_size == 'Tiny'
? size.tiny
: eq_size == 'Small'
? size.small
: size.normal
//Swings
= swings(length)
= swings(5)
//-----------------------------------------------------------------------------}
//Pivot High
//-----------------------------------------------------------------------------{
var line extend_top = na
var label extend_top_lbl = label.new(na, na
, color = TRANSP_CSS
, textcolor = bear_css
, style = label.style_label_down
, size = size.tiny)
if top
top_cross := true
txt_top := top > top_y ? 'HH' : 'LH'
if show_swings
top_lbl = label.new(n-length, top, txt_top
, color = TRANSP_CSS
, textcolor = bear_css
, style = label.style_label_down
, size = swing_structure_lbl_size)
if mode == 'Present'
label.delete(top_lbl )
//Extend recent top to last bar
line.delete(extend_top )
extend_top := line.new(n-length, top, n, top
, color = bear_css)
top_y := top
top_x := n - length
trail_up := top
trail_up_x := n - length
if itop
itop_cross := true
itop_y := itop
itop_x := n - 5
//Trailing maximum
trail_up := math.max(high, trail_up)
trail_up_x := trail_up == high ? n : trail_up_x
//Set top extension label/line
if barstate.islast and show_hl_swings
line.set_xy1(extend_top, trail_up_x, trail_up)
line.set_xy2(extend_top, n + 20, trail_up)
label.set_x(extend_top_lbl, n + 20)
label.set_y(extend_top_lbl, trail_up)
label.set_text(extend_top_lbl, trend < 0 ? 'Strong High' : 'Strong High')
//-----------------------------------------------------------------------------}
//Pivot Low
//-----------------------------------------------------------------------------{
var line extend_btm = na
var label extend_btm_lbl = label.new(na, na
, color = TRANSP_CSS
, textcolor = bull_css
, style = label.style_label_up
, size = size.tiny)
if btm
btm_cross := true
txt_btm := btm < btm_y ? 'LL' : 'HL'
if show_swings
btm_lbl = label.new(n - length, btm, txt_btm
, color = TRANSP_CSS
, textcolor = bull_css
, style = label.style_label_up
, size = swing_structure_lbl_size)
if mode == 'Present'
label.delete(btm_lbl )
//Extend recent btm to last bar
line.delete(extend_btm )
extend_btm := line.new(n - length, btm, n, btm
, color = bull_css)
btm_y := btm
btm_x := n-length
trail_dn := btm
trail_dn_x := n-length
if ibtm
ibtm_cross := true
ibtm_y := ibtm
ibtm_x := n - 5
//Trailing minimum
trail_dn := math.min(low, trail_dn)
trail_dn_x := trail_dn == low ? n : trail_dn_x
//Set btm extension label/line
if barstate.islast and show_hl_swings
line.set_xy1(extend_btm, trail_dn_x, trail_dn)
line.set_xy2(extend_btm, n + 20, trail_dn)
label.set_x(extend_btm_lbl, n + 20)
label.set_y(extend_btm_lbl, trail_dn)
label.set_text(extend_btm_lbl, trend > 0 ? 'Strong Low' : 'Strong Low')
//-----------------------------------------------------------------------------}
//Order Blocks Arrays
//-----------------------------------------------------------------------------{
var iob_top = array.new_float(0)
var iob_btm = array.new_float(0)
var iob_left = array.new_int(0)
var iob_type = array.new_int(0)
var ob_top = array.new_float(0)
var ob_btm = array.new_float(0)
var ob_left = array.new_int(0)
var ob_type = array.new_int(0)
//-----------------------------------------------------------------------------}
//Pivot High BOS/CHoCH
//-----------------------------------------------------------------------------{
//Filtering
var bull_concordant = true
if ifilter_confluence
bull_concordant := high - math.max(close, open) > math.min(close, open - low)
//Detect internal bullish Structure
if ta.crossover(close, itop_y) and itop_cross and top_y != itop_y and bull_concordant
bool choch = na
if itrend < 0
choch := true
bull_ichoch_alert := true
else
bull_ibos_alert := true
txt = choch ? 'CHoCH' : 'BOS'
if show_internals
if show_ibull == 'All' or (show_ibull == 'BOS' and not choch) or (show_ibull == 'CHoCH' and choch)
display_Structure(itop_x, itop_y, txt, ibull_css, true, true, internal_structure_lbl_size)
itop_cross := false
itrend := 1
//Internal Order Block
if show_iob
ob_coord(false, itop_x, iob_top, iob_btm, iob_left, iob_type)
//Detect bullish Structure
if ta.crossover(close, top_y) and top_cross
bool choch = na
if trend < 0
choch := true
bull_choch_alert := true
else
bull_bos_alert := true
txt = choch ? 'CHoCH' : 'BOS'
if show_Structure
if show_bull == 'All' or (show_bull == 'BOS' and not choch) or (show_bull == 'CHoCH' and choch)
display_Structure(top_x, top_y, txt, bull_css, false, true, swing_structure_lbl_size)
//Order Block
if show_ob
ob_coord(false, top_x, ob_top, ob_btm, ob_left, ob_type)
top_cross := false
trend := 1
//-----------------------------------------------------------------------------}
//Pivot Low BOS/CHoCH
//-----------------------------------------------------------------------------{
var bear_concordant = true
if ifilter_confluence
bear_concordant := high - math.max(close, open) < math.min(close, open - low)
//Detect internal bearish Structure
if ta.crossunder(close, ibtm_y) and ibtm_cross and btm_y != ibtm_y and bear_concordant
bool choch = false
if itrend > 0
choch := true
bear_ichoch_alert := true
else
bear_ibos_alert := true
txt = choch ? 'CHoCH' : 'BOS'
if show_internals
if show_ibear == 'All' or (show_ibear == 'BOS' and not choch) or (show_ibear == 'CHoCH' and choch)
display_Structure(ibtm_x, ibtm_y, txt, ibear_css, true, false, internal_structure_lbl_size)
ibtm_cross := false
itrend := -1
//Internal Order Block
if show_iob
ob_coord(true, ibtm_x, iob_top, iob_btm, iob_left, iob_type)
//Detect bearish Structure
if ta.crossunder(close, btm_y) and btm_cross
bool choch = na
if trend > 0
choch := true
bear_choch_alert := true
else
bear_bos_alert := true
txt = choch ? 'CHoCH' : 'BOS'
if show_Structure
if show_bear == 'All' or (show_bear == 'BOS' and not choch) or (show_bear == 'CHoCH' and choch)
display_Structure(btm_x, btm_y, txt, bear_css, false, false, swing_structure_lbl_size)
//Order Block
if show_ob
ob_coord(true, btm_x, ob_top, ob_btm, ob_left, ob_type)
btm_cross := false
trend := -1
//-----------------------------------------------------------------------------}
//Order Blocks
//-----------------------------------------------------------------------------{
//Set order blocks
var iob_boxes = array.new_box(0)
var ob_boxes = array.new_box(0)
//Delete internal order blocks box coordinates if top/bottom is broken
for element in iob_type
index = array.indexof(iob_type, element)
if close < array.get(iob_btm, index) and element == 1
array.remove(iob_top, index)
array.remove(iob_btm, index)
array.remove(iob_left, index)
array.remove(iob_type, index)
bull_iob_break := true
else if close > array.get(iob_top, index) and element == -1
array.remove(iob_top, index)
array.remove(iob_btm, index)
array.remove(iob_left, index)
array.remove(iob_type, index)
bear_iob_break := true
//Delete internal order blocks box coordinates if top/bottom is broken
for element in ob_type
index = array.indexof(ob_type, element)
if close < array.get(ob_btm, index) and element == 1
array.remove(ob_top, index)
array.remove(ob_btm, index)
array.remove(ob_left, index)
array.remove(ob_type, index)
bull_ob_break := true
else if close > array.get(ob_top, index) and element == -1
array.remove(ob_top, index)
array.remove(ob_btm, index)
array.remove(ob_left, index)
array.remove(ob_type, index)
bear_ob_break := true
iob_size = array.size(iob_type)
ob_size = array.size(ob_type)
if barstate.isfirst
if show_iob
for i = 0 to iob_showlast-1
array.push(iob_boxes, box.new(na,na,na,na, xloc = xloc.bar_time))
if show_ob
for i = 0 to ob_showlast-1
array.push(ob_boxes, box.new(na,na,na,na, xloc = xloc.bar_time))
if iob_size > 0
if barstate.islast
display_ob(iob_boxes, iob_top, iob_btm, iob_left, iob_type, iob_showlast, false, iob_size)
if ob_size > 0
if barstate.islast
display_ob(ob_boxes, ob_top, ob_btm, ob_left, ob_type, ob_showlast, true, ob_size)
//-----------------------------------------------------------------------------}
//EQH/EQL
//-----------------------------------------------------------------------------{
var eq_prev_top = 0.
var eq_top_x = 0
var eq_prev_btm = 0.
var eq_btm_x = 0
if show_eq
eq_top = ta.pivothigh(eq_len, eq_len)
eq_btm = ta.pivotlow(eq_len, eq_len)
if eq_top
max = math.max(eq_top, eq_prev_top)
min = math.min(eq_top, eq_prev_top)
if max < min + atr * eq_threshold
eqh_line = line.new(eq_top_x, eq_prev_top, n-eq_len, eq_top
, color = bear_css
, style = line.style_dotted)
eqh_lbl = label.new(int(math.avg(n-eq_len, eq_top_x)), eq_top, 'EQH'
, color = #00000000
, textcolor = bear_css
, style = label.style_label_down
, size = eqhl_lbl_size)
if mode == 'Present'
line.delete(eqh_line )
label.delete(eqh_lbl )
eqh_alert := true
eq_prev_top := eq_top
eq_top_x := n-eq_len
if eq_btm
max = math.max(eq_btm, eq_prev_btm)
min = math.min(eq_btm, eq_prev_btm)
if min > max - atr * eq_threshold
eql_line = line.new(eq_btm_x, eq_prev_btm, n-eq_len, eq_btm
, color = bull_css
, style = line.style_dotted)
eql_lbl = label.new(int(math.avg(n-eq_len, eq_btm_x)), eq_btm, 'EQL'
, color = #00000000
, textcolor = bull_css
, style = label.style_label_up
, size = eqhl_lbl_size)
eql_alert := true
if mode == 'Present'
line.delete(eql_line )
label.delete(eql_lbl )
eq_prev_btm := eq_btm
eq_btm_x := n-eq_len
//-----------------------------------------------------------------------------}
//Fair Value Gaps
//-----------------------------------------------------------------------------{
var bullish_fvg_max = array.new_box(0)
var bullish_fvg_min = array.new_box(0)
var bearish_fvg_max = array.new_box(0)
var bearish_fvg_min = array.new_box(0)
float bullish_fvg_avg = na
float bearish_fvg_avg = na
bullish_fvg_cnd = false
bearish_fvg_cnd = false
=
request.security(syminfo.tickerid, fvg_tf, get_ohlc())
if show_fvg
delta_per = (src_c1 - src_o1) / src_o1 * 100
change_tf = timeframe.change(fvg_tf)
threshold = fvg_auto ? ta.cum(math.abs(change_tf ? delta_per : 0)) / n * 2
: 0
//FVG conditions
bullish_fvg_cnd := src_l > src_h2
and src_c1 > src_h2
and delta_per > threshold
and change_tf
bearish_fvg_cnd := src_h < src_l2
and src_c1 < src_l2
and -delta_per > threshold
and change_tf
//FVG Areas
if bullish_fvg_cnd
array.unshift(bullish_fvg_max, box.new(n-1, src_l, n + fvg_extend, math.avg(src_l, src_h2)
, border_color = bull_fvg_css
, bgcolor = bull_fvg_css))
array.unshift(bullish_fvg_min, box.new(n-1, math.avg(src_l, src_h2), n + fvg_extend, src_h2
, border_color = bull_fvg_css
, bgcolor = bull_fvg_css))
if bearish_fvg_cnd
array.unshift(bearish_fvg_max, box.new(n-1, src_h, n + fvg_extend, math.avg(src_h, src_l2)
, border_color = bear_fvg_css
, bgcolor = bear_fvg_css))
array.unshift(bearish_fvg_min, box.new(n-1, math.avg(src_h, src_l2), n + fvg_extend, src_l2
, border_color = bear_fvg_css
, bgcolor = bear_fvg_css))
for bx in bullish_fvg_min
if low < box.get_bottom(bx)
box.delete(bx)
box.delete(array.get(bullish_fvg_max, array.indexof(bullish_fvg_min, bx)))
for bx in bearish_fvg_max
if high > box.get_top(bx)
box.delete(bx)
box.delete(array.get(bearish_fvg_min, array.indexof(bearish_fvg_max, bx)))
//-----------------------------------------------------------------------------}
//Previous day/week high/lows
//-----------------------------------------------------------------------------{
//Daily high/low
= request.security(syminfo.tickerid, 'D', hl()
, lookahead = barmerge.lookahead_on)
//Weekly high/low
= request.security(syminfo.tickerid, 'W', hl()
, lookahead = barmerge.lookahead_on)
//Monthly high/low
= request.security(syminfo.tickerid, 'M', hl()
, lookahead = barmerge.lookahead_on)
//Display Daily
if show_pdhl
phl(pdh, pdl, 'D', pdhl_css)
//Display Weekly
if show_pwhl
phl(pwh, pwl, 'W', pwhl_css)
//Display Monthly
if show_pmhl
phl(pmh, pml, 'M', pmhl_css)
//-----------------------------------------------------------------------------}
//Premium/Discount/Equilibrium zones
//-----------------------------------------------------------------------------{
var premium = box.new(na, na, na, na
, bgcolor = color.new(premium_css, 80)
, border_color = na)
var premium_lbl = label.new(na, na
, text = 'Premium'
, color = TRANSP_CSS
, textcolor = premium_css
, style = label.style_label_down
, size = size.small)
var eq = box.new(na, na, na, na
, bgcolor = color.rgb(120, 123, 134, 80)
, border_color = na)
var eq_lbl = label.new(na, na
, text = 'Equilibrium'
, color = TRANSP_CSS
, textcolor = eq_css
, style = label.style_label_left
, size = size.small)
var discount = box.new(na, na, na, na
, bgcolor = color.new(discount_css, 80)
, border_color = na)
var discount_lbl = label.new(na, na
, text = 'Discount'
, color = TRANSP_CSS
, textcolor = discount_css
, style = label.style_label_up
, size = size.small)
//Show Premium/Discount Areas
if barstate.islast and show_sd
avg = math.avg(trail_up, trail_dn)
box.set_lefttop(premium, math.max(top_x, btm_x), trail_up)
box.set_rightbottom(premium, n, .95 * trail_up + .05 * trail_dn)
label.set_xy(premium_lbl, int(math.avg(math.max(top_x, btm_x), n)), trail_up)
box.set_lefttop(eq, math.max(top_x, btm_x), .525 * trail_up + .475*trail_dn)
box.set_rightbottom(eq, n, .525 * trail_dn + .475 * trail_up)
label.set_xy(eq_lbl, n, avg)
box.set_lefttop(discount, math.max(top_x, btm_x), .95 * trail_dn + .05 * trail_up)
box.set_rightbottom(discount, n, trail_dn)
label.set_xy(discount_lbl, int(math.avg(math.max(top_x, btm_x), n)), trail_dn)
//-----------------------------------------------------------------------------}
//Trend
//-----------------------------------------------------------------------------{
var color trend_css = na
if show_trend
if style == 'Colored'
trend_css := itrend == 1 ? bull_css : bear_css
else if style == 'Monochrome'
trend_css := itrend == 1 ? #b2b5be : #5d606b
plotcandle(open, high, low, close
, color = trend_css
, wickcolor = trend_css
, bordercolor = trend_css
, editable = false)
//-----------------------------------------------------------------------------}
//Alerts
//-----------------------------------------------------------------------------{
//Internal Structure
alertcondition(bull_ibos_alert, 'Internal Bullish BOS', 'Internal Bullish BOS formed')
alertcondition(bull_ichoch_alert, 'Internal Bullish CHoCH', 'Internal Bullish CHoCH formed')
alertcondition(bear_ibos_alert, 'Internal Bearish BOS', 'Internal Bearish BOS formed')
alertcondition(bear_ichoch_alert, 'Internal Bearish CHoCH', 'Internal Bearish CHoCH formed')
//Swing Structure
alertcondition(bull_bos_alert, 'Bullish BOS', 'Internal Bullish BOS formed')
alertcondition(bull_choch_alert, 'Bullish CHoCH', 'Internal Bullish CHoCH formed')
alertcondition(bear_bos_alert, 'Bearish BOS', 'Bearish BOS formed')
alertcondition(bear_choch_alert, 'Bearish CHoCH', 'Bearish CHoCH formed')
//order Blocks
alertcondition(bull_iob_break, 'Bullish Internal OB Breakout', 'Price broke bullish internal OB')
alertcondition(bear_iob_break, 'Bearish Internal OB Breakout', 'Price broke bearish internal OB')
alertcondition(bull_ob_break, 'Bullish Swing OB Breakout', 'Price broke bullish swing OB')
alertcondition(bear_ob_break, 'Bearish Swing OB Breakout', 'Price broke bearish swing OB')
//EQH/EQL
alertcondition(eqh_alert, 'Equal Highs', 'Equal highs detected')
alertcondition(eql_alert, 'Equal Lows', 'Equal lows detected')
//FVG
alertcondition(bullish_fvg_cnd, 'Bullish FVG', 'Bullish FVG formed')
alertcondition(bearish_fvg_cnd, 'Bearish FVG', 'Bearish FVG formed')
//-----------------------------------------------------------------------------}
// period = str.tonumber(timeframe.period)
// dailyHigh = request.security(syminfo.tickerid, "1D", ta.highest(dailyHighAndLowLength))
// dailyLow = request.security(syminfo.tickerid, "1D", ta.lowest(dailyHighAndLowLength))
// var line dh_line = na
// var line dl_line = na
// line.delete(dh_line )
// line.delete(dl_line )
// dh_line := line.new(bar_index, dailyHigh, bar_index + 20, dailyHigh, color = color.purple, style = line.style_dashed, width = 2)
// dl_line := line.new(bar_index, dailyLow, bar_index + 20, dailyLow, color = color.purple, style = line.style_dashed, width = 2)
// line.set_x1(dh_line, bar_index)
// line.set_x2(dh_line, bar_index + 20)
// line.set_y1(dh_line, dailyHigh)
// line.set_y2(dh_line, dailyHigh)
// line.set_x1(dl_line, bar_index)
// line.set_x2(dl_line, bar_index + 20)
// line.set_y1(dl_line, dailyLow)
// line.set_y2(dl_line, dailyLow)
// plot(dailyHigh, color = color.purple)
// plot(dailyLow, color = color.purple)
// var line _line1 = na
// // var line2 = line.new(bar_index - 20, ta.lowest(int(1440 / period)), bar_index + 20, ta.lowest(int(1440 / period)))
// // line.delete(line1)
// // var line1 = line.new(bar_index,0,0,0)
// // var line2 = line.new()
// line.set_x1(_line1, bar_index)
// line.set_x2(_line1, bar_index + 20)
// line.set_y1(_line1, ta.highest(int(1440 / period)))
// line.set_y2(_line1, ta.highest(int(1440 / period)))
// line.set_xloc(line1, time, time + 60 * 60 * 24, xloc.bar_time)
// line.set_color(line2, color.green)
// line.set_width(line2, 5)
// var line1 = line.new(bar_index - 20, ta.highest(int(1440 / period)), bar_index + 20, ta.highest(int(1440 / period)))
// var line2 = line.new(bar_index - 20, ta.lowest(int(1440 / period)), bar_index + 20, ta.lowest(int(1440 / period)))
// line.set_x1(line1, bar_index - 20)
// dailyHigh = request.security(syminfo.tickerid, "1D", ta.highest(1))
// dailyLow = request.security(syminfo.tickerid, "1D", ta.lowest(1))
// plot(dailyHigh, color = color.purple)
// plot(dailyLow, color = color.purple)
Global Crash & Rally IndicatorGlobal Crash & Rally Indicator for TradingView:
Detect Market Crashes and Rallies with Precision
Unlock the Power of Global Market Insights:
Your Ultimate Stock Market Crash Detector and Rally Signal Tool 📈⚠️
In the volatile world of stock trading, staying ahead of market crashes and spotting rally opportunities can make all the difference between massive gains and devastating losses.
The Global Crash & Rally Indicator – a cutting-edge TradingView Pine Script tool, has been designed to monitor global financial signals in real-time. Whether you're a day trader, swing trader, or long-term investor, this indicator acts as your early warning system for potential market downturns and upswings, helping you navigate the complexities of the stock market with confidence.
Traders often search "stock market crash indicator," "global rally detector," "TradingView crash alert," and "market volatility tool,", this indicator ends your endless search and is a must-try for serious traders who want to protect their portfolio and capitalize on bullish/bearish trends.
What Makes the Global Crash & Rally Indicator Stand Out? 🚀
This advanced indicator goes beyond basic price analysis by integrating a wide array of global economic and market factors. It scans for signs of stress across major indices, volatility measures, currency movements, and commodity prices to provide a comprehensive view of market health. Here's what you can expect:
Real-Time Crash Warnings ⚠️ :
Get alerted to potential market crashes through color-coded signals – from watchful orange alerts to critical red crisis modes. It identifies emerging risks early, giving you time to adjust your positions.
Rally Detection for Bullish Opportunities 📈 :
Not just a downside protector, this tool highlights bullish regimes with green signals, spotting when markets are poised for strong upward moves. Ideal for identifying entry points during recoveries or bull runs and tells you when you can stay in the trade.
Multi-Factor Analysis 🔍 :
it monitors key global elements like volatility spikes, yield changes, risk-off assets, breadth metrics, and more – all without overwhelming you with data. The intuitive table UI displays metrics, values, risks, and notes in an easy-to-read format.
Probability Estimates 📊 :
The probability model of this Indicator offers probabilistic insights into downside and upside risks, helping you gauge the likelihood of market moves with percentage-based forecasts.
Customizable Alerts 🔔 :
Set up notifications for crash cautions, crisis starts, rally watches, and rally go signals by setting up just 01 alert. Perfect for day trading strategies or manual oversight.
Optimized for Traders ⚙️:
Whether searching for "best TradingView indicator for market crashes" or "global stock rally scanner," this tool ranks high in utility, delivering actionable insights tailored to US and international markets.
With its focus on intraday timeframes (like 5-min, 15-min, or 60-min charts), the indicator is versatile for use on major indices such as SPX, VIX, DXY, and beyond. It's built to handle up to 5000 bars back, ensuring historical accuracy without performance lags.
How to Use the Global Crash & Rally Indicator on TradingView 🛠️
Add to Your Chart: Search for "Global Crash & Rally Indicator" in TradingView's indicator library and apply it to your preferred chart (e.g., SPX or ES futures).
Customize Settings: Adjust inputs like analysis timeframe, thresholds for warnings, and optional filters (e.g., currency jumps) to fit your trading style. Enable 3-of-4 warning mode for stricter signals.
Interpret the Signals:
Background Colors: Green for safe/bullish, orange for warnings, red for crises.
Table Breakdown:
Check the on-chart table for detailed metrics on VIX changes, breadth, basis stress, and macro health.
Alerts:
Use the built-in alert conditions to get notified via email, app, or webhook when key events trigger.
Combine with Strategies:
Pair it with your favorite oscillators, moving averages, or volume indicators for enhanced decision-making in forex, stocks, crypto, or commodities.
No need for complex setups –
it's plug-and-play, yet powerful enough for professional traders monitoring global events.
Why Traders Love This Market Volatility Tool ❤️
Imagine having a "sixth sense" for when the market is about to crack or soar. Users rave about its ability to flag hidden risks that traditional indicators miss, such as subtle shifts in market depth or global macro stress. It's not just a crash detector; it's a rally detector too, helping you ride waves of optimism while sidestepping pitfalls.
In an era of geopolitical tensions, economic uncertainties, and rapid news cycles, this indicator empowers you to trade smarter. It's SEO-friendly for discovering terms like "best indicator for detecting stock market rallies" or "global financial crash predictor," ensuring you find the edge you need.
Best Features and Rating 🤖
Various AI tools rate its best features to be its holistic multi-factor approach that blends volatility, breadth, and macro signals into a seamless, probabilistic framework, plus the user-friendly table UI that makes complex data meaningful at a glance.
Join the Conversation! 💬
What are your thoughts on the Global Crash & Rally Indicator? Have you spotted any crashes or rallies using similar tools? Share your experiences, strategies, or questions in the comments below – let's discuss and help each other thrive in the markets! Get connected for a free trial via contact method mentioned in our profile page.
Z-Signal Pro: RSI+BBThe indicator utilizes RSI and Bollinger Bands, incorporates additional logic to filter out noisy signals, and produces long and short entries.
OSOK AMERICANA [TakingProphets]OVERVIEW
OSOK is an ICT-inspired execution framework designed to help traders map the interaction between Higher-Timeframe (HTF) liquidity sweeps, qualifying Order Blocks, and Current-Timeframe (CTF) confirmation signals — all within a single, structured workflow.
By sequencing an HTF CRT → Order Block → CTF CRT model and integrating IPDA 20 equilibrium context, this tool provides traders with a visual framework for aligning intraday execution decisions with higher-timeframe intent. All plotted elements — sweeps, blocks, open prices, and equilibrium levels — update continuously in real time.
-----------------------------------------------------------------------------------------------
Core Concepts (ICT-Based)
-----------------------------------------------------------------------------------------------
Candle Range Transition (CRT) Sweeps
Bullish CRT → The second candle runs below the first candle’s low and closes back inside its range.
Bearish CRT → The second candle runs above the first candle’s high and closes back inside its range.
These patterns are frequently associated with liquidity grabs and potential directional shifts.
HTF → CTF Alignment
-Detects valid HTF CRTs (e.g., Daily CRTs derived from H4 or Weekly CRTs derived from Daily).
-Locates a qualifying Order Block within HTF Candle-2 to identify areas of potential interest.
-Waits for a modified CRT confirmation on the current timeframe before signaling possible directional bias.
IPDA 20 Equilibrium
-Plots the midpoint of the daily highest and lowest prices over the last 20 periods.
-Provides a visual reference for premium and discount pricing zones.
-----------------------------------------------------------------------------------------------
How OSOK Works
-----------------------------------------------------------------------------------------------
Step 1 — HTF CRT Check
On each new HTF candle, the script scans for a clean CRT formation on the higher aggregation (e.g., H4 → D or D → W).
If found, it tags the candles as C1, C2, and C3 and optionally shades their backgrounds for clear visual parsing.
Step 2 — HTF Order Block Identification
Searches within HTF Candle-2 for a qualifying Order Block using a compact pattern filter.
Draws a persistent OB level with clear labeling for context.
Step 3 — CTF Confirmation (Modified CRT)
Monitors your current chart timeframe for a modified CRT in alignment with the HTF setup:
For bullish setups → waits for a bullish modified CRT and close above C1’s high zone.
For bearish setups → expects a bearish modified CRT and close below C1’s low zone.
Step 4 — Real-Time Maintenance
All labels, lines, and background spans update intrabar.
If the setup invalidates — for example, if implied targets are exceeded before entry — the layout resets and waits for the next valid sequence.
-----------------------------------------------------------------------------------------------
KEY FEATURES
-----------------------------------------------------------------------------------------------
HTF CRT Visualization
-Optional “×” markers on Daily/Weekly CRT sweeps.
-Independent background shading for C1, C2, and C3.
Order Block + Open Price Context
-Draws HTF Order Block levels and plots C3 Open Price (DOP) for additional directional reference.
CTF CRT Execution Cue
-Displays a modified CRT on your current timeframe when conditions align with the HTF narrative.
IPDA 20 Line + Label
-Plots a dynamic midpoint level with an optional label for quick premium/discount context.
Optimized Drawing Engine
-Lightweight, efficient use of chart objects ensures smooth performance without visual clutter.
INPUTS
-Higher Timeframe Settings
-Toggle markers for Daily/Weekly CRT sweeps.
-Enable and color C1, C2, and C3 background spans.
-IPDA Display Options
-Control visibility, color, and line style for IPDA 20 equilibrium levels.
-Sweep, OB, and Open Price Styles
-Per-element customization for colors, widths, and labels.
-----------------------------------------------------------------------------------------------
BEST PRACTICES
-----------------------------------------------------------------------------------------------
Start on H4 or Daily to identify valid HTF CRT formations.
Confirm a qualifying OB inside Candle-2.
Drop to your execution timeframe and wait for the modified CTF CRT confirmation before acting.
Use IPDA 20 equilibrium as a reference for premium vs. discount zones.
Combine with your ICT session bias and overall market context for optimal decision-making.
-----------------------------------------------------------------------------------------------
Important Notes
-----------------------------------------------------------------------------------------------
OSOK is not a buy/sell signal provider. It’s a visual framework for understanding ICT-based execution models.
All objects reset automatically when new HTF candles form or setups invalidate.
Works on any symbol and timeframe by default, with HTF mapping set to H4 → D and D → W.
ACE哥專屬指標這是一款專為加密貨幣與外匯市場設計的多空結構分析指標。
指標核心結合了市場結構、K線反轉訊號、均線節奏與關鍵支撐壓力區間偵測,
可協助交易者在趨勢盤與震盪盤中找到相對安全的進出場點位。
本指標可應用於波段、日內與短線操作,能清楚標示多空轉折區間、結構突破與回測確認點,
特別適合搭配結構延續策略、支撐壓力策略或結構轉換策略使用。
若有興趣了解更多策略應用與交易邏輯,歡迎透過官方社群或課程進一步學習。
This is a long-short structure analysis indicator designed specifically for the cryptocurrency and forex markets.
The core of the indicator combines market structure, candlestick reversal signals, moving average rhythm, and key support and resistance zone detection to help traders identify relatively safe entry and exit points in trending and volatile markets.
This indicator can be used for swing, intraday, and short-term trading. It clearly identifies long-short turning points, structural breakouts, and backtest confirmation points.
It is particularly suitable for use with structural continuation strategies, support and resistance strategies, or structural conversion strategies.
If you are interested in learning more about strategy applications and trading logic, please learn more through the official community or courses.
GC FCR OR5 (Webhook Alerts V1)⚡ FCR OR5 (Fair Value Gap + Opening Range 5-Min Strategy)
Timeframe:
1-minute chart (uses 5-minute Opening Range reference).
Core Concept:
The FCR strategy trades breakouts and reversals that form immediately after the first 5-minute Opening Range (09:30 – 09:35 ET) — combining structural momentum (Fair Value Gaps) with confirmation beyond key OR levels.
⸻
🧩 Logic Summary
1. Define the Opening Range (OR5)
• From 09:30 – 09:35 ET, the script records the high and low.
• Once that window closes, the OR is locked in for the day.
2. Detect a Displacement Fair Value Gap (FVG)
• A 3-bar pattern (bar -bar ) that leaves a clean price gap, signaling impulsive movement.
• FVG size must meet a minimum ATR or tick threshold (filters out noise).
3. Confirm Direction
• Wait for price to retrace into the FVG (fills partially).
• Then require a bar to close outside the gap and beyond the OR high/low, confirming momentum.
• Optional safety logic cancels the setup if price invalidates the FVG before confirmation.
4. First-Candle Rule (FCR) Filters
• No trades before the first 1-minute candle after 9:30 closes.
• Only the first valid setup per day can trigger (optional).
5. Trade Entry
• Enter long if a bullish FVG confirms above OR high.
• Enter short if a bearish FVG confirms below OR low.
6. Risk Parameters
• Default Stop Loss = 100 ticks, Take Profit = 175 ticks.
• 1 trade per day (if enabled).
⸻
📈 Behavior
• Works best on structured days with clean OR expansion (Tues/Wed/Fri historically).
• Avoids chop via ATR & FVG filters.
• Captures first directional move after the opening range resolves.
• Typical trade duration: 10–45 min.
• Average win rate: ~60–65 %, Profit Factor ≈ 1.7–1.8 in recent tests.
7 Min KillZoneBefore using this indicator, make sure you have EMA lines 8, 11, 13, and 21 turned on.
All four EMAs must be lined up in bullish direction (stacked upward) — this is very important for confirmation.
Only when all EMAs align bullishly should you use this indicator for entries.
⸻
🧠 How it works
1️⃣ When it runs:
• Scans only 3:00–6:30 AM New York time (London Kill Zone).
• Designed specifically for Gold (XAUUSD) and NASDAQ (NQ/NDX).
• Works best on 7-minute or higher timeframes (≥7m).
2️⃣ What it looks for:
• Candle A: bearish.
• Candle B: bullish or doji (any size).
• Candle C: bullish and body larger than Candle A’s body.
3️⃣ When it triggers:
• After Candle C closes, if the three-candle pattern is valid and EMAs are bullishly aligned.
4️⃣ What happens:
• Only Candle C is highlighted bright green — a visual cue for a bullish entry setup.
• Candles A and B remain normal.
⸻
🎯 Purpose
This indicator is made only for bullish entries.
It helps you spot strong continuation setups during the London session, especially when price aligns with bullish EMA structure.
Simple, clean, and powerful — designed to keep your focus on momentum in the right direction.
Verified Price Action (Revention)Welcome to Verified Price Action (VPA), an all-in-one market analysis suite designed to transform you from a signal-follower into a market reader. Instead of providing simple "buy" or "sell" arrows that lack context, VPA uses a unique "cockpit" approach to give you a holistic view of the market's state, empowering you to make more intelligent trading decisions.
The core of this indicator is the Volatility Catalyst Engine, a purely reactive strategy that identifies high-probability momentum continuations. It's built on the principle that the market alternates between balance (consolidation) and imbalance (a decisive move). VPA helps you identify this shift and act only after the new direction has been verified.
The VPA Strategy: How It Works
This indicator doesn't predict; it reacts. It waits for a specific sequence of price action to unfold before alerting you to a potential opportunity.
Market Pause (The Anchor Bar): The script first identifies a period of volatility contraction—an Anchor Bar. This is a small, indecisive candle where the market is pausing and building energy.
Volatility Expansion (The Catalyst Bar): Next, it waits for a strong, impulsive Catalyst Bar to break out from the Anchor Bar's range. This explosive move reveals the market's chosen direction.
Momentum Confirmation: Finally, the script looks for immediate follow-through on the next candle to verify the breakout's strength.
Only when this full sequence is complete does the dashboard update to a "CONFIRMED" state.
Key Features
The VPA Cockpit Dashboard: The heart of the indicator. A dynamic status panel tells you exactly where we are in the VPA sequence:
Searching...: Looking for favorable, trending market conditions.
Anchor Detected: A volatility contraction has been found. Pay attention.
Bullish/Bearish Catalyst!: A breakout has occurred. Get ready.
CONFIRMED LONG/SHORT: The breakout has been verified.
Interactive Trend Ribbon: This is more than just a moving average ribbon. It not only displays the current trend direction but also ignites to a bright, vibrant color on a Catalyst Bar, giving you an immediate visual cue that a significant move is underway.
Built-in Market Filters: The VPA engine automatically checks for a Trending Regime and aligns with Higher-Timeframe Consensus, ensuring you are only analyzing setups that are flowing with the broader market current.
Dynamic Liquidity Targets: Automatically plots key buy-side and sell-side liquidity levels based on recent swing points, helping you identify potential targets.
OB/OS Pressure Gauge: A sleek meter at the bottom of the chart provides a consensus view of multiple oscillators, helping you gauge market exhaustion at a glance.
How to Use This Indicator
Check the Environment: First, look at the "Overall Bias" and "Market Regime" on the dashboard. The ideal setup occurs in a "TRENDING" market where your intended direction matches the higher-timeframe bias.
Wait for the "Catalyst!": Monitor the "VPA Status." When it changes to Anchor Detected, it's time to watch closely. The moment it updates to Bullish Catalyst! or Bearish Catalyst! (and the ribbon ignites), you have a potential setup in play.
Make Your Decision on "Confirmed": The final CONFIRMED LONG/SHORT status on the dashboard is your cue that the strategy's conditions have been fully met. Use this information, along with your own analysis, to manage your trade.
This tool was built to help the community trade with more context and confidence. Enjoy!
Triple Impulsive Candle Detector (with Midpoint Lines)Triple Impulsive Candle Detector (with Midpoint Lines)
This script expands upon the original Triple Impulsive Candle Detector by adding anchored midpoint lines that visually project potential reaction levels following impulsive candles. Impulsive candles are detected systematically using three configurable detectors based on candle range, volume, and body-to-wick ratio.
Each detected impulsive candle anchors a horizontal midpoint line (either body midpoint or full candle midpoint) that can extend for a fixed number of bars or dynamically until price revisits it, with user-defined controls for both behavior and visual styling.
Credit: Original impulse candle logic by GreatestUsername and published by ProfMichaelG.
(Impulsive-Candle-Detector-Prof-Michael-G)
BiasByCryptxThis is a lightweight market-bias dashboard. For each selected timeframe, Prior Year, Month, Week, Day, H4, H1. It uses the previous completed period’s high and low to compute the 50% midpoint, then labels Bullish when the current bar is above it, otherwise, Bearish.
You can choose which timeframes contribute and how agreement is determined: Strict (all selected must agree) or Majority (≥ N). The dashboard shows the overall bias and per-timeframe status with green ▲ (Bull) and red ▼ (Bear). It relies only on completed prior periods (no look-ahead) for stable signals and suits both intraday (e.g., D + H4) and swing (e.g., W + D + H4) workflows.
**Disclaimer:** This tool is for educational purposes only and is not financial advice. Always validate signals with your own analysis and backtests. Market conditions, data feeds, time zones, slippage, fees, and liquidity can affect outcomes. Past performance does not guarantee future results.
Eye VisionSee the setup. Execute with confidence.
EYE Vision Algo translates market structure into clear, actionable trade plans so you can stop second-guessing and start executing.
Momentum ContinuationMomentum Continuation - By racy_1
The Momentum Continuation indicator helps traders identify high-probability continuation points in established trends — where momentum is likely to resume after a controlled pullback or brief pause.
Concept
At its core, the indicator tracks the relationship between two EMAs (fast and slow) to define the local trend direction, then checks whether multiple higher-timeframe trends support that trend.
When alignment occurs across all selected timeframes, and price confirms a continuation move, the script highlights the corresponding bar — signalling potential momentum re-entry opportunities.
Key Features
Dual EMA Band: Visual representation of short- and medium-term trend structure, with optional shading for clarity.
Multi-Timeframe Alignment: Up to 3 configurable higher timeframes ensure trend agreement before signalling continuation.
Continuation Triggers: Highlights candles where momentum resumes after a pullback or reclaim, confirming that trend structure remains intact.
Optional Distance Filter: Adds a configurable minimum distance (by % or ATR multiples) from the fast EMA to improve signal quality.
Pierce-and-Reclaim Logic: Optionally allows signals where price briefly violated the EMA band but reclaimed direction without breaking alignment.
No-Repaint Option: Choose between *Closed-Bar HTF Mode* (safer, slightly delayed) and *Live HTF Mode* (faster, may flicker).
Built-in Alerts: Receive notifications for both continuation triggers and trend-state changes (e.g., Trending Up / Trending Down).
How to Use
Select your fast and slow EMA lengths (default 8 / 24).
Configure HTF1–3 to define which higher timeframes must align (or leave any blank to ignore).
Enable “Continuation Logic” to activate triggers, bar highlights, and alerts.
Optionally enable Pierce-and-Reclaim or apply a distance filter for stricter setups.
Look for highlighted bars (and alerts) confirming momentum continuation in the prevailing trend direction.
Tips
Works on any asset and timeframe, but performs best on clean, trending instruments.
Combine with market structure or liquidity analysis to time entries more precisely.
The HTF Closed-Bar option is recommended for backtesting and signal reliability.
Disclaimer
This script is for educational and informational purposes only.
It does not constitute financial advice. Always manage risk appropriately before making any trading decision.
Key LevelsKey Levels Indicator
Description
The Key Levels indicator is a powerful tool for traders, displaying major institutional price levels from daily, weekly, and monthly timeframes on your chart. It plots horizontal lines for previous period highs, lows, and midpoints (50% levels), as well as current period opens, helping you identify critical support and resistance zones used by institutional traders. Labels are provided for the most recent levels, positioned at the rightmost bar for easy reference.
Features
Daily Levels: Plots Previous Day High, Previous Day Low, Day Open, and Previous Day 50% Level.
Weekly Levels: Plots Previous Week High, Previous Week Low, Week Open, and Previous Week 50% Level.
Monthly Levels: Plots Previous Month High, Previous Month Low, Month Open, and Previous Month 50% Level.
Customizable Colors: Adjust the color of each line via the settings panel to suit your chart preferences.
Customizable Labels: Enable/disable labels, adjust label size, and change the label background color for optimal visibility.
Clean Visualization: Lines are plotted with breaks at the start of each period, ensuring a clear and uncluttered display.
Settings
Show Labels: Toggle to show or hide all labels (default: enabled).
Label Size: Choose from "tiny," "small," "normal," "large," or "huge" to adjust label text size (default: normal).
Label Background Color: Customize the background color of labels to ensure text visibility (default: black).
Line Colors: Individual color pickers for each level (e.g., Previous Day High, Day Open), allowing full customization of line colors.
Usage
The Key Levels indicator is designed for futures markets, such as S&P 500 futures (ES), Nasdaq futures (NQ), or crude oil futures (CL), where institutional price levels like daily, weekly, and monthly highs, lows, and opens are critical for identifying key support and resistance zones. Apply the indicator to a 1-hour or 15-minute timeframe to capture precise market structure for day trading or swing trading strategies in futures. While optimized for futures, the indicator can be applied to any chart for versatile trading applications. Customize line colors and label settings in the panel to match your chart preferences.
Notes
Labels are shown only for the current day, week, and month to focus on recent price action.
For best visibility, adjust the label background color if text blends into your chart background.
Ideal for traders analyzing major institutional levels for market structure and trading decisions.
Protected script
This script is published as closed-source. However, you can use it freely and without any limitations – learn more here.
njammu123
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by T
🛡️ RAMAYAN 2.0 🛡️# 🛡️ RAMAYAN 2.0 🛡️
**Description**
RAMAYAN 2.0 is a comprehensive, all-in-one TradingView indicator built from the ground up without any AI assistance. Leveraging Pine Script v6, it fuses advanced price analysis, customizable studies, and dynamic visual dashboards into a single overlay. Every feature reflects manual research, personal insights, and iterative refinement to empower traders with clarity, precision, and flexibility.
**Key Features**
- **Bhavishya Candle**: Toggleable high-low percentage steps and multi-line projections with optional background fills and real-time win/loss statistics.
- **Ramayan SMC Tables**: Two configurable tables—Bhavishya Candle summary and advanced trend criteria—support auto or manual sizing and positional placement.
- **EMA Ribbon & Envelope**: Choose up to four moving averages (SMA, EMA, SMMA, WMA, VWMA) and an envelope (percent or exponential) to visualize trend strength and volatility.
- **VWAP + EMA Crossover**: Session/week/month/earnings-anchored VWAP plus short/long EMA cross signals and conditional fills for trend confirmation.
- **Advanced Option Calculator**: Real-time P&L lines, break-even markers, net return, and placeholder Greeks display with custom strike, premiums, quantity, and expiry inputs.
- **Samay Time Lines**: Up to seven user-defined intraday time markers with colored lines and labels.
- **Heikin Ashi Supertrend Signals**: ATR-based swing buy/sell shapes and alerts, alignable with Ramayan SMC’s swing logic.
- **Trend Scoring Panel**: Multi-indicator scoring (20 criteria including EMA, MACD, RSI, ADX, Ichimoku, Alligator, BB, ROC, OBV, prior week high) displayed in a color-coded table with textual interpretation (“Very Strong”, “Strong”, “Possible”, “Weak”).
- **Fully User-Configurable**: Every study has independent enable/disable toggles, input groups for organization, color pickers, sizes, and positions.
- **Alerts**: Customizable alerts for break-even hits, in-money status, buy/sell signals, and directional changes.
**Usage Notes**
- Compatible with Pine Script v6 only.
- Best viewed on dark chart themes for optimal contrast.
- Designed for both educational research and live trading—disable unused modules to optimize performance.
---
All code, logic, and design stem from personal expertise—no AI generation involved. Enjoy exploring market rhythms with RAMAYAN 2.0!
(ppl-ai-file-upload.s3.amazonaws.com)