Neosha Concept V4 (NY Time)
Imagine the financial market as a huge ocean. Millions of traders throw orders into it every second. But beneath all the noise, there is a powerful current that quietly controls where the waves move. That current is not a person, not a trader, and not random—it is an algorithm.
This algorithm is called the Interbank Price Delivery Algorithm (IPDA).
Think of it as the “navigation system” that guides price through the market.
IPDA has one job:
to move prices in a way that keeps the market efficient and liquid.
To do this, it constantly looks for two things:
1. Where liquidity is hiding
Liquidity is usually found above highs and below lows—where traders place stop losses. The algorithm moves price there first to collect that liquidity.
2. Where price became unbalanced
Sometimes price moves too fast and creates gaps or imbalances. IPDA returns to those areas later to “fix” the missing orders.
Once you start looking at the charts with this idea in mind, everything makes more sense:
Why price suddenly spikes above a high and crashes down
Why big moves leave gaps that price later fills
Why the market reverses right after taking stops
Why trends begin only after certain levels are hit
These are not accidents.
They are the algorithm doing its job.
Price moves in a repeating cycle:
Gather liquidity
Make a strong move (displacement)
Return to fix inefficiency
Deliver to the next target
Most beginners only see the candles.
But once you understand IPDA, you see the intention behind the candles.
Instead of guessing where price might go, you begin to understand why it moves there.
And once you understand the “why,” your trading becomes clearer, calmer, and far more accurate.
Concept
Impulse %Impulse % — Liquidation Cascade Detector (BTC · 1H)
Impulse % identifies sharp impulsive price moves and liquidation cascades by measuring how much a candle’s range deviates from its historical average in percent.
How it works
Calculates the candle range (in %) relative to price and compares it to the average over N periods.
When the range exceeds the upper band, an Impulse is detected.
Inside each 1H candle, the indicator checks lower timeframes (1m / 5m) to classify the impulse phases:
PANIC — the first minutes of a violent move (forced liquidations, stop hunts).
CAUTION (Cascade) — continuation and “cleanup” phase with elevated risk.
Determines whether the impulse is against the trend using EMA 50 / EMA 200 — the most dangerous scenario.
Highlights risk zones to protect positions and filter new entries.
What it’s for
Avoid entering during liquidation cascades.
Exit at break-even or partially take profit during risky phases.
Recommended Settings — BTC (1H)
Calculation
Calculation TF: (empty = current)
Average Mode: By N bars
N (bars): 100
Range Type: High–Low
Bands
Upper Band (% of average): 130
Lower Band: Auto (same %)
Cascade (First Minutes)
Enable Cascade Filter: ON
When to trigger safety: Only against trend
PANIC (minutes): 3
CAUTION (minutes after PANIC): 15
Trend (EMA)
Use EMA Trend: ON
Fast EMA: 50
Slow EMA: 200
Lower TF Detection
Lower TF: 1m (or 5m if you prefer smoother signals)
Visualization
Style: Columns
Show Bands: ON
Show Band Lines & Mean: ON
How to read it (BTC · 1H)
Purple (PANIC): first minutes of liquidation — do not enter.
Yellow (CAUTION): cascade phase — high risk, manage/exit.
Normal color: no active cascade — strategy allowed.
Best practice:
1m/5m → real-time cascade detection
1H → decision level
4H → market context
Kalman Smoother PanelPanel version of the Kalman smoothing indicator which I have setup myself to look at the volume but could be used for smoothing other noisy or erratic data values, it populates in a new pane below the main chart and has a small panel window of it's own to display the values that are output and the user is able to see the difference that way as well as in line chart format.
Crypto ATR Position Sizer + LeverageThis indicator is a "heads-up display" for crypto traders who need real time risk management without manually calculating position sizes. It uses Average True Range (ATR) to dynamically place Stop Losses based on current market volatility and automatically calculates the exact position size needed to respect your risk percentage.
Key Features:
Dynamic Risk Management: Stop Loss and Take Profit levels adjust automatically based on market volatility (ATR).
Auto-Position Sizing: Calculates the exact Quantity (in coins) and Position Value (in $) to ensure you never risk more than your defined percentage (e.g., 1% or 2%).
Leverage Calculator: Instantly sees the "Required Leverage" needed to execute the trade size relative to your account balance.
Crypto Precision: Displays up to 8 decimal places, making it compatible with both Bitcoin and low-sat altcoins.
Toggable Direction: Switch between Long and Short biases instantly via the settings menu.
How to Use:
Add the indicator to your chart.
Open Settings and input your Account Balance and Risk %.
Choose your direction (Long or Short) using the checkboxes.
The label will display your Entry, SL, TP, Coin Quantity, and Required Leverage in real-time.
HTF Suspension Blocks [TakingProphets]-----------------------------------------------------------------------------------------------
HTF SUSPENSION BLOCKS
-----------------------------------------------------------------------------------------------
HTF Suspension Blocks bring ICT’s Suspension Block concept into a multi-timeframe workflow by detecting the 3-candle pattern on higher timeframes and projecting those zones directly onto your current execution chart.
Instead of only seeing Suspension Blocks on the timeframe they form, this script identifies valid HTF formations, draws their ranges on your lower timeframe, extends them forward, and manages invalidation automatically. You get higher-timeframe context while staying in your execution environment.
-----------------------------------------------------------------------------------------------
PURPOSE AND SCOPE
-----------------------------------------------------------------------------------------------
- Detect ICT-style Suspension Blocks on multiple higher timeframes (HTF 1 / HTF 2 / HTF 3)
- Project HTF blocks onto the current chart using bar-time anchored drawing
- Require measurable body-to-body separation defined in true ticks (instrument-aware)
- Auto-extend blocks forward in time until invalidation
- Optional Consequent Encroachment (50% equilibrium) inside each block
- Per-timeframe visibility limiting so charts stay clean and actionable
- Labels each block with the originating HTF (ex: M5 / M15 / M60)
- Alerts for:
- New HTF bullish / bearish block formation
- Price entering into any HTF bullish / bearish block
- Session-restricted alert windows (New York time)
-----------------------------------------------------------------------------------------------
WHAT IS A SUSPENSION BLOCK
-----------------------------------------------------------------------------------------------
A Suspension Block is a strict 3-candle displacement sequence defined by body-to-body gaps around a middle candle. This HTF variant uses the same model, but evaluates the pattern on a higher timeframe and then projects the zone onto your current chart.
Bullish Suspension Block logic:
- HTF Candle 1 close is BELOW HTF Candle 2 open by at least Minimum Body Separation
- HTF Candle 3 open is ABOVE HTF Candle 2 close by at least Minimum Body Separation
- HTF Candle 3 open is ABOVE HTF Candle 1 close to ensure a valid vertical span
- Block vertical span: Candle 1 close (low) to Candle 3 open (high)
- Block remains valid until price CLOSES below the block low (Candle 1 close)
Bearish Suspension Block logic (mirror conditions):
- HTF Candle 1 close is ABOVE HTF Candle 2 open by at least Minimum Body Separation
- HTF Candle 3 open is BELOW HTF Candle 2 close by at least Minimum Body Separation
- HTF Candle 3 open is BELOW HTF Candle 1 close to ensure a valid vertical span
- Block vertical span: Candle 1 close (high) to Candle 3 open (low)
- Block remains valid until price CLOSES above the block high (Candle 1 close)
All gap calculations are normalized using `syminfo.mintick` so the “ticks” setting behaves correctly across instruments.
-----------------------------------------------------------------------------------------------
GENERAL SETTINGS
-----------------------------------------------------------------------------------------------
- Minimum Body Separation (ticks)
- Minimum required body-to-body gap in HTF tick units
- Used for both:
- Candle 1 close to Candle 2 open separation
- Candle 2 close to Candle 3 open separation
- Examples:
- 0.25 = quarter-tick gap
- 1.0 = full tick gap
-----------------------------------------------------------------------------------------------
TIMEFRAMES
-----------------------------------------------------------------------------------------------
This script supports up to 3 higher timeframe sources. Each HTF has:
- Enable toggle
- Timeframe selector
- Per-timeframe Max Blocks visibility control
HTF 1 / HTF 2 / HTF 3:
- These are the timeframes the script scans for Suspension Blocks
- Blocks are drawn only when your current chart timeframe is LOWER than the selected HTF
- This prevents duplicate / redundant rendering when you’re already on the HTF or higher
Max Blocks per timeframe:
- Limits the number of most-recent blocks shown per side (bullish + bearish) for that HTF
- 0 = show all blocks for that timeframe
-----------------------------------------------------------------------------------------------
VISUALIZATION SETTINGS
-----------------------------------------------------------------------------------------------
Bullish Blocks:
- Toggle visibility
- Fill color controls opacity / emphasis
- Optional border with selectable style (Solid / Dashed / Dotted)
Bearish Blocks:
- Toggle visibility
- Fill color controls opacity / emphasis
- Optional border with selectable style (Solid / Dashed / Dotted)
Consequent Encroachment (CE):
- Optional 50% equilibrium line drawn inside each block
- Style options (Solid / Dashed / Dotted)
- Automatically extends as blocks extend
HTF Labels:
- Each block is labeled with its originating timeframe (ex: M5 / M15 / M60)
- Label styling includes:
- Text color
- Size (Tiny / Small / Normal / Large)
- Labels are intentionally hidden on non-visible blocks when visibility limiting is active
-----------------------------------------------------------------------------------------------
HOW HTF PROJECTION WORKS
-----------------------------------------------------------------------------------------------
- The script requests the last 3 candles of each selected HTF via `request.security()`
- It maps those HTF candles into the standard 3-candle Suspension Block model:
- Candle 1 = oldest
- Candle 2 = middle
- Candle 3 = most recent
- When a valid block forms:
- A box is created using `xloc.bar_time`
- The left side anchors to the HTF candle timestamp
- The right side projects forward to the current chart time
- Each HTF has its own independent storage set:
- Bull boxes, bear boxes
- High / low bounds
- CE lines
- Labels
-----------------------------------------------------------------------------------------------
BLOCK MANAGEMENT & INVALIDATION
-----------------------------------------------------------------------------------------------
- All blocks extend forward automatically to the current bar time
- Bullish invalidation:
- Block is removed when price CLOSES below the block low
- Bearish invalidation:
- Block is removed when price CLOSES above the block high
- When a block invalidates:
- The box is deleted
- Its CE line is deleted
- All stored references are removed from the set
This keeps the chart focused on active HTF zones only.
-----------------------------------------------------------------------------------------------
VISIBILITY LIMITING
-----------------------------------------------------------------------------------------------
Each timeframe’s “Max Blocks” setting controls how many blocks per side remain visible.
When Max Blocks > 0:
- The script calculates distance from current price to every stored block range
- It keeps the closest N blocks per side (bullish + bearish)
- Blocks not kept are made fully transparent:
- Hidden fill
- Hidden border
- Hidden CE line
- Hidden label text
This gives you the most relevant HTF structures near price without clutter.
-----------------------------------------------------------------------------------------------
ALERT SYSTEM
-----------------------------------------------------------------------------------------------
Alerts are optional and can be restricted to specific NY sessions.
Sessions (New York time):
- Session 1 (default: 09:30–16:00)
- Session 2 (optional)
- Session 3 (optional)
Alert types:
- HTF Bullish Block Formed
- Triggers when any enabled HTF forms a new bullish suspension block
- HTF Bearish Block Formed
- Triggers when any enabled HTF forms a new bearish suspension block
- Enter Bullish Block
- Triggers when price transitions from NOT inside any bullish HTF block to inside one
- Enter Bearish Block
- Triggers when price transitions from NOT inside any bearish HTF block to inside one
Messages:
- Fully customizable alert text inputs
- Script automatically appends ticker + current chart timeframe for context
-----------------------------------------------------------------------------------------------
BEST USE CASES
-----------------------------------------------------------------------------------------------
- Use HTF Suspension Blocks as “context zones” while executing on a lower timeframe
- Pair with ICT displacement, liquidity, PD arrays, and market structure for confluence
- Treat blocks as HTF inefficiency zones that can act as reaction points on retracements
- Use “enter block” alerts as a heads-up to shift into execution mode at HTF levels
-----------------------------------------------------------------------------------------------
DISCLAIMER
-----------------------------------------------------------------------------------------------
This indicator is provided for educational and analytical purposes only. It does not constitute financial advice. Trading involves risk, and past performance is not indicative of future results.
© TakingProphets
-----------------------------------------------------------------------------------------------
Suspension Blocks [TakingProphets]-----------------------------------------------------------------------------------------------
SUSPENSION BLOCKS
-----------------------------------------------------------------------------------------------
Suspension Blocks are a new ICT concept designed to highlight price inefficiencies created by displacement and body-to-body gaps across a precise 3-candle sequence. These structures represent areas where price was temporarily “suspended” before continuation, often acting as high-probability reaction zones on future revisits.
This indicator automatically detects, visualizes, manages, and invalidates Suspension Blocks in real time, while intelligently limiting chart clutter to only the most relevant structures near current price.
-----------------------------------------------------------------------------------------------
PURPOSE AND SCOPE
-----------------------------------------------------------------------------------------------
- Detect ICT-style Bullish and Bearish Suspension Blocks using strict 3-candle body relationships
- Require measurable body-to-body separation defined in true ticks (instrument-aware)
- Automatically draw and extend Suspension Blocks forward in time
- Invalidate blocks only when price decisively closes beyond the defining boundary
- Optionally display Consequent Encroachment (50% equilibrium) within each block
- Limit on-chart visibility to the closest N blocks per side relative to current price
- Provide session-based, directional alerting for new block formations
-----------------------------------------------------------------------------------------------
WHAT IS A SUSPENSION BLOCK
-----------------------------------------------------------------------------------------------
A Suspension Block is a 3-candle displacement pattern defined by body gaps on both sides of a middle candle.
Bullish Suspension Block logic:
- Candle 1 close is BELOW Candle 2 open by at least the Minimum Body Separation
- Candle 3 open is ABOVE Candle 2 close by at least the Minimum Body Separation
- Candle 3 open is ABOVE Candle 1 close to ensure a valid vertical range
- The block spans from Candle 1 close (low) to Candle 3 open (high)
- The block remains valid until price CLOSES below Candle 1 close
Bearish Suspension Block logic (mirror conditions):
- Candle 1 close is ABOVE Candle 2 open by at least the Minimum Body Separation
- Candle 3 open is BELOW Candle 2 close by at least the Minimum Body Separation
- Candle 3 open is BELOW Candle 1 close to ensure a valid vertical range
- The block spans from Candle 1 close (high) to Candle 3 open (low)
- The block remains valid until price CLOSES above Candle 1 close
All calculations are performed using true tick values via `syminfo.mintick` to ensure precision across instruments.
-----------------------------------------------------------------------------------------------
GENERAL SETTINGS
-----------------------------------------------------------------------------------------------
- Minimum Body Separation (ticks)
- Defines the minimum required body-to-body gap between candles
- Measured in true ticks (0.25 = quarter tick, 1.0 = full tick, etc.)
- Max Visible Blocks per Side
- Limits the number of bullish and bearish blocks displayed
- Only the closest blocks to current price remain visible
-----------------------------------------------------------------------------------------------
VISUALIZATION SETTINGS
-----------------------------------------------------------------------------------------------
- Bullish Suspension Blocks
- Toggle bullish block visibility
- Custom fill color with adjustable transparency
- Optional border with selectable line style (Solid / Dashed / Dotted)
- Bearish Suspension Blocks
- Toggle bearish block visibility
- Custom fill color with adjustable transparency
- Optional border with selectable line style (Solid / Dashed / Dotted)
- Consequent Encroachment (CE)
- Optional 50% equilibrium line drawn inside each block
- Custom color and line style
- Automatically extends with the block
Blocks dynamically extend to the current bar and are hidden or shown based on proximity to price to keep the chart clean and actionable.
-----------------------------------------------------------------------------------------------
BLOCK MANAGEMENT & INVALIDATION
-----------------------------------------------------------------------------------------------
- Each block is stored persistently and extended forward bar-by-bar
- Bullish blocks are invalidated only when price CLOSES below the block low
- Bearish blocks are invalidated only when price CLOSES above the block high
- Invalidated blocks and their CE lines are automatically removed
- Visibility logic ensures only the most relevant structures are emphasized
-----------------------------------------------------------------------------------------------
ALERT SYSTEM
-----------------------------------------------------------------------------------------------
- Optional alerts when new Suspension Blocks form
- Independent toggles for bullish and bearish alerts
- Fully customizable alert messages
- Alerts can be restricted to specific trading sessions:
- Session 1 (default: 09:30–16:00 NY)
- Session 2 (optional)
- Session 3 (optional)
- Alerts include ticker and timeframe context automatically
-----------------------------------------------------------------------------------------------
BEST USE CASES
-----------------------------------------------------------------------------------------------
- High-probability reaction zones after displacement
- Confluence with liquidity, PD arrays, and market structure
- Execution refinement within ICT-based models
- Intraday and higher-timeframe contextual bias
- Clean, rules-based identification of inefficiency zones
-----------------------------------------------------------------------------------------------
DISCLAIMER
-----------------------------------------------------------------------------------------------
This indicator is provided for educational and analytical purposes only. It does not constitute financial advice. Trading involves risk, and past performance is not indicative of future results.
© TakingProphets
-----------------------------------------------------------------------------------------------
IFVG Pro v.1Detects IFVGs in real time.
Includes alerts for specific timeframes.
This is my first indicator so I will be continually working on it to make it better and more accurate. Thanks for trying it out!
Apex IndicatorThe Apex Indicator is a physics-based momentum tool designed to measure the 2nd Derivative (Acceleration) of both Price and Volume.
Unlike standard oscillators which often lag, this indicator uses Kinematics to identify the subtle shifts in momentum before price makes a major move. It answers the critical questions: Is the selling pressure fading? and Is there fresh fuel (Volume) entering to support a turn?
This script uses Hull Moving Average (HMA) smoothing for low-latency calculation, and Z-Score Normalization to force Price and Volume onto a shared, readable scale.
Visual Guide
The Histogram (Price Acceleration)
Bright Green: Strong Bullish Acceleration (High Velocity).
Dark Green: Developing Bullish Momentum (or Waning Bullishness depending on context).
Bright Red: Strong Bearish Acceleration (Panic/Dump).
Dark Red: Developing Bearish Momentum (or Waning Bearishness).
The Line (Volume Acceleration)
Yellow: Volume is accelerating (Interest is entering).
Purple: Volume is decelerating (Interest is leaving).
The Background Highlights
Green/Red Background: These mark Statistical Extremes (>1 Standard Deviation). While these show maximum power, they often mark the climax of a move rather than the start.
How to Trade: Reading the Subtleties
The power of the Apex Indicator is not in chasing the spikes, but in reading the Transitions.
1. The Turn (The Reversal Entry)
Don't wait for the explosion; look for the "braking" action.
The Setup: Price has been moving down strongly (Bright Red bars).
The Signal: The histogram shifts to Dark Red and begins moving up toward the zero line (less negative). This means the selling acceleration is dying.
The Trigger: A Dark Green bar prints, accompanied by the Volume Line turning Yellow/Rising.
Why it works: You are entering when the bearish energy is exhausted and fresh volume is stepping in to lift the price, often before the main breakout occurs.
2. The Second Wind (Trend Continuation)
The Setup: You are already in a trend (Green bars), but the bars fade to Dark Green or near Zero (a pullback or pause).
The Trigger: The next bar flips Bright Green and the Volume Line spikes Yellow.
Why it works: This confirms that the pause was just a breather, and buyers are stepping back on the gas.
3. The "Hollow Move" (Trap Avoidance)
The Scenario: Price is moving up (Green bars), but the Volume Line is Purple or dropping.
Interpretation: This is a drift, not a drive. Without volume acceleration support, these moves are prone to rapid reversal.
4. The Climax (Exits)
If the Background flashes Green (Alert Trigger), be aware that price acceleration has hit a statistical extreme (Z-Score > 1).
If you are in a position, this is often a good place to Take Profit, as maintaining that level of acceleration is mathematically difficult for the market to sustain.
Settings
Analysis Length (21): The lookback period for the HMA smoothing.
Normalization Lookback (21): The historical window used to calculate the Z-Score. A setting of 21 allows the indicator to self-adjust quickly to recent volatility conditions.
Smart Money Concepts [MHA Finverse]A comprehensive Smart Money Concepts (SMC) indicator designed to identify institutional trading behavior and market structure shifts. This tool helps traders align with "smart money" by detecting key supply and demand zones, structural breaks, and liquidity patterns.
Core Features
Market Structure Analysis
- Real-time Internal Structure: Detects short-term BOS (Break of Structure) and CHoCH (Change of Character) with customizable filters
- Swing Structure: Identifies major trend shifts and structural breaks on higher timeframes
- Adjustable pivot detection with customizable swing point visualization
- Strong/Weak High/Low identification for bias confirmation
Order Blocks (OB)
- Internal and Swing Order Blocks with independent control
- Volume-based metrics showing OB strength and percentage contribution
- Two filtering methods: ATR-based and Cumulative Mean Range
- Flexible mitigation options (Close or High/Low)
- Display up to 20 order blocks per type with auto-cleanup on mitigation
- Color-coded zones with transparency control
Liquidity Detection
- Equal Highs (EQH) and Equal Lows (EQL) identification
- Threshold-based detection using ATR calculation
- Visual confirmation lines connecting equal levels
- Adjustable sensitivity and bar confirmation settings
Fair Value Gaps (FVG)
- Multi-timeframe FVG detection
- Auto-threshold calculation based on price momentum
- Bullish and Bearish gap visualization
- Extendable gap boxes for tracking unfilled imbalances
Premium & Discount Zones
- Automated premium, equilibrium, and discount zone plotting
- Based on current swing range extremes
- Visual representation of optimal entry zones
- Helps identify potential reversal and continuation areas
Multi-Timeframe Levels
- Previous Daily, Weekly, and Monthly High/Low levels
- Customizable line styles (solid, dashed, dotted)
- Independent color controls for each timeframe
- Auto-adjusted labels (PDH, PDL, PWH, PWL, PMH, PML)
Display Modes
- Historical Mode: Shows all past structures and maintains drawing history
- Present Mode: Displays only current active structures for cleaner charts
Visual Themes
- Colored: Full color customization for all elements
- Monochrome: Clean grey-scale design for minimal distraction
Smart Features
- Confluence filter for internal structure to reduce noise
- Automatic candle coloring based on market bias
- 16 pre-configured alert conditions for all major signals
- Efficient rendering with automatic cleanup of broken structures
- Independent control over each feature for modular usage
Use Cases
- Identify institutional entry and exit points through order blocks
- Spot potential reversals at premium/discount zones
- Confirm trend direction with BOS and CHoCH signals
- Find liquidity grabs at equal highs and lows
- Trade imbalances at fair value gaps
- Align entries with multi-timeframe key levels
Settings Organization
All features are neatly organized into logical groups:
- Smart Money Concepts (general settings)
- Real Time Internal Structure
- Real Time Swing Structure
- Order Blocks
- EQH/EQL
- Fair Value Gaps
- Highs & Lows MTF
- Premium & Discount Zones
Note: This indicator works on all timeframes and instruments. For optimal results, combine multiple SMC concepts together to find high-probability setups with confluence.
Credits
Special thanks to Dau_tu_hieu_goc and BigBeluga for their code examples and inspiration that contributed to the development of this indicator.
Disclaimer
This indicator is for educational purposes only and does not constitute financial advice. Trading involves substantial risk of loss. Past performance does not guarantee future results. Always use proper risk management and conduct your own analysis before making trading decisions. The developer is not responsible for any trading losses incurred.
Happy Trading
MTF Alignment & Key Levelsso this one is specifically for the 1hr and 4hr time frame. but what it does is alert you once the monthly weekly and daily timeframes align with a trend in a certain direction wether its bearish or bullish but then it will mark out key levels on the 1hr and 4hr time frame to indicate when price breaks through that level to enter a trade in the direction of the higher timeframes alignment.
XAUUSD 1m SMC Zones (BOS + Flexible TP Modes + Trailing Runner)//@version=6
strategy("XAUUSD 1m SMC Zones (BOS + Flexible TP Modes + Trailing Runner)",
overlay = true,
initial_capital = 10000,
pyramiding = 10,
process_orders_on_close = true)
//━━━━━━━━━━━━━━━━━━━
// 1. INPUTS
//━━━━━━━━━━━━━━━━━━━
// TP / SL
tp1Pips = input.int(10, "TP1 (pips)", minval = 1)
fixedSLpips = input.int(50, "Fixed SL (pips)", minval = 5)
runnerRR = input.float(3.0, "Runner RR (TP2 = SL * RR)", step = 0.1, minval = 1.0)
// Daily risk
maxDailyLossPct = input.float(5.0, "Max daily loss % (stop trading)", step = 0.5)
maxDailyProfitPct = input.float(20.0, "Max daily profit % (stop trading)", step = 1.0)
// HTF S/R (1H)
htfTF = input.string("60", "HTF timeframe (minutes) for S/R block")
// Profit strategy (Option C)
profitStrategy = input.string("Minimal Risk | Full BE after TP1", "Profit Strategy", options = )
// Runner stop mode (your option 4)
runnerStopMode = input.string( "BE only", "Runner Stop Mode", options = )
// ATR trail settings (only used if ATR mode selected)
atrTrailLen = input.int(14, "ATR Length (trail)", minval = 1)
atrTrailMult = input.float(1.0, "ATR Multiplier (trail)", step = 0.1, minval = 0.1)
// Pip size (for XAUUSD: 1 pip = 0.10 if tick = 0.01)
pipSize = syminfo.mintick * 10.0
tp1Points = tp1Pips * pipSize
slPoints = fixedSLpips * pipSize
baseQty = input.float (1.0, "Base order size" , step = 0.01, minval = 0.01)
//━━━━━━━━━━━━━━━━━━━
// 2. DAILY RISK MANAGEMENT
//━━━━━━━━━━━━━━━━━━━
isNewDay = ta.change(time("D")) != 0
var float dayStartEquity = na
var bool dailyStopped = false
equityNow = strategy.initial_capital + strategy.netprofit
if isNewDay or na(dayStartEquity)
dayStartEquity := equityNow
dailyStopped := false
dailyPnL = equityNow - dayStartEquity
dailyPnLPct = dayStartEquity != 0 ? (dailyPnL / dayStartEquity) * 100.0 : 0.0
if not dailyStopped
if dailyPnLPct <= -maxDailyLossPct
dailyStopped := true
if dailyPnLPct >= maxDailyProfitPct
dailyStopped := true
canTradeToday = not dailyStopped
//━━━━━━━━━━━━━━━━━━━
// 3. 1H S/R ZONES (for direction block)
//━━━━━━━━━━━━━━━━━━━
htOpen = request.security(syminfo.tickerid, htfTF, open)
htHigh = request.security(syminfo.tickerid, htfTF, high)
htLow = request.security(syminfo.tickerid, htfTF, low)
htClose = request.security(syminfo.tickerid, htfTF, close)
// Engulf logic on HTF
htBullPrev = htClose > htOpen
htBearPrev = htClose < htOpen
htBearEngulf = htClose < htOpen and htBullPrev and htOpen >= htClose and htClose <= htOpen
htBullEngulf = htClose > htOpen and htBearPrev and htOpen <= htClose and htClose >= htOpen
// Liquidity sweep on HTF previous candle
htSweepHigh = htHigh > ta.highest(htHigh, 5)
htSweepLow = htLow < ta.lowest(htLow, 5)
// Store last HTF zones
var float htResHigh = na
var float htResLow = na
var float htSupHigh = na
var float htSupLow = na
if htBearEngulf and htSweepHigh
htResHigh := htHigh
htResLow := htLow
if htBullEngulf and htSweepLow
htSupHigh := htHigh
htSupLow := htLow
// Are we inside HTF zones?
inHtfRes = not na(htResHigh) and close <= htResHigh and close >= htResLow
inHtfSup = not na(htSupLow) and close >= htSupLow and close <= htSupHigh
// Block direction against HTF zones
longBlockedByZone = inHtfRes // no buys in HTF resistance
shortBlockedByZone = inHtfSup // no sells in HTF support
//━━━━━━━━━━━━━━━━━━━
// 4. 1m LOCAL ZONES (LIQUIDITY SWEEP + ENGULF + QUALITY SCORE)
//━━━━━━━━━━━━━━━━━━━
// 1m engulf patterns
bullPrev1 = close > open
bearPrev1 = close < open
bearEngulfNow = close < open and bullPrev1 and open >= close and close <= open
bullEngulfNow = close > open and bearPrev1 and open <= close and close >= open
// Liquidity sweep by previous candle on 1m
sweepHighPrev = high > ta.highest(high, 5)
sweepLowPrev = low < ta.lowest(low, 5)
// Local zone storage (one active support + one active resistance)
// Quality score: 1 = engulf only, 2 = engulf + sweep (we only trade ≥2)
var float supLow = na
var float supHigh = na
var int supQ = 0
var bool supUsed = false
var float resLow = na
var float resHigh = na
var int resQ = 0
var bool resUsed = false
// New resistance zone: previous bullish candle -> bear engulf
if bearEngulfNow
resLow := low
resHigh := high
resQ := sweepHighPrev ? 2 : 1
resUsed := false
// New support zone: previous bearish candle -> bull engulf
if bullEngulfNow
supLow := low
supHigh := high
supQ := sweepLowPrev ? 2 : 1
supUsed := false
// Raw "inside zone" detection
inSupRaw = not na(supLow) and close >= supLow and close <= supHigh
inResRaw = not na(resHigh) and close <= resHigh and close >= resLow
// QUALITY FILTER: only trade zones with quality ≥ 2 (engulf + sweep)
highQualitySup = supQ >= 2
highQualityRes = resQ >= 2
inSupZone = inSupRaw and highQualitySup and not supUsed
inResZone = inResRaw and highQualityRes and not resUsed
// Plot zones
plot(supLow, "Sup Low", color = color.new(color.lime, 60), style = plot.style_linebr)
plot(supHigh, "Sup High", color = color.new(color.lime, 60), style = plot.style_linebr)
plot(resLow, "Res Low", color = color.new(color.red, 60), style = plot.style_linebr)
plot(resHigh, "Res High", color = color.new(color.red, 60), style = plot.style_linebr)
//━━━━━━━━━━━━━━━━━━━
// 5. MODERATE BOS (3-BAR FRACTAL STRUCTURE)
//━━━━━━━━━━━━━━━━━━━
// 3-bar swing highs/lows
swHigh = high > high and high > high
swLow = low < low and low < low
var float lastSwingHigh = na
var float lastSwingLow = na
if swHigh
lastSwingHigh := high
if swLow
lastSwingLow := low
// BOS conditions
bosUp = not na(lastSwingHigh) and close > lastSwingHigh
bosDown = not na(lastSwingLow) and close < lastSwingLow
// Zone “arming” and BOS validation
var bool supArmed = false
var bool resArmed = false
var bool supBosOK = false
var bool resBosOK = false
// Arm zones when first touched
if inSupZone
supArmed := true
if inResZone
resArmed := true
// BOS after arming → zone becomes valid for entries
if supArmed and bosUp
supBosOK := true
if resArmed and bosDown
resBosOK := true
// Reset BOS flags when new zones are created
if bullEngulfNow
supArmed := false
supBosOK := false
if bearEngulfNow
resArmed := false
resBosOK := false
//━━━━━━━━━━━━━━━━━━━
// 6. ENTRY CONDITIONS (ZONE + BOS + RISK STATE)
//━━━━━━━━━━━━━━━━━━━
flatOrShort = strategy.position_size <= 0
flatOrLong = strategy.position_size >= 0
longSignal = canTradeToday and not longBlockedByZone and inSupZone and supBosOK and flatOrShort
shortSignal = canTradeToday and not shortBlockedByZone and inResZone and resBosOK and flatOrLong
//━━━━━━━━━━━━━━━━━━━
// 7. ORDER LOGIC – TWO PROFIT STRATEGIES
//━━━━━━━━━━━━━━━━━━━
// Common metrics
atrTrail = ta.atr(atrTrailLen)
// MINIMAL MODE: single trade, BE after TP1, optional trailing
// HYBRID MODE: two trades (Scalp @ TP1, Runner @ TP2)
// Persistent tracking
var float longEntry = na
var float longTP1 = na
var float longTP2 = na
var float longSL = na
var bool longBE = false
var float longRunEntry = na
var float longRunTP1 = na
var float longRunTP2 = na
var float longRunSL = na
var bool longRunBE = false
var float shortEntry = na
var float shortTP1 = na
var float shortTP2 = na
var float shortSL = na
var bool shortBE = false
var float shortRunEntry = na
var float shortRunTP1 = na
var float shortRunTP2 = na
var float shortRunSL = na
var bool shortRunBE = false
isMinimal = profitStrategy == "Minimal Risk | Full BE after TP1"
isHybrid = profitStrategy == "Hybrid | Scalp TP + Runner TP"
//━━━━━━━━━━ LONG ENTRIES ━━━━━━━━━━
if longSignal
if isMinimal
longEntry := close
longSL := longEntry - slPoints
longTP1 := longEntry + tp1Points
longTP2 := longEntry + slPoints * runnerRR
longBE := false
strategy.entry("Long", strategy.long)
supUsed := true
supArmed := false
supBosOK := false
else if isHybrid
longRunEntry := close
longRunSL := longRunEntry - slPoints
longRunTP1 := longRunEntry + tp1Points
longRunTP2 := longRunEntry + slPoints * runnerRR
longRunBE := false
// Two separate entries, each 50% of baseQty (for backtest)
strategy.entry("LongScalp", strategy.long, qty = baseQty * 0.5)
strategy.entry("LongRun", strategy.long, qty = baseQty * 0.5)
supUsed := true
supArmed := false
supBosOK := false
//━━━━━━━━━━ SHORT ENTRIES ━━━━━━━━━━
if shortSignal
if isMinimal
shortEntry := close
shortSL := shortEntry + slPoints
shortTP1 := shortEntry - tp1Points
shortTP2 := shortEntry - slPoints * runnerRR
shortBE := false
strategy.entry("Short", strategy.short)
resUsed := true
resArmed := false
resBosOK := false
else if isHybrid
shortRunEntry := close
shortRunSL := shortRunEntry + slPoints
shortRunTP1 := shortRunEntry - tp1Points
shortRunTP2 := shortRunEntry - slPoints * runnerRR
shortRunBE := false
strategy.entry("ShortScalp", strategy.short, qty = baseQty * 50)
strategy.entry("ShortRun", strategy.short, qty = baseQty * 50)
resUsed := true
resArmed := false
resBosOK := false
//━━━━━━━━━━━━━━━━━━━
// 8. EXIT LOGIC – MINIMAL MODE
//━━━━━━━━━━━━━━━━━━━
// LONG – Minimal Risk: 1 trade, BE after TP1, runner to TP2
if isMinimal and strategy.position_size > 0 and not na(longEntry)
// Move to BE once TP1 is touched
if not longBE and high >= longTP1
longBE := true
// Base SL: BE or initial SL
float dynLongSL = longBE ? longEntry : longSL
// Optional trailing after BE
if longBE
if runnerStopMode == "Structure trail" and not na(lastSwingLow) and lastSwingLow > longEntry
dynLongSL := math.max(dynLongSL, lastSwingLow)
if runnerStopMode == "ATR trail"
trailSL = close - atrTrailMult * atrTrail
dynLongSL := math.max(dynLongSL, trailSL)
strategy.exit("Long Exit", "Long", stop = dynLongSL, limit = longTP2)
// SHORT – Minimal Risk: 1 trade, BE after TP1, runner to TP2
if isMinimal and strategy.position_size < 0 and not na(shortEntry)
if not shortBE and low <= shortTP1
shortBE := true
float dynShortSL = shortBE ? shortEntry : shortSL
if shortBE
if runnerStopMode == "Structure trail" and not na(lastSwingHigh) and lastSwingHigh < shortEntry
dynShortSL := math.min(dynShortSL, lastSwingHigh)
if runnerStopMode == "ATR trail"
trailSLs = close + atrTrailMult * atrTrail
dynShortSL := math.min(dynShortSL, trailSLs)
strategy.exit("Short Exit", "Short", stop = dynShortSL, limit = shortTP2)
//━━━━━━━━━━━━━━━━━━━
// 9. EXIT LOGIC – HYBRID MODE
//━━━━━━━━━━━━━━━━━━━
// LONG – Hybrid: Scalp + Runner
if isHybrid
// Scalp leg: full TP at TP1
if strategy.opentrades > 0
strategy.exit("LScalp TP", "LongScalp", stop = longRunSL, limit = longRunTP1)
// Runner leg
if strategy.position_size > 0 and not na(longRunEntry)
if not longRunBE and high >= longRunTP1
longRunBE := true
float dynLongRunSL = longRunBE ? longRunEntry : longRunSL
if longRunBE
if runnerStopMode == "Structure trail" and not na(lastSwingLow) and lastSwingLow > longRunEntry
dynLongRunSL := math.max(dynLongRunSL, lastSwingLow)
if runnerStopMode == "ATR trail"
trailRunSL = close - atrTrailMult * atrTrail
dynLongRunSL := math.max(dynLongRunSL, trailRunSL)
strategy.exit("LRun TP", "LongRun", stop = dynLongRunSL, limit = longRunTP2)
// SHORT – Hybrid: Scalp + Runner
if isHybrid
if strategy.opentrades > 0
strategy.exit("SScalp TP", "ShortScalp", stop = shortRunSL, limit = shortRunTP1)
if strategy.position_size < 0 and not na(shortRunEntry)
if not shortRunBE and low <= shortRunTP1
shortRunBE := true
float dynShortRunSL = shortRunBE ? shortRunEntry : shortRunSL
if shortRunBE
if runnerStopMode == "Structure trail" and not na(lastSwingHigh) and lastSwingHigh < shortRunEntry
dynShortRunSL := math.min(dynShortRunSL, lastSwingHigh)
if runnerStopMode == "ATR trail"
trailRunSLs = close + atrTrailMult * atrTrail
dynShortRunSL := math.min(dynShortRunSL, trailRunSLs)
strategy.exit("SRun TP", "ShortRun", stop = dynShortRunSL, limit = shortRunTP2)
//━━━━━━━━━━━━━━━━━━━
// 10. RESET STATE WHEN FLAT
//━━━━━━━━━━━━━━━━━━━
if strategy.position_size == 0
longEntry := na
shortEntry := na
longBE := false
shortBE := false
longRunEntry := na
shortRunEntry := na
longRunBE := false
shortRunBE := false
//━━━━━━━━━━━━━━━━━━━
// 11. VISUAL ENTRY MARKERS
//━━━━━━━━━━━━━━━━━━━
plotshape(longSignal, title = "Long Signal", style = shape.triangleup,
location = location.belowbar, color = color.lime, size = size.tiny, text = "L")
plotshape(shortSignal, title = "Short Signal", style = shape.triangledown,
location = location.abovebar, color = color.red, size = size.tiny, text = "S")
ICT FVG & Order Flow (start version) [vanchesz]Overview
Master liquidity with precision. This indicator brings the iCT trading concept to life by automatically detecting liquidity pools, fair value gaps, and key swing points. It shows you exactly where price is likely to move next — from Internal Range Liquidity (IRL) to External Range Liquidity (ERL). With built-in multi-timeframe validation, it helps you stay one step ahead of the market.
Concept
Markets move where liquidity is. According to iCT theory, price usually sweeps internal liquidity (IRL) first and then hunts for external liquidity (ERL). By mapping this process in real time, the indicator provides a clear framework for understanding market structure, liquidity grabs, and directional bias.
High Probability Leg
Context States
Key Features
Detects the High-Probability Leg (HPL) — the leg containing a fair value gap (FVG)
Highlights unmitigated FVGs within the current context.
Marks swing points (SP), IRL levels, and ERL targets automatically.
Identifies IRL rejections when liquidity is taken inside the leg
Multi-timeframe sweep check – if a single candle takes both IRL and ERL, the indicator zooms into a lower timeframe to confirm which liquidity was swept first
Flexible settings for swing points, look back bar count, depth, colors, and style
How to use
Start from the monthly chart to define the macro trend.
Analyze the latest order flow leg:
Bullish FVG = bullish context, Bearish FVG = bearish context
Step down to the daily timeframe and repeat the analysis.
Wait for price to reject from IRL (the indicator highlights it automatically).
Drop to a lower timeframe for entries — use timeframe alignment to select the right LTF.
Enter with the FVG model, targeting liquidity within the leg.
Place take profit inside the context — e.g., never above ERL(in a bullish setup).
Pro version gives you
Alerts for all context events (New context, New FVG, IRL rejection, Context failing by 2CR, ERL/SP sweep
Check of context failing by 2CR (two candle rejection)
Suggestions for every context state
This indicator is provided solely for educational and informational purposes.
It does not constitute financial advice, trading signals, or a recommendation to buy or sell any instrument.
Ashok 07 Dec 25 updated scriptTried to fix the bugs in previous script. Even now improvements are needed, but for now it looks reasonably profiting.
Adaptive Alligator - Asymmetric MH (Entry Only)
Adaptive Alligator – Asymmetric Mexican Hat (Entry Only)
This strategy combines adaptive cycle detection (wavelet + autocorrelation), directional entropy, and a Mexican Hat filter to generate highly selective LONG entry signals. Exits are based solely on the Alligator structure. The system is designed to detect asymmetric, strong, and accelerating bullish phases while filtering out market noise.
1. Adaptive Cycle Detection: The strategy analyzes the median price using wavelet decomposition (Haar, Daubechies D4/D6, Symlet 4), wavelet detail energy, and autocorrelation. It also incorporates the ratio of short-term to long-term ATR volatility. Based on these components, it computes a dominant_cycle value, which dynamically controls the lengths of the Alligator lines (Jaw, Teeth, Lips). This adaptive behavior allows the Alligator to speed up during trending phases and slow down during noise or consolidation.
2. Directional Entropy: Entropy is measured separately for upward and downward movements within the selected lookback window. The entropy difference: e_diff = entropy_down - entropy_up represents the directional bias of the market. When e_diff > 0, the market shows an organized bullish pressure; when < 0, bearish dominance.
3. Mexican Hat Filter: The Mexican Hat (Ricker Wavelet) acts as a second-derivative filter, detecting local maxima in the acceleration of directional entropy. The filtered output (mh_out) is compared against an adaptive noise level computed as SMA(|mh_out|). A signal is considered strong only when: – mh_out exceeds the adaptive noise level, – mh_out is rising relative to the previous bar. This step is critical for eliminating false signals produced by random fluctuations.
4. Entry Logic: A LONG entry requires all three layers: (1) Alligator structure: Lips > Teeth > Jaw. (2) Directional entropy bias: e_diff > 0. (3) A strong, accelerating Mexican Hat signal confirmed by a user-defined number of bars. Once all conditions are satisfied, a buy_final entry is triggered.
5. Exit Logic: Exits are intentionally simple and rely solely on the Alligator: crossunder(lips, teeth) This clean separation ensures precise, adaptive entries and stable, consistent exits.
6. Visual Components: – Alligator lines: Jaw (blue), Teeth (red), Lips (green), plotted with their characteristic offsets. – Background coloring reflects signal strength: dark green (STRONG BUY), lime (acceleration), yellow (weak bias), transparent otherwise. – A dedicated panel displays e_diff (entropy difference), mh_out (Mexican Hat output), and the adaptive noise band.
7. Diagnostic Table: A compact diagnostic dashboard shows: – MH Value, – Noise Level, – MH Acceleration (YES/NO), – Signal Status (STRONG BUY / ACCELERATING / WEAK / BEARISH). It updates on the last bar, making it suitable for live monitoring.
8. Use Case: This strategy is highly selective and ideal as an entry module within trend-following systems. By combining wavelets, entropy, and adaptive noise modeling, it effectively filters out consolidation periods and focuses only on statistically significant bullish transitions. It can be integrated with various exit frameworks such as ATR stops, channel-based exits, range boxes, or trailing logic.
Smart Trend Cloud + Dynamic Gate (V 2.3)Smart Trend Cloud + Dynamic Gate
The Smart Trend Cloud + Dynamic Gate is a comprehensive trend-following system designed to filter out market noise and identify high-probability trend entries. Unlike simple Moving Average crossovers which often fail in ranging markets, this indicator employs a multi-stage validation system (The "Gate") combining Volume, Momentum, and Volatility filters to ensure you only trade when the market has conviction.
Key Features:
> Multi-Type Trend Cloud: Choose between HMA (Hull Moving Average), EMA, or ZeroLag EMA to define the trend baseline.
> The "Dynamic Gate" Filter: A crossover alone does not trigger a signal. The move must be validated by Relative Volume or MACD Histogram momentum within a specific window.
> Choppiness Suppression: Integrated ADX filter turns the candles gray during low-volatility consolidation zones to prevent over-trading.
> Stretch Bands: Optional ATR-based bands to highlight when price is over-extended from the mean.
> Live Dashboard: A table on the chart displaying current Trend State, Relative Volume strength, and ADX values.
How logic Works
1. Trend Definition & The Cloud The core trend is defined by the relationship between a Fast and Slow Moving Average.
Visuals: The space between these MA's forms the "Cloud". The cloud color transparency adjusts dynamically based on the strength of the trend (the spread between the MAs).
MA Options:
HMA: Best for scalping (1m/5m) due to low lag.
ZeroLag EMA: Custom calculation to reduce latency while retaining smoothness.
EMA: Standard trend following.
2. The Entry Gate (Validation) To avoid false signals during "whipsaw" price action, this script uses a logic gate. When a MA crossover occurs, it enters a "Pending" state. It only confirms a BULL or BEAR state if one of the following conditions is met within Gate Window bars:
Volume Spike: Relative Volume (Current Vol / Avg Vol) is greater than the defined threshold (default 1.2x).
Momentum Shift: The MACD Histogram confirms the direction of the trend.
3. Consolidation Filter The script calculates the ADX (Average Directional Index). If the ADX is below the Min ADX Strength threshold (default 20), the market is considered "Choppy."
Visual: Bars turn Gray.
Logic: Trend signals are suppressed until volatility expands.
4. Visual Dashboard A panel is located in the top-right corner providing real-time data:
Trend: Current State (Bull, Bear, or Chop).
Vol: Current Relative Volume (Green if > 1.0).
ADX: Current Trend Strength value.
Settings:
Trend Settings:
Adjust MA types and lengths to fit your timeframe.
Entry Gate: Toggle the Volume/Price gate on/off and adjust the Relative Volume requirement.
Consolidation: Enable/Disable the ADX filter to see all signals or only high-strength ones.
Visuals: Toggle the Cloud, Dashboard, or "Stretch Bands" (ATR bands) to declutter your chart.
Recommended Settings by Timeframe
Since different timeframes require different sensitivities to noise, here are the optimized settings for the Smart Trend Cloud:
⚡ 5 Minute Chart (Scalping)
Best for: Catching quick intraday momentum bursts while filtering chop.
MA Type: HMA (Hull Moving Average for speed)
Fast Length: 9
Slow Length: 21
Min Relative Volume: 1.3 (Requires higher volume to confirm entry)
Min ADX: 25 (Stricter chop filter)
⏱️ 15 Minute Chart (Intraday Swing)
Best for: Day trading with a balance of speed and stability.
MA Type: ZeroLag EMA (Reduces noise better than HMA)
Fast Length: 10
Slow Length: 30
Min Relative Volume: 1.2
Min ADX: 20
hrs 1 Hour Chart (Short-Term Swing)
Best for: Capturing the trend of the week.
MA Type: EMA or ZeroLag EMA
Fast Length: 12
Slow Length: 26 (Classic MACD correlation)
Min Relative Volume: 1.1
Min ADX: 20
📅 1 Day Chart (Position Trading)
Best for: Long-term trends and "Golden Cross" style entries.
MA Type: EMA (Standard Institutional Moving Average)
Fast Length: 20
Slow Length: 50
Min Relative Volume: 1.2
Min ADX: 15 (Allows for earlier entries on major trend shifts)
Alerts:
The script includes built-in alertcondition events for:
Trend Start: Bull (Valid trend detected after filtering).
Trend Start: Bear (Valid trend detected after filtering).
Access & Authorization
This is an Invite-Only script.
XΩ — Trade Commander (Global)1. What is XΩ — Trade Commander?
XΩ — Trade Commander (Global) is a post‑entry position management system.
It does not tell you where to enter. Instead, it helps you manage a trade after you are already in:
Dynamic Trailing Stop based on volatility (ATR)
Visual Safe Zone under price
R‑Multiple targets (1R, 2R, 3R) for profit‑taking
A live Position Dashboard with PnL and suggested actions
Exit alert when price breaks the Trailing Stop
Plus a ZERO GENESIS brand signature on the chart
Think of it as a trade commander / position guardian that enforces your risk and trailing rules.
2. Basic setup (Inputs)
In the Active Position Settings group:
Position Active?
Turn ON when you have a live position you want to manage.
Turn OFF when flat (no position), to effectively disable the management logic.
Avg Entry Price
Enter your average entry price (if you scaled in, use your weighted average).
This is the reference for all PnL and R calculations.
Initial Stop Loss
Your original invalidation price (hard stop) when you planned the trade.
Used to define:
The size of 1R (initial risk unit)
The locations of 1R, 2R, 3R targets.
Position Size (Units)
Size of your current position (number of shares/coins/contracts, etc.).
Used to convert PnL into currency value.
In the Trailing Stop Engine group:
Trailing Width (xATR)
Controls how tight/loose the trailing stop is:
Smaller value → tighter, closer to price (protects faster, more likely to get stopped out early)
Larger value → looser, farther from price (lets winners run, accepts more swing)
Source
Price source for the trailing engine:
AVA → smoothed price (reduces noise and “random” stop‑outs)
Close → closing price
High/Low → mid of high & low
In the Take Profit Targets (R-Multiples) group:
Show R-Levels
Turn ON to draw 1R, 2R, 3R reference lines on the chart.
Turn OFF if you prefer a cleaner chart.
3. How to read the indicator on the chart
Once Position Active? is ON and you’ve filled Avg Entry Price / Initial Stop Loss / Position Size, you’ll see:
3.1. Trailing Stop line (“The Shield”)
A blue/gray line below price (for long trades):
It only moves up, never down (ratchet‑style trailing).
When price rises → the trailing stop is adjusted upward.
When price falls → the trailing stop stays in place, not lowered.
Color:
Blue → price is still above the trailing stop (protected, trade is “alive”).
Gray → price is below the trailing stop (trailing has been violated).
Visually, this line is your dynamic protective shield.
3.2. Safe Zone (blue fill)
Light blue fill between price (chosen source) and the Trailing Stop line.
Represents your current buffer:
Thick Safe Zone → good distance to the stop → room for normal volatility.
Thin Safe Zone → close to stop → trade is at risk of being closed.
3.3. Entry & Hard Stop lines
Horizontal lines:
Entry Price → gray dotted line
Initial Stop Loss → solid red line
Helps you always see:
Where the trade started
Where the original invalidation was (your planned “I’m wrong here” level)
3.4. R‑Multiple Targets (1R, 2R, 3R)
When Show R-Levels is ON and Initial Stop Loss is set:
1R: dashed green line, labeled 1R
2R: dashed green line, labeled 2R
3R: dashed green line, labeled 3R (Target)
Use these for:
Planning partial take‑profits
Knowing when it’s reasonable to move your stop (e.g., to breakeven at 1R)
Evaluating your trade in terms of reward vs initial risk
3.5. “POSITION GUARDIAN” Dashboard label
Near the current price, you’ll see a label like:
Title: 🛡️ POSITION GUARDIAN
Inside:
Size: your position size and entry price
PnL: current profit/loss percentage and value (auto‑formatted, e.g. 1.23M, 45K, etc.)
R-Multiple: your current R (e.g., 0.7R, 1.5R, 3.2R)
TRAILING STOP: the current trailing stop price
ACTION: a suggested action string, for example:
🚫 TRAILING HIT -> EXIT NOW!
🚀 RUNNING PROFIT (x.xR) -> Hold or Trim
✅ IN PROFIT (x.xR) -> Move SL to BE
⚠️ DRAWDOWN -> Watch Trailing Stop
🟢 BREAKEVEN -> Holding
The text color changes (red, green, yellow, orange, etc.) to match the situation, so you can read your trade status at a glance.
4. How to use it in practice
Step 1 – Right after entering a trade
Open a position using your own entry strategy (Commander does not give entries).
On the TradingView chart:
Set Position Active? = true
Fill:
Avg Entry Price = your actual entry
Initial Stop Loss = your planned hard stop
Position Size = the size of your position
Adjust:
Trailing Width (xATR):
Lower for tight, short‑term trades (scalp/intraday).
Higher for swing/position trades to avoid premature exits.
Turn Show R-Levels ON if you trade in terms of R.
Now the script will start drawing the Trailing Stop, Safe Zone, R levels, and Dashboard.
Step 2 – While the trade is running
When price moves in your favor:
Track:
Your current R-Multiple
How much Safe Zone you have
Typical logic:
Once you reach ≥ 1R, consider moving your hard stop to breakeven (BE).
Around 2R–3R, consider:
Taking partial profits
Tightening the trailing
Letting the remainder run with the Shield.
When price pulls back:
If price breaks below the Trailing Stop:
Dashboard shows the red warning: TRAILING HIT -> EXIT NOW!
The alert (if enabled) will also fire.
→ This is your disciplined exit condition according to Commander.
When price hovers near entry:
Dashboard shows BREAKEVEN or DRAWDOWN.
You can:
Give the setup more time
Or decide to scratch the trade if it no longer fits your plan
(The key is: you’re deciding based on a clear snapshot, not pure emotion.)
5. Alerts
The script contains one key alert:
XΩ EXIT SIGNAL
Triggers when price crosses under the Trailing Stop.
Message: "Price breached Trailing Stop. Exit position immediately!"
Use this alert to automate your exit discipline: you don’t need to stare at the chart to know when your trailing stop is hit.
Minho Index | SETUP (Safe Filter 90%)//@version=5
indicator("Minho Index | SETUP (Safe Filter 90%)", shorttitle="Minho Index | SETUP+", overlay=false)
//--------------------------------------------------------
// ⚙️ INPUTS
//--------------------------------------------------------
bullColor = input.color(color.new(color.lime, 0), "Bull Color (Minho Green)")
bearColor = input.color(color.new(color.red, 0), "Bear Color (Red)")
neutralColor = input.color(color.new(color.white, 0), "Neutral Color (White)")
lineWidth = input.int(2, "Line Width")
period = input.int(14, "RSI Period")
centerLine = input.float(50.0, "Central Line (Fixed at 50)")
//--------------------------------------------------------
// 🧠 BASE RSI + INTERNAL SMOOTHING
//--------------------------------------------------------
rsiBase = ta.rsi(close, period)
rsiSmooth = ta.sma(rsiBase, 3) // light smoothing
//--------------------------------------------------------
// 🔍 TREND DETECTION AND NEUTRAL ZONE
//--------------------------------------------------------
trendUp = (rsiSmooth > rsiSmooth ) and (rsiSmooth > rsiSmooth )
trendDown = (rsiSmooth < rsiSmooth ) and (rsiSmooth < rsiSmooth )
slopeUp = (rsiSmooth > rsiSmooth )
slopeDown = (rsiSmooth < rsiSmooth )
lineColor = neutralColor
if trendUp
lineColor := bullColor
else if trendDown
lineColor := bearColor
else if slopeUp or slopeDown
lineColor := neutralColor
//--------------------------------------------------------
// 📈 MAIN INDEX LINE
//--------------------------------------------------------
plot(rsiSmooth, title="Dynamic RSI Line (Safe Filter)", color=lineColor, linewidth=lineWidth)
//--------------------------------------------------------
// ⚪ FIXED CENTRAL LINE
//--------------------------------------------------------
plot(centerLine, title="Central Line (Highlight)", color=neutralColor, linewidth=1)
//--------------------------------------------------------
// 📊 NORMALIZED MOVING AVERAGES (SMA20 and EMA20)
//--------------------------------------------------------
SMA20 = ta.sma(close, 20)
EMA20 = ta.ema(close, 20)
// Normalization 0–100
minPrice = ta.lowest(low, 100)
maxPrice = ta.highest(high, 100)
rangeCalc = maxPrice - minPrice
rangeCalc := rangeCalc == 0 ? 1 : rangeCalc
normSMA = ((SMA20 - minPrice) / rangeCalc) * 100
normEMA = ((EMA20 - minPrice) / rangeCalc) * 100
//--------------------------------------------------------
// 🩶 MOVING AVERAGES PLOTS (GHOST-GREY STYLE)
//--------------------------------------------------------
ghostColor = color.new(color.rgb(200,200,200), 65)
plot(normSMA, title="SMA 20 (Ghost Grey)", color=ghostColor, linewidth=2)
plot(normEMA, title="EMA 20 (Ghost Grey)", color=ghostColor, linewidth=2)
//--------------------------------------------------------
// 🌈 FILL BETWEEN MOVING AVERAGES
//--------------------------------------------------------
bullCond = normSMA < normEMA
bearCond = normSMA > normEMA
fill(
plot(normSMA, display=display.none),
plot(normEMA, display=display.none),
color = bearCond ? color.new(color.red, 55) :
bullCond ? color.new(color.lime, 55) : na
)
//--------------------------------------------------------
// ✅ END OF INDICATOR
//--------------------------------------------------------
Obsidian Flux Matrix# Obsidian Flux Matrix | JackOfAllTrades
Made with my Senior Level AI Pine Script v6 coding bot for the community!
Narrative Overview
Obsidian Flux Matrix (OFM) is an open-source Pine Script v6 study that fuses social sentiment, higher timeframe trend bias, fair-value-gap detection, liquidity raids, VWAP gravitation, session profiling, and a diagnostic HUD. The layout keeps the obsidian palette so critical overlays stay readable without overwhelming a price chart.
Purpose & Scope
OFM focuses on actionable structure rather than marketing claims. It documents every driver that powers its confluence engine so reviewers understand what triggers each visual.
Core Analytical Pillars
1. Social Pulse Engine
Sentiment Webhook Feed: Accepts normalized scores (-1 to +1). Signals only arm when the EMA-smoothed value exceeds the `sentimentMin` input (0.35 by default).
Volume Confirmation: Requires local volume > 30-bar average × `volSpikeMult` (default 2.0) before sentiment flags.
EMA Cross Validation: Fast EMA 8 crossing above/below slow EMA 21 keeps momentum aligned with flow.
Momentum Alignment: Multi-timeframe momentum composite must agree (positive for longs, negative for shorts).
2. Peer Momentum Heatmap
Multi-Timeframe Blend: RSI + Stoch RSI fetched via request.security() on 1H/4H/1D by default.
Composite Scoring: Each timeframe votes +1/-1/0; totals are clamped between -3 and +3.
Intraday Readability: Configurable band thickness (1-5) so scalpers see context without losing space.
Dynamic Opacity: Stronger agreement boosts column opacity for quick bias checks.
3. Trend & Displacement Framework
Dual EMA Ribbon: Cyan/magenta ribbon highlights immediate posture.
HTF Bias: A higher-timeframe EMA (default 55 on 4H) sets macro direction.
Displacement Score: Body-to-ATR ratio (>1.4 default) detects impulses that seed FVGs or VWAP raids.
ATR Normalization: All thresholds float with volatility so the study adapts to assets and regimes.
4. Intelligent Fair Value Gap (FVG) System
Gap Detection: Three-candle logic (bullish: low > high ; bearish: high < low ) with ATR-sized minimums (0.15 × ATR default).
Overlap Prevention: Price-range checks stop redundant boxes.
Spacing Control: `fvgMinSpacing` (default 5) avoids stacking from the same impulse.
Storage Caps: Max three FVGs per side unless the user widens the limit.
Session Awareness: Kill zone filters keep taps focused on London/NY if desired.
Auto Cleanup: Boxes delete when price closes beyond their invalidation level.
5. VWAP Magnet + Liquidity Raid Engine
Session or Rolling VWAP: Toggle resets to match intraday or rolling preferences.
Equal High/Low Scanner: Looks back 20 bars by default for liquidity pools.
Displacement Filter: ATR multiplier ensures raids represent genuine liquidity sweeps.
Mean Reversion Focus: Signals fire when price displaces back toward VWAP following a raid.
6. Session Range Breakout System
Initial Balance Tracking: First N bars (15 default) define the session box.
Breakout Logic: Requires simultaneous liquidity spikes, nearby FVG activity, and supportive momentum.
Z-Score Volume Filter: >1.5σ by default to filter noisy moves.
7. Lifestyle Liquidity Scanner
Volume Z-Scores: 50-bar baseline highlights statistically significant spikes.
Smart Money Footprints: Bottom-of-chart squares color-code buy vs sell participation.
Panel Memory: HUD logs the last five raid timestamps, direction, and normalized size.
8. Risk Matrix & Diagnostic HUD
HUD Structure: Table in the top-right summarizes HTF bias, sentiment, momentum, range state, liquidity memory, and current risk references.
Signal Tags: Aggregates SPS, FVG, VWAP, Range, and Liquidity states into a compact string.
Risk Metrics: Swing-based stops (5-bar lookback) + ATR targets (1.5× default) keep risk transparent.
Signal Families & Alerts
Social Pulse (SPS): Volume-confirmed sentiment alignment; triangle markers with “SPS”.
Kill-Zone FVG: Session + HTF alignment + FVG tap; arrow markers plus SL/TP labels.
Local FVG: Captures local reversals when HTF bias has not flipped yet.
VWAP Raid: Equal-high/low raids that snap toward VWAP; “VWAP” label markers.
Range Breakout: Initial balance violations with liquidity and imbalance confirmation; circle markers.
Liquidity Spike: Z-score spikes ≥ threshold; square markers along the baseline.
Visual Design & Customization
Theme Palette: Primary background RGB (12,6,24). Accent shading RGB (26,10,48). Long accents RGB (88,174,255). Short accents RGB (219,109,255).
Stylized Candles: Optional overlay using theme colors.
Signal Toggles: Independently enable markers, heatmap, and diagnostics.
Label Spacing: Auto-spacing enforces ≥4-bar gaps to prevent text overlap.
Customization & Workflow Notes
Adjust ATR/FVG thresholds when volatility shifts.
Re-anchor sentiment to your webhook cadence; EMA smoothing (default 5) dampens noise.
Reposition the HUD by editing the `table.new` coordinates.
Use multiples of the chart timeframe for HTF requests to minimize load.
Session inputs accept exchange-local time; align them to your market.
Performance & Compliance
Pure Pine v6: Single-line statements, no `lookahead_on`.
Resource Safe: Arrays trimmed, boxes limited, `request.security` cached.
Repaint Awareness: Signals confirm on close; alerts mirror on-chart logic.
Runtime Safety: Arrays/loops guard against `na`.
Use Cases
Measure when social sentiment aligns with structure.
Plan ICT-style intraday rebalances around session-specific FVG taps.
Fade VWAP raids when displacement shows exhaustion.
Watch initial balance breaks backed by statistical volume.
Keep risk/target references anchored in ATR logic.
Signal Logic Snapshot
Social Pulse Long/Short: `sentimentEMA` gated by `sentimentMin`, `volSpike`, EMA 8/21 cross, and `momoComposite` sign agreement. Keeps hype tied to structural follow-through.
Kill-Zone FVG Long/Short: Requires session filter, HTF EMA bias alignment, and an active FVG tap (`bullFvgTap` / `bearFvgTap`). Labels include swing stops + ATR targets pulled from `swingLookback` and `liqTargetMultiple`.
Local FVG Long/Short: Uses `localBullish` / `localBearish` heuristics (EMA slope, displacement, sequential closes) to surface intraday reversals even when HTF bias has not flipped.
VWAP Raids: Detect equal-high/equal-low sweeps (`raidHigh`, `raidLow`) that revert toward `sessionVwap` or rolling VWAP when displacement exceeds `vwapAlertDisplace`.
Range Breakouts: Combine `rangeComplete`, breakout confirmation, liquidity spikes, and nearby FVG activity for statistically backed initial balance breaks.
Liquidity Spikes: Volume Z-score > `zScoreThreshold` logs direction, size, and timestamp for the HUD and optional review workflows.
Session Logic & VWAP Handling
Kill zone + NY session inputs use TradingView’s session strings; `f_inSession()` drives both visual shading and whether FVG taps are tradeable when `killZoneOnly` is true.
Session VWAP resets using cumulative price × volume sums that restart when the daily timestamp changes; rolling VWAP falls back to `ta.vwap(hlc3)` for instruments where daily resets are less relevant.
Initial balance box (`rangeBars` input) locks once complete, extends forward, and stays on chart to contextualize later liquidity raids or breakouts.
Parameter Reference
Trend: `emaFastLen`, `emaSlowLen`, `htfResolution`, `htfEmaLen`, `showEmaRibbon`, `showHtfBiasLine`.
Momentum: `tf1`, `tf2`, `tf3`, `rsiLen`, `stochLen`, `stochSmooth`, `heatmapHeight`.
Volume/Liquidity: `volLookback`, `volSpikeMult`, `zScoreLen`, `zScoreThreshold`, `equalLookback`.
VWAP & Sessions: `vwapMode`, `showVwapLine`, `vwapAlertDisplace`, `killSession`, `nySession`, `showSessionShade`, `rangeBars`.
FVG/Risk: `fvgMinTicks`, `fvgLookback`, `fvgMinSpacing`, `killZoneOnly`, `liqTargetMultiple`, `swingLookback`.
Visualization Toggles: `showSignalMarkers`, `showHeatmapBand`, `showInfoPanel`, `showStylizedCandles`.
Workflow Recipes
Kill-Zone Continuation: During the defined kill session, look for `killFvgLong` or `killFvgShort` arrows that line up with `sentimentValid` and positive `momoComposite`. Use the HUD’s risk readout to confirm SL/TP distances before entering.
VWAP Raid Fade: Outside kill zone, track `raidToVwapLong/Short`. Confirm the candle body exceeds the displacement multiplier, and price crosses back toward VWAP before considering reversions.
Range Break Monitor: After the initial balance locks, mark `rangeBreakLong/Short` circles only when the momentum band is >0 or <0 respectively and a fresh FVG box sits near price.
Liquidity Spike Review: When the HUD shows “Liquidity” timestamps, hover the plotted squares at chart bottom to see whether spikes were buy/sell oriented and if local FVGs formed immediately after.
Metadata
Author: officialjackofalltrades
Platform: TradingView (Pine Script v6)
Category: Sentiment + Liquidity Intelligence
Hope you Enjoy!
Linda Raschke 5 SMA Reversal [LuciTech]How This Indicator Works:
-5 SMA Tracking: Calculates a 5-period simple moving average and plots it on the chart.
-Extension Counter: Counts consecutive bars where price closes above or below the 5 SMA.
-BUY Signals (Green Up Arrow): Triggers when price closes BELOW the 5 SMA after 7+ consecutive closes ABOVE it—indicates a reversal opportunity into dynamic support.
-SELL Signals (Red Down Arrow): Triggers when price closes ABOVE the 5 SMA after 7+ consecutive closes BELOW it—indicates a reversal bounce setup.
-No Repainting: Signals only plot on confirmed bar closes; no repainting issues.
Linda Raschke's Core Principles:
-Extended Run = Imbalance: When price stays above/below the 5 SMA for 7+ bars, it's a one-sided market; mean reversion is likely.
-First Cross = Trigger: The first close back across the SMA after an extension is the reversal signal, not every touch.
-No Setup? No Trade: Without a prior extension or "three-bar balance" filter, a 5 SMA tag is noise. The model requires the prior momentum condition.
-Uptrend Buys: In uptrends, buy dips to the SMA (dynamic support) as long as the weekly/monthly trend is intact.
-Downtrend Fades: In downtrends, treat first rallies above the SMA as bounce fades into lower lows (especially after 14+ bars below).






















