Swing Pivots + Static Dashboard (v5.7-k10-l-alert2)Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum
Indicadores de Bill Williams
UMESHFXBOTUMESHFXBOT: UT Bot Strategy with Alligator Filter (Pine Script v6)
This strategy combines the UT Bot trailing stop logic with the Williams Alligator indicator to help avoid false signals during ranging (sideways) markets.
Key features:
Alligator Filter: Trades are only allowed when the Alligator lines (Jaw, Teeth, Lips) are not intertwined, helping to avoid choppy, non-trending conditions.
Customizable Alligator Settings: You can adjust the Jaw, Teeth, and Lips lengths and shifts to suit your market and timeframe.
Separate Uptrend/Downtrend Thresholds: Set different thresholds for trend strength filtering in uptrends and downtrends.
Heikin Ashi Option: Optionally use Heikin Ashi candle logic for signal generation, calculated internally for compatibility with all symbols.
No Consecutive Signals: Prevents new buy (or sell) signals if already in a long (or short) position.
Visuals: Plots buy/sell signals and Alligator lines on the chart for easy analysis.
خط موحدA good daily indicator for the overall avrageA good daily indicator for the overall average.A good daily indicator for the overall average.
REAL_TPforget all the moving avergaes just try this real average formula and rectify your trading technique. have a great day !!!
Multi-Indicator Strategy with Entry & ExitYour **Multi-Indicator Strategy** is designed to identify **optimal entry and exit points** using multiple technical indicators. Here’s a breakdown of how it works:
### **Strategy Components**
1. **Trend Identification**
- Uses **Exponential Moving Averages (EMA 5 & EMA 20)** to detect bullish or bearish trends.
- A **bullish crossover** (EMA 5 crossing above EMA 20) signals a buying opportunity.
- A **bearish crossunder** (EMA 5 crossing below EMA 20) indicates a selling opportunity.
2. **Momentum & Strength Confirmation**
- **Relative Strength Index (RSI)** ensures price is above **50** for buy signals and below **50** for sell signals.
- **MACD (Moving Average Convergence Divergence)** confirms momentum direction when MACD crosses above the signal line for buys and below for sells.
3. **Volatility & Price Range Analysis**
- **Bollinger Bands** help identify support and resistance zones. Buy when price is near the **lower band**, and sell when price is near the **upper band**.
- **Supertrend Indicator** confirms the general trend direction (**1 for bullish, -1 for bearish**).
4. **Fair Value & Market Sentiment**
- **VWAP (Volume Weighted Average Price)** tracks institutional activity to ensure entries align with market strength.
### **Entry & Exit Rules**
- **Buy Condition:**
✔ EMA 5 crosses above EMA 20
✔ RSI > 50
✔ MACD is bullish
✔ Price near **Bollinger Lower Band**
✔ Supertrend confirms uptrend
- **Sell Condition:**
✔ EMA 5 crosses below EMA 20
✔ RSI < 50
✔ MACD is bearish
✔ Price near **Bollinger Upper Band**
✔ Supertrend confirms downtrend
### **Risk Management**
- **Stop Loss** at **0.5%** below entry price to limit risk.
- **Take Profit** at **1%** above entry price for controlled gains.
This strategy aims for **high probability trades** by combining **trend, momentum, volatility, and institutional activity** into one framework.
Would you like help refining the settings for a specific asset or timeframe? 🚀
Divinearrow-tttypical Video Content Summary (Taylor Trading Technique)
Introduction: George D. Taylor’s Approach
Developed in the 1950s.
Based on the idea that market movements are cyclical.
3-Day Cycle Breakdown
Buy Day: Formation of a low → Look for long positions.
Sell Day: Close long positions → Usually a sideways move.
Sell Short Day: Reversal from highs → Opportunity for short positions.
Examples with Candlestick Charts
The characteristics of each day are illustrated using candlestick patterns.
RSI, MACD, and other auxiliary indicators are often included.
Integrating the Strategy with Current Market Data
TTT signals + trend confirmation tools.
Support-resistance levels and volume analysis are integrated.
Risk Management
Target and stop loss levels.
Position sizing and risk control.
Terils scriptcombined Indicator EMA, Yesterday High low. super trend, BB.
combined Indicator EMA, Yesterday High low. super trend, BB.
combined Indicator EMA, Yesterday High low. super trend, BB.
combined Indicator EMA, Yesterday High low. super trend, BB.
combined Indicator EMA, Yesterday High low. super trend, BB.
combined Indicator EMA, Yesterday High low. super trend, BB.
combined Indicator EMA, Yesterday High low. super trend, BB.
combined Indicator EMA, Yesterday High low. super trend, BB.
combined Indicator EMA, Yesterday High low. super trend, BB.
GIFT NIFTY vs NIFTY DifferenceGift Nifty and NIFTy define a TREND AND CYCLE THAT IS BEING PLOTTED using this indicator.
RESHAIndicator Name: RESHA – Static Price Levels
Description:
The RESHA indicator is a simple tool that allows traders to manually define multiple horizontal price levels on the chart. These levels are displayed as horizontal lines, each extending a customizable number of candles forward. Traders can input a comma-separated list of prices, which are then plotted automatically on the chart.
Features:
📍 Custom input box for price levels (comma-separated).
📏 Adjustable line length in bars.
Visual price labels at the end of each level.
Clean and minimalistic design, perfect for support/resistance zones or static analysis.
This tool is ideal for traders who want to keep key price zones visible at all times without relying on dynamic calculations or automated indicators.
BW MFI fixed v6Bill Williams MFI
Sure! Here’s an English description of the indicator you have:
---
### Bill Williams Market Facilitation Index (MFI) — Indicator Description
This indicator implements the **Market Facilitation Index (MFI)** as introduced by Bill Williams. The MFI measures the market's willingness to move the price by comparing the price range to the volume.
---
### How it works:
* **MFI Calculation:**
The MFI is calculated as the difference between the current bar’s high and low prices divided by the volume of that bar:
$$
\text{MFI} = \frac{\text{High} - \text{Low}}{\text{Volume}}
$$
* **Color Coding Logic:**
The indicator compares the current MFI and volume values to their previous values and assigns colors to visualize market conditions according to Bill Williams’ methodology:
| Color | Condition | Market Interpretation |
| ----------- | ------------------ | --------------------------------------------------------------------------------------------- |
| **Green** | MFI ↑ and Volume ↑ | Strong trend continuation or acceleration (increased price movement supported by volume) |
| **Brown** | MFI ↓ and Volume ↓ | Trend weakening or possible pause (both price movement and volume are decreasing) |
| **Blue** | MFI ↑ and Volume ↓ | Possible false breakout or lack of conviction (price moves but volume decreases) |
| **Fuchsia** | MFI ↓ and Volume ↑ | Market indecision or battle between bulls and bears (volume rises but price movement shrinks) |
| **Gray** | None of the above | Neutral or unchanged market condition |
* **Display:**
The indicator plots the MFI values as colored columns on a separate pane below the price chart, providing a visual cue of the market’s behavior.
---
### Purpose:
This tool helps traders identify changes in market momentum and the strength behind price moves, providing insight into when trends might accelerate, weaken, or potentially reverse.
---
If you want, I can help you write a more detailed user guide or trading strategy based on this indicator!
High/Low Digit SumNAMAN SHAH
Its about the high low total of a candle only for gold where if highs total is 9 then its a chance that it will not break the high for a long time and it will be a good opportunity for short
And vise versa
Gold Breakout Strategy - RR 4Strategy Name: Gold Breakout Strategy - RR 4
🧠 Main Objective
This strategy aims to capitalize on breakouts from the Donchian Channel on Gold (XAU/USD) by filtering trades with:
Volume confirmation,
A custom momentum indicator (LWTI - Linear Weighted Trend Index),
And a specific trading session (8 PM to 8 AM Quebec time — GMT-5).
It takes only one trade per day, either a buy or a sell, using a fixed stop-loss at the wick of the breakout candle and a 4:1 reward-to-risk (RR) ratio.
📊 Indicators Used
Donchian Channel
Length: 96
Detects breakouts of recent highs or lows.
Volume
Simple Moving Average (SMA) over 30 bars.
A breakout is only valid if the current volume is above the SMA.
LWTI (Linear Weighted Trend Index)
Measures momentum using price differences over 25 bars, smoothed over 5.
Used to confirm trend direction:
Buy when LWTI > its smoothed version (uptrend).
Sell when LWTI < its smoothed version (downtrend).
⏰ Time Filter
The strategy only allows entries between 8 PM and 8 AM (GMT-5 / Quebec time).
A timestamp-based filter ensures the system recognizes the correct trading session even across midnight.
📌 Entry Conditions
🟢 Buy (Long)
Price breaks above the previous Donchian Channel high.
The current channel high is higher than the previous one.
Volume is above its moving average.
LWTI confirms an uptrend.
The time is within the trading session (20:00 to 08:00).
No trade has been taken yet today.
🔴 Sell (Short)
Price breaks below the previous Donchian Channel low.
The current channel low is lower than the previous one.
Volume is above its moving average.
LWTI confirms a downtrend.
The time is within the trading session.
No trade has been taken yet today.
💸 Trade Management
Stop-Loss (SL):
For long entries: placed below the wick low of the breakout candle.
For short entries: placed above the wick high of the breakout candle.
Take-Profit (TP):
Set at a fixed 4:1 reward-to-risk ratio.
Calculated as 4x the distance between the entry price and stop-loss.
No trailing stop, no break-even, no scaling in/out.
🎨 Visuals
Green triangle appears below the candle on a buy signal.
Red triangle appears above the candle on a sell signal.
Donchian Channel lines are plotted on the chart.
The strategy is designed for the 5-minute timeframe.
🔄 One Trade Per Day Rule
Once a trade is taken (buy or sell), no more trades will be executed for the rest of the day. This prevents overtrading and limits exposure.
Enhanced Volume w/ Pocket Pivots, Milestones & LiquiditySure! Here’s a professional and clear **description** you can use when saving or publishing the script on TradingView:
---
## 📄 Script Description: *Enhanced Volume w/ Pocket Pivots, Milestones & Liquidity*
This custom volume indicator enhances the default volume view by combining key institutional-level insights into a single tool. It highlights meaningful volume activity, liquidity conditions, and milestone events to help traders better understand accumulation/distribution and smart money participation.
### 🔍 Features:
* **Color-coded volume bars**:
* 🔵 **Pocket Pivot Volume (PPV)**: Up-day with volume > highest down-day volume of last 10 bars.
* 🟢 **Up Volume**: Up-day with volume > 50-day average.
* 🔴 **Down Volume**: Down-day with volume > 50-day average.
* 🟠 **Dry Volume**: Low-volume bars < 20% of 50-day average.
* ⚫ **Neutral/Other bars**: No significant signal.
* **Volume Milestones**:
* **HVE**: Highest volume ever (20 years lookback).
* **HVY**: Highest volume in the past 1 year (252 bars).
* **HVQ**: Highest volume in the past quarter (63 bars).
* **Projected Volume**:
* Real-time estimate of end-of-day volume based on elapsed session time.
* **Liquidity Metrics**:
* Displays current and 50-day average dollar volume.
* Estimates 1-minute liquidity for large-position feasibility.
* **Relative Volume Label**:
* Displays how today’s volume compares to the 50-day average.
* **Alerts Included**:
* Set alerts for HVE, HVY, and HVQ to catch key breakout or climactic volume events.
---
### 🧠 Ideal For:
* Growth stock traders
* Volume/price analysts
* Intraday & swing traders
* Institutions or prop traders needing liquidity benchmarks
---
Let me know if you'd like a short or promotional version (for sharing with others).
Wick SweepThe Wick Sweep indicator identifies potential trend reversal zones based on price action patterns and swing points. Specifically, it looks for "Wick Sweeps," a concept where the market temporarily breaks a swing low or high (creating a "wick"), only to reverse in the opposite direction. This pattern is often indicative of a market attempting to trap traders before making a larger move. The indicator marks these zones using dashed lines, helping traders spot key areas of potential price action.
Key Features:
* Swing Low and High Detection: The indicator identifies significant swing lows and highs within a user-defined period by employing Williams fractals.
* Wick Sweep Detection: Once a swing low or high is identified, the indicator looks for price movements that break through the low or high (creating a wick) and then reverses direction.
* Fractal Plotting: Optionally, the indicator plots fractal points (triangle shapes) on the chart when a swing low or high is detected. This can assist in visually identifying the potential wick sweep areas.
* Line Plotting: When a wick sweep is detected, a dashed line is drawn at the price level of the failed low or high, visually marking the potential reversal zone.
Inputs:
* Periods: The number of bars used to identify swing highs and lows. A higher value results in fewer, more significant swing points.
* Line Color: The color of the dashed lines drawn when a wick sweep is detected. Customize this to match your chart's theme or preferences.
* Show Fractals: A toggle that, when enabled, plots triangle shapes above and below bars indicating swing highs (up triangles) and swing lows (down triangles).
Functionality:
* Swing High and Low Calculation:
- The indicator calculates the swing low and swing high based on the periods input. A swing low is identified when the current low is the lowest within a range of (2 * periods + 1), with the lowest point being at the center of the period.
- Similarly, a swing high is identified when the current high is the highest within the same range.
* Wick Sweep Detection:
- Once a swing low or high is detected, the script looks for a potential wick. This happens when the price breaks the swing low or high and then reverses in the opposite direction.
- For a valid wick sweep, the price should briefly move beyond the identified swing point but then close in the opposite direction (i.e., a bullish reversal for a swing low and a bearish reversal for a swing high).
- A line is drawn at the price level of the failed low or high when a wick sweep is confirmed.
Confirmations for Reversal:
* The confirmation for a wick sweep requires that the price not only break the swing low/high but also close in the opposite direction (i.e., close above the low for a bullish reversal or close below the high for a bearish reversal).
* The confirmation is further refined by checking that the price movement is within a reasonable distance from the original swing point, which prevents the indicator from marking distant, unimportant price levels.
Additional Notes:
* The Wick Sweep indicator does not provide standalone trading signals; it is best used in conjunction with other technical analysis tools, such as trend analysis, oscillators, or volume indicators.
* The periods input can be adjusted based on the trader’s preferred level of sensitivity. A lower period value will result in more frequent swing points and potentially more signals, while a higher value will focus on more significant market swings.
* The indicator may work well in ranging markets where price tends to oscillate between key support and resistance levels.
RSI Phan Ky FullThe RSI divergence indicator is like a magnifying glass that spots gaps between price swings and momentum. When price keeps climbing but RSI quietly sags, it’s a flashing U‑turn sign: the bulls are winded, and the bears are lacing up their boots. Flip it around—price is sliding yet RSI edges higher—and you’ve got bulls secretly stockpiling. Hidden divergences shore up the trend; regular divergences hint at a pivot. Blend those signals with overbought/oversold zones, support‑resistance, and volume, and RSI divergence turns into a radar that helps traders jump in with swagger and bail out just in time.
Current Fractal High/Low (Dynamic)
This indicator dynamically tracks the most recent confirmed Fractal High and Fractal Low across any timeframe using custom left/right bar configurations.
🔍 Key Features:
Detects Fractal Highs and Lows based on user-defined pivot settings.
Draws a green line and label ("FH") at the most recent Fractal High.
Draws a red line and label ("FL") at the most recent Fractal Low.
All lines extend from the confirmation bar to the current candle.
Automatically removes old lines and labels for a clean, uncluttered chart.
🛠️ Customizable Inputs:
Left & Right bars for pivot sensitivity
Line width for visibility
📌 Use Cases:
Identifying structure shifts
Recognizing key swing points
Supporting liquidity and breakout strategies
💡 Fractals are confirmed only after the full formation of the pattern (left and right bars). This ensures reliability over reactivity.
This script is designed for intraday to swing traders who want a reliable way to visualize market turning points with minimal noise.
Absorption Lines Basic Indicator:
Green support lines and red resistance lines will appear on your chart
Numbers 1-7 will show up as triangles above and below bars
Green triangles below bars are sell signals
Red triangles above bars are buy signals
For Scanning:
In TradingView's Stock Screener, add a custom filter using this indicator
Look for "New Level", "Signal Number", or "Bar Close At Level" conditions
For specific signals, use "Buy Signal X" or "Sell Signal X" (where X is 1-7)
For Alerts:
Set up alerts using the three alert conditions in TradingView
You'll be notified when new lines are printed, when bars close at levels, or when signals appear
Williams R Zone Scalper v1.0[BullByte]Originality & Usefulness
Unlike standard Williams R cross-over scripts, this strategy layers five dynamic filters—moving-average trend, Supertrend, Choppiness Index, Bollinger Band Width, and volume validation —and presents a real-time dashboard with equity, PnL, filter status, and key indicator values. No other public Pine script combines these elements with toggleable filters and a custom dashboard. In backtests (BTC/USD (Binance), 5 min, 24 Mar 2025 → 28 Apr 2025), adding these filters turned a –2.09 % standalone Williams R into a +5.05 % net winner while cutting maximum drawdown in half.
---
What This Script Does
- Monitors Williams R (length 14) for overbought/oversold reversals.
- Applies up to five dynamic filters to confirm trend strength and volatility direction:
- Moving average (SMA/EMA/WMA/HMA)
- Supertrend line
- Choppiness Index (CI)
- Bollinger Band Width (BBW)
- Volume vs. its 50-period MA
- Plots blue arrows for Long entries (R crosses above –80 + all filters green) and red arrows for Short entries (R crosses below –20 + all filters green).
- Optionally sets dynamic ATR-based stop-loss (1.5×ATR) and take-profit (2×ATR).
- Shows a dashboard box with current position, equity, PnL, filter status, and real-time Williams R / MA/volume values.
---
Backtest Summary (BTC/USD(Binance), 5 min, 24 Mar 2025 → 28 Apr 2025)
• Total P&L : +50.70 USD (+5.05 %)
• Max Drawdown : 31.93 USD (3.11 %)
• Total Trades : 198
• Win Rate : 55.05 % (109/89)
• Profit Factor : 1.288
• Commission : 0.01 % per trade
• Slippage : 0 ticks
Even in choppy March–April, this multi-filter approach nets +5 % with a robust risk profile, compared to –2.09 % and higher drawdown for Williams R alone.
---
Williams R Alone vs. Multi-Filter Version
• Total P&L :
– Williams R alone → –20.83 USD (–2.09 %)
– Multi-Filter → +50.70 USD (+5.05 %)
• Max Drawdown :
– Williams R alone → 62.13 USD (6.00 %)
– Multi-Filter → 31.93 USD (3.11 %)
• Total Trades : 543 vs. 198
• Win Rate : 60.22 % vs. 55.05 %
• Profit Factor : 0.943 vs. 1.288
---
Inputs & What They Control
- wrLen (14): Williams R look-back
- maType (EMA): Trend filter type (SMA, EMA, WMA, HMA)
- maLen (20): Moving-average period
- useChop (true): Toggle Choppiness Index filter
- ciLen (12): CI look-back length
- chopThr (38.2): CI threshold (below = trending)
- useVol (true): Toggle volume-above-average filter
- volMaLen (50): Volume MA period
- useBBW (false): Toggle Bollinger Band Width filter
- bbwMaLen (50): BBW MA period
- useST (false): Toggle Supertrend filter
- stAtrLen (10): Supertrend ATR length
- stFactor (3.0): Supertrend multiplier
- useSL (false): Toggle ATR-based SL/TP
- atrLen (14): ATR period for SL/TP
- slMult (1.5): SL = slMult × ATR
- tpMult (2.0): TP = tpMult × ATR
---
How to Read the Chart
- Blue arrow (Long): Williams R crosses above –80 + all enabled filters green
- Red arrow (Short) : Williams R crosses below –20 + all filters green
- Dashboard box:
- Top : position and equity
- Next : cumulative PnL in USD & %
- Middle : green/white dots for each filter (green=passing, white=disabled)
- Bottom : Williams R, MA, and volume current values
---
Usage Tips
- Add the script : Indicators → My Scripts → Williams R Zone Scalper v1.0 → Add to BTC/USD chart on 5 min.
- Defaults : Optimized for BTC/USD.
- Forex majors : Raise `chopThr` to ~42.
- Stocks/high-beta : Enable `useBBW`.
- Enable SL/TP : Toggle `useSL`; stop-loss = 1.5×ATR, take-profit = 2×ATR apply automatically.
---
Common Questions
- * Why not trade every Williams R reversal?*
Raw Williams R whipsaws in sideways markets. Choppiness and volume filters reduce false entries.
- *Can I use on 1 min or 15 min?*
Yes—adjust ATR length or thresholds accordingly. Defaults target 5 min scalping.
- *What if all filters are on?*
Fewer arrows, higher-quality signals. Expect ~10 % boost in average win size.
---
Disclaimer & License
Trading carries risk of loss. Use this script “as is” under the Mozilla Public License 2.0 (mozilla.org). Always backtest, paper-trade, and adjust risk settings to your own profile.
---
Credits & References
- Pine Script v6, using TradingView’s built-in `ta.supertrend()`.
- TradingView House Rules: www.tradingview.com
Goodluck!
BullByte
Overnight ES Strategy: CBC + Fractal + RSI + ATR FilterThis script is designed for overnight trading of the E-mini S&P 500 futures (ES) between 6 PM and 11 PM EST.
It combines multiple technical confluences to generate high-probability buy and sell signals, focusing on volatility-rich, low-liquidity evening sessions.
Key Features:
Candle Body Confluence (CBC) Approximation:
Identifies candles with small real bodies compared to total range, simulating consolidation zones where price is likely to reverse.
Williams Fractal Confirmation:
Detects local tops and bottoms based on 5-bar fractal reversal patterns, helping validate breakout or reversal points.
RSI Filter:
Ensures momentum is supportive — buys only when RSI < 35 (oversold) and sells only when RSI > 65 (overbought).
ATR Volatility Filter:
Trades are only allowed if the Average True Range (ATR) exceeds a user-defined threshold, filtering out low-volatility, risky environments.
Time Session Control:
Signals are only generated during the user-defined evening session (default: 6 PM to 11 PM EST) to match market behavior.
Real-Time Alerts Enabled:
Alerts can be set for BUY or SELL conditions, enabling mobile notifications, emails, or pop-ups without constant chart monitoring.
Recommended Settings:
Chart Timeframe: 15-minute or 30-minute candles
Assets: ES Mini (ES1!), NQ Mini, or other CME futures
Session: New York Time (EST)
ATR Threshold: Adjust based on market conditions; 5.0 suggested starting point for ES Mini on 15m.
Important:
This script only plots signals, it does not auto-execute trades.
Always backtest and paper trade before using live capital.
Volatility can vary; consider adjusting RSI and ATR filters based on market environment.
Credits:
Script designed based on confluence of price action, momentum, reversal structure, and volatility filtering principles used by professional traders.
Inspired by Candle Body Confluence (CBC) theory and Williams fractal techniques.
Williams Fractals Dynamic Horizontal LinesWilliams Fractals with Dynamic Horizontal Lines
Overview
This script identifies Williams Fractals (support and resistance points) on any chart and automatically draws horizontal lines at those fractal levels.
The lines extend right and disappear when price breaks them — giving a clean and real-time view of key support and resistance levels.
Features
Detects upward fractals (potential resistances).
Detects downward fractals (potential supports).
Draws horizontal lines at each fractal point.
Automatically deletes a line when:
Price closes above a resistance.
Price closes below a support.
Clean and lightweight — minimal performance impact.
Inputs
Setting Description Default
Periods (n) Number of candles on each side required to confirm a fractal (minimum 2). 2
How It Works
Fractal Detection:
An up fractal is confirmed when a candle has the highest high compared to its neighbors.
A down fractal is confirmed when a candle has the lowest low compared to its neighbors.
Custom logic supports different "ties" — not just strict greater-than or less-than comparisons.
Drawing Lines:
When an up fractal is detected → a red horizontal resistance line is drawn.
When a down fractal is detected → a green horizontal support line is drawn.
Lines are drawn starting at the fractal candle and extend right across the chart.
Dynamic Line Deletion:
Every new candle is checked:
If high > resistance line → delete that resistance line.
If low < support line → delete that support line.
Only unbroken lines are kept on the chart, providing live, updated support/resistance zones.
Visual Elements
Up Fractal: 🡅 Triangular marker (teal color) above the fractal candle.
Down Fractal: 🡇 Triangular marker (red color) below the fractal candle.
Resistance Line: Red horizontal line.
Support Line: Green horizontal line.
Technical Details
Version: Pine Script v6
Arrays Used:
To store and manage active lines (line arrays).
To track the price associated with each line (float arrays).
Error Handling:
Backward iteration is handled using a while loop instead of a for loop to comply with Pine Script restrictions.
Offset Handling:
Fractal markers are plotted with an offset of -n bars for visual alignment.
Possible Enhancements (Future Ideas)
Sensitivity Settings: Allow a small margin (buffer) to define breakouts.
Extend Options: Let users choose between extending "infinite" or "limited" bars.
Custom Alerts: Generate alerts when fractal levels are broken.
Multi-timeframe Support: Detect fractals from higher timeframes on lower timeframe charts.
Example Usage
Swing Trading:
Use the fractal lines to identify and react to key breakouts or breakdowns dynamically.
Intraday Trading:
Spot live support/resistance on smaller timeframes for quick trades.
Trend Reversal Spotting:
Notice when a major fractal level is broken, possibly indicating trend changes.
Example Visual — Williams Fractals Dynamic Lines
Price Chart View:
What This Diagram Shows:
▲ Up Fractals:
Form resistance lines.
Line extends until price breaks above it.
▼ Down Fractals:
Form support lines.
Line extends until price breaks below it.
Lines are removed from the chart as soon as broken.
📈 Real Chart Example
Here's a rough idea how it will look live on your TradingView chart:
Feature Visual
Up Fractal 🔺 Green triangle above bar
Resistance Line ➖ Horizontal red line across the chart
Down Fractal 🔻 Red triangle below bar
Support Line ➖ Horizontal green line across the chart
Line Break 🚫 Line disappears when price crosses