Community

Free indicators and strategies with source code

522 community scripts written in Deepwick Script, a subset of Pine Script. Read the code, add any script to a crypto or CFD chart in one click, backtest the strategies with fees and next-bar fills, and turn their conditions into alerts.

522 public scripts

Publish your own →
strategy

Momentum Time-Series

Time-series momentum: long when the return over the lookback is positive, out when it turns negative. Hurst, Ooi and Pedersen document it across 67 markets since 1880; it is also the only anomaly in the corpus that worked in 8 of the 10 worst crises of the last century. - The lookback is the whole strategy. Measured on XAUUSD H1 with 27.3 M real Dukascopy ticks (Jan-Jul 2016, spread 2.94 bps): a 250-bar lookback gave Sharpe 1.60 (CAGR 1.6 %, max drawdown −9.7 %, 84 trades) and 120 bars gave Sharpe 1.47 (max drawdown −8.3 %, 87 trades). - 🚨 It is not monotonic, and the research says so. A 60-bar lookback lost money (Sharpe −0.69) and a 20-bar one was mostly noise (Sharpe 0.72, CAGR −3.6 %). 250 and 120 work; 60 and 20 do not. Do not shorten it because it feels slow. - 🚨 One asset, not a basket. This is time-series momentum on the instrument you are looking at. The cross-sectional version — buying the coins that went up — has Sharpe 0.67 with 96.5 % of its return in 20 of 2,360 days, and its 2025-26 holdout is Sharpe −1.20. It is a regime strategy dressed as an edge. - Run it on daily or 4h. A 120-bar lookback is five months on the hourly chart and five days on the daily one. On five-minute bars it is noise. - The costs are Dukascopy's, which is tighter than a real broker: add 1-2 bps for yours before reading the numbers as yours. - The default stop (0.75 %) and target (1.5 %) are the ones the measurement used. The research's own next step was to widen the stop and narrow the target to 1:1 — it was not re-measured, so it is not the default here.

indicator

Asian / London / NY Killzones

Asian / London / NY Killzones shade the chart background during the three classic institutional trading windows (UTC hours). - Asian: 00:00–08:00 UTC (default purple shade) — accumulation and range definition. - London: 08:00–13:00 UTC (default blue shade) — usually the cleanest breakouts. - New York: 13:00–20:00 UTC (default green shade) — high volume, frequent reversals at the London close. - Toggle each zone on/off via the input checkboxes; pick custom colours per zone. - Outside any session the background is grey to mark the dead-zone. - Default watch settings are tuned for FX and crypto (UTC hours); US equity sessions are in ET. - The LDN breakout/breakdown alerts fire when London takes out the prior 50-bar range — classic London open play. - Combine with the market-structure overlay to trade the first CHoCH inside each killzone.

indicator

Discount Array (OB Cluster)

Discount Array stacks the bottom boundaries of recent bullish order blocks below the current price. Mirror of the premium array. - Plot the most recent maxObs bullish OB bottoms. - A cluster of OBs in a tight band = the institutional long zone. - Combine with a discount filter (price below 50% range) for highest-probability longs. - Discount arrays are the canonical buy zone in an uptrend — price often returns to multiple stacked OBs before launching higher. - Sweeping the top of the array and reclaiming = high-conviction trend continuation. - Stacked discount arrays of 3+ OBs are the strongest demand reads. - The most recent OB is plotted with thicker line weight so it dominates visually. - Tapping the discount array alerts you to a possible long entry when paired with a bullish CHoCH.

indicator

Premium Array (OB Cluster)

Premium Array stacks the top boundaries of recent bearish order blocks above the current price. A dense cluster of equal-priced OBs is a high-probability short zone. - Plot the most recent maxObs bearish OB tops. - Use with an OB-touched signal for premium shorts. - Cluster of 3+ OBs in a tight band = the institutional short zone. - Premium arrays are the typical take-profit zone for shorts in a downtrend — price often taps multiple stacked OBs before reversing. - A sweep of the lowest box in the array is the most aggressive reversal trigger. - Triple-stacked premium arrays are rare and produce the largest reversals. - The most recent OB is plotted with thicker line weight so it dominates visually. - Tapping the premium array alerts you to a possible short entry when paired with a bearish CHoCH.

