Elliott Wave Auto + Fib Targets + Scalper Strategy (Fixed)// Elliott Wave Auto + Fib Targets + Scalper Strategy
//
// Fixed by expert trader:
// - Replaced table with label-based visualization to avoid 'Column 2 is out of table bounds' error.
// - Uses label.new to display buy/sell signal counts in top-right corner, mimicking table layout.
// - Fixed array.sum() error: Replaced invalid range-based array.sum() with custom sum_array_range() function.
// - Removed barstate usage to fix 'Undeclared identifier barstate' error.
// - Replaced barstate.isconfirmed with true (process every bar).
// - Replaced barstate.isfirstconfirmed with bar_index == 0 (first bar).
// - Replaced strategy.alert with label.new for long/short entry signals (buy/sell markers).
// - Fixed array index out-of-bounds: Protected array.get() calls with size checks.
// - Fixed pyramiding: Set constant pyramiding=4 (max 5 entries); use allow_pyramiding to limit entries.
// - Fixed default_qty_value: Set constant default_qty_value=100.0; use entry_size_pct to scale qty.
// - Replaced alertcondition with labels for Elliott Wave patterns.
// - Fixed partial exits: 50% at TP1 with fixed SL, 50% at TP2 with fixed SL or trailing.
// - Fixed Elliott Wave pivot indexing for alternating H/L check.
// - Ensured proper position sizing and exit logic.
Candlestick analysis
FVG Diamond📊 Overview
FVG Diamond is an advanced indicator that detects three specific price action patterns: Inside Bar, Outside Bar, and Diamond Formation. Unlike basic FVG tools, it focuses on these higher-level setups for more precise analysis.
✨ Key Features
🎯 Detection of 3 Advanced FVG Pattern Types
Independent on/off toggle for each pattern
Inside FVG (Inside Bar / Harami): The body of the 3rd candle forms an inside bar relative to the 2nd candle
Outside FVG (Outside Bar / Engulfing): The body of the 1st candle forms an outside bar relative to the 2nd candle
Diamond FVG (Diamond Formation): A unique pattern that satisfies both Inside and Outside conditions
🎯 Mitigation Feature
ON: FVG boxes are automatically removed once price fully fills the FVG zone (keeps the chart clean by showing only active FVGs)
OFF: FVG boxes remain on the chart indefinitely (allows full historical review of all FVGs)
🎨 Visual Features
Color Coding: Assign unique colors to each pattern type
Transparency Control: Default 70% transparency for optimal readability
Extension Display: Extend the right edge of FVG boxes for any number of bars
⚙️ Advanced Configuration
Threshold Settings
Manual Threshold: Define a minimum gap size by percentage
Auto Threshold: Dynamically adjusts based on market volatility
Mitigation Tools
Real-Time Mitigation: Automatic removal when price fills an FVG zone
Mitigation Levels: Display filled FVG levels with dashed lines
🔔 Alerts
Notification on new Bullish/Bearish FVG detection
Notification when an FVG is mitigated (filled)
Works with all FVG types
📈 How to Use
Add the indicator to your chart
The three advanced FVG patterns will be detected and displayed automatically
Set your preferred threshold (0% = detect all gaps)
⚠️ Note: This indicator is designed as an analysis support tool. Trading decisions should be made in combination with other methods of technical and fundamental analysis.
Author: omochi_
Version: 1.0
Last Updated: September 28, 2025
MultiTF break lines (1H / 15M / 5M / 1M) - with tableThis indicator detects high and low breakouts on the most recent candlesticks on the 1-hour, 15-minute, 5-minute, and 1-minute timeframes.
It automatically draws breakout lines on the chart.
The breakout direction is displayed as an arrow label (⇧/⇩).
The most recent breakout direction is displayed in a table (top right).
This is a multi-timeframe breakout monitoring tool.
Upward breakouts are visually distinguishable by blue, and downward breakouts by red.
Shamji's Liquidity Sweep + FVG (Follow-up + Filters) Purpose (what it does)
This indicator looks for two related price structures used by many smart-money / liquidity-hunt traders:
Liquidity Sweeps — candles that wick beyond a recent swing high (for buy-side stop-hunts) or swing low (for sell-side stop-hunts), then close back inside. These are flagged as potential stop-hunt events that clear obvious liquidity.
Fair Value Gaps (FVGs) — simple 3-bar style gaps where an older bar’s high is below the current low (bullish FVG) or an older bar’s low is above the current high (bearish FVG). When an FVG appears after a sweep (within a configurable window), this is considered a follow-up alignment.
The script adds optional filters (volume spike and candle-range vs ATR) to increase confidence, and can restrict marking/alerts to only events that meet the follow-up and filter rules.
CRT Theory — CRT Candle + Phases (configurable)CRT Candles with All Phases-Accumulation, Manipulation and Distribution
Multi-Timeframe Dual MA Downside DetectorThis indicator is designed to highlight potential downside moves using two customizable moving averages (MA1 and MA2) across multiple timeframes. It works on any chart and provides a visual cue when the price is trading below both selected moving averages on a red/down candle.
Key Features:
Dual Moving Averages: Supports EMA, SMA, VWMA, and HMA for both MA1 and MA2.
Multi-Timeframe Support: Each moving average can be calculated on a different timeframe, allowing higher timeframe trend context on lower timeframe charts.
Downside Detection: Highlights candles where the close is below both moving averages and forms a down candle (close < open).
Visual Signals:
Plots MA1 (orange) and MA2 (blue) on the chart.
Colors the downside candles blue when the price is below both MAs.
Customizable: Easily adjust the MA type, length, and timeframe to suit your trading style.
Usage:
Helps identify strong bearish conditions or potential pullbacks.
Can be combined with other technical analysis tools for trend confirmation.
Works across any market, instrument, or timeframe
M Killzones[by vetrivel]Cool free style Session indicator, Inspired by TJR trader session times and it's easily changeable. Really this session times changes everything. Basic requirement to use this Discipline and Mindset
RSI DivergenceStrat WCredit to faytterro. Buy when RSI is staying flat or going up while the ticker price is going down. Sell when RSI is staying flat or going down while the ticker price is going up.
ICT 369 Sniper MSS Indicator (HTF Bias) - H2LThis script is an ICT (Inner Circle Trader) concept-based trading indicator designed to identify high-probability reversal or continuation setups, primarily focusing on intraday trading using a Higher Timeframe (HTF) directional bias.
Here are the four core components of the indicator:
Higher Timeframe (HTF) Bias Filter (Market Structure Shift - MSS): It determines the overall trend by checking if the current price has broken the most recent high or low swing point of a larger timeframe (e.g., 4H). This establishes a Bullish or Bearish bias, ensuring trades align with the dominant trend.
Fair Value Gap (FVG) and OTE: It identifies price imbalances (FVGs) and calculates the Optimal Trade Entry (OTE) levels (50%, 62%, 70.5%, etc.) within those gaps, looking for price to retrace into these specific areas.
Kill Zones (Timing): It incorporates specific time windows (London and New York Kill Zones, based on NY Time) where institutional trading activity is high, only allowing entry signals during these defined periods.
Signal and Targets: It triggers a Long or Short signal when all criteria are met (HTF Bias, FVG, OTE retracement, and Kill Zone timing). It then calculates and plots suggested trade levels, including a Stop Loss (SL) and three Take Profit targets (TP1, TP2, and a dynamic Runner Target based on the weekly Average True Range or ATR).
In summary, it's a comprehensive tool for traders following ICT principles, automating the confluence check across trend, structure, liquidity, and timing.
Smart Session Levels - Step 1 (NY Prep Lines)this indicator shows 3 vertical lines at 18:00, 00:00, 06:00 . For easier way to see Asian high Asian low London high and London low levels for preparation before trading at New York session.
IMB zones, alerts, 8 EMAs, DO lvlThis indicator was created to be a combined indicator for those who use DO levels, IMBs, and EMAs in their daily trading, helping them by providing a script that allows them to customize these indicators to their liking.
Here you can set the IMBs, DO levels, and EMAs. Its special feature is that it uses alerts to indicate which IMB zones have been created, along with the invalidation line for the new potential IMB.
The program always calculates the Daily Opening (DO) level from the opening of the broker, and you can set how many hours the line should be drawn.
Help for use:
There are 3 types of alerts:
- Use the "Bullish IMB formed" alert if you are looking for Bull IMBs.
- Use the "Bearish IMB formed" alert if you are looking for Bear IMBs.
- Use the "Either IMB" alert if you are looking for Bull and Bear IMBs.
Tip: Set the alert type "Once per bar close" if you do not want to set new alerts after an IMB is formed.
IMBs:
- Customizable IMB quantity (1-500 pcs)
- Zone colors and borders can be customized
- Potential IMB line can be customized
EMAs:
- You can set and customize 8 EMA lengths
- Only the current and higher timeframe EMAs are displayed
Daily Open Level:
- Displays today's Daily Open level
- Note: The DO level does not work in Replay mode
Last OFR:
"Show True OFR" checkbox added.
It displays the latest OFR, and hides the old ones.
HTF Control Shift CandlesHTF Control Shift Candles highlights reversal-type candles that show a decisive shift in market control between buyers and sellers. These candles are detected by measuring wick length relative to the entire range and the close’s position within that range. A bullish control shift occurs when a candle forms with a long lower wick and closes in the top portion of its range, showing strong rejection of lower prices and a buyer takeover. A bearish control shift occurs when a candle forms with a long upper wick and closes in the bottom portion of its range, showing rejection of higher prices and a seller takeover. Candles are automatically recolored for fast visual recognition, and alerts are built in so traders never miss a potential shift in control.
This tool is specifically designed for 30-minute and higher timeframes, where control shift candles carry greater significance for swing and intraday setups. Inputs allow you to adjust wick percentage (wickPct) and body percentage (bodyPct) thresholds for different levels of sensitivity. For example, with wickPct = 0.5 and bodyPct = 0.3, a bullish control shift requires the lower wick to be at least 50% of the entire range and the close to finish in the top 30%. By tuning these values, traders can refine the detection for different volatility regimes or personal trading strategies.
Bar Close Confirmation Only
This indicator confirms signals only after the candle has closed. The calculation requires final values for open, high, low, and close, which are not fixed until the bar finishes forming. That means no mid-bar or intrabar repainting — alerts and highlights trigger only once the bar is complete. For example, if a candle temporarily has a long lower wick but closes back in the middle of its range, it will not be marked as a bullish control shift. This ensures accuracy by waiting for the final candle close before confirming that buyers or sellers truly maintained control.
Control shift candles can be especially useful around liquidity sweeps, support/resistance zones, or after extended moves, as they often mark key turning points. A bullish control shift near demand may provide an early entry confirmation for longs, while a bearish control shift at supply may signal short opportunities or exits from longs. This makes the indicator a versatile tool for anticipating reversals, timing entries with precision, and filtering signals on higher timeframes where market structure shifts are most impactful.
ARGT Possible entry and exit points:This is just an observation, and not any type of financial advice.
]To identify key entry and exit points. In addition, this is based on YTD and yearly charts. This is a work in progress.
Index Day Ranges (Selectable - Universal Live Update)it helps to show the days range so we can take decision accordingly
Glacial Momentum Index Glacial Momentum Index (GMI) - Technical Documentation 🧊
Core Concept
The GMI is a momentum oscillator that measures sustained directional pressure in price movements. It combines velocity analysis with a for-loop scanning system to identify medium-term trends while filtering out noise and false breakouts.
Architecture
1. Velocity Index Calculation
velocity_index = (price - EMA) / ATR
Components:
Price Source: OHLC4 (average of open, high, low, close)
Velocity Basis: 40-period EMA of price
Normalization: ATR(24) makes the indicator adaptive to volatility
Purpose: Measures how far price has deviated from its moving average, scaled by current market volatility. This creates a normalized momentum reading that works across different market conditions.
2. For-Loop Momentum Score
The core innovation. Scans 5-55 bars (50-bar window) and counts directional consistency:
For each bar from 5 to 55 bars ago:
- If velocity_index > velocity_index : +1 point
- If velocity_index < velocity_index : -1 point
Final Score = (net points / total bars) × 100
Output: A percentage score from -100% to +100%
+100% = every bar shows upward momentum
-100% = every bar shows downward momentum
0% = equal distribution
Why 5-55 bars?
Start at 5 to ignore immediate noise
End at 55 to capture medium-term trends
Creates a 50-bar scanning window
3. Drift Layer
A 34-period slower velocity calculation providing macro context. Plotted as a white line scaled ×20 to match the velocity display range. This shows the underlying trend while the velocity index shows short-term moves.
Signal Logic
Entry Conditions
LONG:
Loop score > 28% (meaning 64%+ of scanned bars are trending up)
Velocity index > 0 (confirming current upward momentum)
SHORT:
Loop score < -25% (meaning 62%+ of scanned bars are trending down)
Velocity index < 0 (confirming current downward momentum)
State Persistence
Uses a state machine (signal_state: -1, 0, 1) that:
Enters long when both conditions meet
Stays long until short conditions trigger
No exit on neutral - holds position through consolidation
This prevents excessive trading during sideways markets.
Visual Elements
Histogram (Primary Signal)
Shows loop score as columns
Color: Cyan above long threshold, navy below short threshold, gray in between
Direct visualization of trend strength
Velocity Line (Thick, 4px)
Scaled ×20 to overlay on histogram
Color matches signal state (cyan=long, navy=short, gray=neutral)
Shows immediate momentum
Drift Line (White, 2px)
Scaled ×20 for consistency
Provides slower context
Helps identify when velocity is aligned with macro trend
Background Fill
Subtle tint (94% transparency)
Cyan during long state
Navy during short state
Instantly shows current position
Threshold Lines
Long: 28 (cyan dashed)
Short: -25 (navy dashed)
Zero: 0 (gray solid)
Signal Markers
Triangle up (cyan) on new long
Triangle down (navy) on new short
Only appear on state changes, not every bar
Why It Works for Crypto
ATR Normalization: Adapts to Bitcoin/Ethereum's variable volatility
Medium-Term Focus: 50-bar scan catches trends lasting days/weeks
State Persistence: Doesn't exit on minor pullbacks
Asymmetric Thresholds: 28/-25 reflects crypto's tendency to trend up stronger than down
Velocity Confirmation: Prevents entries when loop score is positive but price is actually falling
Parameter Tuning Guide
Velocity Period (40):
Lower (20-30) = more sensitive, faster signals
Higher (50-60) = smoother, fewer signals
Loop Window (5-55):
Wider window = catches longer trends
Narrower window = responds faster to changes
Long Threshold (28):
Lower (20-25) = more entries, potentially more noise
Higher (35-40) = fewer, higher-conviction entries
Short Threshold (-25):
Higher (-20 to -15) = more short entries
Lower (-30 to -35) = more selective shorts
Current Optimized Settings (BTC/ETH 4H-1D)
Velocity: 40 periods (catches medium-term momentum shifts)
Loop: 5-55 bars (50-bar trend scan)
Long: 28% (requires 64% directional consistency)
Short: -25% (requires 62% directional consistency)
Source: OHLC4 (reduces single-wick noise)
What Makes This Different
Unlike standard oscillators (RSI, MACD, Stochastic):
Not mean-reverting - designed to ride trends, not fade them
Context-aware - loop score measures sustained pressure, not just current momentum
Volatility-adaptive - ATR normalization works in both high and low vol regimes
State-based - holds positions through noise instead of flipping constantly
The for-loop mechanism is the key innovation: it requires a majority of recent history to show directional alignment before signaling, filtering out temporary spikes that destroy most momentum systems.
Trend Speed Analyzer + alerts//@version=6
indicator('Trend Speed Analyzer + alerts', overlay = false)
//~~}
// ~~ Tooltips {
string t1 = 'Maximum Length: This parameter sets the upper limit for the number of bars considered in the dynamic moving average. A higher value smooths out the trend line, making it less reactive to minor fluctuations but slower to adapt to sudden price movements. Use higher values for long-term trend analysis and lower values for faster-moving markets.'
string t2 = 'Accelerator Multiplier: Adjusts the responsiveness of the dynamic moving average to price changes. A larger value makes the trend more reactive but can introduce noise in choppy markets. Lower values create a smoother trend but may lag behind rapid price movements. This is particularly useful in volatile markets where precise sensitivity is needed.'
string t5 = 'Enable Candles: When enabled, the candlesticks on the chart will be color-coded based on the calculated trend speed. This provides a visual representation of momentum, making it easier to spot shifts in market dynamics. Disable this if you prefer the standard candlestick colors.'
string t6 = 'Collection Period: Defines the number of bars used to normalize trend speed values. A higher value includes a broader historical range, smoothing out the speed calculation. Lower values make the speed analysis more sensitive to recent price changes, ideal for short-term trading.'
string t7 = 'Enable Table: Activates a statistical table that provides an overview of key metrics, such as average wave height, maximum wave height, dominance, and wave ratios. Useful for traders who want numerical insights to complement visual trend analysis.'
string t8 = 'Lookback Period: Determines how many historical bars are used for calculating bullish and bearish wave data. A longer lookback period provides a more comprehensive view of market trends but may dilute sensitivity to recent market conditions. Shorter periods focus on recent data.'
string t9 = 'Start Date: Sets the starting point for all calculations. This allows you to analyze data only from a specific date onward, which is useful for isolating trends within a certain period or avoiding historical noise.'
string t10 = 'Timer Option: Select between using a custom start date or starting from the first available bar on the chart. The \'Custom\' option works with the Start Date setting, while \'From start\' includes all available data.'
// Tooltips for Table Cells
string tt1 = 'Average Wave: Shows the average size of bullish or bearish waves during the lookback period. Use this to assess overall market strength. Larger values indicate stronger trends, and comparing bullish vs bearish averages can reveal market bias. For instance, a higher bullish average suggests a stronger uptrend.'
string tt2 = 'Max Wave: Displays the largest bullish or bearish wave during the lookback period. Use this to identify peak market momentum. A significantly higher bullish or bearish max wave indicates where the market may have shown extreme trend strength in that direction.'
string tt3 = 'Current Wave Ratio (Average): Compares the current wave\'s size to the average wave size for both bullish and bearish trends. A value above 1 indicates the current wave is stronger than the historical average, which may signal increased market momentum. Use this to evaluate if the current move is significant compared to past trends.'
string tt4 = 'Current Wave Ratio (Max): Compares the current wave\'s size to the maximum wave size for both bullish and bearish trends. A value above 1 suggests the current wave is setting new highs in strength, which could indicate a breakout or strong momentum in the trend direction.'
string tt5 = 'Dominance (Average): The net difference between the average bullish and bearish wave sizes. Positive values suggest bullish dominance over time, while negative values indicate bearish dominance. Use this to determine which side (bulls or bears) has had consistent control of the market over the lookback period.'
string tt6 = 'Dominance (Max): The net difference between the largest bullish and bearish wave sizes. Positive values suggest bulls have dominated with stronger individual waves, while negative values indicate bears have produced stronger waves. Use this to gauge the most significant power shifts in the market.'
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
max_length = input.int(50, minval = 1, title = 'Maximum Length', group = 'Dynamic Moving Average', tooltip = t1)
accel_multiplier = input.float(5.0, minval = 0.0, step = 1.1, title = 'Accelerator Multiplier', group = 'Dynamic Moving Average', tooltip = t2)
tbl_ = input.bool(true, title = 'Enable Table', group = 'Wave Analysis', tooltip = t7)
lookback_period = input.int(100, minval = 1, step = 1, title = 'Lookback Period', group = 'Wave Analysis', tooltip = t8)
candle = input.bool(true, title = 'Enable Candles', group = 'Trend Visualization', tooltip = t5)
collen = input.int(100, step = 10, minval = 5, title = 'Collection Period', group = 'Trend Visualization', tooltip = t6)
up_col = input.color(color.lime, title = 'Dynamic Trend', group = 'Trend Visualization', inline = 'Trend')
dn_col = input.color(color.red, title = '', group = 'Trend Visualization', inline = 'Trend')
up_hist_col = input.color(#82ffc3, title = 'Trend Speed Up', group = 'Trend Visualization', inline = 'up')
up_hist_col_ = input.color(color.lime, title = '', group = 'Trend Visualization', inline = 'up')
dn_hist_col = input.color(color.red, title = 'Trend Speed Dn', group = 'Trend Visualization', inline = 'dn')
dn_hist_col_ = input.color(#f78c8c, title = '', group = 'Trend Visualization', inline = 'dn')
start = input.time(timestamp('1 Jan 2020 00:00 +0000'), title = 'Start Date', group = 'Time Settings', tooltip = t9, inline = 'startdate')
timer = input.string('From start', title = 'Timer Option', options = , group = 'Time Settings', tooltip = t10, inline = 'startdate')
// ~~ Dynamic Average {
counts_diff = close
max_abs_counts_diff = ta.highest(math.abs(counts_diff), 200)
counts_diff_norm = (counts_diff + max_abs_counts_diff) / (2 * max_abs_counts_diff)
dyn_length = 5 + counts_diff_norm * (max_length - 5)
// ~~ Function to compute the accelerator factor with normalization of delta_counts_diff {
calc_accel_factor(float counts_diff, float prev_counts_diff) =>
delta_counts_diff = math.abs(counts_diff - prev_counts_diff)
float max_delta_counts_diff = ta.highest(delta_counts_diff, 200)
max_delta_counts_diff := max_delta_counts_diff == 0 ? 1 : max_delta_counts_diff
float accel_factor = delta_counts_diff / max_delta_counts_diff
accel_factor
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Function to adjust alpha using the accelerator factor {
adjust_alpha(float dyn_length, float accel_factor, float accel_multiplier) =>
alpha_base = 2 / (dyn_length + 1)
alpha = alpha_base * (1 + accel_factor * accel_multiplier)
alpha := math.min(1, alpha)
alpha
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Accelerator Factor
accel_factor = calc_accel_factor(counts_diff, nz(counts_diff ))
alpha = adjust_alpha(dyn_length, accel_factor, accel_multiplier)
// ~~ Compute dynamic Ema
var float dyn_ema = na
dyn_ema := na(dyn_ema ) ? close : alpha * close + (1 - alpha) * dyn_ema
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Trend Speed {
trend = dyn_ema
bullsrc = close
bearsrc = close
type TrendData
array change
array t
StartTime() =>
time > start
var bullish = TrendData.new(array.new(), array.new())
var bearish = TrendData.new(array.new(), array.new())
var x1 = int(na)
var y1 = float(na)
var pos = 0
var speed = 0.0
c = ta.rma(close, 10)
o = ta.rma(open, 10)
// ~~ First value {
if na(x1) and StartTime() or na(x1) and timer == 'From start'
x1 := bar_index
y1 := o
y1
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Trend direction {
if StartTime() or timer == 'From start'
if bullsrc > trend and bullsrc <= trend
bearish.change.unshift(ta.lowest(speed, bar_index - x1))
bearish.t.unshift(bar_index - x1)
x1 := bar_index
y1 := bullsrc
pos := 1
speed := c - o
speed
if bearsrc < trend and bearsrc >= trend
bullish.change.unshift(ta.highest(speed, bar_index - x1))
bullish.t.unshift(bar_index - x1)
x1 := bar_index
y1 := bearsrc
pos := -1
speed := c - o
speed
speed := speed + c - o
speedGradient = color.from_gradient(speed, ta.min(-speed / 3), ta.max(speed / 3), color.red, color.lime)
trendspeed = ta.hma(speed, 5)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Plots {
rma_dyn_ema(x, p) =>
average = ta.rma(dyn_ema , p)
average
colour = ta.wma(close, 2) > dyn_ema ? up_col : dn_col
fillColor = rma_dyn_ema(0, 5) > rma_dyn_ema(1, 5) ? color.new(up_col, 70) : color.new(dn_col, 70)
p1 = plot(dyn_ema, color = colour, linewidth = 2, title = 'Dynamic Trend', force_overlay = true)
p2 = plot(ta.rma(hl2, 50), display = display.none, editable = false, force_overlay = true)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
min_speed = ta.lowest(speed, collen)
max_speed = ta.highest(speed, collen)
normalized_speed = (speed - min_speed) / (max_speed - min_speed)
speedGradient1 = speed < 0 ? color.from_gradient(normalized_speed, 0.0, 0.5, dn_hist_col, dn_hist_col_) : color.from_gradient(normalized_speed, 0.5, 1.0, up_hist_col, up_hist_col_)
plot(StartTime() or timer == 'From start' ? trendspeed : na, title = 'Trend Speed', color = speedGradient1, style = plot.style_columns)
plotcandle(open, high, low, close, color = candle ? speedGradient1 : na, wickcolor = candle ? speedGradient1 : na, bordercolor = candle ? speedGradient1 : na, force_overlay = true)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Table {
if barstate.islast and tbl_
bullish_recent = bullish.change.slice(0, math.min(lookback_period, bullish.change.size()))
bearish_recent = bearish.change.slice(0, math.min(lookback_period, bearish.change.size()))
bull_max = bullish_recent.max()
bear_max = bearish_recent.min()
bull_avg = bullish_recent.avg()
bear_avg = bearish_recent.avg()
wave_size_ratio_avg = bull_avg / math.abs(bear_avg)
wave_size_text_avg = str.tostring(math.round(wave_size_ratio_avg, 2)) + 'x'
wave_size_color_avg = wave_size_ratio_avg > 0 ? color.lime : color.red
wave_size_ratio_max = bull_max / math.abs(bear_max)
wave_size_text_max = str.tostring(math.round(wave_size_ratio_max, 2)) + 'x'
wave_size_color_max = wave_size_ratio_max > 0 ? color.lime : color.red
dominance_avg_value = bull_avg - math.abs(bear_avg)
dominance_avg_text = dominance_avg_value > 0 ? 'Bullish +' + str.tostring(math.round(wave_size_ratio_avg, 2)) + 'x' : 'Bearish -' + str.tostring(math.round(1 / wave_size_ratio_avg, 2)) + 'x'
dominance_avg_color = dominance_avg_value > 0 ? color.lime : color.red
dominance_max_value = bull_max - math.abs(bear_max)
dominance_max_text = dominance_max_value > 0 ? 'Bullish +' + str.tostring(math.round(wave_size_ratio_max, 2)) + 'x' : 'Bearish -' + str.tostring(math.round(1 / wave_size_ratio_max, 2)) + 'x'
dominance_max_color = dominance_max_value > 0 ? color.lime : color.red
current_wave = speed
current_wave_color = current_wave > 0 ? color.lime : color.red
current_ratio_avg = current_wave > 0 ? current_wave / bull_avg : current_wave / math.abs(bear_avg)
current_ratio_max = current_wave > 0 ? current_wave / bull_max : current_wave / math.abs(bear_max)
current_text_avg = str.tostring(math.round(current_ratio_avg, 2)) + 'x'
current_text_max = str.tostring(math.round(current_ratio_max, 2)) + 'x'
current_color_avg = current_ratio_avg > 0 ? color.lime : color.red
current_color_max = current_ratio_max > 0 ? color.lime : color.red
var tbl = table.new(position.top_right, 3, 3, force_overlay = true)
table.cell(tbl, 0, 0, '', text_color = chart.fg_color, tooltip = '')
table.cell(tbl, 0, 1, 'Average Wave', text_color = chart.fg_color, tooltip = tt1)
table.cell(tbl, 0, 2, 'Max Wave', text_color = chart.fg_color, tooltip = tt2)
table.cell(tbl, 1, 0, 'Current Wave Ratio', text_color = chart.fg_color, tooltip = '')
table.cell(tbl, 1, 1, current_text_avg, text_color = current_color_avg, tooltip = tt3)
table.cell(tbl, 1, 2, current_text_max, text_color = current_color_max, tooltip = tt4)
table.cell(tbl, 2, 0, 'Dominance', text_color = chart.fg_color, tooltip = '')
table.cell(tbl, 2, 1, dominance_avg_text, text_color = dominance_avg_color, tooltip = tt5)
table.cell(tbl, 2, 2, dominance_max_text, text_color = dominance_max_color, tooltip = tt6)
// ─────────────────────────────────────────────────────────────
// MTF BUY/SELL alerts: 10m & 1H agreement (no logic changes)
isGreen = ta.wma(close, 2) > dyn_ema
tf_fast = input.timeframe("10", "Fast TF (Buy/Sell check)", group = "MTF Alerts")
tf_slow = input.timeframe("60", "Slow TF (Buy/Sell check)", group = "MTF Alerts")
confirm_on_close = input.bool(true, "Confirm on bar close", group = "MTF Alerts")
green_fast = request.security(syminfo.tickerid, tf_fast, isGreen, lookahead = barmerge.lookahead_off)
green_slow = request.security(syminfo.tickerid, tf_slow, isGreen, lookahead = barmerge.lookahead_off)
buyCond = green_fast and green_slow
sellCond = not green_fast and not green_slow
triggerOK = confirm_on_close ? barstate.isconfirmed : true
// Single BUY / SELL alerts (messages unchanged)
alertcondition(buyCond and triggerOK, title = "MTF BUY (10m & 1H GREEN)", message = "{{ticker}} | TF={{interval}} | Dynamic line")
alertcondition(sellCond and triggerOK, title = "MTF SELL (10m & 1H RED)", message = "{{ticker}} | TF={{interval}} | Dynamic line")
// ─────────────────────────────────────────────────────────────
// NEW: 10m status repeated EVERY MINUTE (no logic changes)
// ─────────────────────────────────────────────────────────────
// 1-minute pulse: true once per closed 1m bar
m1_pulse = request.security(syminfo.tickerid, "1", barstate.isconfirmed, lookahead = barmerge.lookahead_off)
// Repeat ONLY the 10-minute status every minute
status10_green = green_fast
status10_red = not green_fast
alertcondition(status10_green and m1_pulse, title = "10m Status GREEN — repeat each minute", message = "{{ticker}} | TF=10 | Dynamic line — GREEN")
alertcondition(status10_red and m1_pulse, title = "10m Status RED — repeat each minute", message = "{{ticker}} | TF=10 | Dynamic line — RED")
how do the trend speed anlaysis work
Flexible Candle Zones (3x) — ZeeSM AND IC MARKING INDICATOR where you can mark the daily indicator for the SM zone and london and new york zones automatically
Previous Day Close (PDC)pdc price just watch how it reacts it will say if bearish or bullish on day or can get a good entry took a while to make who likes it
卡蛋K线反转Currently, only entry signals and reversal signals are available.
Continuous updates are planned, with subsequent plans to add alarm and reversal alerts.
Señales de Compra/Venta - KUSKUS + MACD AlgoAlphaseñales de compra/venta con base en la alineación de dos indicadores
CME Gap Finder - BTC (Adjustable TF)This is a CME Futures gap finder that has a variable timeframe. Great for finding long term trades or short term depending on the time frame. 1hr chart to 3 hr gaps. 4 hr chart to 3 day on gaps.
Candle body break (WD4H1H)When the body of a candlestick breaks on the weekly, daily, 4-hour, and 1-hour charts, a sign and horizontal line will be displayed. The alert corresponds to the break of the 1-hour chart, and although there are some places where it is not displayed accurately, it may be useful as a guide when determining whether a bottom or peak is forming.
RSI Crossover with Candlestick Patternsusing the RSI indicator levels 40 and 60, where the signal cuts above level 40 with a candlestick hammer or bull engulfing and cuts below level 60 with a candlestick inverter hammer or bearish engulfing.