ATR 14 + ATR 3 (shade when ATR3 > 10% of price)Plots ATR14 and ATR3 on the same graph. If ATR3 > 10% of the closing price, shade the area in red.
Indicateurs et stratégies
BTC EMA-200 Z-Score (SDCA)This indicator measures how far Bitcoin’s price deviates from its 120-day simple moving average (SMA) using a Z-score.
The Z-score is calculated from the logarithmic distance between price and the SMA-120, normalized over a rolling lookback period. This makes deviations comparable across different market regimes.
Positive SDCA scores indicate undervaluation (price below SMA-120), while negative scores indicate overvaluation (price above SMA-120). The indicator is designed for systematic Dollar Cost Averaging, where deeper undervaluation increases allocation size.
EMA HH/LL Levels v6This indicator builds dynamic horizontal levels based on Higher Highs (HH) and Lower Lows (LL) of an Exponential Moving Average (EMA) rather than raw price.
It is designed to highlight structural EMA-based resistance and support levels and automatically manage their lifecycle.
🔹 Core Logic
The script calculates an EMA (default length: 26).
Pivot Highs and Pivot Lows are detected directly on the EMA line, not on price.
Each confirmed:
EMA Higher High (HH) → creates a solid blue horizontal level
EMA Lower Low (LL) → creates a solid red horizontal level
Levels extend to the right and remain active until specific conditions are met.
🔹 Level State Management
Each level can be in one of three states:
Active (Solid line)
The level has been created but not interacted with yet.
Touched by Price (Dotted line)
When a price bar touches the level (High ≥ level AND Low ≤ level),
the level changes its style from solid to dotted, but remains on the chart.
Broken by EMA (Removed)
When the EMA itself crosses the level:
HH level → removed when EMA crosses above it
LL level → removed when EMA crosses below it
The level is then deleted from the chart.
⚠️ Important:
Levels are never removed by price action alone — only by an EMA break.
🔹 EMA Visualization
The EMA line is color-coded by direction:
Upward slope → user-defined “up” color
Downward slope → user-defined “down” color
EMA length, colors, and line width are fully configurable.
🔹 Customization Options
EMA length
EMA up/down colors and thickness
Pivot sensitivity (left/right bars)
HH / LL level colors and thickness
Maximum number of stored levels (to control memory and chart clutter)
🔹 Use Cases
Identifying EMA-based dynamic support and resistance
Tracking trend structure via EMA swings
Confluence with price action, pullbacks, and breakouts
Trend-following and mean-reversion strategies
🔹 Notes
This indicator works on all markets and timeframes.
No repainting after pivot confirmation.
No ta.crossover() / ta.crossunder() is used — all logic is calculated manually for maximum stability in Pine Script v6.
Internal vs External Liquidity Zones [Alpha Extract]A sophisticated dual-timeframe market structure visualization system that identifies and maps internal (short-term) and external (long-term) liquidity levels with comprehensive Break of Structure (BOS) and Change of Character (CHoCH) detection across both timeframes. Utilizing pivot-based zone creation with ATR-scaled heights and sweep classification, this indicator delivers institutional-grade liquidity mapping distinguishing between major swing liquidity (external) and minor retracement liquidity (internal) for multi-dimensional market structure analysis. The system's hierarchical structure framework combined with objective arrow projection and state-based zone coloring provides complete smart money concept implementation for advanced order flow trading.
🔶 Understanding Internal vs External Structure
External Structure represents major swing points using longer pivot lengths (default 10 bars), identifying significant highs and lows that define the broader market range and trend direction. These are the key levels where large institutional positions likely exist, stop losses cluster, and major trend reversals may occur. External structure breaks (eBOS/eCHoCH) signal significant shifts in market sentiment and often precede sustained directional moves.
Internal Structure captures minor swing points within the external range using shorter pivot lengths (default 3 bars), revealing short-term liquidity pools formed during retracements, consolidations, and minor corrections. These represent areas where smaller participants' stops accumulate and where price often reacts before continuing toward external objectives. Internal structure breaks (iBOS/iCHoCH) provide early warning signals and tactical entry opportunities within the broader external trend context.
The relationship between internal and external structure creates a hierarchical framework: external zones define the "what" (overall bias and major objectives), while internal zones reveal the "how" (tactical path and entry models). When internal structure breaks bullish while within an external bearish range, it signals potential reversal setup. When internal breaks align with external direction, it confirms trend strength.
🔶 Advanced Dual-Pivot Detection Framework
Implements separate pivot calculation systems for external and internal structure with configurable lookback periods optimizing for different swing magnitudes. The system identifies external pivots using extended length capturing major swing extremes, detects internal pivots using compressed length for minor retracement highs/lows, and optionally requires internal pivots occur within current external range boundaries ensuring hierarchical structure coherence.
// Dual Structure Detection
External_Pivot_High = ta.pivothigh(high, External_Length, External_Length)
External_Pivot_Low = ta.pivotlow(low, External_Length, External_Length)
Internal_Pivot_High = ta.pivothigh(high, Internal_Length, Internal_Length)
Internal_Pivot_Low = ta.pivotlow(low, Internal_Length, Internal_Length)
// Optional Range Requirement
Valid_Internal = requireInside ? (pivot within ) : true
🔶 BOS and CHoCH Detection System
Break of Structure (BOS) occurs when price breaks a recent structure point in the direction of the current trend, confirming trend continuation. The system identifies BOS when:
Price breaks above previous high while trend remains bullish (bullish BOS)
Price breaks below previous low while trend remains bearish (bearish BOS)
Previous structure point hasn't been violated yet
Change of Character (CHoCH) signals potential trend reversal when price breaks structure counter to the established trend direction. The system detects CHoCH when:
Price breaks above previous high while trend was bearish (bullish CHoCH - reversal signal)
Price breaks below previous low while trend was bullish (bearish CHoCH - reversal signal)
Both external (e-prefix) and internal (i-prefix) structures generate independent BOS/CHoCH labels, enabling multi-timeframe structure analysis where eCHoCH may signal major reversal while iBOS confirms minor trend within that reversal.
🔶 Intelligent Zone Creation Architecture
Features ATR-based or tick-based zone height calculation with separate sizing for internal and external liquidity levels, creating visual boxes centered on pivot points. The system calculates zone dimensions using configurable ATR multiples (default 0.40x) or fixed tick counts, positions zones symmetrically above/below pivot levels, and applies distinct color schemes distinguishing external highs (red), external lows (white), internal highs (cyan), and internal lows (blue).
🔶 Equal High/Low Detection Mode
Provides advanced internal zone mode that only creates zones when consecutive internal pivots form equal highs or equal lows within ATR-based tolerance, filtering noise and highlighting significant accumulation/distribution patterns. The system tracks previous internal pivots, compares new pivots against tolerance threshold, creates averaged zone when equality detected, and ignores isolated pivots that don't form patterns, reducing visual clutter while emphasizing institutional liquidity clustering.
🔶 Comprehensive Sweep Classification System
Implements three sweep detection modes distinguishing between liquidity grabs and genuine breakouts with state-based zone coloring:
Wick Mode: Marks zone as swept when wick touches but close remains outside
Close Mode: Requires close through zone for sweep classification
Wick+Close Classify Mode: Distinguishes sweeps (S - wick touches, close outside) from breaks (B - close through zone)
The system transitions zones through three states: Active (0 - untouched), Swept (1 - liquidity grabbed), Broken (2 - fully breached), applying progressive transparency increases to visually distinguish state changes and enabling traders to identify false breakouts versus genuine structural violations.
🔶 Objective Arrow Projection Framework
Features intelligent objective labeling that triggers when internal zones are swept, projecting arrows pointing toward opposite external structure as probable targets. The system generates "->ExtH" labels when internal low swept (suggesting move toward external high) and "->ExtL" labels when internal high swept (suggesting move toward external low), providing smart money concept implementation where internal liquidity grabs often precede runs toward external objectives.
🔶 Dynamic Zone Management System
Maintains separate arrays for external and internal zones with configurable history modes and maximum zone limits. The system implements "Latest Only" mode (clears previous external zones of same side when new pivot detected) or "Keep History" mode (preserves all zones up to maximum limit), automatically expires oldest zones when limits reached, and optionally clears all internal zones when new external pivot forms, maintaining clean chart presentation while preserving relevant liquidity context.
🔶 Trend Momentum Scoring Engine
Calculates sophisticated trend state using dual-component analysis combining momentum (price change normalized by volatility) with strength (MA separation and slope alignment). The system generates TrendScore objects containing momentum value, strength percentage, direction (-1/0/+1), and confidence score (0-100), uses these scores to classify BOS versus CHoCH by comparing previous and current trend states, and provides objective structural classification beyond simple price level violations.
🔶 Adaptive Zone Extension Logic
Implements intelligent right-edge management where active zones extend to current bar but freeze at touch/sweep point when cut-on-touch enabled. The system continuously updates zone right boundaries during active state, locks boundary at bar of first violation, and maintains locked position through subsequent bars, creating visual history of when liquidity was accessed while preventing misleading forward projection of filled zones.
🔶 Multi-State Visual Feedback System
Provides comprehensive color and transparency modulation based on zone state with two visual style options. "Soft Fill" mode uses semi-transparent fills with subtle borders, while "Outline" mode displays only colored borders with transparent fills. The system applies progressive transparency increases: Active (light), Swept (medium), Broken (heavy), with independent control over fill and border transparency enabling customization from subtle hints to prominent highlighting.
🔶 Structure Line Visualization Architecture
Creates dashed horizontal lines connecting structure break points to current bar with BOS/CHoCH labels positioned at midpoint between break bar and detection bar. The system draws lines at exact structure level, applies color coding matching bullish (green) or bearish (red) classification, and uses compact labels (eBOS, eCHoCH, iBOS, iCHoCH) for instant structural event identification without cluttering chart with excessive text.
🔶 Performance Optimization Framework
Utilizes efficient array management with configurable maximum limits (default 120 zones each type), automatic cleanup of oldest elements, and optional hiding of filled zones reducing active object count. The system includes intelligent state tracking minimizing recalculation overhead, optimized sweep detection using simple comparison logic, and streamlined zone update loops processing only active zones for consistent performance across extended sessions.
🔶 Why Choose Internal vs External Liquidity Zones ?
This indicator delivers institutional-grade market structure analysis through hierarchical dual-timeframe liquidity mapping with comprehensive BOS/CHoCH detection. The distinction between external (major swing) and internal (minor retracement) structure provides complete smart money concept implementation where external zones define bias and targets while internal zones reveal tactical entries and stop hunts. The system's sweep classification distinguishes liquidity grabs from genuine breakouts, objective arrows project probable targets based on internal sweeps toward external levels, and comprehensive BOS/CHoCH labeling across both timeframes enables multi-dimensional structural analysis. Perfect for order flow traders implementing ICT concepts, liquidity-based strategies, or market maker models in cryptocurrency, forex, and futures markets where understanding the relationship between internal accumulation and external objectives is essential for high-probability trade location and proper risk management.
CSO FSVZO V104 - BOX & PRICESDescription
Overview
The Apex Adaptive Trend Engine is a high-precision trend-following strategy designed for traders who value clean visual confirmation and strict entry criteria. Built on a Zero-Lag EMA foundation, this system specializes in capturing explosive trend movements while filtering out market noise through a proprietary multi-condition validation process.
Core Logic: How it Works
The strategy utilizes a Volatility-Adjusted Envelope system. Unlike standard moving averages, our engine calculates a "Trend Anker" that adapts to market volatility in real-time.
Trend Identification: Entry signals are generated only when price action breaks out of the dynamic bands with confirmed momentum.
The Apex Filter: To ensure high-quality entries, the system checks for a "Reversal Lock." If a trade hits a Stop Loss, the strategy will not "Double-Dip" into the same direction until a full trend reversal is confirmed, preventing "revenge trading" in a choppy market.
Dynamic Volume Confirmation: (If active) Signals are validated by a Z-Score Volume analysis. This ensures you only enter when there is actual "fuel" (liquidity) behind the move.
Visual Trade Management (Box Tech)
One of the standout features of V104 is the Live Risk Visualization.
Auto-Projections: The moment a signal triggers, the script projects a Green (TP) and Red (SL) box directly onto the chart.
Clean Labeling: Price targets are offset to the right of the current bar to ensure your price action remains clear and readable.
Real-Time Scaling: Boxes expand dynamically as the trade progresses, giving you a professional-grade dashboard for your active positions.
Key Features
MTF Synchronization: Optionally filters entries based on a higher timeframe (e.g., 60m trend) to ensure you are never trading against the "Big Picture".
Zero-Lag Calculation: Optimized EMA lengths (14) provide a perfect balance between speed and reliability.
Pro-Grade Alerts: Specifically defined alerts for BUY and SELL scenarios, making it 100% compatible with automated trading bots and webhooks.
Recommended Timeframes & Assets
Timeframes: Optimized for 15m, 30m, and 1H.
Assets: High liquidity instruments (BTC, ETH, Major Forex Pairs, and Tech Stocks).
How to Use
Wait for a Box: When the Trend Envelopes change color, a Buy/Sell signal will trigger.
Confirm Volume: Ensure the background highlights (optional) show a volume surge.
Follow the Levels: Use the projected Green/Red boxes for your exit management.
Disclaimer
Trading involves significant risk. This strategy is for educational and informational purposes. Always perform your own backtests and practice proper risk management.
Bybit Fees Calculator + Correct Fee LogicОнлайн - расчет Суммы комиссий для сделки на криптобирже BYBIT для Вашей заданной суммы сделки и плеча.
Текущая ставка Funding Rate автоматически обновляется в режиме онлайн по запросу к бирже BYBIT.
________________________________________________________________________________
Online calculation of the amount of fees for a trade on the BYBIT crypto exchange for your specified trade amount and leverage.
The current Funding Rate is automatically updated online upon request to the BYBIT exchange.
200 Bar En Uzun Bar + 1.5x Volume (Nokta)btc için ise yarıyor dönüş ihtimali olan yerleri gösteriyor ..mor nokta
by m t EYUBOGLU
Sakalau02 Weekly Daily SessionsSakalau02: Weekly Daily Sessions – The Architecture of the Trading Week
The "Sakalau02 Weekly Daily Sessions" is a high-definition visual mapping tool designed to dissect the trading week into distinct daily blocks. More than just a period separator, this script defines the "field of play" for each day, allowing you to visualize where liquidity builds and how price interacts with temporal boundaries.
Here is why this script is the cornerstone of a professional Top-Down analysis:
📅 High-Definition Daily Structure
The indicator transforms your chart into a logical map of the week, providing visual support for all 7 days, with a focus on active trading from Monday to Friday.
Visual Identity: Each day is assigned its own unique color, helping you instantly recognize repetitive market signatures (like the "Tuesday Reversal" or "Mid-week Expansion").
Timezone Precision: Featuring a dedicated Timezone Input, the script ensures that daily boxes open exactly at 00:00 according to your chosen financial hub (UTC, New York, London, etc.).
📐 Range and Liquidity Analysis
Through its Dynamic Box System, the script monitors price evolution in real-time:
High/Low Tracking: Automatically expands the box boundaries as price carves out new daily highs or lows.
The 0.5 Level (Daily Equilibrium): Automatically calculates the midpoint of the entire day. This is the critical "Fair Value" zone where price decides whether to trend or mean-revert.
Open/Close Trajectory: A discreet line tracks price relative to the daily open, providing an instant read on the intraday bias (Bullish/Bearish).
⚡ Precision Alert System
Never miss a structural shift. The indicator comes equipped with built-in alerts for:
Session Starts: Be notified the moment a new daily cycle begins.
Liquidity Sweeps (New High/Low): Receive alerts the second price breaches the current day’s high or low—perfect for executing Judas Swings or Expansion setups.
💎 Versatile Display Modes
Boxes Mode: Encapsulates price for a clear view of market structure.
Zones Mode: Highlights the background for a cleaner integration with secondary indicators.
Timeline Mode: Marks the base of the chart, keeping the price action area completely untouched.
Piața nu este doar preț, este ritm. În timp ce alții se pierd în zgomotul fiecărei secunde, eu definesc limitele zilei. O structură creată pentru traderul care știe că volumul urmează timpul, iar profitul urmează disciplina — păstrați ochii pe echilibrul zilei!" — Semnat, Andrei (Sakalau02) ⏳
Swing Trade StrategySwing Trade Strategy
📊 Overview
Multi-indicator trend-following system for cryptocurrency swing trading. Combines 10 technical indicators with weighted voting to identify high-probability trend reversals.
🎯 Key Features
10 indicators with weighted consensus voting (max 13 points Bull/Bear)
Trend confirmation system reduces false signals
Visual signals: Green/red trend line, buy/sell arrows, position backgrounds
Real-time dashboard: Shows Bull/Bear scores and trend strength
Long-only positions with automatic exits during bear markets
📈 How It Works
Entry: When Bull score exceeds Bear score by +2 (WEAK BULL) or +5 (STRONG BULL), confirmed over 2 bars
Exit: When Bear score exceeds Bull score by -2, confirmed over 2 bars
Indicators: RMI, ALMA, CTI, EMA crossovers, DEMA DMI, Stochastic, Trend Oscillators, and more
📊 Performance Characteristics
Trades: 4-5 per year (swing trading approach)
Win Rate: 39% (fewer wins but larger gains)
Profit Factor: 2.4+ (winners are 2.4x larger than losers)
Max Drawdown: -42%
⚙️ Settings
Timeframe: Daily (1D) recommended
Position Size: 95% of equity
Commission: 0.1% per trade
Asset: Optimized for BTC/crypto
💡 Usage
Apply to BTC Daily chart
Green arrow = BUY, Red arrow = SELL
Monitor dashboard for trend strength
Hold positions until opposite signal
⚠️ Risk Warning
Max 42% drawdown - high risk tolerance required
Long-only strategy - no shorting
Optimized for crypto markets
Past performance ≠ future results
Version: 1.0 | Pine Script: v6 | Style: Trend Following
Coinview30 LIQThis indicator is generated by analysis of crypto market liquidity, and it shows how market makers set their make and take price and it guides trade options, stop loss and profit taking level settings.
Initial Balance FDAX1!Initial Balance FDAX — a fork of the original Initial Balance indicator by noop-noop, adapted specifically for FDAX / GER40 trading.
What's changed:
🕐 Timezone-proof IB detection — the script uses hour(time, "Europe/Berlin") internally, so the Initial Balance is always calculated correctly regardless of your chart's timezone setting. No more manual time shifting. DST (CET ↔ CEST) is handled automatically.
📻 Two IB session modes:
Frankfurt Trading Hours — IB 08:00–09:00 CET (Frankfurt trading opens at 08:00)
XETRA — IB 09:00–10:00 CET (XETRA cash market opens at 09:00)
⚙️ A.T. default settings — all default values are pre-configured for the Fix PIPS community setup. Use TradingView's built-in Defaults → Reset to defaults to restore them at any time.
All original features preserved: IB levels (IBH/IBL/IBM), extensions (x2, x3), 50% intermediate levels, IB delta analytics, customizable colors and line styles.
Credits: Based on the original work by noop-noop. Forked and customized for the Fix PIPS community.
Auction Weighted Support and Resistance [Metrify]This script builds an “auction-weighted” S/R map that’s intentionally closer to a microstructure proxy than a classic “draw pivots → draw lines” approach.
The core idea: treat repeated interactions around the same price as evidence of auction behavior (acceptance vs rejection), then compress that behavior into a small set of ranked horizontal zones per horizon. Instead of outputting dozens of levels, it runs a selection pass to keep only the strongest, spatially distinct levels.
Candidate discovery is pivot-driven, but not used naively. The script collects pivot highs/lows into rolling buffers for three horizons (Micro/Short/Medium) with different pivot lengths and memory caps. Those candidates don’t become “levels” directly; they’re just seeds that get clustered and rescored. Clustering is ATR-normalized (distance measured in ATR multiples), so the same logic doesn’t fall apart when you change symbol volatility or timeframe. Each horizon has its own clustering radius (distATR_micro/short/medium), which makes Micro more granular and Medium more tolerant.
The “weight” you see is not a single metric. It’s a composite score that tries to approximate how meaningful a price is in an auction sense:
Touch count (distinct): interactions are counted only when the candle range gets within a near-band threshold (ATR-normalized), and then gated by minimum bar separation so you don’t get spam from chop printing 20 touches in a row. (this is done with a stride-based loop to avoid blowing runtime on deep lookbacks)
Acceptance: a rolling overlap rate of candle ranges inside the box. It’s exponentially weighted (half-life decay), so recent acceptance matters more, but older acceptance still contributes. If price has been “living” around that level, acceptance rises.
Rejection quality: wick-aware rejection, but range-gated (not close-gated). The scoring looks at whether the candle range overlaps/approaches the level, then measures wick dominance on the rejecting side plus where the close sits inside the bar range.
Age decay: older levels aren’t thrown away automatically, but they get downweighted via an exponential decay term so stale structure doesn’t dominate forever.
Those components get combined by f_weightCompose() into a bounded weight using saturating transforms (so touches don’t scale linearly forever) and a decay factor tied to age. When multiple candidates land in the same cluster, the merge is done with a saturating union on weights (1 - (1-oldW)*(1-wAdd)) rather than simple addition, so weights don’t explode and a level can converge toward 1.0 without becoming meaningless. The cluster center price is updated via a weight-based average to prevent random drift from weak additions.
After clustering, we does an explicit selection pass instead of drawing everything. First it filters by minScore, then sorts by weight, then applies a spatial suppression step (basically NMS for horizontal levels). The minimum spacing is ATR-based and incorporates both a horizon spacing floor and the zone thickness, so you don’t end up with two bands that overlap visually or convey the same information. On top of that, there’s a global cross-horizon collision gate (f_canDraw) so Medium zones can coexist with Short/Micro without the chart turning into a layered fog of rectangles.
Visualization is intentionally “zone-first.” Each selected level becomes a box band whose half-thickness is ATR-scaled per horizon (bandThicknessATR_*). Opacity isn’t linear: it normalizes weight above minScore, applies a power curve to compress mid-range values, and also scales relative to the strongest level in that horizon (so you still get contrast when everything is “kind of strong”).
The pressure overlay is not volume-based and not orderflow (pine can’t read L2), but it tries to expose short-term imbalance while price is inside a band. When the last price is inside a zone, it computes a pressure score from two parts: proximity to the center (closer = higher) and a directional imbalance proxy from recent returns sampled only on bars that intersect the band. It then draws two thin lines at the band edges with alpha proportional to that pressure score. This is meant as a “are we being pushed out or absorbed here” hint (not a prediction engine).
If you enable the audit panel, the script builds a table listing the levels that actually got drawn (post-selection + collision filtering). The columns map directly to the internal metrics (weight, touches, acceptance, rejection), so you can sanity-check why a level exists. Level IDs are horizon-prefixed (MC/ST/MD) and assigned based on ranking within each horizon.
note:
rebuild is throttled (rebuildEveryN) and only runs on the last bar. Loops that can go deep use a stride heuristic (1/2/4) to keep runtime predictable on large lookbacks. Arrays are used as bounded buffers for candidate storage, and drawing objects are aggressively deleted/rebuilt to avoid object leaks.
Bybit Fees Calculator + Smart FundingРасчет Суммы комиссий для сделки на криптобирже BYBIT для Вашей заданной суммы сделки и плеча.
Внимание!! Для биржи BYBIT пока недоступно автоматическое считывание текущей ставки Funding Rate. Нужно вводить вручную в настройки индикатора . Брать - с сайта биржи или с индикатора Trading View - ставка Финансирования.
__________________________________________________________________________________
Calculation of the amount of commissions for a trade on the BYBIT crypto exchange for your specified trade amount and leverage.
Attention!! Automatic reading of the current Funding Rate is not yet available for the BYBIT exchange. You need to enter it manually in the indicator settings. You can take it from the exchange website or from the Trading View indicator - Funding Rate.
Sakalau02 Weekly Daily SessionsSakalau02: Weekly Daily Sessions – The Architecture of the Trading Week
The "Sakalau02 Weekly Daily Sessions" is a high-definition visual mapping tool designed to dissect the trading week into distinct daily blocks. More than just a period separator, this script defines the "field of play" for each day, allowing you to visualize where liquidity builds and how price interacts with temporal boundaries.
Here is why this script is the cornerstone of a professional Top-Down analysis:
📅 High-Definition Daily Structure
The indicator transforms your chart into a logical map of the week, providing visual support for all 7 days, with a focus on active trading from Monday to Friday.
Visual Identity: Each day is assigned its own unique color, helping you instantly recognize repetitive market signatures (like the "Tuesday Reversal" or "Mid-week Expansion").
Timezone Precision: Featuring a dedicated Timezone Input, the script ensures that daily boxes open exactly at 00:00 according to your chosen financial hub (UTC, New York, London, etc.).
📐 Range and Liquidity Analysis
Through its Dynamic Box System, the script monitors price evolution in real-time:
High/Low Tracking: Automatically expands the box boundaries as price carves out new daily highs or lows.
The 0.5 Level (Daily Equilibrium): Automatically calculates the midpoint of the entire day. This is the critical "Fair Value" zone where price decides whether to trend or mean-revert.
Open/Close Trajectory: A discreet line tracks price relative to the daily open, providing an instant read on the intraday bias (Bullish/Bearish).
⚡ Precision Alert System
Never miss a structural shift. The indicator comes equipped with built-in alerts for:
Session Starts: Be notified the moment a new daily cycle begins.
Liquidity Sweeps (New High/Low): Receive alerts the second price breaches the current day’s high or low—perfect for executing Judas Swings or Expansion setups.
💎 Versatile Display Modes
Boxes Mode: Encapsulates price for a clear view of market structure.
Zones Mode: Highlights the background for a cleaner integration with secondary indicators.
Timeline Mode: Marks the base of the chart, keeping the price action area completely untouched.
Piața nu este doar preț, este ritm. În timp ce alții se pierd în zgomotul fiecărei secunde, eu definesc limitele zilei. O structură creată pentru traderul care știe că volumul urmează timpul, iar profitul urmează disciplina — păstrați ochii pe echilibrul zilei!" — Semnat, Andrei (Sakalau02) ⏳
RSI / Stoch RSI Combo (Overlay)RSI + Stoch RSI Overlay combines two of TradingView’s most-used momentum tools into a single clean oscillator pane: Relative Strength Index (RSI) for broader momentum/strength and Stochastic RSI (K/D) for faster timing signals.
What you see
RSI line (classic momentum/strength)
Stoch RSI K & D lines (fast momentum/timing)
Optional RSI zones (70/50/30) with gradient fills
Optional Stoch RSI zones (80/50/20) with background fill
Why it’s useful
RSI is great to judge the “bigger” momentum regime, while Stoch RSI is great for entries/exits timing inside that regime. Overlaying both helps you quickly answer:
Is momentum bullish/bearish overall (RSI)?
Is price stretched or resetting (Stoch RSI 80/20 + K/D crosses)?
Are reversals supported by RSI structure or just a quick Stoch RSI fluctuation?
How it’s calculated
RSI is calculated from the selected source (default: close) and length.
Stoch RSI is calculated using the RSI values (not price), then smoothed into:
- K = SMA of Stoch(RSI) over “K” smoothing
- D = SMA of K over “D” smoothing
Optional features
RSI Smoothing: Add an RSI-based moving average (SMA/EMA/SMMA/WMA/VWMA) to reduce noise.
Bollinger Bands on RSI MA: If “SMA + Bollinger Bands” is selected, bands are plotted around the smoothing MA.
Divergence (optional): Enable classic regular bullish/bearish divergence detection on RSI (hidden by default to keep the UI clean) and use alert conditions.
Signals traders often look for
Trend bias: RSI above 50 = bullish pressure; below 50 = bearish pressure.
Overbought/oversold:
-> RSI 70/30 zones for broader momentum extremes
-> Stoch RSI 80/20 zones for faster “stretch / reset”
Timing: Stoch RSI K/D crosses near 20 or 80 can help time pullbacks or reversals—best when aligned with RSI context.
Alerts
Regular Bullish Divergence
Regular Bearish Divergence
(Enable “Calculate Divergence” in settings to activate.)
Notes
This is an oscillator tool, not a standalone trading system.
Works on any market/timeframe; consider combining with structure/trend confirmation.
Moving Average ExponentialDAYAAn Exponential Moving Average (EMA) is a technical chart indicator used in trading to identify market trends by averaging asset prices over a specific timeframe, placing higher weight and significance on the most recent price data. Unlike a Simple Moving Average (SMA), the EMA is more responsive to recent price changes, making it ideal for identifying reversals or short-term trends.
8:30 AM CST Vertical LineVertical line @ open New York market. It let's everyone know when to start trading in order to catch major moves in the market for the most part.
Monthly 14th Line (Past & Future)This utility indicator automatically draws a vertical line on a specific day of every month (default is the 14th). It is designed for traders who track monthly cycles, recurring economic events, or specific expiration dates.
DafePatternsLibDafePatternLib: The Adaptive Pattern Recognition Engine
DafePatternLib is not a static pattern library. It is an adaptive recognition engine. It doesn't just find patterns; it tracks, weights, and filters them based on their performance in the live market.
█ CHAPTER 1: THE PHILOSOPHY — BEYOND STATIC RULES, INTO DYNAMIC LEARNING
For decades, chart pattern analysis has been trapped in a rigid paradigm. An indicator coded to find a "Bullish Engulfing" will signal that pattern with the same confidence every time, regardless of whether it has been failing consistently for weeks. It has no memory and no ability to adapt.
DafePatternLib was created to change this. It is built on a performance-based reinforcement framework. This library is not just a collection of detection functions; it is a self-weighting logic system. It tracks outcomes. It remembers what works. Over time, it amplifies the signals of high-probability patterns and filters out those that are failing in the current market regime.
This is not a black box. It is an open-source, observable learning system. It strengthens and weakens its own internal weights based on positive and negative feedback, evolving into a tool adapted to the specific asset you are trading.
█ CHAPTER 2: CORE INNOVATIONS
This library introduces several advanced concepts for algorithmic analysis:
Reinforcement Learning Engine: The core of the system. Every high-confidence pattern is logged into "Active Memory." The library tracks the outcome against projected stops and targets. If successful, the weight for that pattern category is strengthened. If it fails, the weight is reduced. This creates a continuous feedback loop.
Adaptation Rate (Plasticity): You have direct control over the engine's "plasticity"—its ability to learn. High plasticity allows fast adaptation to new conditions; lower plasticity creates a stable, long-term model.
Dynamic Volatility Scaling (DVS): Markets breathe. DVS is a proprietary function that calculates a real-time volatility scalar by comparing current ATR to historical averages. This scalar automatically adjusts lookback periods and sensitivities. In high volatility, engines look for larger structures; in low volatility, they tighten focus.
Smart Confidence Score: The output is not a simple "true/false." Every pattern includes two scores:
• Raw Confidence: Static confidence based on the pattern's textbook definition.
• Net Confidence: The adaptive score (Raw Confidence × Learned Bias). A performing pattern sees its confidence boosted; a failing pattern gets penalized.
Intelligent Filtering: If the learned bias for a category (e.g., "Candle") drops below a threshold (e.g., 0.8), the library automatically filters those signals, treating them as low-probability noise until performance improves.
█ CHAPTER 3: ANATOMY OF THE LOGIC — HOW IT THINKS
The LogicWeights (The Core)
The central data structure holding the system's "memory." It stores a floating-point weight or "bias" for each of the five major categories (Candle, Harmonic, Structure, Geometry, VSA). Initialized at 1.0 (neutral).
update_core() (The Learning Process)
The heart of the reinforcement loop. When a pattern resolves (win/loss), this function applies a positive or negative adjustment to the corresponding category weight. Weights are constrained between 0.5 (distrust) and 2.0 (trust).
manage_memory() (Short-Term Memory)
Maintains an array of active signals. On every bar, it checks if targets or stops have been hit. Resolved patterns trigger update_core(). Unresolved patterns eventually expire, applying a minor penalty to discourage stagnation.
scan_pattern_universe() (Master Controller)
The main exported function. On every bar, it:
Calculates the Dynamic Volatility Scalar (DVS).
Runs all pattern detection engines (VSA, Geometry, Candles, etc.) adapted to DVS.
Identifies the single best pattern based on raw confidence.
Passes it to memory for tracking.
Applies the learned bias to calculate Net Confidence.
Returns the final, adaptively weighted PatternResult.
█ CHAPTER 4: DEVELOPER INTEGRATION GUIDE
Designed for simplicity and power.
1. Import the Library:
import DskyzInvestments/DafePatternLib/1 as pattern
2. Call the Scanner:
The library handles DVS, scanning, memory, and learning internally.
pattern.PatternResult signal = pattern.scan_pattern_universe()
3. Use the Result:
if signal.is_active
label.new(bar_index, signal.entry, "Conf: " + str.tostring(signal.net_confidence, "#") + "%")
With just these lines, you integrate a self-weighting, multi-pattern recognition engine.
█ INPUTS TEMPLATE (COPY INTO YOUR SCRIPT)
// ═══════════════════════════════════════════════════════════
// INPUT GROUPS
// ═══════════════════════════════════════════════════════════
string G_AI_ENGINE = "══════════ 🧠 LOGIC ENGINE ══════════"
string G_AI_PATTERNS = "══════════ 🔬 PATTERN SELECTION ══════════"
string G_AI_VISUALS = "══════════ 🎨 VISUALS & SIGNALS ══════════"
string G_AI_DASH = "══════════ 📋 LOGIC STATE DASHBOARD ══════════"
string G_AI_ALERTS = "══════════ 🔔 ALERTS ══════════"
// ═══════════════════════════════════════════════════════════
// LOGIC ENGINE CONTROLS
// ═══════════════════════════════════════════════════════════
bool i_enable_ai = input.bool(true, "✨ Enable Adaptive Engine", group = G_AI_ENGINE,
tooltip="Master switch to enable the pattern recognition and learning system.")
float i_plasticity = input.float(0.03, "Adaptation Rate", minval=0.01, maxval=0.1, step=0.01, group = G_AI_ENGINE,
tooltip="Controls adaptation speed. • Low (0.01-0.02): Stable learning. • Medium (0.03-0.05): Balanced. • High (0.06+): Fast adaptation.")
float i_filter_threshold = input.float(0.8, "Adaptive Filter Threshold", minval=0.5, maxval=1.0, step=0.05, group = G_AI_ENGINE,
tooltip="Hide signals from categories with a learned bias below this value.")
// ═══════════════════════════════════════════════════════════
// PATTERN SELECTION
// ═══════════════════════════════════════════════════════════
bool i_scan_candles = input.bool(true, "🕯️ Candlestick Patterns", group = G_AI_PATTERNS, inline="row1")
bool i_scan_vsa = input.bool(true, "📦 Volume Spread Analysis", group = G_AI_PATTERNS, inline="row1")
bool i_scan_geometry = input.bool(true, "📐 Geometric Patterns", group = G_AI_PATTERNS, inline="row2")
bool i_scan_structure = input.bool(true, "📈 Market Structure (SMC)", group = G_AI_PATTERNS, inline="row2")
bool i_scan_harmonic = input.bool(false, "🦋 Harmonic Setups", group = G_AI_PATTERNS, inline="row3")
// ═══════════════════════════════════════════════════════════
// VISUALS & DASHBOARD
// ═══════════════════════════════════════════════════════════
bool i_show_signals = input.bool(true, "Show Signals", group = G_AI_VISUALS)
bool i_show_dashboard = input.bool(true, "Show Logic Dashboard", group = G_AI_DASH)
█ DEVELOPMENT PHILOSOPHY
DafePatternLib was born from a vision to bring dynamic logic to technical analysis. We believe an indicator should not be a static tool, but an intelligent partner that adapts. This library is an open-source framework empowering developers to build the next generation of smart indicators.
█ DISCLAIMER
• LIBRARY FOR DEVELOPERS: This script produces no visual output on its own. It is an engine for developers.
• ADAPTIVE, NOT PREDICTIVE: Reinforcement learning optimizes based on recent history. It is a statistical edge, not a crystal ball.
• RISK WARNING: Patterns and confidence scores are for informational purposes.
"The key to trading success is emotional discipline. If intelligence were the key, there would be a lot more people making money trading." — Victor Sperandeo
Create with DAFE.
5, 8, 21, 200 EMA Daily 200 SMA Daily VWAPMulti-timeframe EMA stack with Daily VWAP & 200 SMA
This clean overlay indicator combines popular exponential moving averages (5, 8, 21, 200 EMA on current timeframe) with a higher-timeframe Daily 200 SMA and session-resetting Daily VWAP — perfect for trend following, dynamic support/resistance, and intraday bias on stocks, forex, crypto, or futures.
Key Features:
• 5 EMA (very fast) – quick momentum & scalping filter (default lime)
• 8 EMA (fast) – short-term trend & pullback entries (default blue)
• 21 EMA (medium) – intermediate trend & confluence zone (default orange)
• 200 EMA (long) – major trend direction & big-picture support/resistance (default purple)
• Daily 200 SMA – smooth higher-timeframe trend line that stays constant on lower TFs (default teal, thicker line)
• Daily VWAP – volume-weighted average price that resets each trading day (default yellow)
All lines feature right-edge labels that auto-refresh daily and follow price action (toggleable + size adjustable).
Common uses:
- Trend alignment: Trade in direction of higher EMAs + Daily 200 SMA
- Pullbacks: Enter near 5/8/21 EMA when aligned with 200s
- Intraday mean reversion: Use Daily VWAP as fair value anchor
- Dynamic S/R: Watch reactions at these levels
Fully customizable colors, lengths, and label visibility. Clean code, no repainting issues on historical bars.
Happy trading!





