indicator

Mitigated Order Blocks

Mitigated Order Blocks — bullish OBs coloured grey once price trades back through them, signalling the zone has been 'mitigated' (used up). - Top/bottom lines drawn for extendBars after formation. - Green = live OB, grey = mitigated OB. - Use mitigated OBs as historical reference points for back-testing setups. - Mitigation = the OB has paid out; treat mitigated OBs as neutral levels. - A mitigated OB often becomes support/resistance on the other side of the chart. - Default extendBars of 50 is generous; lower it to 20 for tighter historical context. - The mitigated-state colour flips the moment a bar trades back through the OB bottom — instant feedback. - Use both bullish and bearish colour inputs to theme active and mitigated states distinctly.

indicator

Imbalance Zones

Imbalance Zones — permissive Fair Value Gaps (any 3-candle imbalance, no minimum size) so you see every unfilled area. - Green zone = bullish imbalance, red = bearish. - Optional minGapPct to suppress noise on instruments with micro-gaps. - Use when you want to see all imbalances, not just the SMC-grade ones. - Bullish imbalances below current price = demand; bearish imbalances above = supply. - Two adjacent imbalances in the same direction = 'conduit' — price moves straight through without pause. - Default minGapPct of 0 captures everything; raise to 0.1% to filter micro-gaps. - Use the colour inputs to theme bullish/bearish imbalances independently to match your chart palette. - The new-imbalance alert signals every fresh zone so you can chain entries on retests.

indicator

Liquidity Void

Liquidity Void highlights candles with very small wicks relative to their body — fast moves that leave unfilled areas price later re-balances. - Upper / lower line plot the candle's high/low for extendBars. - wickPct controls how small the wicks must be (smaller = stricter). - Look for voids that align with FVGs for high-probability fill trades. - Consecutive voids in the same direction = strong institutional flow. - A void candle that closes near its high/low (strong directional close) is more meaningful than a doji-shaped void. - Default wickPct of 0.1% catches only the most extreme voids; raise to 5% for more signals. - The stacked voids alert fires when two consecutive bars both qualify — strongest institutional momentum. - Direction-specific alerts let you follow one side of the flow without alerts from the other side.

●IND●IND●IND
indicator

Inducement Detector

Inducement Detector flags a small retracement into a fresh order block — the 'bait' smart money uses to flush out the before the real move. - Detects a small counter-trend move after a BOS in the opposite direction. - Marks the setup with a circle on the bar where the inducement completes. - Wait for price to leave the inducement zone with momentum. - Inducement + OB retest is one of the highest-probability SMC entry triggers. - A bullish inducement near a discount OB is the highest-quality long entry. - A bearish inducement near a premium OB is the highest-quality short entry. - Default swing = 5; works best on 1m–15m where inducements are frequent. - The wickRatio input controls how strict the 'small retracement' filter is — lower values for cleaner signals. - Streak alerts fire on consecutive inducements in the same direction.

▲BOS▲BOS▲CH▲BOS▲CH▲CH▲BOS▲CH▲BOS▲CH▼BOS▲BOS
indicator

Smart Money Concepts (All)

Smart Money Concepts (All-in-One) — BOS, CHOCH, bullish / bearish Order Blocks and Fair Value Gaps on a single overlay. - One config that combines the four most common SMC primitives. - Labels distinguish BOS (BOS), CHOCH (CH), bullish OB (BOB), bearish OB (SOB). - Best for traders who want the full SMC picture without stacking four scripts. - Each subsystem caps its own zone count so the chart never gets overwhelmed. - Use the colour inputs to match your chart theme and reduce visual clutter. - Pair with the premium / discount indicator for high-probability entries on OB retests. - The default 30-bar zone expiry keeps the chart clean; raise extendBars-equivalent for longer-lived zones. - Alert fires for every BOS, CHoCH, OB, and FVG formation so you can build automations on top.

