pyogi24 Intraday Ichimoku + RSIcustom script to get entry exit
its based on the ichimoku cloud indicator
and the cross over of the leading ang lagging spans to get the signals,
its under development.
i have also integrated the vwap so we know the bias of the trend.
this should work on a trending day.
トレンド分析
Inversion Fair Value Gap Signals [AlgoAlpha]🟠 OVERVIEW
This script is a custom signal tool called Inversion Fair Value Gap Signals (IFVG) , designed to detect, track, and visualize fair value gaps (FVGs) and their inversions directly on price charts. It identifies bullish and bearish imbalances, monitors when these zones are mitigated or rejected, and extends them until resolution or expiration. What makes this script original is the inclusion of inversion logic—when a gap is filled, the area flips into an opposite "inversion fair value gap," creating potential reversal or continuation zones that give traders additional context beyond classic FVG analysis.
🟠 CONCEPTS
The script builds on the Smart Money Concepts (SMC) principle of fair value gaps, where inefficiencies form when price moves too quickly in one direction. Detection requires a three-bar sequence: a strong up or down move that leaves untraded price between bar highs and lows. To refine reliability, the script adds an ATR-based size filter and prevents overlap between zones. Once created, gaps are tracked in arrays until mitigation (price closing back into the gap), expiration, or transformation into an inversion zone. Inversions act as polarity flips, where bullish gaps become bearish resistance and bearish gaps become bullish support. Lower-timeframe volume data is also displayed inside zones to highlight whether buying or selling pressure dominated during gap creation.
🟠 FEATURES
Automatic detection of bullish and bearish FVGs with ATR-based thresholding.
Inversion logic: mitigated gaps flip into opposite-colored IFVG zones.
Volume text overlay inside each zone showing up vs down volume.
Visual markers (△/▽ for FVG, ▲/▼ for IFVG) when price exits a zone without mitigation.
🟠 USAGE
Apply the indicator to any chart and enable/disable bullish or bearish FVG detection depending on your focus. Use the colored gap zones as areas of interest: bullish gaps suggest possible continuation to the upside until mitigated, while bearish gaps suggest continuation down. When a gap flips into an inversion zone, treat it as potential support/resistance—bullish IFVGs below price may act as demand, while bearish IFVGs above price may act as supply. Watch the embedded up/down volume data to gauge the strength of participants during gap formation. Use the △/▽ and ▲/▼ markers to spot when price rejects gaps or inversions without filling them, which can indicate strong trending momentum. For practical use, combine alerts with your trade plan to track when new gaps form, when old ones are resolved, or when key zones flip into inversions, helping you align entries, targets, or reversals with institutional order flow logic.
Smart Money Support/Resistance — LiteSmart Money Support/Resistance — Lite
Overview & Methodology
This indicator identifies support and resistance as zones derived from concentrated buying and selling pressure, rather than relying solely on traditional swing highs/lows. Its design focuses on transparency: how data is sourced, how zones are computed, and how the on‑chart display should be interpreted.
Lower‑Timeframe (LTF) Data
The script requests Up Volume, Down Volume, and Volume Delta from a lower timeframe to expose intrabar order‑flow structure that the chart’s native timeframe cannot show. In practical terms, this lets you see where buyers or sellers briefly dominated inside the body of a higher‑timeframe bar.
bool use_custom_tf_input = input.bool(true, title="Use custom lower timeframe", tooltip="Override the automatically chosen lower timeframe for volume calculations.", group=grpVolume)
string custom_tf_input = input. Timeframe("1", title="Lower timeframe", tooltip="Lower timeframe used for up/down volume calculations (default 5 seconds).", group=grpVolume)
import TradingView/ta/10 as tvta
resolve_lower_tf(useCustom, customTF) =>
useCustom ? customTF :
timeframe.isseconds ? "1S" :
timeframe.isintraday ? "1" :
timeframe.isdaily ? "5" : "60"
get_up_down_volume(lowerTf) =>
= tvta.requestUpAndDownVolume(lowerTf)
var float upVolume = na
var float downVolume = na
var float deltaVolume = na
string lower_tf = resolve_lower_tf(use_custom_tf_input, custom_tf_input)
= get_up_down_volume(lower_tf)
upVolume := u_tmp
downVolume := d_tmp
deltaVolume := dl_tmp
• Data source: TradingView’s ta.requestUpAndDownVolume(lowerTf) via the official TA library.
• Plan capabilities: higher‑tier subscriptions unlock seconds‑based charts and allow more historical bars per chart. This expands both the temporal depth of LTF data and the precision of short‑horizon analysis, while base tiers provide minute‑level data suitable for day/short‑swing studies.
• Coverage clarity: a small on‑chart Coverage Panel reports the active lower timeframe, the number of bars covered, and the latest computed support/resistance ranges so you always know the bounds of valid LTF input.
Core Method
1) Data acquisition (LTF)
The script retrieves three series from the chosen lower timeframe:
– Up Volume (buyers)
– Down Volume (sellers)
– Delta (Up – Down)
2) Rolling window & extrema
Over a user‑defined lookback (Global Volume Period), the algorithm builds rolling arrays of completed bars and scans for extrema:
– Buyers_max / Buyers_min from Up Volume
– Sellers_max / Sellers_min from Down Volume
Only completed bars are considered; the current bar is excluded for stability.
3) Price mapping
The extrema are mapped back to their source candles to obtain price bounds:
– For “maximum” roles the algorithm uses the relevant candle highs.
– For “minimum” roles it uses the relevant candle lows.
These pairs define candidate resistance (max‑based) and support (min‑based) zones or vice versa.
4) Zone construction & minimum width
To ensure practicality on all symbols, zones enforce a minimum vertical thickness of two ticks. This prevents visually invisible or overly thin ranges on instruments with tight ticks.
5) Vertical role resolution
When both max‑ and min‑based zones exist, the script compares their midpoints. If, due to local price structure, the min‑based zone sits above the max‑based zone, display roles are swapped so the higher zone is labeled Resistance and the lower zone Support. Colors/widths are updated accordingly to keep the visual legend consistent.
6) Rendering & panel
Two horizontal lines and a filled box represent each active zone. The Coverage Panel (bottom‑right by default) prints:
– Lower‑timeframe in use
– Number of bars covered by LTF data
– Current Support and Resistance ranges
If the two zones overlap, an additional “Range Market” note is shown.
Key Inputs
• Global Volume Period: shared lookback window for the extrema search.
• Lower timeframe: user‑selectable override of the automatically resolved lower timeframe.
• Visualization toggles: independent show/hide controls and colors for maximum (resistance) and minimum (support) zones.
• Coverage Panel: enable/disable the single‑cell table and its readout.
Operational Notes
• The algorithm aligns all lookups to completed bars (no peeking). Price references are shifted appropriately to avoid using the still‑forming bar in calculations.
• Second‑based lower timeframes improve granularity for scalping and very short‑term entries. Minute‑based lower timeframes provide broader coverage for intraday and short‑swing contexts.
• Use the Coverage Panel to confirm the true extent of available LTF history on your symbol/plan before drawing conclusions from very deep lookbacks.
Visual Walkthrough
A step‑by‑step image sequence accompanies this description. Each figure demonstrates how the indicator reads LTF volume, locates extrema, builds price‑mapped zones, and updates labels/colors when vertical order requires it.
Chart Interpretation
This chart illustrates two distinct perspectives of the Smart Money Support/Resistance — Lite indicator, each derived from different lookback horizons and lower-timeframe (LTF) resolutions.
1- Short-term view (43 bars, 10-second LTF)
Using the most recent 43 completed bars with 10-second intrabar data, the algorithm detects that both maximum and minimum volume extrema fall within a narrow range. The result is a clearly identified range market: resistance between 178.15–184.55 and support between 175.02–179.38.
The Coverage Panel (bottom-right) confirms the scope of valid input: the lower timeframe used, number of bars covered, and the resulting zones. This short-term scan highlights how the indicator adapts to limited data depth, flagging sideways structure where neither side dominates.
2 - Long-term view (120 bars, 30-second LTF)
Over a wider 120-bar lookback with higher-granularity 30-second data, broader supply and demand zones emerge.
– The long-term resistance zone captures the concentration of buyers and sellers at the upper boundary of recent price history.
– The long-term support zone anchors to the opposite side of the distribution, derived from maxima and minima of both buying and selling pressure.
These zones reflect deeper structural levels where market participants previously committed significant volume.
Combined Perspective
By aligning the short-term and long-term outputs, the chart shows how the indicator distinguishes immediate consolidation (range market) from more durable support and resistance levels derived from extended history. This dual resolution approach makes clear that support and resistance are not static lines but dynamic zones, dependent on both timeframe depth and the resolution of intrabar volume data.
Multi-Oscillator Adaptive Kernel with MomentumMulti-Oscillator Adaptive Kernel w. Momentum
An adaptation of the indicator by AlphaAlgos : Multi-Oscillator-Adaptive-Kernel (MOAK) with Divergence . Please find the description of the indicator in the above link.
Apart from adding labels to show trend/momentum changes, the following changes have been made to the original script:
1. Sensitivity is used in the computation to scale the fast MOAK signal,
2. Selection between two indicator modes:
Trending - (the original script method) assesses whether smoothed MOAK is above/below 0 - for up/down trends respectively.
Momentum - assesses whether the fast MOAK signal is above/below the smoothed MOAK, and can be used to indicate potential trend reversals as momentum of current trend fades.
Best MA Finder: Sharpe/Sortino ScannerThis script, Best MA Finder: Sharpe/Sortino Scanner, is a tool designed to identify the moving average (SMA or EMA) that best acts as a dynamic trend threshold on a chart, based on risk-adjusted historical performance. It scans a wide range of MA lengths (SMA or EMA) and selects the one whose simple price vs MA crossover delivered the strongest results using either the Sharpe ratio or the Sortino ratio. Reading it is intuitive: when price spent time above the selected MA, conditions were on average more favorable in the backtest; below, less favorable. It is a trend and risk gauge, not an overbought or oversold signal.
What it does:
- Runs individual long-only crossover backtests for many MA lengths across short to very long horizons.
- For each length, measures the total number of trades, the annualized Sharpe ratio, and the annualized Sortino ratio.
- Uses the chosen metric value (Sharpe or Sortino) as the score to rank candidates.
- Applies a minimum trade filter to discard statistically weak results.
- Optionally applies a local stability filter to prefer a length that also outperforms its close neighbors by at least a small margin.
- Selects the optimal MA and displays it on the chart with a concise summary table.
How to use it:
- Choose MA type: SMA or EMA.
- Choose the metric: Sharpe or Sortino.
- Set the minimum trade count to filter out weak samples.
- Select the risk-free mode:
Auto: uses a short-term risk-free rate for USD-priced symbols when available.
Manual: you provide a risk-free ticker.
None: no risk-free rate.
- Optionally enable stability controls: neighbor radius and epsilon.
- Toggle the on-chart summary table as needed.
On-chart output:
- The selected optimal MA is plotted.
- The optional table shows MA length, number of trades, chosen metric value annualized, and the annual risk-free rate used.
Key features:
- Risk-adjusted optimization via Sharpe or Sortino for fair, comparable assessment.
- Broad MA scan with SMA and EMA support.
- Optional stability filter to avoid one-off spikes.
- Clear and auditable presentation directly on the chart.
Use cases:
- Traders who want a defensible, data-driven trend threshold without manual trial and error.
- Swing and trend-following workflows across timeframes and asset classes.
- Quick SMA vs EMA comparisons using risk-adjusted results.
Limitations:
- Not a full trading strategy with position sizing, costs, funding, slippage, or stops.
- Long-only, one position at a time.
- Discrete set of MA lengths, not a continuous optimizer.
- Requires sufficient price history and, if used, a reliable risk-free series.
This script is open-source and built from original logic. It does not replicate closed-source scripts or reuse significant external components.
Z-Score Trend Channels [BackQuant]Z-Score Trend Channels
A self-contained price-statistics framework that turns a rolling z-score into price channels, bias states, and trade markers. Run either trend-following or mean-reversion from the same tool with clear, on-chart context.
What it is
A rolling statistical map that measures how far price is from its recent average in standard-deviation units (z-score).
Adaptive channels drawn in price space from fixed z thresholds, so the rails breathe with volatility.
A simple trend proxy from z-score momentum to separate trending from ranging conditions.
On-chart signals for pullback entries, stretched extremes, and practical exits.
Core idea (plain English math)
Rolling mean and volatility - Over a lookback you get the average price and its standard deviation.
Z-score - How many standard deviations the current price is above or below its average: z = (price - mean) / stdev. z near 0 means near average; positive is above; negative is below.
Noise control - An EMA smooths the raw z to reduce jitter and false flickers.
Channels back in price - Fixed z levels are converted back to price to form the upper, lower, and extreme rails.
Trend proxy - A smoothed change in z is used as a lightweight trend-strength line. Positive strength with positive z favors uptrend; negative strength with negative z favors downtrend.
What you see on the chart
Channels and fills - Mean, upper, lower, and optional extreme lines. The area mean->upper tints with the bearish color, mean->lower tints with the bullish color.
Background tint (optional) - Soft green, red, or neutral based on detected trend state.
Signals - Bullish Entry (triangle up) when z exits the oversold zone upward; Bearish Entry (triangle down) when z exits the overbought zone downward; Extreme markers (diamonds) at the extreme bands with a one-bar turn.
Table - Current z, trend state, trend strength, distance to bands, market state tag, and a quick volatility regime label.
Edge labels - MEAN, OB, and OS labels slightly projected forward with level values.
Inputs you will actually use
Z-Score Period - Lookback for mean and stdev. Larger = slower and steadier rails, smaller = more reactive.
Smoothing Period - EMA on z. Lower = earlier but choppier flips; higher = later but cleaner.
Price Source - Default hlc3. Choose close if you prefer session-close logic.
Upper and Lower Thresholds - Default around +2.0 and -2.0. Tighten for more signals, widen for fewer and stronger.
Extreme Upper and Lower - Deeper stretch guards, e.g., +/- 2.5.
Strength Period - EMA on z momentum. Sets how fast the trend proxy flips.
Trend Threshold - Minimum absolute z to accept a directional bias.
Visual toggles - Channels, signals, background tint, stats table, colors, and optional last-bar trend label.
How to use it: trend-following playbook
Read the state - Uptrend when z > Trend Threshold and trend strength > 0. Downtrend when z < -Trend Threshold and trend strength < 0. Neutral otherwise.
Entries - In an uptrend, prefer Bullish Entry signals that fire near the lower channel. In a downtrend, prefer Bearish Entry signals that fire near the upper channel.
Stops - Conservative: beyond the extreme channel on your side. Tighter: just outside the standard band that framed the signal.
Exits - For longs, exit or trim on a cross back through z = 0 or a clean tag of the upper threshold. For shorts, mirror with z = 0 up-cross or tag of the lower threshold. You can also reduce if trend strength flips against you.
Adds - In strong trends, additional signals near your side’s band can be add points. Avoid adding once z hovers near the opposite band for several bars.
How to use it: mean-reversion playbook
Find stretch - Standard reversions: Bullish Entry when z leaves the oversold zone upward; Bearish Entry when z leaves the overbought zone downward. Aggressive reversions: Extreme markers at extreme bands with a one-bar turn.
Entries - Take the signal as price exits the zone. Prefer setups where trend strength is near zero or tilting against the prior push.
Targets - First target is the mean line. A runner can aim for the opposite standard channel if momentum keeps flipping.
Stops - Outside the extreme band beyond your entry. If fading without extremes, place risk just beyond the opposite standard band.
Filters - Optional: skip counter-trend fades against a very strong trend state unless your risk is tight and predefined.
Reading the stats table
Current Z-Score - Magnitude and sign of displacement now.
Trend State - Uptrend, Downtrend, or Ranging.
Trend Strength - Smoothed z momentum. Higher absolute values imply stronger directional conviction.
Distance to Upper/Lower - Percent distance from price to each band, useful for sizing targets or judging room left.
Market State - Overbought, Oversold, Extreme OB, Extreme OS, or Normal.
Volatility Regime - High, Normal, or Low relative to recent distribution. Expect bands to widen in High and tighten in Low.
Parameter guidance (conceptual)
Z-Score Period - Choose longer for a structural mean, shorter for a reactive mean.
Smoothing Period - Lower for earlier but noisier reads; higher for slower but steadier reads.
Thresholds - Start around +/- 2.0. Tighten for scalping or quiet ranges. Widen for noisy or fast markets.
Trend Threshold and Strength Period - Raise to avoid weak, transient bias. Lower to capture earlier regime shifts.
Practical examples
Trend pullback long - State shows Uptrend. Price tests the lower channel; z dips near or below the lower threshold; a Bullish Entry prints. Stop just below extreme lower; first target mean; keep a runner if trend strength stays positive.
Mean-revert short - State is Ranging. z tags the extreme upper, an Extreme Bearish marker prints, then a Bearish Entry prints on the leave. Stop above extreme upper; target the mean; consider a runner toward the lower channel if strength turns negative.
Potential Questions you might have
Why z-score instead of fixed offsets - Because the bands adapt with volatility. When the tape gets quiet the rails tighten, when it runs hot the rails expand. Your entries stay normalized.
Do I need both modes - No. Many users run only trend pullbacks or only mean-reversions. The tool lets you toggle what you need and keep the chart readable.
Multi-timeframe workflow - A common approach is to set bias from a higher timeframe’s trend state and execute on a lower timeframe’s signals that align with it.
Summary
Z-Score Trend Channels gives you an adaptive mean, volatility-aware rails, a simple trend lens, and clear signals. Trade the trend by buying pullbacks in green and selling pullbacks in red, or fade stretched extremes back to the mean with defined risk. One framework, two strategies, consistent logic.
Delta Volume Signals by Claudio [hapharmonic]Modifications:
Percentages without decimals.
I replaced the 'Current Volume' row with two boxes: "Δ Vol" and its value, which changes color depending on the direction of the bearish/bullish candle.
Signals can change color in the settings.
Box spacing so the table doesn't constantly change size.
To be modified:
The Net Volume sign shouldn't change to negative when the candle is red.
If anyone does this, let me know...
claudio.ventola@hotmail.com
Best regards!
Trend Fib Zone Bounce (TFZB) [KedArc Quant]Description:
Trend Fib Zone Bounce (TFZB) trades with the latest confirmed Supply/Demand zone using a single, configurable Fib pullback (0.3/0.5/0.6). Trade only in the direction of the most recent zone and use a single, configurable fib level for pullback entries.
• Detects market structure via confirmed swing highs/lows using a rolling window.
• Draws Supply/Demand zones (bearish/bullish rectangles) from the latest MSS (CHOCH or BOS) event.
• Computes intra zone Fib guide rails and keeps them extended in real time.
• Triggers BUY only inside bullish zones and SELL only inside bearish zones when price touches the selected fib and closes back beyond it (bounce confirmation).
• Optional labels print BULL/BEAR + fib next to the triangle markers.
What it does
Finds structure using confirmed swing highs/lows (you choose the confirmation length).
Builds the latest zone (bullish = demand, bearish = supply) after a CHOCH/BOS event.
Draws intra-zone “guide rails” (Fib lines) and extends them live.
Signals only with the trend of that zone:
BUY inside a bullish zone when price tags the selected Fib and closes back above it.
SELL inside a bearish zone when price tags the selected Fib and closes back below it.
Optional labels print BULL/BEAR + Fib next to triangles for quick context
Why this is different
Most “zone + fib + signal” tools bolt together several indicators, or fire counter-trend signals because they don’t fully respect structure. TFZB is intentionally minimal:
Single bias source: the latest confirmed zone defines direction; nothing else overrides it.
Single entry rule: one Fib bounce (0.3/0.5/0.6 selectable) inside that zone—no counter-trend trades by design.
Clean visuals: you can show only the most recent zone, clamp overlap, and keep just the rails that matter.
Deterministic & transparent: every plot/label comes from the code you see—no external series or hidden smoothing
How it helps traders
Cuts decision noise: you always know the bias and the only entry that matters right now.
Forces discipline: if price isn’t inside the active zone, you don’t trade.
Adapts to volatility: pick 0.3 in strong trends, 0.5 as the default, 0.6 in chop.
Non-repainting zones: swings are confirmed after Structure Length bars, then used to build zones that extend forward (they don’t “teleport” later)
How it works (details)
*Structure confirmation
A swing high/low is only confirmed after Structure Length bars have elapsed; the dot is plotted back on the original bar using offset. Expect a confirmation delay of about Structure Length × timeframe.
*Zone creation
After a CHOCH/BOS (momentum shift / break of prior swing), TFZB draws the new Supply/Demand zone from the swing anchors and sets it active.
*Fib guide rails
Inside the active zone TFZB projects up to five Fib lines (defaults: 0.3 / 0.5 / 0.7) and extends them as time passes.
*Entry logic (with-trend only)
BUY: bar’s low ≤ fib and close > fib inside a bullish zone.
SELL: bar’s high ≥ fib and close < fib inside a bearish zone.
*Optionally restrict to one signal per zone to avoid over-trading.
(Optional) Aggressive confirm-bar entry
When do the swing dots print?
* The code confirms a swing only after `structureLen` bars have elapsed since that candidate high/low.
* On a 5-min chart with `structureLen = 10`, that’s about 50 minutes later.
* When the swing confirms, the script plots the dot back on the original bar (via `offset = -structureLen`). So you *see* the dot on the old bar, but it only appears on the chart once the confirming bar arrives.
> Practical takeaway: expect swing markers to appear roughly `structureLen × timeframe` later. Zones and signals are built from those confirmed swings.
Best timeframe for this Indicator
Use the timeframe that matches your holding period and the noise level of the instrument:
* Intraday :
* 5m or 15m are the sweet spots.
* Suggested `structureLen`:
* 5m: 10–14 (confirmation delay \~50–70 min)
* 15m: 8–10 (confirmation delay \~2–2.5 hours)
* Keep Entry Fib at 0.5 to start; try 0.3 in strong trends, 0.6 in chop.
* Tip: avoid the first 10–15 minutes after the open; let the initial volatility set the early structure.
* Swing/overnight:
* 1h or 4h.
* `structureLen`:
* 1h: 6–10 (6–10 hours confirmation)
* 4h: 5–8 (20–32 hours confirmation)
* 1m scalping: not recommended here—the confirmation lag relative to the noise makes zones less reliable.
Inputs (all groups)
Structure
• Show Swing Points (structureTog)
o Plots small dots on the bar where a swing point is confirmed (offset back by Structure Length).
• Structure Length (structureLen)
o Lookback used to confirm swing highs/lows and determine local structure. Higher = fewer, stronger swings; lower = more reactive.
Zones
• Show Last (zoneDispNum)
o Maximum number of zones kept on the chart when Display All Zones is off.
• Display All Zones (dispAll)
o If on, ignores Show Last and keeps all zones/levels.
• Zone Display (zoneFilter): Bullish Only / Bearish Only / Both
o Filters which zone types are drawn and eligible for signals.
• Clean Up Level Overlap (noOverlap)
o Prevents fib lines from overlapping when a new zone starts near the previous one (clamps line start/end times for readability).
Fib Levels
Each row controls whether a fib is drawn and how it looks:
• Toggle (f1Tog…f5Tog): Show/hide a given fib line.
• Level (f1Lvl…f5Lvl): Numeric ratio in . Defaults active: 0.3, 0.5, 0.7 (0 and 1 off by default).
• Line Style (f1Style…f5Style): Solid / Dashed / Dotted.
• Bull/Bear Colors (f#BullColor, f#BearColor): Per-fib color in bullish vs bearish zones.
Style
• Structure Color: Dot color for confirmed swing points.
• Bullish Zone Color / Bearish Zone Color: Rectangle fills (transparent by default).
Signals
• Entry Fib for Signals (entryFibSel): Choose 0.3, 0.5 (default), or 0.6 as the trigger line.
• Show Buy/Sell Signals (showSignals): Toggles triangle markers on/off.
• One Signal Per Zone (oneSignalPerZone): If on, suppresses additional entries within the same zone after the first trigger.
• Show Signal Text Labels (Bull/Bear + Fib) (showSignalLabels): Adds a small label next to each triangle showing zone bias and the fib used (e.g., BULL 0.5 or BEAR 0.3).
How TFZB decides signals
With trend only:
• BUY
1. Latest active zone is bullish.
2. Current bar’s close is inside the zone (between top and bottom).
3. The bar’s low ≤ selected fib and it closes > selected fib (bounce).
• SELL
1. Latest active zone is bearish.
2. Current bar’s close is inside the zone.
3. The bar’s high ≥ selected fib and it closes < selected fib.
Markers & labels
• BUY: triangle up below the bar; optional label “BULL 0.x” above it.
• SELL: triangle down above the bar; optional label “BEAR 0.x” below it.
Right-Panel Swing Log (Table)
What it is
A compact, auto-updating log of the most recent Swing High/Low events, printed in the top-right of the chart.
It helps you see when a pivot formed, when it was confirmed, and at what price—so you know the earliest bar a zone-based signal could have appeared.
Columns
Type – Swing High or Swing Low.
Date – Calendar date of the swing bar (follows the chart’s timezone).
Swing @ – Time of the original swing bar (where the dot is drawn).
Confirm @ – Time of the bar that confirmed that swing (≈ Structure Length × timeframe after the swing). This is also the earliest moment a new zone/entry can be considered.
Price – The swing price (high for SH, low for SL).
Why it’s useful
Clarity on repaint/confirmation: shows the natural delay between a swing forming and being usable—no guessing.
Planning & journaling: quick reference of today’s pivots and prices for notes/backtesting.
Scanning intraday: glance to see if you already have a confirmed zone (and therefore valid fib-bounce entries), or if you’re still waiting.
Context for signals: if a fib-bounce triangle appears before the time listed in Confirm @, it’s not a valid trade (you were too early).
Settings (Inputs → Logging)
Log swing times / Show table – turn the table on/off.
Rows to keep – how many recent entries to display.
Show labels on swing bar – optional tags on the chart (“Swing High 11:45”, “Confirm SH 14:15”) that match the table.
Recommended defaults
• Structure Length: 10–20 for intraday; 20–40 for swing.
• Entry Fib for Signals: 0.5 to start; try 0.3 in stronger trends and 0.6 in choppier markets.
• One Signal Per Zone: ON (prevents over trading).
• Zone Display: Both.
• Fib Lines: Keep 0.3/0.5/0.7 on; turn on 0 and 1 only if you need anchors.
Alerts
Two alert conditions are available:
• BUY signal – fires when a with trend bullish bounce at the selected fib occurs inside a bullish zone.
• SELL signal – fires when a with trend bearish bounce at the selected fib occurs inside a bearish zone.
Create alerts from the chart’s Alerts panel and select the desired condition. Use Once Per Bar Close to avoid intrabar flicker.
Notes & tips
• Swing dots are confirmed only after Structure Length bars, so they plot back in time; zones built from these confirmed swings do not repaint (though they extend as new bars form).
• If you don’t see a BUY where you expect one, check: (1) Is the active zone bullish? (2) Did the candle’s low actually pierce the selected fib and close above it? (3) Is One Signal Per Zone suppressing a second entry?
• You can hide visual clutter by reducing Show Last to 1–3 while keeping Display All Zones off.
Glossary
• CHOCH (Change of Character): A shift where price breaks beyond the last opposite swing while local momentum flips.
• BOS (Break of Structure): A cleaner break beyond the prior swing level in the current momentum direction.
• MSS: Either CHOCH or BOS – any event that spawns a new zone.
Extension ideas (optional)
• Add fib extensions (1.272 / 1.618) for target lines.
• Zone quality score using ATR normalization to filter weak impulses.
• HTF filter to only accept zones aligned with a higher timeframe trend.
⚠️ Disclaimer This script is provided for educational purposes only.
Past performance does not guarantee future results.
Trading involves risk, and users should exercise caution and use proper risk management when applying this strategy.
Volume Delta Volume Signals by Claudio [hapharmonic]// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org
// © hapharmonic
//@version=6
FV = format.volume
FP = format.percent
indicator('Volume Delta Volume Signals by Claudio ', format = FV, max_bars_back = 4999, max_labels_count = 500)
//------------------------------------------
// Settings |
//------------------------------------------
bool usecandle = input.bool(true, title = 'Volume on Candles',display=display.none)
color C_Up = input.color(#12cef8, title = 'Volume Buy', inline = ' ', group = 'Style')
color C_Down = input.color(#fe3f00, title = 'Volume Sell', inline = ' ', group = 'Style')
// ✅ Nueva entrada para colores de señales
color buySignalColor = input.color(color.new(color.green, 0), "Buy Signal Color", group = "Signals")
color sellSignalColor = input.color(color.new(color.red, 0), "Sell Signal Color", group = "Signals")
string P_ = input.string(position.top_right,"Position",options = ,
group = "Style",display=display.none)
string sL = input.string(size.small , 'Size Label', options = , group = 'Style',display=display.none)
string sT = input.string(size.normal, 'Size Table', options = , group = 'Style',display=display.none)
bool Label = input.bool(false, inline = 'l')
History = input.bool(true, inline = 'l')
// Inputs for EMA lengths and volume confirmation
bool MAV = input.bool(true, title = 'EMA', group = 'EMA')
string volumeOption = input.string('Use Volume Confirmation', title = 'Volume Option', options = , group = 'EMA',display=display.none)
bool useVolumeConfirmation = volumeOption == 'none' ? false : true
int emaFastLength = input(12, title = 'Fast EMA Length', group = 'EMA',display=display.none)
int emaSlowLength = input(26, title = 'Slow EMA Length', group = 'EMA',display=display.none)
int volumeConfirmationLength = input(6, title = 'Volume Confirmation Length', group = 'EMA',display=display.none)
string alert_freq = input.string(alert.freq_once_per_bar_close, title="Alert Frequency",
options= ,group = "EMA",
tooltip="If you choose once_per_bar, you will receive immediate notifications (but this may cause interference or indicator repainting).
However, if you choose once_per_bar_close, it will wait for the candle to confirm the signal before notifying.",display=display.none)
//------------------------------------------
// UDT_identifier |
//------------------------------------------
type OHLCV
float O = open
float H = high
float L = low
float C = close
float V = volume
type VolumeData
float buyVol
float sellVol
float pcBuy
float pcSell
bool isBuyGreater
float higherVol
float lowerVol
color higherCol
color lowerCol
//------------------------------------------
// Calculate volumes and percentages |
//------------------------------------------
calcVolumes(OHLCV ohlcv) =>
var VolumeData data = VolumeData.new()
data.buyVol := ohlcv.V * (ohlcv.C - ohlcv.L) / (ohlcv.H - ohlcv.L)
data.sellVol := ohlcv.V - data.buyVol
data.pcBuy := data.buyVol / ohlcv.V * 100
data.pcSell := 100 - data.pcBuy
data.isBuyGreater := data.buyVol > data.sellVol
data.higherVol := data.isBuyGreater ? data.buyVol : data.sellVol
data.lowerVol := data.isBuyGreater ? data.sellVol : data.buyVol
data.higherCol := data.isBuyGreater ? C_Up : C_Down
data.lowerCol := data.isBuyGreater ? C_Down : C_Up
data
//------------------------------------------
// Get volume data |
//------------------------------------------
ohlcv = OHLCV.new()
volData = calcVolumes(ohlcv)
// Plot volumes and create labels
plot(ohlcv.V, color=color.new(volData.higherCol, 90), style=plot.style_columns, title='Total',display = display.all - display.status_line)
plot(ohlcv.V, color=volData.higherCol, style=plot.style_stepline_diamond, title='Total2', linewidth = 2,display = display.pane)
plot(volData.higherVol, color=volData.higherCol, style=plot.style_columns, title='Higher Volume', display = display.all - display.status_line)
plot(volData.lowerVol , color=volData.lowerCol , style=plot.style_columns, title='Lower Volume',display = display.all - display.status_line)
S(D,F)=>str.tostring(D,F)
volStr = S(math.sign(ta.change(ohlcv.C)) * ohlcv.V, FV)
buyVolStr = S(volData.buyVol , FV )
sellVolStr = S(volData.sellVol , FV )
// ✅ MODIFICACIÓN: Porcentaje sin decimales
buyPercentStr = str.tostring(math.round(volData.pcBuy)) + " %"
sellPercentStr = str.tostring(math.round(volData.pcSell)) + " %"
totalbuyPercentC_ = volData.buyVol / (volData.buyVol + volData.sellVol) * 100
sup = not na(ohlcv.V)
if sup
TC = text.align_center
CW = color.white
var table tb = table.new(P_, 6, 6, bgcolor = na, frame_width = 2, frame_color = chart.fg_color, border_width = 1, border_color = CW)
tb.cell(0, 0, text = 'Volume Candles', text_color = #FFBF00, bgcolor = #0E2841, text_halign = TC, text_valign = TC, text_size = sT)
tb.merge_cells(0, 0, 5, 0)
tb.cell(0, 1, text = 'Current Volume', text_color = CW, bgcolor = #0B3040, text_halign = TC, text_valign = TC, text_size = sT)
tb.merge_cells(0, 1, 1, 1)
tb.cell(0, 2, text = 'Buy', text_color = #000000, bgcolor = #92D050, text_halign = TC, text_valign = TC, text_size = sT)
tb.cell(1, 2, text = 'Sell', text_color = #000000, bgcolor = #FF0000, text_halign = TC, text_valign = TC, text_size = sT)
tb.cell(0, 3, text = buyVolStr, text_color = CW, bgcolor = #074F69, text_halign = TC, text_valign = TC, text_size = sT)
tb.cell(1, 3, text = sellVolStr, text_color = CW, bgcolor = #074F69, text_halign = TC, text_valign = TC, text_size = sT)
tb.cell(0, 5, text = 'Net: ' + volStr, text_color = CW, bgcolor = #074F69, text_halign = TC, text_valign = TC, text_size = sT)
tb.merge_cells(0, 5, 1, 5)
tb.cell(0, 4, text = buyPercentStr, text_color = CW, bgcolor = #074F69, text_halign = TC, text_valign = TC, text_size = sT)
tb.cell(1, 4, text = sellPercentStr, text_color = CW, bgcolor = #074F69, text_halign = TC, text_valign = TC, text_size = sT)
cellCount = 20
filledCells = 0
for r = 5 to 1 by 1
for c = 2 to 5 by 1
if filledCells < cellCount * (totalbuyPercentC_ / 100)
tb.cell(c, r, text = '', bgcolor = C_Up)
else
tb.cell(c, r, text = '', bgcolor = C_Down)
filledCells := filledCells + 1
filledCells
if Label
sp = ' '
l = label.new(bar_index, ohlcv.V,
text=str.format('Net: {0} Buy: {1} ({2}) Sell: {3} ({4}) {5}/\ {5}l {5}l',
volStr, buyVolStr, buyPercentStr, sellVolStr, sellPercentStr, sp),
style=label.style_none, textcolor=volData.higherCol, size=sL, textalign=text.align_left)
if not History
(l ).delete()
//------------------------------------------
// Draw volume levels on the candlesticks |
//------------------------------------------
float base = na,float value = na
bool uc = usecandle and sup
if volData.isBuyGreater
base := math.min(ohlcv.O, ohlcv.C)
value := base + math.abs(ohlcv.O - ohlcv.C) * (volData.pcBuy / 100)
else
base := math.max(ohlcv.O, ohlcv.C)
value := base - math.abs(ohlcv.O - ohlcv.C) * (volData.pcSell / 100)
barcolor(sup ? color.new(na, na) : ohlcv.C < ohlcv.O ? color.red : color.green,display = usecandle? display.all:display.none)
UseC = uc ? volData.higherCol:color.new(na, na)
plotcandle(uc?base:na, uc?base:na, uc?value:na, uc?value:na,
title='Body', color=UseC, bordercolor=na, wickcolor=UseC,
display = usecandle ? display.all - display.status_line : display.none, force_overlay=true,editable=false)
plotcandle(uc?ohlcv.O:na, uc?ohlcv.H:na, uc?ohlcv.L:na, uc?ohlcv.C:na,
title='Fill', color=color.new(UseC,80), bordercolor=UseC, wickcolor=UseC,
display = usecandle ? display.all - display.status_line : display.none, force_overlay=true,editable=false)
//------------------------------------------------------------
// Plot the EMA and filter out the noise with volume control. |
//------------------------------------------------------------
float emaFast = ta.ema(ohlcv.C, emaFastLength)
float emaSlow = ta.ema(ohlcv.C, emaSlowLength)
bool signal = emaFast > emaSlow
color c_signal = signal ? C_Up : C_Down
float volumeMA = ta.sma(ohlcv.V, volumeConfirmationLength)
bool crossover = ta.crossover(emaFast, emaSlow)
bool crossunder = ta.crossunder(emaFast, emaSlow)
isVolumeConfirmed(source, length, ma) =>
math.sum(source > ma ? source : 0, length) >= math.sum(source < ma ? source : 0, length)
bool ISV = isVolumeConfirmed(ohlcv.V, volumeConfirmationLength, volumeMA)
bool crossoverConfirmed = crossover and (not useVolumeConfirmation or ISV)
bool crossunderConfirmed = crossunder and (not useVolumeConfirmation or ISV)
PF = MAV ? emaFast : na
PS = MAV ? emaSlow : na
p1 = plot(PF, color = c_signal, editable = false, force_overlay = true, display = display.pane)
plot(PF, color = color.new(c_signal, 80), linewidth = 10, editable = false, force_overlay = true, display = display.pane)
plot(PF, color = color.new(c_signal, 90), linewidth = 20, editable = false, force_overlay = true, display = display.pane)
plot(PF, color = color.new(c_signal, 95), linewidth = 30, editable = false, force_overlay = true, display = display.pane)
plot(PF, color = color.new(c_signal, 98), linewidth = 45, editable = false, force_overlay = true, display = display.pane)
p2 = plot(PS, color = c_signal, editable = false, force_overlay = true, display = display.pane)
plot(PS, color = color.new(c_signal, 80), linewidth = 10, editable = false, force_overlay = true, display = display.pane)
plot(PS, color = color.new(c_signal, 90), linewidth = 20, editable = false, force_overlay = true, display = display.pane)
plot(PS, color = color.new(c_signal, 95), linewidth = 30, editable = false, force_overlay = true, display = display.pane)
plot(PS, color = color.new(c_signal, 98), linewidth = 45, editable = false, force_overlay = true, display = display.pane)
fill(p1, p2, top_value=crossover ? emaFast : emaSlow,
bottom_value =crossover ? emaSlow : emaFast,
top_color =color.new(c_signal, 80),
bottom_color =color.new(c_signal, 95)
)
// ✅ Usar colores configurables para señales
plotshape(crossoverConfirmed and MAV, style=shape.triangleup , location=location.belowbar, color=buySignalColor , size=size.small, force_overlay=true,display =display.pane)
plotshape(crossunderConfirmed and MAV, style=shape.triangledown, location=location.abovebar, color=sellSignalColor, size=size.small, force_overlay=true,display =display.pane)
string msg = '--------- '+"Buy volume ="+buyVolStr+" Buy Percent = "+buyPercentStr+" Sell volume = "+sellVolStr+" Sell Percent = "+sellPercentStr+" Net = "+volStr+' ---------'
if crossoverConfirmed
alert("Price (" + str.tostring(close) + ") Crossed over MA " + msg, alert_freq)
if crossunderConfirmed
alert("Price (" + str.tostring(close) + ") Crossed under MA " + msg, alert_freq)
GCK CRT MODEL Purpose
Multi-timeframe execution toolkit that overlays HTF candle structure on any lower timeframe and automatically marks CRT (Counter-Reaction Tag) only when a lower-timeframe CISD occurs. It draws a short line from the exact liquidity wick/body to the break/rejection bar—never a long extended line. Includes bold C2 / C3 / C4 labels for clarity.
What it shows
HTF candles (bodies, wicks, start lines, timer, labels) on your LTF chart
CISD → CRT: prints only when an LTF CISD triggers; line is anchored to the liquidity candle and ends at the break bar
Midpoint (log-based) lines, sweep markers, FVG & VI zones (optional)
T-Spot & Silver T-Spot logic (bias-aware), with confirmation and optional projections
Compact info table (current TF → HTF model, time remaining, bias)
Optional position sizing readout for the most recent confirmed sweep
Key options
HTF Mode: Auto or Custom (e.g., 1D, 1W)
Use Body for Confirmation: choose body extremes vs wick for CISD/CRT anchoring
Show Only Latest: keep the most recent T-Spot/CRT clean on chart
Projections & CISD lines: on/off + levels
Label Size: C2/C3/C4 printed larger by default for visibility
How to use
Add to your lower timeframe chart.
Pick HTF (Auto is fine).
Choose whether CRT/CISD checks use wick or body (toggle).
(Optional) Enable projections/alerts/position sizing.
Notes
CRT only prints inside the current HTF phase when an LTF CISD happens.
Lines are intentionally short (liquidity candle → rejection bar).
For education/analysis only. Not financial advice.
PSAR+EMA+Hull+BBDescription
This all-in-one indicator combines four proven tools:
Parabolic SAR (Everget) — trend direction and potential reversals.
Exponential Moving Averages (20/50/100/200) — customizable lengths, colors, and offsets.
Hull Suite (InSilico) — smooth trend detection with multiple variations (HMA, THMA, EHMA).
Bollinger Bands — volatility and dynamic support/resistance.
Features
Toggle each module on/off in settings.
Fully configurable inputs (lengths, colors, offsets, multipliers).
Optional PSAR labels, highlights, and state fill.
Hull can color candles, draw band fills, and pull from higher timeframes.
Bollinger Bands include multiple basis types, stdev multipliers, and fill transparency.
Built-in alerts: PSAR direction change, Hull trending up/down.
Category
Trend Analysis (with Volatility as secondary).
All Key Levels CompleteHave lines created for Yesterday Close, Prior Day High, Prior Day -1 Close, Prior Day Low, Prior Day -1 Low, Premarket High and Premarket Low.
ICT 369 Sniper MSS Indicator (HTF Bias) - H2LThis script is an ICT (Inner Circle Trader) concept-based trading indicator designed to identify high-probability reversal or continuation setups, primarily focusing on intraday trading using a Higher Timeframe (HTF) directional bias.
Here are the four core components of the indicator:
Higher Timeframe (HTF) Bias Filter (Market Structure Shift - MSS): It determines the overall trend by checking if the current price has broken the most recent high or low swing point of a larger timeframe (e.g., 4H). This establishes a Bullish or Bearish bias, ensuring trades align with the dominant trend.
Fair Value Gap (FVG) and OTE: It identifies price imbalances (FVGs) and calculates the Optimal Trade Entry (OTE) levels (50%, 62%, 70.5%, etc.) within those gaps, looking for price to retrace into these specific areas.
Kill Zones (Timing): It incorporates specific time windows (London and New York Kill Zones, based on NY Time) where institutional trading activity is high, only allowing entry signals during these defined periods.
Signal and Targets: It triggers a Long or Short signal when all criteria are met (HTF Bias, FVG, OTE retracement, and Kill Zone timing). It then calculates and plots suggested trade levels, including a Stop Loss (SL) and three Take Profit targets (TP1, TP2, and a dynamic Runner Target based on the weekly Average True Range or ATR).
In summary, it's a comprehensive tool for traders following ICT principles, automating the confluence check across trend, structure, liquidity, and timing.
Alpha - Multi-Asset Adaptive Trading Strategy# Alpha - Multi-Asset Adaptive Trading Strategy
Overview
Alpha is a comprehensive trading strategy that combines multiple technical analysis components with pre-optimized settings for over 70 different trading instruments across cryptocurrencies, forex, and stocks. The strategy employs an adaptive approach using modified trend detection algorithms, dynamic support/resistance zones, and multi-timeframe confirmation.
Key Features & Originality
1. Adaptive Trend Detection System
- Modified trend-following algorithm with amplitude-based channel deviation
- Dynamic channel width adjustment based on ATR (Average True Range)
- Dual-layer trend confirmation using both price action and momentum indicators
2. Pre-Configured Asset Optimization
The strategy includes carefully backtested parameter sets for:
- **Cryptocurrencies**: BTC, ETH, and 40+ altcoin pairs
- **Forex Pairs**: Major and minor currency pairs
- **Stocks**: TSLA, AAPL, GOOG
- **Commodities**: Gold, Silver, Platinum
- Each configuration is optimized for specific timeframes (5m, 15m, 30m, 45m, 1h)
3. Advanced Risk Management
- Multiple take profit levels (4 targets with customizable position sizing)
- Dynamic stop-loss options (ATR-based or percentage-based)
- Position size allocation across profit targets (default: 30%, 30%, 30%, 10%)
4. Multi-Timeframe Analysis Dashboard
- Real-time analysis across 4 configurable timeframes
- Comprehensive performance metrics display
- Visual representation of current market conditions
5. Market Condition Filtering
- RSI-based trend strength filtering
- ATR-based volatility filtering
- Sideways market detection to avoid choppy conditions
- Customizable filter combinations (ATR only, RSI only, both, or disabled)
How to Use
Initial Setup
1. **Select Asset Configuration**: Choose your trading pair from the "Strategies" dropdown menu
2. **Enable Strategy**: Enter "Alpha" in the code confirmation field
3. **Adjust Timeframe**: Match your chart timeframe to the selected strategy configuration
Parameter Customization
- **Trendline Settings**: Adjust amplitude and channel deviation for sensitivity
- **TP/SL Method**: Choose between ATR-based or percentage-based targets
- **Filtering Options**: Select appropriate market filters for your trading style
- **Backtest Period**: Set the number of days for strategy testing (max 60)
Signal Interpretation
- **BUY/SELL Labels**: Primary entry signals based on trend changes
- **Support/Resistance Zones**: Visual zones showing key price levels
- **Dashboard**: Real-time display of position status, targets, and performance metrics
Important Considerations
Limitations and Warnings
- **Backtesting Period**: Results shown are based on historical data from the specified backtest period
- **No Guarantee**: Past performance does not guarantee future results
- **Market Conditions**: Strategy performance varies with market volatility and trending conditions
- **Repainting**: Some signals may repaint if "Wait For Confirmed Bar" is disabled
Risk Warnings
- The pre-configured settings are starting points and may require adjustment for current market conditions
- Always use appropriate position sizing and risk management
- Test thoroughly on demo accounts before live trading
- Monitor and adjust parameters regularly as market dynamics change
Technical Components
Core Indicators Used
- Modified trend detection with amplitude-based channels
- RSI (Relative Strength Index) for momentum confirmation
- ATR (Average True Range) for volatility measurement
- Support/Resistance detection using pivot points
- Bollinger Band variant for trend confirmation
Alert Functionality
The strategy includes comprehensive alert options for:
- Entry signals (long and short)
- Take profit levels (TP1, TP2, TP3, TP4)
- Stop loss triggers
- Integration with trading bots via webhook messages
Recommended Usage
Best Practices
1. Start with the pre-configured settings for your chosen asset
2. Run backtests over different time periods to verify performance
3. Use the dashboard to monitor real-time strategy performance
4. Adjust filters based on current market conditions
5. Always use stop losses and proper risk management
Timeframe Recommendations
- **Short-Term**: Use 5m, 15m configurations for scalping
- **Mid-Term**: Use 30m, 45m configurations for day trading
- **Long-Term**: Use 1h configurations for swing trading
Updates and Support
The strategy parameters are regularly reviewed and optimized. Users should periodically check for updates to ensure they have the latest configurations.
Disclaimer
This strategy is for educational and informational purposes only. Trading involves substantial risk of loss. Users should conduct their own research and consider their financial situation before trading. The author is not responsible for any trading losses incurred using this strategy.
Cloud Trend — MA Crossover Cloud with AlertsThe Cloud Trend indicator highlights market momentum using two customizable moving averages.
Trend Cloud: Fills the zone between a fast and slow MA, turning green in uptrends and orange in downtrends.
Cross Signals: Arrows and alerts trigger when the fast MA crosses above or below the slow MA.
Bar Coloring: Optionally paints candles by trend direction for quick chart reading.
Customizable: Choose from SMA, EMA, RMA, WMA, or VWMA with adjustable lengths and cloud opacity.
✅ Ideal for spotting trend shifts, trade entries, and riding strong moves with confidence.
Shamji's Liquidity Sweep + FVG (Follow-up + Filters) Purpose (what it does)
This indicator looks for two related price structures used by many smart-money / liquidity-hunt traders:
Liquidity Sweeps — candles that wick beyond a recent swing high (for buy-side stop-hunts) or swing low (for sell-side stop-hunts), then close back inside. These are flagged as potential stop-hunt events that clear obvious liquidity.
Fair Value Gaps (FVGs) — simple 3-bar style gaps where an older bar’s high is below the current low (bullish FVG) or an older bar’s low is above the current high (bearish FVG). When an FVG appears after a sweep (within a configurable window), this is considered a follow-up alignment.
The script adds optional filters (volume spike and candle-range vs ATR) to increase confidence, and can restrict marking/alerts to only events that meet the follow-up and filter rules.
Contrarian Period High & LowContrarian Period High & Low
This indicator pairs nicely with the Contrarian 100 MA and can be located here:
Overview
The "Contrarian Period High & Low" indicator is a powerful technical analysis tool designed for traders seeking to identify key support and resistance levels and capitalize on contrarian trading opportunities. By tracking the highest highs and lowest lows over user-defined periods (Daily, Weekly, or Monthly), this indicator plots historical levels and generates buy and sell signals when price breaks these levels in a contrarian manner. A unique blue dot counter and action table enhance decision-making, making it ideal for swing traders, trend followers, and those trading forex, stocks, or cryptocurrencies. Optimized for daily charts, it can be adapted to other timeframes with proper testing.
How It Works
The indicator identifies the highest high and lowest low within a specified period (e.g., daily, weekly, or monthly) and draws horizontal lines for the previous period’s extremes on the chart. These levels act as dynamic support and resistance zones. Contrarian signals are generated when the price crosses below the previous period’s low (buy signal) or above the previous period’s high (sell signal), indicating potential reversals. A blue dot counter tracks consecutive buy signals, and a table displays the count and recommended action, helping traders decide whether to hold or flip positions.
Key Components
Period High/Low Levels: Tracks the highest high and lowest low for each period, plotting red lines for highs and green lines for lows from the bar where they occurred, extending for a user-defined length (default: 200 bars).
Contrarian Signals: Generates buy signals (blue circles) when price crosses below the previous period’s low and sell signals (white circles) when price crosses above the previous period’s high, designed to capture potential reversals.
Blue Dot Tracker: Counts consecutive buy signals (“blue dots”). If three or more occur, it suggests a stronger trend, with the table recommending whether to “Hold Investment” or “Flip Investment.”
Action Table: A 2x2 table in the bottom-right corner displays the blue dot count and action (“Hold Investment” if count ≥ 4, else “Flip Investment”) for quick reference.
Mathematical Concepts
Period Detection: Uses an approximate bar count to define periods (1 bar for Daily, 5 bars for Weekly, 20 bars for Monthly on a daily chart). When a new period starts, the previous period’s high/low is finalized and plotted.
High/Low Tracking:
Highest high (periodHigh) and lowest low (periodLow) are updated within the period.
Lines are drawn at these levels when the period ends, starting from the bar where the extreme occurred (periodHighBar, periodLowBar).
Signal Logic:
Buy signal: ta.crossunder(close , prevPeriodLow) and not lowBroken and barstate.isconfirmed
Sell signal: ta.crossover(close , prevPeriodHigh) and not highBroken and barstate.isconfirmed
Flags (highBroken, lowBroken) prevent multiple signals for the same level within a period.
Blue Dot Counter: Increments on each buy signal, resets on a sell signal or if price exceeds the entry price after three or more buy signals.
Entry and Exit Rules
Buy Signal (Blue Circle): Triggered when the price crosses below the previous period’s low, suggesting a potential oversold condition and buying opportunity. The signal appears as a blue circle below the price bar.
Sell Signal (White Circle): Triggered when the price crosses above the previous period’s high, indicating a potential overbought condition and selling opportunity. The signal appears as a white circle above the price bar.
Blue Dot Tracker:
Increments blueDotCount on each buy signal and sets an entryPrice on the first buy.
Resets on a sell signal or if price exceeds entryPrice after three or more buy signals.
If blueDotCount >= 3, the table suggests holding; if >= 4, it reinforces “Hold Investment.”
Exit Rules: Exit a buy position on a sell signal or when price exceeds the entry price after three or more buy signals. Combine with other tools (e.g., trendlines, support/resistance) for additional confirmation. Always apply proper risk management.
Recommended Usage
The "Contrarian Period High & Low" indicator is optimized for daily charts but can be adapted to other timeframes (e.g., 1H, 4H) with adjustments to the period bar count. It excels in markets with clear support/resistance levels and potential reversal zones. Traders should:
Backtest the indicator on their chosen asset and timeframe to validate signal reliability.
Combine with other technical tools (e.g., moving averages, Fibonacci levels) for stronger trade confirmation.
Adjust barsPerPeriod (e.g., ~120 bars for Weekly on hourly charts) based on the chart timeframe and market volatility.
Monitor the action table to guide position management based on blue dot counts.
Customization Options
Period Type: Choose between Daily, Weekly, or Monthly periods (default: Monthly).
Line Length: Set the length of high/low lines in bars (default: 200).
Show Highs/Lows: Toggle visibility of period high (red) and low (green) lines.
Max Lines to Keep: Limit the number of historical lines displayed (default: 10).
Hide Signals: Toggle buy/sell signal visibility for a cleaner chart.
Table Display: A fixed table in the bottom-right corner shows the blue dot count and action, with yellow (Hold) or green (Flip) backgrounds based on the count.
Why Use This Indicator?
The "Contrarian Period High & Low" indicator offers a unique blend of support/resistance visualization and contrarian signal generation, making it a versatile tool for identifying potential reversals. Its clear visual cues (lines and signals), blue dot tracker, and actionable table provide traders with an intuitive way to monitor market structure and manage trades. Whether you’re a beginner or an experienced trader, this indicator enhances your ability to spot key levels and time entries/exits effectively.
Tips for Users
Test the indicator thoroughly on your chosen market and timeframe to optimize settings (e.g., adjust barsPerPeriod for non-daily charts).
Use in conjunction with price action or other indicators for stronger trade setups.
Monitor the action table to decide whether to hold or flip positions based on blue dot counts.
Ensure your chart timeframe aligns with the selected period type (e.g., daily chart for Monthly periods).
Apply strict risk management to protect against false breakouts.
Happy trading with the Contrarian Period High & Low indicator! Share your feedback and strategies in the TradingView community!
FX MAN PRO//@version=5
indicator(title="FCB Signals with SMA, Momentum & Stochastic", shorttitle="FCB+AllFilters+Stoch", overlay=true)
// ---------- Inputs ----------
Pattern = input.int(1, "Pattern Length", minval=1)
showSignals = input.bool(true, "Show Buy/Sell Signals")
signalOffset = input.int(0, "Signal Offset", minval=-5, maxval=5)
smaFastLength = input.int(7, "SMA Fast")
smaSlowLength = input.int(21, "SMA Slow")
momentumLength = input.int(10, "Momentum Length")
// ---------- Stochastic Inputs ----------
stochKLength = input.int(14, "Stoch K Length")
stochDLength = input.int(3, "Stoch D Length")
stochSmooth = input.int(3, "Stoch Smooth")
stochOverbought = input.int(80, "Overbought Level")
stochOversold = input.int(20, "Oversold Level")
// ---------- Fractal Functions ----------
fractalUp(pattern) =>
p = high
okl = 1
okr = 1
res = 0.0
for i = pattern to 1
okl := high < high and okl == 1 ? 1 : 0
for i = pattern + 2 to pattern * 2 + 1
okr := high < high and okr == 1 ? 1 : 0
res := okl == 1 and okr == 1 ? p : res
res
fractalDn(pattern) =>
p = low
okl = 1
okr = 1
res = 0.0
for i = pattern to 1
okl := low > low and okl == 1 ? 1 : 0
for i = pattern + 2 to pattern * 2 + 1
okr := low > low and okr == 1 ? 1 : 0
res := okl == 1 and okr == 1 ? p : res
res
// ---------- Compute ----------
xUpper = fractalUp(Pattern)
xLower = fractalDn(Pattern)
// ---------- Hide FCB ----------
plot(xUpper, color=na, title="FCB Up")
plot(xLower, color=na, title="FCB Down")
// ---------- Candle Analysis ----------
body = math.abs(close - open)
shadowTop = high - math.max(open, close)
shadowBot = math.min(open, close) - low
strongBody = body > (shadowTop + shadowBot)
isGreen = close > open
isRed = close < open
// ---------- SMA ----------
smaFast = ta.sma(close, smaFastLength)
smaSlow = ta.sma(close, smaSlowLength)
// ---------- Momentum ----------
momentumValue = ta.mom(close, momentumLength)
// ---------- Stochastic ----------
kLine = ta.sma(ta.stoch(close, high, low, stochKLength), stochSmooth)
dLine = ta.sma(kLine, stochDLength)
// ---------- Stochastic Direction ----------
kUp = kLine > kLine
dUp = dLine > dLine
kDown = kLine < kLine
dDown = dLine < dLine
// ---------- Check Stochastic Neutral ----------
inNeutral = (kLine < stochOverbought and kLine > stochOversold) and (dLine < stochOverbought and dLine > stochOversold)
// ---------- First Candle Signal Logic ----------
var bool buyActive = false
var bool sellActive = false
buyCond = close > xUpper and strongBody and isGreen and smaFast > smaSlow and momentumValue > momentumValue and kUp and dUp and inNeutral
sellCond = close < xLower and strongBody and isRed and smaFast < smaSlow and momentumValue < momentumValue and kDown and dDown and inNeutral
buySignal = buyCond and not buyActive
sellSignal = sellCond and not sellActive
buyActive := buyCond ? true : not buyCond ? false : buyActive
sellActive := sellCond ? true : not sellCond ? false : sellActive
// ---------- Plot Signals with golden text ----------
plotshape(showSignals and buySignal,
title="Buy Signal",
style=shape.triangleup,
location=location.belowbar,
color=color.green,
size=size.tiny,
text="BUY",
textcolor=color.new(color.yellow, 0), // طلایی
offset=signalOffset)
plotshape(showSignals and sellSignal,
title="Sell Signal",
style=shape.triangledown,
location=location.abovebar,
color=color.red,
size=size.tiny,
text="SELL",
textcolor=color.new(color.yellow, 0), // طلایی
offset=signalOffset)
Cloud Trend + Pivot Levels🚀 Cloud Trend + Pivot Levels
A hybrid indicator that blends trend-following clouds with HTF pivot points. Spot momentum shifts with MA crossovers, and trade confidently around daily, weekly, or monthly pivot zones. Perfect for trend confirmation + key support/resistance levels.
EMA Separation (LFZ Scalps) v6 — Early TriggerPlots the percentage distance between a fast and a slow EMA (default 9 & 21) to gauge trend strength and filter out choppy London Flow Zone breakouts.
• Gray – EMAs nearly flat (low momentum, avoid trades)
• Orange – early trend building
• Green/Red – strong directional momentum
Useful for day-traders: wait for the gap to widen beyond your chosen threshold (e.g., 0.25 %) before entering a breakout. Adjustable EMA lengths and alert when the separation exceeds your “strong trend” level.
CRT Theory — CRT Candle + Phases (configurable)CRT Candles with All Phases-Accumulation, Manipulation and Distribution
Ultimate BB Squeeze [Final]This indicator gives the move as it is about to happen and I have even added adx to the same so as to have a directional trade and not get stopped by loss.