SMA Crossover StrategyThis is a simple Multiple SMA Crossover strategy that works wonders with alpha stocks, ETF, Indices and Bees.
Apply on monthly and quarterly charts and reap better, bigger rewards - You will be able to beat the index returns.
Wish you all success
Do follow me in youtube channel name MyBillioninc
지표 및 전략
RSICó RSI (14)
và 2 đường EMA
EMA (9)
WMA (45)
RSI cắt lên thì chuyển xanh
RSI cắt xuống thì chuyển đỏ
[QuantLabs] Kinetic Fusion Ultra The Problem with Standard Indicators Most trading indicators fail for one simple reason: They are Static. A standard Stochastic or CCI uses fixed variables that might work perfectly on EURUSD but fail completely on Bitcoin or Gold. This forces you to constantly tweak settings to avoid false signals, and usually, by the time you adjust them, the move is over.
Kinetic Fusion Ultra Kinetic Fusion Ultra solves this by combining Stochastic Position (Static) with Adaptive Momentum (Velocity). At its core is a proprietary Adaptive Normalization Engine. This algorithm "learns" the volatility of the asset over the last 100 bars and auto-scales the momentum data to fit perfectly into a 0-100 oscillator window.
Whether you are scalping a 1-minute Crypto chart or swinging a Weekly Stock chart, the signals remain mathematically consistent.
updated swapsV-Tap (also called D-Tap) is a standardized auxiliary power output found on V-mount batteries. It provides direct DC power—typically around 14.4V—to run external accessories such as monitors, wireless video transmitters, follow-focus motors, LED lights, and audio equipment. V-Tap ports allow filmmakers to power multiple devices from a single battery, reducing cable clutter and improving mobility on set.
If you want it shorter, more technical, or more marketing-style, tell me where you’re using it (product page, manual, school project, etc.).
VWAP 2nd stdev Mean Reversion StrategyThis strategy is based on the daily WVAP 2nd dev reversion.
The idea is to take a trade on the 2nd dev touch with the WVAP itself as a target.
The WVAP should be flat.
For daily trade only.
Use for ES/MES on the 1-minute timeframe.
VWAP Suite (Updated 3W + Long Term)VWAP Suite (Updated 3W + Long Term)VWAP Suite (Updated 3W + Long Term)VWAP Suite (Updated 3W + Long Term)VWAP Suite (Updated 3W + Long Term)VWAP Suite (Updated 3W + Long Term)VWAP Suite (Updated 3W + Long Term)VWAP Suite (Updated 3W + Long Term)VWAP Suite (Updated 3W + Long Term)VWAP Suite (Updated 3W + Long Term)VWAP Suite (Updated 3W + Long Term)VWAP Suite (Updated 3W + Long Term)VWAP Suite (Updated 3W + Long Term)VWAP Suite (Updated 3W + Long Term)VWAP Suite (Updated 3W + Long Term)VWAP Suite (Updated 3W + Long Term)VWAP Suite (Updated 3W + Long Term)v
VWAP Suite (Updated 3W + Long Term)VWAP Suite (Updated 3W + Long Term)VWAP Suite (Updated 3W + Long Term)VWAP Suite (Updated 3W + Long Term)VWAP Suite (Updated 3W + Long Term)VWAP Suite (Updated 3W + Long Term)VWAP Suite (Updated 3W + Long Term)VWAP Suite (Updated 3W + Long Term)
Aggressive ScalpingAggressive Scalping — EMA × RSI × VWAP × ADX Mesh-Up
Aggressive Scalping is a precision intraday indicator designed for range-to-early expansion environments, where most scalping strategies either over-trade or get chopped up.
This indicator intentionally meshes four complementary tools—EMA structure, RSI momentum, VWAP bias, and ADX regime detection—to isolate high-probability micro-moves while filtering out trend exhaustion and late entries.
The goal is simple:
trade only when price is aligned, momentum is controlled, and the market is quiet enough to move cleanly.
Why This Mesh-Up Exists
Most scalping indicators fail because they:
Trade every EMA cross
Ignore market regime
Chase overextended RSI
Enter against VWAP
This script solves that by assigning one clear job to each component:
1️⃣ EMA Structure (Fast vs Slow)
Defines short-term directional bias
Triggers precise entry timing
Provides clean crossover signals (▲ / ▼)
EMAs answer: Which side should I be on right now?
2️⃣ RSI Control (Not Overbought / Oversold)
Prevents chasing extended moves
Filters entries when momentum is already spent
Keeps scalps inside continuation windows
RSI answers: Is there still fuel left for a scalp?
3️⃣ VWAP Bias (Institutional Fair Value)
Aligns trades with institutional positioning
Blocks longs below VWAP and shorts above VWAP (optional)
Greatly reduces counter-trend noise
VWAP answers: Am I trading with or against the real money?
4️⃣ ADX Regime Filter (Range Detection)
Allows entries only when ADX is below a threshold
Avoids high-ADX trend exhaustion and fake pullbacks
Highlights scalp-friendly compression zones
ADX answers: Is the market calm enough to scalp?
How to Use the Signals
🔺 EMA Bullish Crossover (Green Triangle Up)
Fast EMA crosses above Slow EMA
Early directional shift
Can be used as:
Standalone momentum trigger
Confirmation for pullback entries
🔻 EMA Bearish Crossover (Red Triangle Down)
Fast EMA crosses below Slow EMA
Early downside signal
Ideal for quick downside scalps or fades
🟢 Long Entry Signal (Larger Green Triangle)
Triggers only when ALL conditions align:
EMA bullish structure
RSI not overbought
ADX below threshold (range mode)
Price above VWAP (if enabled)
🔴 Short Entry Signal (Larger Red Triangle)
Triggers only when:
EMA bearish structure
RSI not oversold
ADX below threshold
Price below VWAP (if enabled)
These are high-quality scalp entries, not constant signals.
Best Market Conditions
✔ Choppy to mildly trending sessions
✔ Open, mid-day, power hour rotations
✔ Large-cap & mega-cap stocks
✔ Index futures (ES, NQ)
✔ VWAP-respecting instruments
🚫 Not designed for:
Strong trend days
News-driven momentum explosions
Illiquid small caps
Final Notes
This indicator is not a prediction tool.
It is a structure-and-regime alignment tool.
Use it to:
Reduce over-trading
Improve entry precision
Trade fewer, cleaner setups
Stay aligned with market context
Pair it with:
Strict risk management
Session awareness
Price action confirmation
Structure + MTF + Failed 2U/2D + PDH/PDL Sweeps (Toolkit)How this behaves (so you are not guessing)
1) Liquidity sweeps (PDH/PDL)
PDH Sweep: price trades above yesterday’s high, then (by default) closes back below PDH
PDL Sweep: price trades below yesterday’s low, then closes back above PDL
You can allow wick-only sweeps via the input if you want more signals (and more noise, because humans love noise).
2) Failed 2U / Failed 2D
Failed 2U: candle takes prior high but closes back below it (failure)
Failed 2D: candle takes prior low but closes back above it
If you enable confirmation, the script triggers the “confirmed” entry only when the next candle breaks the fail candle in the intended direction.
3) FTFC strength meter (0–3)
Uses 3 higher timeframes you pick (defaults 15, 60, 240).
Strength = how many of those TF candles are bullish or bearish.
“Aligned” means 2 or 3 agree.
4) Consolidation filter
Flags consolidation when:
You have an inside-bar streak (default 2+) and/or
ATR is compressed vs its own SMA (default threshold 0.80)
Then it can block entries if you enable “Avoid entries during consolidation”.
5) “Setup Ready” alert
Triggers before entries when:
Sweep/rejection context exists (PDH/PDL)
Structure signal is forming (failed or reversal pattern)
Consolidation filter allows it
That’s your “stop chasing every candle” mechanism.
MTF Confluence Reporter - Trend & Momentum AlignmentThis indicator is a multi-timeframe confluence dashboard designed to answer one question clearly:
“Across my key timeframes, is the market leaning Bullish, Bearish, or Mixed—and how strong is that lean?”
It combines two separate “votes” per timeframe:
4MA Direction (trend alignment / slope bias)
StochRSI State (momentum bias)
Those votes are then blended into a single Confluence result, shown as a clean readout with a 0–100 Strength score, plus hysteresis to reduce flicker near the decision boundary.
What you see in the table
1) 4MA
This is the trend component. It summarizes whether the selected timeframes are generally Bull or Bear based on the moving-average direction logic (your 4MA engine).
2) Stoch
This is the momentum component. It summarizes whether StochRSI across the selected timeframes is leaning Bull or Bear.
3) Qualified (YES/NO)
A safety gate. “Qualified = YES” means the internal conditions required for a valid confluence read are met (i.e., enough alignment/consistency to treat the output as actionable).
If it’s NO, treat the market as mixed / transitional and tighten risk.
4) Strength (0–100)
Your blended score (trend + momentum).
Higher = stronger agreement across timeframes.
A simple way to interpret it:
80–100: Strong alignment (clean regime)
60–79: Moderate alignment (tradable, but expect chop)
50–59: Weak / transitioning (be cautious)
< 50: Bearish side of the regime logic (or mixed turning down)
5) Strength Bar
A visual “battery meter” for the Strength score. This is meant to be read at a glance during fast decision-making.
6) Confluence (BULL/BEAR)
The actual regime output. This is the “final answer” based on the Strength score and hysteresis rules.
7) Hysteresis (Enter / Exit thresholds)
This is the anti-flicker system.
Example shown on the chart:
Enter > 60
Exit < 50
Meaning:
The script only “flips ON” a Bull regime when strength becomes convincingly Bullish (above 60).
It won’t “flip OFF” until strength meaningfully weakens (below 50).
This reduces rapid flipping during 50/50 conditions.
How to use it (practical workflow)
Step 1 — Use Confluence as your “market mode”
BULL: Favor longs, trend-following entries, buying pullbacks.
BEAR: Favor defense, shorts/hedges (if you trade them), or wait for reset.
Qualified = NO: Reduce size, tighten stops, or wait—conditions are not clean.
Step 2 — Use Strength to time aggressiveness
Strength rising: Momentum is joining trend → entries tend to have better follow-through.
Strength falling: Alignment is fading → take profit quicker or tighten risk.
Step 3 — Use hysteresis as your “noise filter”
If you’re a swing trader, hysteresis is your friend:
Don’t overreact to a single bar change.
Let the regime confirm and stay confirmed.
Best use-cases
Swing trading / position bias (daily/weekly context)
Hedge decisions (when alignment flips and stays flipped)
Filtering entries from other tools (only take signals that match the regime)
Settings notes:
This script is designed to be flexible:
You can choose which timeframes matter most to you (commonly 1H / 4H / 1D / 1W / 1M).
If your version includes weighting, you can tune weights to match your trading style (short-term vs swing).
Thresholds (Enter/Exit) can be tightened for faster flips or widened for smoother regimes.
Important notes / disclaimer (TradingView-safe)
This tool is an informational confluence dashboard, not financial advice. No indicator can predict the future. Always confirm with market structure, risk management, and your own plan. Past behavior on a chart does not guarantee future results.
How I Use This Indicator (Example Workflow)
I use this tool primarily as a market-bias and risk-filter, not as a standalone entry signal.
Establish the regime first
I start by checking the Confluence row:
BULL: I focus on long-side ideas and bullish continuation setups.
BEAR: I become defensive, avoid counter-trend trades, or look for short/hedge opportunities where applicable.
Qualified = NO: I treat the market as transitional and reduce risk.
Use Strength to adjust aggressiveness
When Strength is elevated and rising, I am more comfortable holding positions and allowing trades more room to develop.
When Strength is declining, I tighten stops, reduce position size, or manage trades more actively.
Let hysteresis do the work
I do not react to every minor fluctuation near the midpoint.
The built-in hysteresis thresholds help me stay aligned with the prevailing regime instead of over-trading during indecision.
Entries come from other tools
Actual entries are taken using price structure, support/resistance, or other indicators.
This dashboard simply tells me whether the broader environment supports that idea or not.
In short, I treat this indicator as a context and confirmation layer—it helps answer when to be aggressive, cautious, or patient.
RSI: Sessions + Days + Risk ManagedThis is a disciplined RSI mean-reversion strategy designed for traders who prioritize risk management and session confluence. Instead of trading 24/7, this strategy focuses on high-liquidity market sessions (London, New York, etc.) and uses dynamic position sizing to ensure a consistent dollar-amount risk per trade.
How it Works:
Entry Logic: The strategy triggers a Long when the RSI crosses above the Oversold level (30) and a Short when it crosses below the Overbought level (70).
Session Filtering: Built-in filters allow you to restrict trading to specific days of the week and specific market hours (NY, London, Tokyo, or Sydney sessions).
Force Close: An optional feature to automatically close open positions at the end of a trading session to avoid overnight gap risk.
Pro-Level Risk Management:
Dynamic Sizing: The script automatically calculates your position size based on a fixed dollar risk (e.g., $5 per trade).
Technical Stops: Stop losses are automatically placed at the high (for shorts) or low (for longs) of the entry candle.
Fixed Reward-to-Risk: Trades are executed with a customizable R:R ratio (default 2.0), ensuring your winners are twice the size of your losses.
Visual Features:
Real-time TP/SL lines while a trade is active.
Post-trade labels indicating "Win" or "Loss" markers.
Clean, organized input menu for easy optimization.
Best Used On:
Timeframes: 5m, 15m, or 1h.
Assets: Forex pairs, Indices (US30, NAS100), and liquid Crypto pairs.
Gamma Hedging Pressure 🧠 HOW TO USE THIS (TRADING RULES):
🔴 NEGATIVE GAMMA (Red)
✔ Trade breakouts
✔ Hold winners
✔ Avoid fading moves
✔ Best for trend days
🟢 POSITIVE GAMMA (Green)
✔ Trade mean reversion
✔ Fade extremes
✔ Take profits quickly
✔ Best for scalping
⚪ NEUTRAL
❌ Reduce size
❌ Avoid forcing trades
TJR asia session sweep//@version=5
strategy("TJR asia session sweep", "TJR Asia Sweep", overlay=true, max_lines_count=500, max_labels_count=500)
// Input settings
show_asian = input.bool(true, "Show Asian Session", group="Visual Settings")
show_london = input.bool(true, "Show London Session", group="Visual Settings")
show_swing_points = input.bool(true, "Show Asian Swing Points", group="Visual Settings")
show_market_structure = input.bool(true, "Show Market Structure", group="Visual Settings")
show_bos = input.bool(true, "Show Break of Structure", group="Visual Settings")
// Session Time Settings
asian_start_hour_input = input.int(22, "Asian Session Start Hour", minval=0, maxval=23, group="Session Times")
asian_end_hour_input = input.int(3, "Asian Session End Hour", minval=0, maxval=23, group="Session Times")
london_start_hour_input = input.int(3, "London Session Start Hour", minval=0, maxval=23, group="Session Times")
london_end_hour_input = input.int(8, "London Session End Hour", minval=0, maxval=23, group="Session Times")
session_timezone = input.string("America/New_York", "Session Timezone", options= , group="Session Times")
// Risk Management Settings
use_atr_sl = input.bool(false, "Use ATR Multiplier for Stop Loss", group="Risk Management")
atr_length = input.int(14, "ATR Length", minval=1, maxval=50, group="Risk Management")
atr_multiplier = input.float(2.0, "ATR Multiplier for Stop Loss", minval=0.5, maxval=10.0, group="Risk Management")
force_london_close = input.bool(true, "Force Close at London Session End", group="Risk Management")
cutoff_minutes = input.int(60, "Minutes Before Session End to Stop New Trades", minval=0, maxval=300, group="Risk Management")
// Position Sizing Settings
position_sizing_method = input.string("USD Risk", "Position Sizing Method", options= , group="Position Sizing")
usd_risk_per_trade = input.float(100.0, "USD Risk Per Trade", minval=1.0, maxval=10000.0, group="Position Sizing")
fixed_contracts = input.float(1.0, "Fixed Number of Contracts", minval=0.01, maxval=1000.0, step=0.01, group="Position Sizing")
// Color settings
asian_color = input.color(color.red, "Asian Session Color")
london_color = input.color(color.blue, "London Session Color")
swing_high_color = input.color(color.orange, "Swing High Color")
swing_low_color = input.color(color.lime, "Swing Low Color")
bullish_structure_color = input.color(color.green, "Bullish Structure Color")
bearish_structure_color = input.color(color.red, "Bearish Structure Color")
bos_color = input.color(color.orange, "Break of Structure Color")
// Line settings
line_width = input.int(2, "Line Width", minval=1, maxval=5)
// ATR calculation for stop loss
atr = ta.atr(atr_length)
// Position size calculation function
calculate_position_size(entry_price, stop_loss_price) =>
var float position_size = na
if position_sizing_method == "Fixed Contracts"
position_size := fixed_contracts
else // USD Risk method
stop_distance = math.abs(entry_price - stop_loss_price)
if stop_distance > 0
// Calculate position size based on USD risk per trade
// For forex: position_size = risk_amount / (stop_distance * point_value)
// For most forex pairs, point value = 1 (since we're dealing with price differences directly)
position_size := usd_risk_per_trade / stop_distance
else
position_size := fixed_contracts // Fallback to fixed contracts if stop distance is 0
position_size
// Session time definitions (using input variables)
asian_start_hour = asian_start_hour_input
asian_end_hour = asian_end_hour_input
london_start_hour = london_start_hour_input
london_end_hour = london_end_hour_input
// Get current hour using selected timezone
current_hour = hour(time, session_timezone)
// Previous hour for transition detection
prev_hour = hour(time , session_timezone)
// Session transition detection
asian_start = current_hour == asian_start_hour and prev_hour != asian_start_hour
asian_end = current_hour == asian_end_hour and prev_hour != asian_end_hour
london_start = current_hour == london_start_hour and prev_hour != london_start_hour
london_end = current_hour == london_end_hour and prev_hour != london_end_hour
// Session activity detection
asian_active = (current_hour >= asian_start_hour) or (current_hour < asian_end_hour)
london_active = (current_hour >= london_start_hour) and (current_hour < london_end_hour)
// Session boxes - keep previous sessions visible
var box asian_session_box = na
var box london_session_box = na
// Create Asian session box
if show_asian and asian_start
// Create new box at session start (previous box remains visible)
asian_session_box := box.new(bar_index, high, bar_index + 1, low,
border_color=asian_color, bgcolor=color.new(asian_color, 90),
border_width=2, border_style=line.style_solid)
// Pre-calculate session highs and lows for consistency
asian_session_length = asian_active and not na(asian_session_box) ? bar_index - box.get_left(asian_session_box) + 1 : 1
current_asian_high = ta.highest(high, asian_session_length)
current_asian_low = ta.lowest(low, asian_session_length)
// Update Asian session box continuously during session
if show_asian and asian_active and not na(asian_session_box)
box.set_right(asian_session_box, bar_index)
// Update box to contain session highs and lows
box.set_top(asian_session_box, current_asian_high)
box.set_bottom(asian_session_box, current_asian_low)
// Create London session box
if show_london and london_start
// Create new box at session start (previous box remains visible)
london_session_box := box.new(bar_index, high, bar_index + 1, low,
border_color=london_color, bgcolor=color.new(london_color, 90),
border_width=2, border_style=line.style_solid)
// Pre-calculate London session highs and lows for consistency
london_session_length = london_active and not na(london_session_box) ? bar_index - box.get_left(london_session_box) + 1 : 1
current_london_high = ta.highest(high, london_session_length)
current_london_low = ta.lowest(low, london_session_length)
// Update London session box continuously during session
if show_london and london_active and not na(london_session_box)
box.set_right(london_session_box, bar_index)
// Update box to contain session highs and lows
box.set_top(london_session_box, current_london_high)
box.set_bottom(london_session_box, current_london_low)
// Asian Session Swing Points Detection
var float asian_session_high = na
var float asian_session_low = na
var int asian_high_bar = na
var int asian_low_bar = na
// Asian Session Absolute High/Low for TP levels
var float asian_absolute_high = na
var float asian_absolute_low = na
var line asian_high_line = na
var line asian_low_line = na
var label asian_high_label = na
var label asian_low_label = na
var bool high_broken = false
var bool low_broken = false
// London Session High/Low tracking for stop loss
var float london_session_high = na
var float london_session_low = na
// Market structure tracking variables
var string breakout_direction = na // "bullish" or "bearish"
var float last_hh_level = na // Last Higher High level
var float last_hl_level = na // Last Higher Low level
var float last_ll_level = na // Last Lower Low level
var float last_lh_level = na // Last Lower High level
var int structure_count = 0
var string last_structure_type = na // "HH", "HL", "LL", "LH"
// Legacy variables for compatibility
var float last_swing_high = na
var float last_swing_low = na
var int last_high_bar = na
var int last_low_bar = na
// Market structure state tracking
var float pending_high = na
var float pending_low = na
var int pending_high_bar = na
var int pending_low_bar = na
var bool waiting_for_confirmation = false
// Break of Structure tracking variables
var float most_recent_hl = na
var float most_recent_lh = na
var int most_recent_hl_bar = na
var int most_recent_lh_bar = na
var bool bos_detected = false
// Trading variables
var bool trade_taken = false
// Trade visualization boxes (based on Casper strategy approach)
var box current_profit_box = na
var box current_sl_box = na
// Update swing points during Asian session
if asian_active and show_swing_points
// Always track absolute high/low for both TP levels and breakout detection
if na(asian_absolute_high) or high > asian_absolute_high
asian_absolute_high := high
if na(asian_absolute_low) or low < asian_absolute_low
asian_absolute_low := low
// Use absolute high/low for breakout levels (simplified logic)
if na(asian_session_high) or high > asian_session_high
asian_session_high := high
asian_high_bar := bar_index
if na(asian_session_low) or low < asian_session_low
asian_session_low := low
asian_low_bar := bar_index
// Track London session high/low for stop loss levels
if london_active
if na(london_session_high) or high > london_session_high
london_session_high := high
if na(london_session_low) or low < london_session_low
london_session_low := low
// Draw initial lines when Asian session ends
if asian_end and show_swing_points
if not na(asian_session_high) and not na(asian_high_bar)
// Draw extending line for high
asian_high_line := line.new(asian_high_bar, asian_session_high, bar_index + 200, asian_session_high,
color=swing_high_color, width=2, style=line.style_dashed, extend=extend.right)
asian_high_label := label.new(bar_index + 5, asian_session_high, "Asian High: " + str.tostring(asian_session_high, "#.####"), style=label.style_label_left, color=swing_high_color, textcolor=color.white, size=size.small)
if not na(asian_session_low) and not na(asian_low_bar)
// Draw extending line for low
asian_low_line := line.new(asian_low_bar, asian_session_low, bar_index + 200, asian_session_low,
color=swing_low_color, width=2, style=line.style_dashed, extend=extend.right)
asian_low_label := label.new(bar_index + 5, asian_session_low, "Asian Low: " + str.tostring(asian_session_low, "#.####"), style=label.style_label_left, color=swing_low_color, textcolor=color.white, size=size.small)
// Reset break flags for new session
high_broken := false
low_broken := false
// Check for breakouts during London session
if london_active and show_swing_points and not na(asian_session_high) and not na(asian_session_low)
// Check if Asian high is broken
if not high_broken and not low_broken and high > asian_session_high
high_broken := true
// Update high line to end at break point
if not na(asian_high_line)
line.set_x2(asian_high_line, bar_index)
line.set_extend(asian_high_line, extend.none)
// Remove the low line (first break wins)
if not na(asian_low_line)
line.delete(asian_low_line)
if not na(asian_low_label)
label.delete(asian_low_label)
// Add break marker
label.new(bar_index, asian_session_high * 1.001, "HIGH BREAK!",
style=label.style_label_down, color=color.red, textcolor=color.white, size=size.normal)
// Set breakout direction and initialize structure tracking
breakout_direction := "bullish"
last_swing_high := asian_session_high
last_swing_low := asian_session_low
last_high_bar := bar_index
structure_count := 0
// Check if Asian low is broken
if not low_broken and not high_broken and low < asian_session_low
low_broken := true
// Update low line to end at break point
if not na(asian_low_line)
line.set_x2(asian_low_line, bar_index)
line.set_extend(asian_low_line, extend.none)
// Remove the high line (first break wins)
if not na(asian_high_line)
line.delete(asian_high_line)
if not na(asian_high_label)
label.delete(asian_high_label)
// Add break marker
label.new(bar_index, asian_session_low * 0.999, "LOW BREAK!",
style=label.style_label_up, color=color.red, textcolor=color.white, size=size.normal)
// Set breakout direction and initialize structure tracking
breakout_direction := "bearish"
last_swing_high := asian_session_high
last_swing_low := asian_session_low
last_low_bar := bar_index
structure_count := 0
// Stop extending lines when London session ends (if not already broken)
if london_end and show_swing_points
if not high_broken and not na(asian_high_line)
line.set_x2(asian_high_line, bar_index)
line.set_extend(asian_high_line, extend.none)
if not low_broken and not na(asian_low_line)
line.set_x2(asian_low_line, bar_index)
line.set_extend(asian_low_line, extend.none)
// Force close all trades at London session end (if enabled)
if london_end and force_london_close
if strategy.position_size != 0
// Extend boxes immediately before session close to prevent timing issues
if not na(current_profit_box)
// Ensure minimum 8 bars width or extend to current bar, whichever is longer
box_left = box.get_left(current_profit_box)
min_right = box_left + 8
final_right = math.max(min_right, bar_index)
box.set_right(current_profit_box, final_right)
current_profit_box := na // Clear reference after extending
if not na(current_sl_box)
// Ensure minimum 8 bars width or extend to current bar, whichever is longer
box_left = box.get_left(current_sl_box)
min_right = box_left + 8
final_right = math.max(min_right, bar_index)
box.set_right(current_sl_box, final_right)
current_sl_box := na // Clear reference after extending
strategy.close_all(comment="London Close")
trade_taken := false // Reset trade flag for next session
// Market structure detection after breakout (only during London session and before first BoS)
if show_market_structure and not na(breakout_direction) and london_active and not bos_detected
// Bullish structure tracking (HH, HL alternating)
if breakout_direction == "bullish"
// Check for Higher High pattern: Bullish candle followed by bearish candle
pattern_high = math.max(high , high)
prev_hh = na(last_hh_level) ? last_swing_high : last_hh_level
// HH Detection: Only if we expect HH next (no last structure or last was HL)
if (na(last_structure_type) or last_structure_type == "HL") and close > open and close < open and pattern_high > prev_hh and close > prev_hh
// Check consolidation
is_too_close = not na(last_high_bar) and (bar_index - last_high_bar) <= 4
should_create_hh = true
if is_too_close and structure_count > 0 and pattern_high <= last_hh_level
should_create_hh := false
if should_create_hh
structure_count := structure_count + 1
label.new(bar_index - 1, high + (high * 0.0003), "HH" + str.tostring(structure_count),
style=label.style_none, color=color.new(color.white, 100),
textcolor=color.white, size=size.small)
last_hh_level := pattern_high
last_swing_high := pattern_high
last_high_bar := bar_index
last_structure_type := "HH"
// HL Detection: Only if we expect HL next (last was HH)
pattern_low = math.min(low , low)
prev_hl = na(last_hl_level) ? last_swing_low : last_hl_level
if last_structure_type == "HH" and close < open and close > open and pattern_low > prev_hl and close > prev_hl
// Check consolidation
is_too_close = not na(last_low_bar) and (bar_index - last_low_bar) <= 4
should_create_hl = true
if is_too_close and pattern_low <= last_hl_level
should_create_hl := false
if should_create_hl
structure_count := structure_count + 1
label.new(bar_index - 1, low - (low * 0.0003), "HL" + str.tostring(structure_count),
style=label.style_none, color=color.new(color.white, 100),
textcolor=color.white, size=size.small)
last_hl_level := pattern_low
most_recent_hl := pattern_low // Update most recent HL for BoS detection
most_recent_hl_bar := bar_index - 1 // Store HL bar position
last_low_bar := bar_index
last_structure_type := "HL"
// Bearish structure tracking (LL, LH alternating)
if breakout_direction == "bearish"
// Check for Lower Low pattern: Bearish candle followed by bullish candle
pattern_low = math.min(low , low)
prev_ll = na(last_ll_level) ? last_swing_low : last_ll_level
// LL Detection: Only if we expect LL next (no last structure or last was LH)
if (na(last_structure_type) or last_structure_type == "LH") and close < open and close > open and pattern_low < prev_ll and close < prev_ll
// Check consolidation
is_too_close = not na(last_low_bar) and (bar_index - last_low_bar) <= 4
should_create_ll = true
if is_too_close and structure_count > 0 and pattern_low >= last_ll_level
should_create_ll := false
if should_create_ll
structure_count := structure_count + 1
label.new(bar_index - 1, low - (low * 0.0003), "LL" + str.tostring(structure_count),
style=label.style_none, color=color.new(color.white, 100),
textcolor=color.white, size=size.small)
last_ll_level := pattern_low
last_swing_low := pattern_low
last_low_bar := bar_index
last_structure_type := "LL"
// LH Detection: Only if we expect LH next (last was LL)
pattern_high = math.max(high , high)
prev_lh = na(last_lh_level) ? last_swing_high : last_lh_level
if last_structure_type == "LL" and close > open and close < open and pattern_high < prev_lh and close < prev_lh
// Check consolidation
is_too_close = not na(last_high_bar) and (bar_index - last_high_bar) <= 4
should_create_lh = true
if is_too_close and pattern_high >= last_lh_level
should_create_lh := false
if should_create_lh
structure_count := structure_count + 1
label.new(bar_index - 1, high + (high * 0.0003), "LH" + str.tostring(structure_count),
style=label.style_none, color=color.new(color.white, 100),
textcolor=color.white, size=size.small)
last_lh_level := pattern_high
most_recent_lh := pattern_high // Update most recent LH for BoS detection
most_recent_lh_bar := bar_index - 1 // Store LH bar position
last_high_bar := bar_index
last_structure_type := "LH"
// Check if we're within the cutoff period before London session end
current_minute = minute(time, session_timezone)
london_end_time_minutes = london_end_hour * 60 // Convert London end hour to minutes
current_time_minutes = current_hour * 60 + current_minute // Current time in minutes
// Calculate minutes remaining in London session
london_session_minutes_remaining = london_end_time_minutes - current_time_minutes
// Handle day rollover case (e.g., if london_end is 8:00 (480 min) and current is 23:30 (1410 min))
if london_session_minutes_remaining < 0
london_session_minutes_remaining := london_session_minutes_remaining + (24 * 60) // Add 24 hours in minutes
// Only allow trades if more than cutoff_minutes remaining in London session
allow_new_trades = london_session_minutes_remaining > cutoff_minutes
// Break of Structure (BoS) Detection and Trading Logic - Only first BoS per London session and outside cutoff period
if show_bos and london_active and show_market_structure and not bos_detected and not trade_taken and allow_new_trades
// Bullish BoS: Price closes below the most recent HL (after bullish breakout) - SELL SIGNAL
if breakout_direction == "bullish" and not na(most_recent_hl) and not na(most_recent_hl_bar)
// Check minimum distance requirement (at least 4 candles between BoS and HL)
if close < most_recent_hl and (bar_index - most_recent_hl_bar) >= 4
// Draw dotted line from HL position to BoS point
line.new(most_recent_hl_bar, most_recent_hl, bar_index, most_recent_hl,
color=bos_color, width=2, style=line.style_dotted, extend=extend.none)
// Calculate center position for BoS label
center_bar = math.round((most_recent_hl_bar + bar_index) / 2)
// Draw BoS label below the line for HL break
label.new(center_bar, most_recent_hl - (most_recent_hl * 0.0005), "BoS",
style=label.style_none, color=color.new(color.white, 100),
textcolor=bos_color, size=size.normal)
// SELL ENTRY
if not na(london_session_high) and not na(asian_absolute_low)
// Calculate stop loss based on settings
stop_loss_level = use_atr_sl ? close + (atr * atr_multiplier) : london_session_high
take_profit_level = asian_absolute_low
entry_price = close
// Calculate position size based on user settings
position_size = calculate_position_size(entry_price, stop_loss_level)
strategy.entry("SELL", strategy.short, qty=position_size, comment="BoS Sell")
strategy.exit("SELL EXIT", "SELL", stop=stop_loss_level, limit=take_profit_level, comment="SL/TP")
// Create trade visualization boxes (TradingView style) - minimum 8 bars width
// Blue profit zone box (from entry to take profit)
current_profit_box := box.new(left=bar_index, top=take_profit_level, right=bar_index + 8, bottom=entry_price,
bgcolor=color.new(color.blue, 70), border_width=0)
// Red stop loss zone box (from entry to stop loss)
current_sl_box := box.new(left=bar_index, top=entry_price, right=bar_index + 8, bottom=stop_loss_level,
bgcolor=color.new(color.red, 70), border_width=0)
trade_taken := true
bos_detected := true // Mark BoS as detected for this session
// Bearish BoS: Price closes above the most recent LH (after bearish breakout) - BUY SIGNAL
if breakout_direction == "bearish" and not na(most_recent_lh) and not na(most_recent_lh_bar)
// Check minimum distance requirement (at least 4 candles between BoS and LH)
if close > most_recent_lh and (bar_index - most_recent_lh_bar) >= 4
// Draw dotted line from LH position to BoS point
line.new(most_recent_lh_bar, most_recent_lh, bar_index, most_recent_lh,
color=bos_color, width=1, style=line.style_dotted, extend=extend.none)
// Calculate center position for BoS label
center_bar = math.round((most_recent_lh_bar + bar_index) / 2)
// Draw BoS label above the line for LH break
label.new(center_bar, most_recent_lh + (most_recent_lh * 0.0005), "BoS",
style=label.style_none, color=color.new(color.white, 100),
textcolor=bos_color, size=size.normal)
// BUY ENTRY
if not na(london_session_low) and not na(asian_absolute_high)
// Calculate stop loss based on settings
stop_loss_level = use_atr_sl ? close - (atr * atr_multiplier) : london_session_low
take_profit_level = asian_absolute_high
entry_price = close
// Calculate position size based on user settings
position_size = calculate_position_size(entry_price, stop_loss_level)
strategy.entry("BUY", strategy.long, qty=position_size, comment="BoS Buy")
strategy.exit("BUY EXIT", "BUY", stop=stop_loss_level, limit=take_profit_level, comment="SL/TP")
// Create trade visualization boxes (TradingView style) - minimum 8 bars width
// Blue profit zone box (from entry to take profit)
current_profit_box := box.new(left=bar_index, top=entry_price, right=bar_index + 8, bottom=take_profit_level,
bgcolor=color.new(color.blue, 70), border_width=0)
// Red stop loss zone box (from entry to stop loss)
current_sl_box := box.new(left=bar_index, top=stop_loss_level, right=bar_index + 8, bottom=entry_price,
bgcolor=color.new(color.red, 70), border_width=0)
trade_taken := true
bos_detected := true // Mark BoS as detected for this session
// Position close detection for extending boxes (based on Casper strategy)
if barstate.isconfirmed and strategy.position_size == 0 and strategy.position_size != 0
// Extend trade visualization boxes to exact exit point when position closes
if not na(current_profit_box)
// Ensure minimum 8 bars width or extend to current bar, whichever is longer
box_left = box.get_left(current_profit_box)
min_right = box_left + 8
final_right = math.max(min_right, bar_index)
box.set_right(current_profit_box, final_right)
current_profit_box := na // Clear reference after extending
if not na(current_sl_box)
// Ensure minimum 8 bars width or extend to current bar, whichever is longer
box_left = box.get_left(current_sl_box)
min_right = box_left + 8
final_right = math.max(min_right, bar_index)
box.set_right(current_sl_box, final_right)
current_sl_box := na // Clear reference after extending
// Backup safety check - extend boxes if position is closed but boxes still active
if not na(current_profit_box) and strategy.position_size == 0
box_left = box.get_left(current_profit_box)
min_right = box_left + 8
final_right = math.max(min_right, bar_index)
box.set_right(current_profit_box, final_right)
current_profit_box := na
if not na(current_sl_box) and strategy.position_size == 0
box_left = box.get_left(current_sl_box)
min_right = box_left + 8
final_right = math.max(min_right, bar_index)
box.set_right(current_sl_box, final_right)
current_sl_box := na
// Reset everything when new Asian session starts
if asian_start and show_swing_points
asian_session_high := na
asian_session_low := na
asian_high_bar := na
asian_low_bar := na
// Reset absolute levels
asian_absolute_high := na
asian_absolute_low := na
asian_high_line := na
asian_low_line := na
asian_high_label := na
asian_low_label := na
high_broken := false
low_broken := false
// Reset London session levels
london_session_high := na
london_session_low := na
// Reset market structure tracking
breakout_direction := na
last_hh_level := na
last_hl_level := na
last_ll_level := na
last_lh_level := na
last_swing_high := na
last_swing_low := na
last_high_bar := na
last_low_bar := na
structure_count := 0
last_structure_type := na
pending_high := na
pending_low := na
pending_high_bar := na
pending_low_bar := na
waiting_for_confirmation := false
// Reset BoS tracking
most_recent_hl := na
most_recent_lh := na
most_recent_hl_bar := na
most_recent_lh_bar := na
bos_detected := false
// Reset trading
trade_taken := false
// Reset current trade boxes
current_profit_box := na
current_sl_box := na
// Debug info (optional)
show_debug = input.bool(false, "Show Debug Info")
if show_debug
var table debug_table = table.new(position.top_right, 2, 3, bgcolor=color.white, border_width=1)
if barstate.islast
table.cell(debug_table, 0, 0, "Current Hour:", text_color=color.black)
table.cell(debug_table, 1, 0, str.tostring(current_hour), text_color=color.black)
table.cell(debug_table, 0, 1, "Asian Active:", text_color=color.black)
table.cell(debug_table, 1, 1, str.tostring((current_hour >= asian_start_hour) or (current_hour < asian_end_hour)), text_color=color.black)
table.cell(debug_table, 0, 2, "London Active:", text_color=color.black)
table.cell(debug_table, 1, 2, str.tostring((current_hour >= london_start_hour) and (current_hour < london_end_hour)), text_color=color.black)
Pullbacks CompletoThis indicator is a comprehensive Trend Following toolkit that combines two distinct, high-probability pullback strategies into a single, intelligent interface. It is designed to help traders identify precise entry points during corrections in established trends, filtering out low-quality noise.
The indicator features Smart Conflict Detection: if the two strategies generate opposing signals on the same candle, the system blocks the individual alerts and displays a Purple "X", warning the trader of market indecision.
Strategy 1: Stoch Pullback (Triangles)
Visual: Green/Red Triangles Logic:
Trend: Defined by the alignment of the Fast EMA (21) and Slow EMA (100).
The Setup: The indicator waits for the Stochastic RSI to enter an Overbought or Oversold zone.
Strict Filter: A signal is only valid if, while in the zone, the price physically tests the Fast EMA (closes against it). This filters out "shallow" pullbacks.
Trigger: The signal is fired when the Stochastic RSI crosses back out of the extreme zone, resuming the trend.
Strategy 2: Dave Landry Setup (Dots)
Visual: Green/Red Circles Logic:
Trend: Filtered by MACD Histogram momentum and the relation to the Fast EMA (21).
The Pattern: Looks for a correction of at least 2 candles making lower lows (for uptrends) or higher highs (for downtrends).
Trigger: Enters when the price breaks the high/low of the previous candle, provided it closes in favor of the EMA 21.
Anti-Climax Filter: Includes a "Stretched" filter to prevent buying/selling on exhausted "Elephant Bars" (huge candles that have already consumed the move).
Key Features
Dual Alert System: Receive specific alerts for "Pullback" or "Landry" setups.
Conflict Warning: If Strategy A says "Buy" and Strategy B says "Sell" simultaneously, a "Doubtful Signal" alert is triggered, and a purple Cross appears on the chart.
Smart Visibility: The indicator automatically hides or shows the Moving Averages depending on which strategies you have enabled in the settings.
Educational Tooltips: Hover over the "i" icons in the settings menu to read the rationale behind each specific filter.
How to Use
Green Triangle: Look for Long opportunities (Stoch Pullback).
Green Dot: Look for Long opportunities (Landry Breakout).
Red Triangle: Look for Short opportunities (Stoch Pullback).
Red Dot: Look for Short opportunities (Landry Breakout).
Purple X: Stay Out. The setups are conflicting (Trend vs. Momentum disagreement).
Configuration You can toggle each strategy on/off in the settings menu. You can also choose to display the Overbought/Oversold background zones to visualize where the Stoch Pullback is "arming".
30d Rolling TWAP (Hourly)code:
//@version=5
indicator("30d Rolling TWAP (Hourly)", overlay=true)
// Calculation: (High + Low + Close) / 3
typicalPrice = hlc3
// 30 days * 24 hours = 720 bars
length = 720
twap30 = ta.sma(typicalPrice, length)
// Plotting
plot(twap30, color=color.new(#2962FF, 0), title="30d Hourly TWAP", linewidth=2)
// Optional: Background highlight
fillColor = close > twap30 ? color.new(color.green, 90) : color.new(color.red, 90)
bgcolor(fillColor)
yaman short longThis indicator provides clear Long and Short signals to help traders identify potential market direction and trading opportunities with higher confidence.
It is designed to follow price momentum and trend strength, allowing traders to enter trades when the market shows clear directional bias. The indicator focuses on clean signals and avoids unnecessary noise, making it suitable for both beginners and experienced traders.
Key Features:
Clear Long and Short signals displayed on the chart
Helps identify potential trend continuation and reversals
Designed to reduce false signals during choppy market conditions
Suitable for scalping, intraday, and swing trading
Works across multiple markets and timeframes
How to Use:
Long Signal: Indicates potential upward movement when bullish conditions align
Short Signal: Indicates potential downward movement when bearish conditions align
Best used with proper stop-loss and risk management rules
Can be combined with support/resistance or higher timeframe confirmation
Best Markets:
Forex pairs
Gold (XAUUSD)
Cryptocurrencies
Indices
Notes:
Signals are generated after candle close
The indicator does not repaint
This tool is meant to assist decision-making, not guarantee profits
SHFE Silver Premium vs COMEX (USD/oz)This indicator measures the SHFE–COMEX silver premium/discount in USD per troy ounce.
SHFE silver is quoted in CNY per kilogram, so the script first converts SHFE:AG1! into USD/oz using the current USD/CNY exchange rate and the exact kg → troy oz factor (32.1507466). It then calculates:
Premium (USD/oz) = SHFE_USD/oz − COMEX_USD/oz
How to interpret:
Positive bars: SHFE is trading above COMEX (premium)
Negative bars: SHFE is trading below COMEX (discount)
Persistent regimes can reflect currency dynamics, regional liquidity, import/export constraints, and shifts in industrial demand.
How to use:
Add this indicator beneath the companion overlay indicator “SHFE Silver Price Discovery (USD/oz)” to keep the price chart readable while still visualizing divergence.
Watch for sustained premium expansions/contractions as inter-market confirmation signals, especially during volatile periods.
This indicator is intended for macro and inter-market analysis, not short-term scalping.
SA Range Rank NQ 1.13.2026 PM SESSION15 MINUTE — PREPARE / POSITION MODE
Developer Note: Bias & Position Framing
This daily view is preparatory, not executable.
The purpose of the Daily timeframe is to define directional bias, not entries.
It helps frame which side of the market deserves attention and which activity should be ignored.
The goal here is context, not action.
________________________________________
Purpose on Daily
The Daily timeframe is used to:
• Define directional bias for the week
• Prepare position-building zones
• Identify environments where participation is unnecessary or elevated-risk
• Reduce overtrading by narrowing focus
Daily charts answer one question only:
“If I participate this week, which side makes sense?”
________________________________________
What Matters Most (Public View)
SA Range Indicator (RI):
→ Is the market transitioning or trending?
→ Is energy building, releasing, or rotating?
SA ZoneEngine (visual context only):
→ Are daily moves aligned with higher-timeframe structure?
→ Is price operating with or against dominant bias?
These visuals explain environment, not decisions.
________________________________________
How to Interpret Public Daily Posts
• Daily is not timing
• Daily is not execution
• Daily is not a signal
Daily charts prepare the trader mentally and structurally by clarifying:
• what deserves patience
• what deserves caution
• what deserves no attention at all
________________________________________
Messaging Line
“Daily charts prepare the trade — they don’t execute it.”
________________________________________
SEO Intent
daily equity bias, position preparation, market structure analysis
________________________________________
🤝 For Those Who Find Value
If these daily posts help you see the market more clearly:
• Follow, boost, and share my scripts, Ideas, and MINDS posts
• Feel free to message me directly with questions or build requests
• Constructive feedback and collaboration are always welcome
For traders who want to go deeper, optional memberships may include:
• Additional signal access
• Early previews
• Occasional free tools and upgrades
🔗 Membership & Signals
trianchor.gumroad.com
________________________________________
________________________________________
⏱ 15-MIN — PREPARE / POSITION MODE
Developer Note: Setup Formation Phase
The 15-minute timeframe is where setups begin to form, not where they are acted on.
This view exists to separate developing structure from noise.
________________________________________
Purpose on 15-Minute
The 15-minute timeframe is used to:
• Spot trap-prone conditions
• Identify developing structure
• Observe compression, rotation, or early expansion
• Prepare for execution — without acting
This timeframe answers a different question:
“Is something forming — or is this noise?”
________________________________________
What Matters Most (Public View)
SA Range Indicator (RI):
→ Compression → expansion transitions
→ Energy buildup vs premature release
SA CloudRegimes (visual only):
→ Whether price behavior reflects continuation, pullback, or contraction
→ Whether movement is controlled or impulsive
These visuals describe behavior, not entries.
________________________________________
How to Interpret Public 15-Minute Posts
• 15m is setup formation
• 15m is environmental awareness
• 15m is not execution
Most errors occur when traders act before structure has finished forming.
This timeframe exists to slow that impulse down.
________________________________________
Messaging Line
“Preparation happens before the move — not during it.”
________________________________________
________________________________________
🤝 For Those Who Find Value
If these posts help you better recognize developing structure:
• Follow, boost, and share my scripts, Ideas, and MINDS posts
• Feel free to message me directly with questions or build requests
• Constructive feedback and collaboration are always welcome
For traders who want to go deeper, optional memberships may include:
• Additional signal access
• Early previews
• Occasional free tools and upgrades
🔗 Membership & Signals
trianchor.gumroad.com
15 Minute (15m) — Tactical Entry Alignment / “Permission + Timing”
Goal: Convert higher-timeframe permission into tradable timing.
How to use:
• Trade the first clean reclaim after a pullback.
• Avoid taking a reclaim if price is already extended far beyond the wake edge (late reclaim).
Best conditions:
• Works extremely well when:
o 1H agrees
o session structure is active (open/close windows)
o reclaim occurs near VWAP or a key level you already respect
Settings:
• dispMult 0.75–1.05
• reclaimWindow 6–14
• cooldown 3–6
🟠 15-MINUTE — Intraday Structure & Session Logic
1️⃣ Range Indicator (RI)
• Session compression → impulse likely
• Expansion → follow, don’t fade
Use:
Defines session behavior.
________________________________________
2️⃣ ZoneEngine (Structure)
• Filters session traps
• Explains failed breakouts
Use:
Keeps you aligned with real participation.
________________________________________
3️⃣ Cloud / Reclaim (Behavior)
• Identifies pullback vs continuation
• Reclaim confirms acceptance
Use:
Contextual confirmation.
________________________________________
4️⃣ Stop-Hunt Proxy
• Session liquidity sweeps
• Common near opens and transitions
Use:
Stop-hunt + compression = likely session impulse.
BarCoreLibrary "BarCore"
BarCore is a foundational library for technical analysis, providing essential functions for evaluating the structural properties of candlesticks and inter-bar relationships.
It prioritizes ratio-based metrics (0.0 to 1.0) over absolute prices, making it asset-agnostic and ideal for robust pattern recognition, momentum analysis, and volume-weighted pressure evaluation.
Key modules:
- Structure & Range: High-precision bar and body metrics with relative positioning.
- Wick Dynamics: Absolute and relative wick analysis for identifying price rejection.
- Inter-bar Logic: Containment, coverage, and quantitative price overlap (Ratio-based).
- Gap Intelligence: Real body and price gaps with customizable significance thresholds.
- Flow & Pressure: Volume-weighted buying/selling pressure and Money Flow metrics.
isBuyingBar()
Checks if the bar is a bullish (up) bar, where close is greater than open.
Returns: bool True if the bar closed higher than it opened.
isSellingBar()
Checks if the bar is a bearish (down) bar, where close is less than open.
Returns: bool True if the bar closed lower than it opened.
barMidpoint()
Calculates the absolute midpoint of the bar's total range (High + Low) / 2.
Returns: float The midpoint price of the bar.
barRange()
Calculates the absolute size of the bar's total range (High to Low).
Returns: float The absolute difference between high and low.
barRangeMidpoint()
Calculates half of the bar's total range size.
Returns: float Half the bar's range size.
realBodyHigh()
Returns the higher price between the open and close.
Returns: float The top of the real body.
realBodyLow()
Returns the lower price between the open and close.
Returns: float The bottom of the real body.
realBodyMidpoint()
Calculates the absolute midpoint of the bar's real body.
Returns: float The midpoint price of the real body.
realBodyRange()
Calculates the absolute size of the bar's real body.
Returns: float The absolute difference between open and close.
realBodyRangeMidpoint()
Calculates half of the bar's real body size.
Returns: float Half the real body size.
upperWickRange()
Calculates the absolute size of the upper wick.
Returns: float The range from high to the real body high.
lowerWickRange()
Calculates the absolute size of the lower wick.
Returns: float The range from the real body low to low.
openRatio()
Returns the location of the open price relative to the bar's total range (0.0 at low to 1.0 at high).
Returns: float The ratio of the distance from low to open, divided by the total range.
closeRatio()
Returns the location of the close price relative to the bar's total range (0.0 at low to 1.0 at high).
Returns: float The ratio of the distance from low to close, divided by the total range.
realBodyRatio()
Calculates the ratio of the real body size to the total bar range.
Returns: float The real body size divided by the bar range. Returns 0 if barRange is 0.
upperWickRatio()
Calculates the ratio of the upper wick size to the total bar range.
Returns: float The upper wick size divided by the bar range. Returns 0 if barRange is 0.
lowerWickRatio()
Calculates the ratio of the lower wick size to the total bar range.
Returns: float The lower wick size divided by the bar range. Returns 0 if barRange is 0.
upperWickToBodyRatio()
Calculates the ratio of the upper wick size to the real body size.
Returns: float The upper wick size divided by the real body size. Returns 0 if realBodyRange is 0.
lowerWickToBodyRatio()
Calculates the ratio of the lower wick size to the real body size.
Returns: float The lower wick size divided by the real body size. Returns 0 if realBodyRange is 0.
totalWickRatio()
Calculates the ratio of the total wick range (Upper Wick + Lower Wick) to the total bar range.
Returns: float The total wick range expressed as a ratio of the bar's total range. Returns 0 if barRange is 0.
isBodyExpansion()
Checks if the current bar's real body range is larger than the previous bar's real body range (body expansion).
Returns: bool True if realBodyRange() > realBodyRange() .
isBodyContraction()
Checks if the current bar's real body range is smaller than the previous bar's real body range (body contraction).
Returns: bool True if realBodyRange() < realBodyRange() .
isWithinPrevBar(inclusive)
Checks if the current bar's range is entirely within the previous bar's range.
Parameters:
inclusive (bool) : If true, allows equality (<=, >=). Default is false.
Returns: bool True if High < High AND Low > Low .
isCoveringPrevBar(inclusive)
Checks if the current bar's range fully covers the entire previous bar's range.
Parameters:
inclusive (bool) : If true, allows equality (<=, >=). Default is false.
Returns: bool True if High > High AND Low < Low .
isWithinPrevBody(inclusive)
Checks if the current bar's real body is entirely inside the previous bar's real body.
Parameters:
inclusive (bool) : If true, allows equality (<=, >=). Default is false.
Returns: bool True if the current body is contained inside the previous body.
isCoveringPrevBody(inclusive)
Checks if the current bar's real body fully covers the previous bar's real body.
Parameters:
inclusive (bool) : If true, allows equality (<=, >=). Default is false.
Returns: bool True if the current body fully covers the previous body.
isOpenWithinPrevBody(inclusive)
Checks if the current bar's open price falls within the real body range of the previous bar.
Parameters:
inclusive (bool) : If true, includes the boundary prices. Default is false.
Returns: bool True if the open price is between the previous bar's real body high and real body low.
isCloseWithinPrevBody(inclusive)
Checks if the current bar's close price falls within the real body range of the previous bar.
Parameters:
inclusive (bool) : If true, includes the boundary prices. Default is false.
Returns: bool True if the close price is between the previous bar's real body high and real body low.
isPrevOpenWithinBody(inclusive)
Checks if the previous bar's open price falls within the current bar's real body range.
Parameters:
inclusive (bool) : If true, includes the boundary prices. Default is false.
Returns: bool True if open is between the current bar's real body high and real body low.
isPrevCloseWithinBody(inclusive)
Checks if the previous bar's closing price falls within the current bar's real body range.
Parameters:
inclusive (bool) : If true, includes the boundary prices. Default is false.
Returns: bool True if close is between the current bar's real body high and real body low.
isOverlappingPrevBar()
Checks if there is any price overlap between the current bar's range and the previous bar's range.
Returns: bool True if the current bar's range has any intersection with the previous bar's range.
bodyOverlapRatio()
Calculates the percentage of the current real body that overlaps with the previous real body.
Returns: float The overlap ratio (0.0 to 1.0). 1.0 means the current body is entirely within the previous body's price range.
isCompletePriceGapUp()
Checks for a complete price gap up where the current bar's low is strictly above the previous bar's high, meaning there is zero price overlap between the two bars.
Returns: bool True if the current low is greater than the previous high.
isCompletePriceGapDown()
Checks for a complete price gap down where the current bar's high is strictly below the previous bar's low, meaning there is zero price overlap between the two bars.
Returns: bool True if the current high is less than the previous low.
isRealBodyGapUp()
Checks for a gap between the current and previous real bodies.
Returns: bool True if the current body is completely above the previous body.
isRealBodyGapDown()
Checks for a gap between the current and previous real bodies.
Returns: bool True if the current body is completely below the previous body.
gapRatio()
Calculates the percentage difference between the current open and the previous close, expressed as a decimal ratio.
Returns: float The gap ratio (positive for gap up, negative for gap down). Returns 0 if the previous close is 0.
gapPercentage()
Calculates the percentage difference between the current open and the previous close.
Returns: float The gap percentage (positive for gap up, negative for gap down). Returns 0 if previous close is 0.
isGapUp()
Checks for a basic gap up, where the current bar's open is strictly higher than the previous bar's close. This is the minimum condition for a gap up.
Returns: bool True if the current open is greater than the previous close (i.e., gapRatio is positive).
isGapDown()
Checks for a basic gap down, where the current bar's open is strictly lower than the previous bar's close. This is the minimum condition for a gap down.
Returns: bool True if the current open is less than the previous close (i.e., gapRatio is negative).
isSignificantGapUp(minRatio)
Checks if the current bar opened significantly higher than the previous close, as defined by a minimum percentage ratio.
Parameters:
minRatio (float) : The minimum required gap percentage ratio. Default is 0.03 (3%).
Returns: bool True if the gap ratio (open vs. previous close) is greater than or equal to the minimum ratio.
isSignificantGapDown(minRatio)
Checks if the current bar opened significantly lower than the previous close, as defined by a minimum percentage ratio.
Parameters:
minRatio (float) : The minimum required gap percentage ratio. Default is 0.03 (3%).
Returns: bool True if the absolute value of the gap ratio (open vs. previous close) is greater than or equal to the minimum ratio.
trueRangeComponentHigh()
Calculates the absolute distance from the current bar's High to the previous bar's Close, representing one of the components of the True Range.
Returns: float The absolute difference: |High - Close |.
trueRangeComponentLow()
Calculates the absolute distance from the current bar's Low to the previous bar's Close, representing one of the components of the True Range.
Returns: float The absolute difference: |Low - Close |.
isUpperWickDominant(minRatio)
Checks if the upper wick is significantly long relative to the total range.
Parameters:
minRatio (float) : Minimum ratio of the wick to the total bar range. Default is 0.7 (70%).
Returns: bool True if the upper wick dominates the bar's range.
isUpperWickNegligible(maxRatio)
Checks if the upper wick is very small relative to the total range.
Parameters:
maxRatio (float) : Maximum ratio of the wick to the total bar range. Default is 0.05 (5%).
Returns: bool True if the upper wick is negligible.
isLowerWickDominant(minRatio)
Checks if the lower wick is significantly long relative to the total range.
Parameters:
minRatio (float) : Minimum ratio of the wick to the total bar range. Default is 0.7 (70%).
Returns: bool True if the lower wick dominates the bar's range.
isLowerWickNegligible(maxRatio)
Checks if the lower wick is very small relative to the total range.
Parameters:
maxRatio (float) : Maximum ratio of the wick to the total bar range. Default is 0.05 (5%).
Returns: bool True if the lower wick is negligible.
isSymmetric(maxTolerance)
Checks if the upper and lower wicks are roughly equal in length.
Parameters:
maxTolerance (float) : Maximum allowable percentage difference between the two wicks. Default is 0.15 (15%).
Returns: bool True if wicks are symmetric within the tolerance level.
isMarubozuBody(minRatio)
Candle with a very large body relative to the total range (minimal wicks).
Parameters:
minRatio (float) : Minimum body size ratio. Default is 0.9 (90%).
Returns: bool True if the bar has minimal wicks (Marubozu body).
isLargeBody(minRatio)
Candle with a large body relative to the total range.
Parameters:
minRatio (float) : Minimum body size ratio. Default is 0.6 (60%).
Returns: bool True if the bar has a large body.
isSmallBody(maxRatio)
Candle with a small body relative to the total range.
Parameters:
maxRatio (float) : Maximum body size ratio. Default is 0.4 (40%).
Returns: bool True if the bar has small body.
isDojiBody(maxRatio)
Candle with a very small body relative to the total range (indecision).
Parameters:
maxRatio (float) : Maximum body size ratio. Default is 0.1 (10%).
Returns: bool True if the bar has a very small body.
isLowerWickExtended(minRatio)
Checks if the lower wick is significantly extended relative to the real body size.
Parameters:
minRatio (float) : Minimum required ratio of the lower wick length to the real body size. Default is 2.0 (Lower wick must be at least twice the body's size).
Returns: bool True if the lower wick's length is at least `minRatio` times the size of the real body.
isUpperWickExtended(minRatio)
Checks if the upper wick is significantly extended relative to the real body size.
Parameters:
minRatio (float) : Minimum required ratio of the upper wick length to the real body size. Default is 2.0 (Upper wick must be at least twice the body's size).
Returns: bool True if the upper wick's length is at least `minRatio` times the size of the real body.
isStrongBuyingBar(minCloseRatio, maxOpenRatio)
Checks for a bar with strong bullish momentum (open near low, close near high), indicating high conviction.
Parameters:
minCloseRatio (float) : Minimum required ratio for the close location (relative to range, e.g., 0.7 means close must be in the top 30%). Default is 0.7 (70%).
maxOpenRatio (float) : Maximum allowed ratio for the open location (relative to range, e.g., 0.3 means open must be in the bottom 30%). Default is 0.3 (30%).
Returns: bool True if the bar is bullish, opened in the low extreme, and closed in the high extreme.
isStrongSellingBar(maxCloseRatio, minOpenRatio)
Checks for a bar with strong bearish momentum (open near high, close near low), indicating high conviction.
Parameters:
maxCloseRatio (float) : Maximum allowed ratio for the close location (relative to range, e.g., 0.3 means close must be in the bottom 30%). Default is 0.3 (30%).
minOpenRatio (float) : Minimum required ratio for the open location (relative to range, e.g., 0.7 means open must be in the top 30%). Default is 0.7 (70%).
Returns: bool True if the bar is bearish, opened in the high extreme, and closed in the low extreme.
isWeakBuyingBar(maxCloseRatio, maxBodyRatio)
Identifies a bar that is technically bullish but shows significant weakness, characterized by a failure to close near the high and a small body size.
Parameters:
maxCloseRatio (float) : Maximum allowed ratio for the close location relative to the range (e.g., 0.6 means the close must be in the bottom 60% of the bar's range). Default is 0.6 (60%).
maxBodyRatio (float) : Maximum allowed ratio for the real body size relative to the bar's range (e.g., 0.4 means the body is small). Default is 0.4 (40%).
Returns: bool True if the bar is bullish, but its close is weak and its body is small.
isWeakSellingBar(minCloseRatio, maxBodyRatio)
Identifies a bar that is technically bearish but shows significant weakness, characterized by a failure to close near the low and a small body size.
Parameters:
minCloseRatio (float) : Minimum required ratio for the close location relative to the range (e.g., 0.4 means the close must be in the top 60% of the bar's range). Default is 0.4 (40%).
maxBodyRatio (float) : Maximum allowed ratio for the real body size relative to the bar's range (e.g., 0.4 means the body is small). Default is 0.4 (40%).
Returns: bool True if the bar is bearish, but its close is weak and its body is small.
balanceOfPower()
Measures the net pressure of buyers vs. sellers within the bar, normalized to the bar's range.
Returns: float A value between -1.0 (strong selling) and +1.0 (strong buying), representing the strength and direction of the close relative to the open.
buyingPressure()
Measures the net buying volume pressure based on the close location and volume.
Returns: float A numerical value representing the volume weighted buying pressure.
sellingPressure()
Measures the net selling volume pressure based on the close location and volume.
Returns: float A numerical value representing the volume weighted selling pressure.
moneyFlowMultiplier()
Calculates the Money Flow Multiplier (MFM), which is the price component of Money Flow and CMF.
Returns: float A normalized value from -1.0 (strong selling) to +1.0 (strong buying), representing the net directional pressure.
moneyFlowVolume()
Calculates the Money Flow Volume (MFV), which is the Money Flow Multiplier weighted by the bar's volume.
Returns: float A numerical value representing the volume-weighted money flow. Positive = buying dominance; negative = selling dominance.
isAccumulationBar()
Checks for basic accumulation on the current bar, requiring both positive Money Flow Volume and a buying bar (closing higher than opening).
Returns: bool True if the bar exhibits buying dominance through its internal range location and is a buying bar.
isDistributionBar()
Checks for basic distribution on the current bar, requiring both negative Money Flow Volume and a selling bar (closing lower than opening).
Returns: bool True if the bar exhibits selling dominance through its internal range location and is a selling bar.
QUARTERS THEORY XAUUSDThe “Quarter Theory XAUUSD” indicator on TradingView is designed to automatically plot horizontal price levels in $25 increments on your chart, providing traders with a clear visual representation of key psychological and technical price points. These levels are particularly useful for instruments like XAU/USD, where price often reacts to round numbers, forming support and resistance zones that can be leveraged for both scalping and swing trading strategies. By showing all $25 increments as horizontal white lines, the indicator ensures that traders can quickly identify potential entry and exit points, without the need for manual drawing or repeated calculations.
The indicator works by calculating the nearest $25 multiple relative to the current market price and then drawing horizontal lines across the chart for all increments within a defined range. This range can be customized to suit the instrument being traded; for example, for gold (XAU/USD), a typical range might extend from 0 to 5000, covering all practical price levels that could be relevant in both high and low market conditions. By using Pine Script’s persistent variables, the indicator efficiently creates these lines only once at the start of the chart, avoiding unnecessary resource usage and preventing TradingView from slowing down, which can happen if lines are redrawn every bar.
From a trading perspective, these levels serve multiple purposes. For scalpers, the $25 increments act as micro support and resistance points, helping to determine short-term price reactions and potential breakout zones. Scalpers can use these levels to enter positions with tight stop-loss orders just beyond a level and take profits near the next $25 increment, which aligns with common price behavior patterns in highly liquid instruments. For swing traders, the same levels provide broader context, allowing them to identify areas where price might pause or reverse over several days. Swing traders can use these levels to align trades with the prevailing trend, particularly when combined with other indicators such as moving averages or trendlines.
Another key advantage of the Quarterly Levels indicator is its simplicity and visual clarity. By plotting lines in a uniform white color and extending them to the right, the chart remains clean and easy to read, allowing traders to focus on price action and market dynamics rather than cluttered technical drawings. This visual consistency also helps in backtesting and strategy development, as traders can quickly see how price interacts with each level over time. Additionally, the use of round-number increments leverages the psychological tendencies of market participants, as many traders place stop orders or entry points near these levels, making them natural zones of interest.
Overall, the Quarterly Levels indicator combines efficiency, clarity, and practical trading utility into a single tool. It streamlines chart analysis, highlights meaningful price zones, and supports both scalping and swing trading approaches, making it an essential addition to a trader’s toolkit. By understanding how to integrate these levels into trading strategies, traders can make more informed decisions, manage risk effectively, and identify high-probability trade setups across various market conditions.
LEVENT: Lifetime Estimation via Efficiency-Regime EventLEVENT — Lifetime Estimation via Efficiency-Regime Event Transitions
LEVENT is a research-grade indicator that estimates the remaining structural lifetime of the current market regime.
Unlike trend, volatility, or momentum tools, LEVENT does not measure price movement — it measures how long the current market structure is likely to survive before breaking.
This script implements the LEVENT model published on Zenodo (Bülent Duman, 2026) and is built on top of the open-source DERYA (Dynamic Efficiency Regime Yield Analyzer) microstructural efficiency framework.
What LEVENT measures
LEVENT outputs a single continuous variable L that represents the remaining survival capacity of the active efficiency regime.
High L → the current regime has strong structural endurance
Falling L → the regime is consuming its capacity
L → 0 → regime exhaustion and elevated probability of transition
This makes LEVENT a forward-looking structural time variable, not a price indicator.
What is inside this script
This implementation contains the following components:
1. DERYA (open-source microstructure efficiency)
DERYA is computed from OHLC data as:
Net close-to-close movement divided by total intrabar range
It is smoothed with an EMA and normalized over a rolling window to produce a bounded efficiency state (0–100).
This is an open-source indicator and is explicitly credited in the LEVENT paper.
2. Transition Strength (S)
S measures how unstable the regime is by combining:
the slope of DERYA
the acceleration of DERYA
This is not RSI, MACD, or ATR — it is a state-transition intensity metric.
3. Regime Engine
Markets are classified into four structural regimes:
Expansion
Exhaustion
Collapse
Base / Recovery
A debounce + persistence filter is used to avoid noise-based flickering.
4. Structural Lifetime (LEVENT L)
Each regime is assigned a capacity (Λ) and a fragility (α).
LEVENT then evolves as a jump-and-countdown survival process:
On regime change → L resets to full capacity
Inside a regime → L decays deterministically
High instability → faster decay
This is not a moving average, oscillator, or probability estimate — it is a structural survival clock.
How to use LEVENT
LEVENT is designed to be used as a regime-health overlay, not a buy/sell trigger.
Typical uses:
Detect late-stage trends when L is low
Avoid initiating positions when the regime is near collapse
Compare structural stability across assets
Combine with price, trend, or volume systems
Do not use LEVENT alone as a trading signal.
LEVENT tells you “how long the structure may last”, not “where price will go.”
Visuals
Background colors show the current regime
The LEVENT line shows remaining structural lifetime
A table displays the active regime and current L value
Important notes
LEVENT is not RSI, MACD, ATR, or trend
LEVENT does not predict price direction
LEVENT does not issue entry/exit signals
LEVENT is a research-grade structural model
The DERYA component used here is an open-source microstructural efficiency estimator and is credited accordingly.
Risk and disclaimer
This script is provided for research and analytical purposes only.
It is not financial advice and must not be used as a standalone trading system.
Markets are uncertain.
All trading decisions and risks remain entirely the responsibility of the user.
LEVENT: Lifetime Estimation via Efficiency-regime Event Transitions
Introducing a Regime-Dependent Structural Lifetime Estimator for Financial Markets Using OHLC Data
Author: DUMAN,Bülent
Affiliation: Independent Researcher
zenodo.org






