loLabhiLabhiLabloLabhiLabloLabhiLabloLabhiLabloLabhiLabloLabhiLabhiLabloLab
indicator

Internal Structure

Internal Structure plots the swing pivots and stair-step structure line of the current timeframe only. (HTF overlay is parked until request.security() is available in the runtime.) - Plot shows HH/LH/HL/LL classification of every confirmed pivot. - Use on lower timeframes to read the micro-structure inside a higher-TF range. - Combine with the premium / discount indicator for cleaner entries. - Internal structure drives entries; HTF structure drives the bias. - When internal structure disagrees with HTF structure, take the HTF direction with internal entries. - Default swing = 5; raise to 10+ for cleaner internal structure on noisy instruments. - Alerts fire for every internal HH/LL/LH/HL classification so you can track micro-structure live. - Stack this indicator with a HTF structure overlay (separate chart) to read multi-TF confluence.

●●●●●●●●●●●●●●●
indicator

Swing High/Low Markers

Swing High / Low Markers — minimal labels on every confirmed pivot, no structure classification, no step line. - Cleanest possible swing visualisation — just H/L labels. - Use when your chart is already busy with other overlays and you only want the raw swings. - Same swing engine as the structure indicators above. - Default swing = 5; tweak to 3 for noisy markets and 10+ for clean charts. - The markers are intentionally delayed swing bars — no repaint mid-bar. - The 'tight swings' alert fires when both a swing high and low confirm within 5 bars of each other — strong compression. - Use the marker-shape input to switch between circle, diamond, and xcross for different visual styles.

LHHLHLHLHLHLHHL
indicator

Swing High/Low with Pivots

Swing pivots — confirmed swing highs and lows marked with H/L labels. Same engine as the ZigZag, but with explicit character labels. - swing controls how many bars each side of the pivot must dominate. - Lines persist using linebr style so you can see the stair-step of the market. - Use as the foundation for any structure-based system. - Toggle labels off if you only want the step-line. - Combine with the EQH/EQL overlays to highlight liquidity pools. - Default swing = 5 (works well on 1m–1h); raise to 10+ on daily charts for swing structure. - The stair-step line uses linebr style so the value holds steady until the next pivot prints. - Use the line-width input to match your chart's visual style.

indicator

Premium / Discount Zone

Premium / Discount Zone shades the chart background relative to the 50% midpoint of the recent swing range. - Above 50% = premium (red shade, look for shorts). - Below 50% = discount (green shade, look for longs). - Range derives from the rolling high / low over lookback bars. - The zone resets each time a new swing high or low is confirmed. - Pair with a directional CHoCH for the cleanest setups. - A 'premium sweep' that hits the swing high and reverses is the highest-probability short entry. - The 50% line is the 'equilibrium'; expect price to oscillate around it in ranging conditions. - Default lookback = 20 — captures the most recent 20-bar range. - The shaded background fills the area between the recent high and low for instant context.

◆EQL◆EQL
indicator

Equal Lows (EQL)

Equal Lows (EQL) — two consecutive confirmed swing lows within a percentage tolerance. Mirror of EQH. - Line extends forward from the EQL confluence. - tolerancePct controls the matching tolerance. - A clean sweep of an EQL is a textbook SMC reversal trigger. - The tighter the tolerance, the more precise the liquidity pool. - Triple EQLs are the classic 'stop run before reversal' setup. - A sweep of EQL plus a bullish CHoCH = highest-conviction long entry. - The EQL sweep alert fires when price takes out an EQL level and closes back above it. - For FX/instruments with high noise, raise tolerance to 1.0% to capture practical EQLs.

◆EQH◆EQH
indicator

Equal Highs (EQH)

Equal Highs (EQH) — two consecutive confirmed swing highs within a percentage tolerance. A classic liquidity pool that price loves to sweep before reversing. - A line connects the two highs; the line extends forward. - tolerancePct controls how 'equal' the two highs must be (default 0.5%). - Triangles mark the EQH confluence. - The tighter the tolerance, the more precise the liquidity pool. - Triple or quadruple equal highs (rare) are the strongest reversal triggers in SMC. - Combine with a sweep-low alert to catch the actual reversal entry. - Default swing = 5, tolerance = 0.5% — works well on most liquid instruments. - The sweep alert fires when price takes out an EQH level and closes back below it. - For FX/instruments with high noise, raise tolerance to 1.0% to capture practical EQHs.

▲markerText▲markerText▲markerText
indicator

Liquidity Sweeps (Lows)

Liquidity Sweeps (Lows) — a wick takes out the most recent swing low but the bar closes back above it. Bullish trap signal. - Triangle-up marker on the sweeping bar. - lookback controls swing low liveness. - Combine with bullish OB / FVG for high-conviction longs. - The deeper the wick beyond the swing low, the more liquidity taken, and the stronger the reversal tends to be. - A low sweep at a prior demand zone or OB is one of the cleanest long entries in SMC. - Multiple consecutive low sweeps without follow-through = ongoing absorption. - The deep-sweep alert flags sweeps that exceed the level by more than 1 ATR — strongest signal. - Default swing = 5, lookback = 20 — captures the most recent pivot low as the trigger.

▼markerText▼markerText▼markerText▼markerText
indicator

Liquidity Sweeps (Highs)

Liquidity Sweeps (Highs) — a wick takes out the most recent swing high but the bar closes back below it. Often marks the trap that precedes a reversal. - Triangle-down marker on the sweeping bar. - lookback controls how many bars back we still consider a swing high live. - Combine with bearish OB or FVG for high-conviction shorts. - A high-volume sweep of a strong resistance level is the highest-conviction short entry. - Multiple consecutive high sweeps without follow-through = ongoing distribution by sellers. - Default swing = 5, lookback = 20 — captures the most recent pivot high as the trigger. - The deep-sweep alert flags sweeps that exceed the level by more than 1 ATR — strongest signal. - Use the colour input to match your chart theme; default orange works on most backgrounds.

indicator

Fair Value Gaps (Both)

Fair Value Gaps (Bullish + Bearish) plotted together — every qualifying 3-candle imbalance is shaded in green (bull) or red (bear). - Combines bullish + bearish FVG logic in one overlay. - minGapPct filters tiny imbalances. - Quick visual map of all unfilled imbalances on the chart. - Bullish gaps are demand; bearish gaps are supply; both act as magnets when price returns. - Stacked gaps (multiple gaps in the same direction without overlap) are the strongest imbalance reads. - A clean fill of a stacked FVG is the highest-probability reversal trigger. - Two opposing FVGs in the same bar = inside-bar compression, often a precursor to an explosive move. - The wide FVG alerts flag exceptional imbalances that deserve extra attention.

indicator

Fair Value Gap (Bearish)

Bearish Fair Value Gap — mirror of the bullish FVG. Three-candle pattern where bar[0]'s wick sits above bar[2]'s wick with no overlap. - Red zone = top of bar[0] high to bottom of bar[2] low. - minGapPct filters out noise; extendBars controls zone lifetime. - Look for short entries on a retest into a premium zone. - Bearish FVGs are supply zones that price often retraces into before continuing lower. - The first retest of a fresh bearish FVG is the most common short entry in SMC. - A bearish FVG formed during a high-volume session is the highest-quality supply zone. - Stacked bearish FVGs without overlap are the strongest supply imbalance reads. - After the bearish FVG is filled, look for a CHoCH as a confirmation of trend reversal.

indicator

Fair Value Gap (Bullish)

Bullish Fair Value Gap — a 3-candle pattern where the wick of bar[2] sits above the wick of bar[0] with no overlap, leaving an imbalance institutions tend to revisit. - Green zone = top of bar[2] high to bottom of bar[0] low. - Optional minGapPct filter ignores tiny gaps (in % of price). - Pairs with a discount filter for long entries. - A bullish FVG + bullish OB confluence is the cleanest demand read on the chart. - Gaps on high-volatility sessions tend to get filled faster than gaps on quiet ones. - The default minGapPct of 0.1% filters out micro-gaps on most instruments; lower to 0% to see every imbalance. - Stacked bullish FVGs without overlap are the strongest demand imbalance reads. - Default extendBars of 30 keeps the zone live long enough for a typical retest.

indicator

Order Blocks (Both)

Order Blocks (Bullish + Bearish) on one chart — green zones are bullish OBs, red zones are bearish. - All bullish / bearish OB rules from earlier iterations combined. - Each zone extends for extendBars bars before expiring. - Best for clean multi-direction structure visualisation when both sides are active. - Confluence of a fresh BOS with a freshly-formed OB in the break direction is the canonical SMC entry model. - Use the colour inputs to match your chart theme; tweak transparency to layer multiple OBs cleanly. - The most-recent OBs dominate visually because they extend only extendBars bars; older ones expire naturally. - Each zone retest is signalled via the OB retested alert — set up a webhook for live entries. - Stack 2-3 of these overlays with different extendBars to see both fresh and historical OBs at once.

indicator

Order Blocks (Bearish)

Bearish Order Blocks mark the last bullish candle before a bearish break of structure — the mirror of bullish OBs. - Red zone = OB top/bottom; shaded fill shows the mitigation range. - Zones extend for extendBars bars; perfect for shorting into premium on a retracement. - Use in confluence with a CHOCH signal for highest probability. - A bearish OB that has never been revisited is a virgin OB and signals strong institutional supply. - After a bearish BOS, wait for a rally into the OB rather than chasing the breakdown. - Bearish OBs often align with the top of an FVG — confluence of both is the highest-conviction short entry. - Default lookback = 30 — searches the most recent 30 bars after the BOS for the trigger candle. - Mitigated bearish OBs (price closes above OB top) become supply turned support on the other side.

indicator

Order Blocks (Bullish)

Bullish Order Blocks mark the last bearish candle before a bullish break of structure — institutions typically entered long there, and price tends to retest the zone. - Green zone = OB top/bottom; shaded fill shows the mitigation range. - Zones extend for extendBars bars, then expire if price never returned. - Combine with a discount filter (below 50% of recent range) for highest-probability longs. - An OB that has never been revisited is called a virgin OB and is the most valuable. - After the BOS re-prices, wait for a pullback to the OB rather than chasing the break. - Default swing = 5, lookback = 30 — captures the most recent bearish candle before BOS. - Combine with an FVG detector for confluence — the OB + FVG stack is the institutional demand zone. - After the zone is mitigated (price closes below the OB bottom), treat the OB as invalid.

▲CHOCH▲CHOCH
indicator

Change of Character (CHOCH)

Change of Character (CHOCH) fires when price breaks structure against the prevailing trend — a higher low after a run of lower lows (bullish CHOCH) or a lower high after higher highs (bearish CHOCH). - Often the first sign of a trend reversal. - An optional confirmClose filter waits for the bar to close beyond the level. - Pairs well with order blocks and FVGs for reversal entries. - Different from BOS: CHoCH flips the trend bias, BOS continues it. - The most reliable reversal signal comes from pairing a CHOCH with a clean break of the trigger swing. - CHOCH + retest of the broken level = institutional entry trigger. - Default swing = 5; use higher swing on higher-timeframe charts for slower CHOCH signals. - A CHOCH followed by a BOS in the same direction = full trend flip, the highest-conviction reversal setup. - Toggle the labels off if you only want the trend-state in code.