Weekly RSI DivergenceMarks divergences on price and RSI on price chart. arrows arrears where DIVERGENCE occcure. green indicates bullish red is bearish. to be cross checked with price and used. any suggeston is welcome
Penunjuk dan strategi
Smooth Fibonacci BandsSmooth Fibonacci Bands
This indicator overlays adaptive Fibonacci bands on your chart, creating dynamic support and resistance zones based on price volatility. It combines a simple moving average with ATR-based Fibonacci levels to generate multiple bands that expand and contract with market conditions.
## Features
- Creates three pairs of upper and lower Fibonacci bands
- Smoothing option for cleaner, less noisy bands
- Fully customizable colors and line thickness
- Adapts automatically to changing market volatility
## Settings
Adjust the SMA and ATR lengths to match your trading timeframe. For short-term trading, try lower values; for longer-term analysis, use higher values. The Fibonacci factors determine how far each band extends from the center line - standard Fibonacci ratios (1.618, 2.618, and 4.236) are provided as defaults.
## Trading Applications
- Use band crossovers as potential entry and exit signals
- Look for price bouncing off bands as reversal opportunities
- Watch for price breaking through multiple bands as strong trend confirmation
- Identify potential support/resistance zones for placing stop losses or take profits
Fibonacci Bands combines the reliability of moving averages with the adaptability of ATR and the natural market harmony of Fibonacci ratios, offering a robust framework for both trend and range analysis.
Cash Market Volatility StrategyBCM - Baycam
Brakout signals based on voltality parameters -
Closing price
ATR - Average true range
RSI
MACD of RSI [TORYS]MACD of RSI — Momentum & Divergence Scanner
Description:
This enhanced oscillator applies MACD logic directly to the Relative Strength Index (RSI) rather than price, giving traders a clearer look at internal momentum and early shifts in trend strength. Now featuring a custom histogram, dual MA types, and RSI-based divergence detection — it’s a complete toolkit for identifying exhaustion, acceleration, and hidden reversal points in real time.
How It Works:
Calculates the MACD line as the difference between a fast and slow moving average of RSI. Adds a Signal Line (MA of the MACD) and plots a Histogram to show momentum acceleration/deceleration. Both RSI MAs and the Signal Line can be toggled between EMA and SMA for custom tuning.
Divergence Detection:
Bullish Divergence : Price makes a lower low while RSI makes a higher low → labeled with a green “D” below the curve.
Bearish Divergence : Price makes a higher high while RSI makes a lower high → labeled with a red “D” above the curve.
Configurable lookback window for tuning sensitivity to pivots, with 4 as the sweet spot.
RSI Pivot Dot Signals:
Plots green dots at RSI oversold pivot lows below 30,
Plots red dots at overbought pivot highs above 70.
Helps detect short-term exhaustion or bounce zones, plotted right on the MACD-RSI curve.
RSI 50 Crosses (Optional):
Optional ▲ and ▼ labels when RSI crosses its 50 midline — useful for momentum trend shifts or pullback confirmation, or to detect consolidation.
Histogram:
Plotted as a column chart showing the distance between MACD and Signal Line.
Colored dynamically:
Bright green : Momentum rising above zero
Light green : Weakening above zero
Bright red : Momentum falling below zero
Light red : Weakening below zero
The zero line serves as the mid-point:
Above = Bullish Bias
Below = Bearish Bias
How to Interpret:
Momentum Confirmation:
Use MACD cross above Signal Line with a rising histogram to confirm breakouts or trend entries.
Histogram shrinking near zero = momentum weakening → caution or reversal.
Exhaustion & Reversals:
Dot signals near RSI extremes + histogram peak can suggest overbought/oversold pressure.
Use divergence labels ("D") to spot early reversal signals before price breaks structure.
Inputs & Settings:
RSI Length
Fast/Slow MA Lengths for MACD (applied to RSI)
Signal Line Length
MA Type: Choose between EMA and SMA for MACD and Signal Line
Pivot Sensitivity for dot markers
Divergence Logic Toggle
Show/hide RSI 50 Crosses
Best For:
Traders who want momentum insight from inside RSI, not price
Scalpers using divergence or exhaustion entries
Swing traders seeking entry confirmation from signal crossovers
Anyone using multi-timeframe confluence with RSI and trend filters
Pro Tips:
Combine this with:
Bollinger Bands breakouts and reversals
VWAP or EMAs to filter entries by trend
Volume spikes or BBW squeezes for volatility confirmation
TTM Scalper Alert to sync structure and momentum
Why EMA Isn't What You Think It IsMany new traders adopt the Exponential Moving Average (EMA) believing it's simply a "better Simple Moving Average (SMA)". This common misconception leads to fundamental misunderstandings about how EMA works and when to use it.
EMA and SMA differ at their core. SMA use a window of finite number of data points, giving equal weight to each data point in the calculation period. This makes SMA a Finite Impulse Response (FIR) filter in signal processing terms. Remember that FIR means that "all that we need is the 'period' number of data points" to calculate the filter value. Anything beyond the given period is not relevant to FIR filters – much like how a security camera with 14-day storage automatically overwrites older footage, making last month's activity completely invisible regardless of how important it might have been.
EMA, however, is an Infinite Impulse Response (IIR) filter. It uses ALL historical data, with each past price having a diminishing - but never zero - influence on the calculated value. This creates an EMA response that extends infinitely into the past—not just for the last N periods. IIR filters cannot be precise if we give them only a 'period' number of data to work on - they will be off-target significantly due to lack of context, like trying to understand Game of Thrones by watching only the final season and wondering why everyone's so upset about that dragon lady going full pyromaniac.
If we only consider a number of data points equal to the EMA's period, we are capturing no more than 86.5% of the total weight of the EMA calculation. Relying on he period window alone (the warm-up period) will provide only 1 - (1 / e^2) weights, which is approximately 1−0.1353 = 0.8647 = 86.5%. That's like claiming you've read a book when you've skipped the first few chapters – technically, you got most of it, but you probably miss some crucial early context.
▶️ What is period in EMA used for?
What does a period parameter really mean for EMA? When we select a 15-period EMA, we're not selecting a window of 15 data points as with an SMA. Instead, we are using that number to calculate a decay factor (α) that determines how quickly older data loses influence in EMA result. Every trader knows EMA calculation: α = 1 / (1+period) – or at least every trader claims to know this while secretly checking the formula when they need it.
Thinking in terms of "period" seriously restricts EMA. The α parameter can be - should be! - any value between 0.0 and 1.0, offering infinite tuning possibilities of the indicator. When we limit ourselves to whole-number periods that we use in FIR indicators, we can only access a small subset of possible IIR calculations – it's like having access to the entire RGB color spectrum with 16.7 million possible colors but stubbornly sticking to the 8 basic crayons in a child's first art set because the coloring book only mentioned those by name.
For example:
Period 10 → alpha = 0.1818
Period 11 → alpha = 0.1667
What about wanting an alpha of 0.17, which might yield superior returns in your strategy that uses EMA? No whole-number period can provide this! Direct α parameterization offers more precision, much like how an analog tuner lets you find the perfect radio frequency while digital presets force you to choose only from predetermined stations, potentially missing the clearest signal sitting right between channels.
Sidenote: the choice of α = 1 / (1+period) is just a convention from 1970s, probably started by J. Welles Wilder, who popularized the use of the 14-day EMA. It was designed to create an approximate equivalence between EMA and SMA over the same number of periods, even thought SMA needs a period window (as it is FIR filter) and EMA doesn't. In reality, the decay factor α in EMA should be allowed any valye between 0.0 and 1.0, not just some discrete values derived from an integer-based period! Algorithmic systems should find the best α decay for EMA directly, allowing the system to fine-tune at will and not through conversion of integer period to float α decay – though this might put a few traditionalist traders into early retirement. Well, to prevent that, most traditionalist implementations of EMA only use period and no alpha at all. Heaven forbid we disturb people who print their charts on paper, draw trendlines with rulers, and insist the market "feels different" since computers do algotrading!
▶️ Calculating EMAs Efficiently
The standard textbook formula for EMA is:
EMA = CurrentPrice × alpha + PreviousEMA × (1 - alpha)
But did you know that a more efficient version exists, once you apply a tiny bit of high school algebra:
EMA = alpha × (CurrentPrice - PreviousEMA) + PreviousEMA
The first one requires three operations: 2 multiplications + 1 addition. The second one also requires three ops: 1 multiplication + 1 addition + 1 subtraction.
That's pathetic, you say? Not worth implementing? In most computational models, multiplications cost much more than additions/subtractions – much like how ordering dessert costs more than asking for a water refill at restaurants.
Relative CPU cost of float operations :
Addition/Subtraction: ~1 cycle
Multiplication: ~5 cycles (depending on precision and architecture)
Now you see the difference? 2 * 5 + 1 = 11 against 5 + 1 + 1 = 7. That is ≈ 36.36% efficiency gain just by swapping formulas around! And making your high school math teacher proud enough to finally put your test on the refrigerator.
▶️ The Warmup Problem: how to start the EMA sequence right
How do we calculate the first EMA value when there's no previous EMA available? Let's see some possible options used throughout the history:
Start with zero : EMA(0) = 0. This creates stupidly large distortion until enough bars pass for the horrible effect to diminish – like starting a trading account with zero balance but backdating a year of missed trades, then watching your balance struggle to climb out of a phantom debt for months.
Start with first price : EMA(0) = first price. This is better than starting with zero, but still causes initial distortion that will be extra-bad if the first price is an outlier – like forming your entire opinion of a stock based solely on its IPO day price, then wondering why your model is tanking for weeks afterward.
Use SMA for warmup : This is the tradition from the pencil-and-paper era of technical analysis – when calculators were luxury items and "algorithmic trading" meant your broker had neat handwriting. We first calculate an SMA over the initial period, then kickstart the EMA with this average value. It's widely used due to tradition, not merit, creating a mathematical Frankenstein that uses an FIR filter (SMA) during the initial period before abruptly switching to an IIR filter (EMA). This methodology is so aesthetically offensive (abrupt kink on the transition from SMA to EMA) that charting platforms hide these early values entirely, pretending EMA simply doesn't exist until the warmup period passes – the technical analysis equivalent of sweeping dust under the rug.
Use WMA for warmup : This one was never popular because it is harder to calculate with a pencil - compared to using simple SMA for warmup. Weighted Moving Average provides a much better approximation of a starting value as its linear descending profile is much closer to the EMA's decay profile.
These methods all share one problem: they produce inaccurate initial values that traders often hide or discard, much like how hedge funds conveniently report awesome performance "since strategy inception" only after their disastrous first quarter has been surgically removed from the track record.
▶️ A Better Way to start EMA: Decaying compensation
Think of it this way: An ideal EMA uses an infinite history of prices, but we only have data starting from a specific point. This creates a problem - our EMA starts with an incorrect assumption that all previous prices were all zero, all close, or all average – like trying to write someone's biography but only having information about their life since last Tuesday.
But there is a better way. It requires more than high school math comprehension and is more computationally intensive, but is mathematically correct and numerically stable. This approach involves compensating calculated EMA values for the "phantom data" that would have existed before our first price point.
Here's how phantom data compensation works:
We start our normal EMA calculation:
EMA_today = EMA_yesterday + α × (Price_today - EMA_yesterday)
But we add a correction factor that adjusts for the missing history:
Correction = 1 at the start
Correction = Correction × (1-α) after each calculation
We then apply this correction:
True_EMA = Raw_EMA / (1-Correction)
This correction factor starts at 1 (full compensation effect) and gets exponentially smaller with each new price bar. After enough data points, the correction becomes so small (i.e., below 0.0000000001) that we can stop applying it as it is no longer relevant.
Let's see how this works in practice:
For the first price bar:
Raw_EMA = 0
Correction = 1
True_EMA = Price (since 0 ÷ (1-1) is undefined, we use the first price)
For the second price bar:
Raw_EMA = α × (Price_2 - 0) + 0 = α × Price_2
Correction = 1 × (1-α) = (1-α)
True_EMA = α × Price_2 ÷ (1-(1-α)) = Price_2
For the third price bar:
Raw_EMA updates using the standard formula
Correction = (1-α) × (1-α) = (1-α)²
True_EMA = Raw_EMA ÷ (1-(1-α)²)
With each new price, the correction factor shrinks exponentially. After about -log₁₀(1e-10)/log₁₀(1-α) bars, the correction becomes negligible, and our EMA calculation matches what we would get if we had infinite historical data.
This approach provides accurate EMA values from the very first calculation. There's no need to use SMA for warmup or discard early values before output converges - EMA is mathematically correct from first value, ready to party without the awkward warmup phase.
Here is Pine Script 6 implementation of EMA that can take alpha parameter directly (or period if desired), returns valid values from the start, is resilient to dirty input values, uses decaying compensator instead of SMA, and uses the least amount of computational cycles possible.
// Enhanced EMA function with proper initialization and efficient calculation
ema(series float source, simple int period=0, simple float alpha=0)=>
// Input validation - one of alpha or period must be provided
if alpha<=0 and period<=0
runtime.error("Alpha or period must be provided")
// Calculate alpha from period if alpha not directly specified
float a = alpha > 0 ? alpha : 2.0 / math.max(period, 1)
// Initialize variables for EMA calculation
var float ema = na // Stores raw EMA value
var float result = na // Stores final corrected EMA
var float e = 1.0 // Decay compensation factor
var bool warmup = true // Flag for warmup phase
if not na(source)
if na(ema)
// First value case - initialize EMA to zero
// (we'll correct this immediately with the compensation)
ema := 0
result := source
else
// Standard EMA calculation (optimized formula)
ema := a * (source - ema) + ema
if warmup
// During warmup phase, apply decay compensation
e *= (1-a) // Update decay factor
float c = 1.0 / (1.0 - e) // Calculate correction multiplier
result := c * ema // Apply correction
// Stop warmup phase when correction becomes negligible
if e <= 1e-10
warmup := false
else
// After warmup, EMA operates without correction
result := ema
result // Return the properly compensated EMA value
▶️ CONCLUSION
EMA isn't just a "better SMA"—it is a fundamentally different tool, like how a submarine differs from a sailboat – both float, but the similarities end there. EMA responds to inputs differently, weighs historical data differently, and requires different initialization techniques.
By understanding these differences, traders can make more informed decisions about when and how to use EMA in trading strategies. And as EMA is embedded in so many other complex and compound indicators and strategies, if system uses tainted and inferior EMA calculatiomn, it is doing a disservice to all derivative indicators too – like building a skyscraper on a foundation of Jell-O.
The next time you add an EMA to your chart, remember: you're not just looking at a "faster moving average." You're using an INFINITE IMPULSE RESPONSE filter that carries the echo of all previous price actions, properly weighted to help make better trading decisions.
EMA done right might significantly improve the quality of all signals, strategies, and trades that rely on EMA somewhere deep in its algorithmic bowels – proving once again that math skills are indeed useful after high school, no matter what your guidance counselor told you.
Sector Relative StrengthDescription
This script compares sector performance relative to the S&P 500. Sector price levels or charts alone can mislead, because they tend to move with the broader market. An increase in a sector’s price does not necessarily indicate strength, as it may simply be following the index.
For more a more reliable picture, the script calculates a ratio between each sector ETF and SPY. If the ratio has increased, the sector has outperformed the index. In case it has declined, the sector has underperformed. If the value is near zero, the sector has moved in line with the index. The sectors are presented in a table and sorted on relative performance.
Calculation Method
The performance is expressed as a percentage change in the ratio over a user-defined lookback period. The default lookback is set to 21 bars, which corresponds to one month on a daily chart. This value can be adopted in the settings to match preferred time period.
Z-Score
In addition to the percentage change, the script calculates a Z-score of the ratio, which measures how far the current value deviates from its recent mean. A high positive Z-score indicates that the ratio is significantly above its average, while a negative value indicates it is below. This normalization allows for comparison between sectors with different price levels or volatility profiles.
Table Columns
- Relative %: The sector's performance relative to SPY over the selected lookback period
- Z-Score: Standardized measure of current performance ratio is relative to its average
- Trend Arrow: Indicates the direction of relative performance up down or flat
Example Interpretation
For example, if XLK shows a 3.7% change, it has outperformed SPY over the selected period. Another sector might show a -2.1% change, which indicates underperformance. While both values shows relative strength or weakness, the Z-score is optional and can provide additional context based on how unusual that performance is compared to the sector's own recent behavior.
Use Case
This approach helps evaluate overall market conditions and supports a top-down method. By starting with sector performance, it becomes easier to identify where the market is showing leadership or weakness. This allows the stock selection process to be more deliberate and can help refine or customize screeners based on certain sectors.
FibSync - DynamicFibSupportWhat is this indicator?
FibSync – DynamicFibSupport overlays your chart with both static and dynamic Fibonacci retracement levels, making it easy to spot potential areas of support and resistance.
Static Fibs: Calculated from the highest and lowest price over a user-defined lookback period.
Dynamic Fibs: Calculated from the most recent swing high and swing low, automatically adapting as new swings form.
How to use
Add the indicator to your chart.
Configure the settings:
Static Fib Period: Sets the lookback window for static fib levels.
Show Dynamic Fibonacci Levels: Toggle dynamic fibs on/off.
Dynamic Fib Swing Search Window: How far back to search for valid swing highs/lows.
Swing Strength (bars left/right): How many bars define a swing high/low (higher = stronger swing).
Interpret the levels:
Solid lines are static fibs.
Transparent lines are dynamic fibs (if enabled).
Colors match standard fib conventions (yellow = 0.236, red = 0.382, blue = 0.618, green = 0.786, gray = 0.5).
Tips
Static and dynamic fibs can overlap-this often highlights especially important support/resistance zones.
Adjust the swing strength for your trading style: lower values for short-term, higher for long-term swings.
Hide/show individual lines using the indicator’s style settings in TradingView.
Trading Ideas (for higher timeframes and static fibs)
Close above the blue line (0.618 static fib):
This can be interpreted as a potential long (buy) signal, suggesting the market is breaking above a key resistance level.
Close below the red line (0.382 static fib):
This can be interpreted as a potential short (sell) signal, indicating the market is breaking below a key support level.
Note: These signals are most meaningful on higher timeframes and when using the static fib lines. Always confirm with your own strategy and risk management.
Q Impulse EntryQ Impulse Entry
A directional entry system combining impulse breakouts, Elder's momentum confirmation, and ADX trend validation. Designed for clean trade setups with multi-step filtering, entry markers, and real-time alerts.
🔧 Core Logic
This is not a basic mashup — each filter plays a distinct technical role:
1. Impulse Breakout Engine
• Detects sharp directional price breaks using ATR-adjusted dynamic zones
• Impulse window controls sensitivity to local highs/lows
2. Elder Momentum Filter
• Confirms signal using MACD histogram and EMA alignment
• Blocks entries when internal momentum contradicts price move
3. ADX Trend Strength Filter
• Uses threshold-based ADX logic to validate trend power
• Filters out noise in flat or weak markets
The system requires all three filters to agree before confirming an entry.
📈 Visual Feedback
• ⇑ / ⇓ arrows mark confirmed entry signals
• Colored entry dots plotted at signal price help confirm timing and aid in multi-position layering
• Impulse breakout zones and EMA are displayed for directional context
• Clean layout, no repainting, designed for real-time use
⚙️ Configurable Inputs
• Impulse Window — controls breakout signal sensitivity
• ATR Multiplier — defines width of impulse breakout zones
(Elder and ADX filters are embedded and fine-tuned)
✨ Highlights
• Triple-filter signal logic = fewer false positives
• Entry dots + arrows for visual clarity and scaling in
• Lightweight, non-repainting, and alert-ready
• Best suited for Forex and all timeframes
• Ideal for breakout, trend-following, or hybrid systems
• Built-in alerts and customizable zones
• Always apply risk management suited to your capital and strategy
Trade with clarity — stay for quality.
Index Futures vs Cash ArbitrageThis indicator measures the statistical spread between major stock index futures and their corresponding cash indices (e.g., ES vs SPX, NQ vs NDX) using Z-score normalization. It automatically detects commonly traded index pairs (S&P 500, Nasdaq, Dow Jones, Russell 2000) and calculates a smoothed spread between futures and spot prices. A Z-score is then derived from this spread to highlight potential overpricing or underpricing conditions.
Traders can use customizable thresholds to identify mean-reversion opportunities where the futures contract may be temporarily overvalued or undervalued relative to the index. The histogram highlights the direction of the Z-score (green = futures > index, red = futures < index), while built-in alerts notify users of key threshold breaches or zero-line crosses.
This tool is designed for discretionary traders, pairs traders, or anyone exploring statistical arbitrage strategies between futures and spot markets. It is not a buy/sell signal by itself and should be used with additional confluence or risk management techniques.
Liquidity stop huntThis tool identifies key liquidity zones where stop hunts are likely to occur.
**How it works:**
- Detects swing highs/lows on your selected timeframe.
- Marks levels where "liquidity sweeps" (fakeouts) often happen.
- Plots these zones as dotted lines for visual reference.
**How to use:**
1. Look for price rejections near marked levels.
2. Avoid placing stops too close to obvious liquidity zones.
3. Combine with price action for confirmation.
**Settings:**
- Timeframe: Choose the historical period for analysis (e.g., 1D, 1W).
- Sweep Type: "Wick Only" for precise tails, "Regular" for all breaks.
- Colors/Style: Customize appearance.
Note: Works best in trending markets. Not a standalone strategy — always confirm with additional analysis.
Seasonality DOW CombinedOverall Purpose
This script analyzes historical daily returns based on two specific criteria:
Month of the year (January through December)
Day of the week (Sunday through Saturday)
It summarizes and visually displays the average historical performance of the selected asset by these criteria over multiple years.
Step-by-Step Breakdown
1. Initial Settings:
Defines minimum year (i_year_start) from which data analysis will start.
Ensures the user is using a daily timeframe, otherwise prompts an error.
Sets basic display preferences like text size and color schemes.
2. Data Collection and Variables:
Initializes matrices to store and aggregate returns data:
month_data_ and month_agg_: store monthly performance.
dow_data_ and dow_agg_: store day-of-week performance.
COUNT tracks total number of occurrences, and COUNT_POSITIVE tracks positive-return occurrences.
3. Return Calculation:
Calculates daily percentage change (chg_pct_) in price:
chg_pct_ = close / close - 1
Ensures it captures this data only for the specified years (year >= i_year_start).
4. Monthly Performance Calculation:
Each daily return is grouped by month:
matrix.set updates total returns per month.
The script tracks:
Monthly cumulative returns
Number of occurrences (how many days recorded per month)
Positive occurrences (days with positive returns)
5. Day-of-Week Performance Calculation:
Similarly, daily returns are also grouped by day-of-the-week (Sunday to Saturday):
Daily return values are summed per weekday.
The script tracks:
Cumulative returns per weekday
Number of occurrences per weekday
Positive occurrences per weekday
6. Visual Display (Tables):
The script creates two visual tables:
Left Table: Monthly Performance.
Right Table: Day-of-the-Week Performance.
For each table, it shows:
Yearly data for each month/day.
Summaries at the bottom:
SUM row: Shows total accumulated returns over all selected years for each month/day.
+ive row: Shows percentage (%) of times the month/day had positive returns, along with a tooltip displaying positive occurrences vs total occurrences.
Cells are color-coded:
Green for positive returns.
Red for negative returns.
Gray for neutral/no change.
7. Interpreting the Tables:
Monthly Table (left side):
Helps identify seasonal patterns (e.g., historically bullish/bearish months).
Day-of-Week Table (right side):
Helps detect recurring weekday patterns (e.g., historically bullish Mondays or bearish Fridays).
Practical Use:
Traders use this to:
Identify patterns based on historical data.
Inform trading strategies, e.g., avoiding historically bearish days/months or leveraging historically bullish periods.
Example Interpretation:
If the table shows consistently green (positive) for March and April, historically the asset tends to perform well during spring. Similarly, if the "Friday" column is often red, historically Fridays are bearish for this asset.
India VIX TableThis indicator gives you the India Vix value in real time on your chart. You can change the position on the chart as per your preference.
HiLo EMA Custom bandsHILo Ema custom bands
This advanced technical indicator is a powerful variation of "HiLo Ema squeeze bands" that combines the best elements of Donchian channels and EMAs. It's specially designed to identify price squeezes before significant market moves while providing dynamic support/resistance levels and predictive price targets.
Indicator Concept:
The indicator initializes EMAs at each new high or low - the upper EMA tracks highs while the lower EMA tracks lows. It draws maximum of 6 custom bands based on percentage, fixed value or Atr
Upper EM bands are drawn below uper ema, Lower EMA bands are drawn above lower ema
Customizable Options:
Ema length: 200 default
Calculation type: Ema (Default), HILO
Calculation type: Percent,Fixed Value, ATR
Band Value: Percent/Value/ATR multiple This is value to use for calculation type
Band Selection: Both,Upper,Lower
Key Features:
You can choose to draw either of one or both, the latter can be overwhelming initially but as you get used to it, it becomes a powerful tool.
When both bands are selected, upper and lower bands provide provides dual references and intersections
This creates a more trend-responsive alternative to traditional Donchian channels with clearly defined zones for trade planning.
If you select percaentage, note that the calulation is based FROM the respective EMA bands. So bands from lower EMA band will appear narrower compared to the those drawn from upper EMA band
Price targets or reversals:
Look of alignment of lines and price. The current level of one order could align with that of previous level of a different order because often markets move in steps
Settings Guide:
Recommended Settings:
Ema length: 200
Use one of the bands (not both) if using large length of say 1000
Calculation type: EMA
HILO will draw donchian like bands, this is useful if you only want flat price levels. In a rising market use upper and vise versa
Calculation type:
percentage for indices : 5, for symbols 10 or higher based on symbol volatility
Fixed value: about 10% of symbol value converted to value
Atr: 2 ideally
Perfect for swing traders and position traders looking for a more sophisticated volatility-based overlay that adapts to changing market conditions and provides predictive reversal levels.
Note: This indicator works well across multiple timeframes but is especially effective on H4, Daily and Weekly charts for trend trading.
[blackcat] L2 Z-Score of PriceOVERVIEW
The L2 Z-Score of Price indicator offers traders an insightful perspective into how current prices diverge from their historical norms through advanced statistical measures. By leveraging Z-scores, it provides a robust framework for identifying potential reversals in financial markets. The Z-score quantifies the number of standard deviations that a data point lies away from the mean, thus serving as a critical metric for recognizing overbought or oversold conditions. 🎯
Key benefits encompass:
• Precise calculation of Z-scores reflecting true price deviations.
• Interactive plotting features enhancing visual clarity.
• Real-time generation of buy/sell signals based on crossover events.
STATISTICAL ANALYSIS COMPONENTS
📉 Mean Calculation:
Utilizes Simple Moving Averages (SMAs) to establish baseline price references.
Provides smooth representations filtering short-term noise preserving long-term trends.
Fundamental for deriving subsequent deviation metrics accurately.
📈 Standard Deviation Measurement:
Quantifies dispersion around established means revealing underlying variability.
Crucial for assessing potential volatility levels dynamically adapting strategies accordingly.
Facilitates precise Z-score derivations ensuring statistical rigor.
🕵️♂️ Z-SCORE DETECTION:
Measures standardized distances indicating relative positions within distributions.
Helps pinpoint extreme conditions signaling impending reversals proactively.
Enables early identification of trend exhaustion phases prompting timely actions.
INDICATOR FUNCTIONALITY
🔢 Core Algorithms:
Integrates SMAs along with standardized deviation formulas generating precise Z-scores.
Employs Arithmetic Mean Line Algorithm (AMLA) smoothing techniques improving interpretability.
Ensures consistent adherence to predefined statistical protocols maintaining accuracy.
🖱️ User Interface Elements:
Dedicated plots displaying real-time Z-score markers facilitating swift decision-making.
Context-sensitive color coding distinguishing positive/negative deviations intuitively.
Background shading highlighting proximity to key threshold activations enhancing visibility.
STRATEGY IMPLEMENTATION
✅ Entry Conditions:
Confirm bullish/bearish setups validated through multiple confirmatory signals.
Validate entry decisions considering concurrent market sentiment factors.
Assess alignment between Z-score readings and broader trend directions ensuring coherence.
🚫 Exit Mechanisms:
Trigger exits upon hitting predetermined thresholds derived from historical analyses.
Monitor continuous breaches signifying potential trend reversals promptly executing closures.
Execute partial/total closes contingent upon cumulative loss limits preserving capital efficiently.
PARAMETER CONFIGURATIONS
🎯 Optimization Guidelines:
Length: Governs responsiveness versus smoothing trade-offs balancing sensitivity/stability.
Price Source: Dictates primary data series driving Z-score computations selecting relevant inputs accurately.
💬 Customization Recommendations:
Commence with baseline defaults; iteratively refine parameters isolating individual impacts.
Evaluate adjustments independently prior to combined modifications minimizing disruptions.
Prioritize minimizing erroneous trigger occurrences first optimizing signal fidelity.
Sustain balanced risk-reward profiles irrespective of chosen settings upholding disciplined approaches.
ADVANCED RISK MANAGEMENT
🛡️ Proactive Risk Mitigation Techniques:
Enforce strict compliance with pre-defined maximum leverage constraints adhering strictly to guidelines.
Mandatorily apply trailing stop-loss orders conforming to script outputs reinforcing discipline.
Allocate positions proportionately relative to available capital reserves managing exposures prudently.
Conduct periodic reviews gauging strategy effectiveness rigorously identifying areas needing refinement.
⚠️ Potential Pitfalls & Solutions:
Address frequent violations arising during heightened volatility phases necessitating manual interventions judiciously.
Manage false alerts warranting immediate attention avoiding adverse consequences systematically.
Prepare contingency plans mitigating margin call possibilities preparing proactive responses effectively.
Continuously assess automated system reliability amidst fluctuating conditions ensuring seamless functionality.
PERFORMANCE AUDITS & REFINEMENTS
🔍 Critical Evaluation Metrics:
Assess win percentages consistently across diverse trading instruments gauging reliability.
Calculate average profit ratios per successful execution measuring profitability efficiency accurately.
Measure peak drawdown durations alongside associated magnitudes evaluating downside risks comprehensively.
Analyze signal generation frequencies revealing hidden patterns potentially skewing outcomes uncovering systematic biases.
📈 Historical Data Analysis Tools:
Maintain comprehensive records capturing every triggered event meticulously documenting results.
Compare realized profits/losses against backtested simulations benchmarking actual vs expected performances accurately.
Identify recurrent systematic errors demanding corrective actions implementing iterative refinements steadily.
Document evolving performance metrics tracking progress dynamically addressing identified shortcomings proactively.
PROBLEM SOLVING ADVICE
🔧 Frequent Encountered Challenges:
Unpredictable behaviors emerging within thinly traded markets requiring filtration processes.
Latency issues manifesting during abrupt price fluctuations causing missed opportunities.
Overfitted models yielding suboptimal results post-extensive tuning demanding recalibrations.
Inaccuracies stemming from incomplete/inaccurate data feeds necessitating verification procedures.
💡 Effective Resolution Pathways:
Exclude low-liquidity assets prone to erratic movements enhancing signal integrity.
Introduce buffer intervals safeguarding major news/event impacts mitigating distortions effectively.
Limit ongoing optimization attempts preventing model degradation maintaining optimal performance levels consistently.
Verify reliable connections ensuring uninterrupted data flows guaranteeing accurate interpretations reliably.
USER ENGAGEMENT SEGMENT
🤝 Community Contributions Welcome
Highly encourage active participation sharing experiences & recommendations!
[blackcat] L3 Mean Reversion ATR Stop Loss OVERVIEW
The L3 Mean Reversion ATR Stop Loss indicator is meticulously crafted to empower traders by offering statistically-driven stop-loss levels that adapt seamlessly to evolving market dynamics. By harmoniously blending mean reversion concepts with Advanced True Range (ATR) metrics, it delivers a robust framework for managing risks more effectively. 🌐 The primary objective is to furnish traders with intelligent exit points grounded in both short-term volatility assessments and long-term trend evaluations.
Key highlights encompass:
• Dynamic calculation of Z-scores to evaluate deviations from established means
• Adaptive stop-loss pricing leveraging real-time ATR measurements
• Clear visual cues enabling swift decision-making processes
TECHNICAL ANALYSIS COMPONENTS
📉 Z-SCORE CALCULATION
Measures how many standard deviations an asset's current price lies away from its average
Facilitates identification of extreme conditions indicative of impending reversals
Utilizes simple moving averages and standard deviation computations
📊 STANDARD DEVIATION MEASUREMENT
Quantifies dispersion of closing prices around the mean
Provides insights into underlying price distribution characteristics
Crucial for assessing potential volatility levels accurately
🕵️♂️ ADAPTIVE STOP-LOSS DETECTION
Employs ATR as a proxy for prevailing market volatility
Modulates stop-loss placements dynamically responding to shifting trends
Ensures consistent adherence to predetermined risk management protocols
INDICATOR FUNCTIONALITY
🔢 Core Algorithms
Integrate Smooth Moving Averages (SMAs) alongside standardized deviation formulas
Generate precise Z-scores reflecting true price deviations
Leverage ATR-derived multipliers for fine-grained stop-loss adjustments
🖱️ User Interface Elements
Interactive plots displaying real-time stop-loss markers
Context-sensitive color coding enhancing readability
Background shading indicating proximity to stop-level activations
STRATEGY IMPLEMENTATION
✅ Entry Conditions
Confirm bullish/bearish setups validated through multiple confirmatory signals
Ensure alignment between Z-score readings and broader trend directions
Validate entry decisions considering concurrent market sentiment factors
🚫 Exit Mechanisms
Trigger exits upon hitting predefined ATR-based stop-loss thresholds
Monitor continuous breaches signifying potential trend reversals
Execute partial/total closes contingent upon cumulative loss limits
PARAMETER CONFIGURATIONS
🎯 Optimization Guidelines
Period Length: Governs responsiveness versus smoothing trade-offs
ATR Length: Dictates the temporal scope for volatility analysis
Stop Loss ATR Multiplier: Tunes sensitivity towards stop-trigger activations
💬 Customization Recommendations
Commence with baseline defaults; iteratively refine parameters
Evaluate impacts independently prior to combined adjustments
Prioritize minimizing erroneous trigger occurrences first
Sustain balanced risk-reward profiles irrespective of chosen settings
ADVANCED RISK MANAGEMENT
🛡️ Proactive Risk Mitigation Techniques
Enforce strict compliance with pre-defined maximum leverage constraints
Mandatorily apply trailing stop-loss orders conforming to script outputs
Allocate positions proportionately relative to available capital reserves
Conduct periodic reviews gauging strategy effectiveness rigorously
⚠️ Potential Pitfalls & Solutions
Address frequent violations arising during heightened volatility phases
Manage false alerts warranting manual interventions judiciously
Prepare contingency plans mitigating margin call possibilities
Continuously assess automated system reliability amidst fluctuating conditions
PERFORMANCE AUDITS & REFINEMENTS
🔍 Critical Evaluation Metrics
Assess win percentages consistently across diverse trading instruments
Calculate average profit ratios per successful execution
Measure peak drawdown durations alongside associated magnitudes
Analyze signal generation frequencies revealing hidden patterns
📈 Historical Data Analysis Tools
Maintain comprehensive records capturing every triggered event
Compare realized profits/losses against backtested simulations
Identify recurrent systematic errors demanding corrective actions
Implement iterative refinements bolstering overall efficacy steadily
PROBLEM SOLVING ADVICE
🔧 Frequent Encountered Challenges
Unpredictable behaviors emerging within thinly traded markets
Latency issues manifesting during abrupt price fluctuations
Overfitted models yielding suboptimal results post-extensive tuning
Inaccuracies stemming from incomplete or delayed data inputs
💡 Effective Resolution Pathways
Exclude low-liquidity assets prone to erratic movements
Introduce buffer intervals safeguarding major news/event impacts
Limit ongoing optimization attempts preventing model degradation
Verify seamless connectivity ensuring uninterrupted data flows
USER ENGAGEMENT SEGMENT
🤝 Community Contributions Welcome
Highly encourage active participation sharing experiences & recommendations!
THANKS
A heartfelt acknowledgment extends to all developers contributing invaluable insights about adaptive stop-loss strategies using statistical measures! ✨
Weekly ManipulationUnderstanding the "Weekly Manipulation" Indicator
The "Weekly Manipulation" indicator is a powerful tool designed to identify false breakouts in the market—moments. Let me explain how it works in simple terms.
What This Indicator Detects
This indicator spots two specific market behaviors that often indicate manipulation:
1. Single-Day Manipulation (Red/Green Labels)
This occurs when price briefly breaks through a significant daily level but fails to maintain the momentum:
Bearish Manipulation (Red): Price pushes above the previous day's high, but then reverses and closes below that high.
Bullish Manipulation (Green): Price drops below the previous day's low), but then reverses and closes above that low.
2. Two-Day Manipulation (Black Labels)
This is a more complex version of the same pattern, but occurring over a 2-day period. These signals can indicate even stronger manipulation attempts and potentially more powerful reversals.
Why This Matters for Your Trading
By identifying these patterns, you can:
- Avoid getting caught in false breakouts
- Find potential entry points after the manipulation is complete
- Understand when market action might not be genuine price discovery
How to Use This Indicator
1. Look for Red Markers: These appear when price has attempted to break higher but failed. This often suggests bearish potential going forward.
2. Look for Green Markers: These appear when price has attempted to break lower but failed. This often suggests bullish potential going forward.
3. Pay Attention to Black Markers: These 2-day patterns can signal stronger reversals and might be worth giving extra weight in your analysis.
The indicator labels these patterns clearly as "Manipulation" right on your chart, giving you an immediate visual cue when these potential setups occur.
Consecutive Candles Above/Below EMADescription:
This indicator identifies and highlights periods where the price remains consistently above or below an Exponential Moving Average (EMA) for a user-defined number of consecutive candles. It visually marks these sustained trends with background colors and labels, helping traders spot strong bullish or bearish market conditions. Ideal for trend-following strategies or identifying potential trend exhaustion points, this tool provides clear visual cues for price behavior relative to the EMA.
How It Works:
EMA Calculation: The indicator calculates an EMA based on the user-specified period (default: 100). The EMA is plotted as a blue line on the chart for reference.
Consecutive Candle Tracking: It counts how many consecutive candles close above or below the EMA:
If a candle closes below the EMA, the "below" counter increments; any candle closing above resets it to zero.
If a candle closes above the EMA, the "above" counter increments; any candle closing below resets it to zero.
Highlighting Trends: When the number of consecutive candles above or below the EMA meets or exceeds the user-defined threshold (default: 200 candles):
A translucent red background highlights periods where the price has been below the EMA.
A translucent green background highlights periods where the price has been above the EMA.
Labeling: When the required number of consecutive candles is first reached:
A red downward arrow label with the text "↓ Below" appears for below-EMA streaks.
A green upward arrow label with the text "↑ Above" appears for above-EMA streaks.
Usage:
Trend Confirmation: Use the highlights and labels to confirm strong trends. For example, 200 candles above the EMA may indicate a robust uptrend.
Reversal Signals: Prolonged streaks (e.g., 200+ candles) might suggest overextension, potentially signaling reversals.
Customization: Adjust the EMA period to make it faster or slower, and modify the candle count to make the indicator more or less sensitive to trends.
Settings:
EMA Length: Set the period for the EMA calculation (default: 100).
Candles Count: Define the minimum number of consecutive candles required to trigger highlights and labels (default: 200).
Visuals:
Blue EMA line for tracking the moving average.
Red background for sustained below-EMA periods.
Green background for sustained above-EMA periods.
Labeled arrows to mark when the streak threshold is met.
This indicator is a powerful tool for traders looking to visualize and capitalize on persistent price trends relative to the EMA, with clear, customizable signals for market analysis.
Explain EMA calculation
Other trend indicators
Make description shorter
Linear Regression Trendline on Close
This indicator draws a linear regression trendline that connects the closing prices of the last N candles, where N is a user-defined input.
🔹 Key Features:
Uses least-squares linear regression to fit a straight line to recent closes
Automatically adapts to any timeframe (5min, 1h, daily, etc.)
Input lets you select how many recent candles to include
Helps identify short-term trend direction and momentum
🔸 How to Use:
Set the "Number of Candles" input to choose how far back the regression line should look
The line updates in real time as new candles form
Use it to gauge short-term bias, or combine with support/resistance/zones for confirmation
🧠 Tip: Increase the number of candles for smoother trends; decrease for more reactive trendlines.
动态止损趋势指标Trend indicators edited by Happy in Chiang Mai,When the K-line is above the stop loss line, go long; when the K-line is below the stop loss line, go short. The stop loss line stops loss, which is applicable to the two-minute cycle.
Minervini Trend Template (EMA)📄 Description:
This script is inspired by Mark Minervini’s SEPA (Specific Entry Point Analysis) strategy and adapts his famous Trend Template using Exponential Moving Averages (EMAs). It helps traders visually identify technically strong stocks that are in ideal buy conditions based on Minervini's rules.
📈 Strategy Logic:
This script scans for momentum breakouts by filtering stocks with the following characteristics:
✅ Buy Criteria (All Conditions Must Be Met):
Price above 50-day EMA
Price above 150-day EMA
Price above 200-day EMA
50-day EMA above 150-day EMA
150-day EMA above 200-day EMA
200-day EMA trending upward (greater than it was 20 days ago)
Price within 25% of its 52-week high
Price at least 30% above its 52-week low
If all 8 conditions are satisfied, the script triggers a SEPA Setup Signal. This is visually indicated by:
✅ A green background on the chart
✅ A label saying “SEPA Setup” under the bar
🛒 When to Buy:
Wait for the stock to break out above a recent base or consolidation pattern (like a cup-with-handle or flat base) on strong volume.
The ideal entry is within 5% of the breakout point.
Confirm that the SEPA conditions are met on the breakout day.
📉 When to Sell:
Place a stop-loss 5–8% below your entry price.
Exit if the breakout fails and price falls back below the pivot or the 50-day EMA.
Take partial profits after a 20–25% gain, and move your stop-loss up to breakeven or trail it using moving averages like the 21 or 50 EMA.
Exit fully if price closes below the 50-day or 150-day EMA on volume.
🧠 Why EMAs?
EMAs react faster to recent price action than SMAs, helping you catch earlier signals in fast-moving markets. This makes it especially useful for growth and momentum traders following Minervini’s high-performance approach.
📊 How to Use:
Apply the script to any stock chart (daily timeframe recommended).
Look for a green background + SEPA Setup label.
Combine with price/volume analysis, base patterns, and market context to time your entries.
🚨 Optional Alerts:
You can set an alert on the condition minerviniPass == true to notify you when a SEPA-compliant setup appears.
📚 This tool is meant for educational and research purposes. Always validate with your own due diligence and consult your risk plan before making any trades.
ADX EMA's DistanceIt is well known to technical analysts that the price of the most volatile and traded assets do not tend to stay in the same place for long. A notable observation is the recurring pattern of moving averages that tend to move closer together prior to a strong move in some direction to initiate the trend, it is precisely that distance that is measured by the blue ADX EMA's Distance lines on the chart, normalized and each line being the distance between 2, 3 or all 4 moving averages, with the zero line being the point where the distance between them is zero, but it is also necessary to know the direction of the movement, and that is where the modified ADX will be useful.
This is the well known Directional Movement Indicator (DMI), where the +DI and -DI lines of the ADX will serve to determine the direction of the trend.
(FVC) Fractal Volatility Compression (DAFE) (FVC) Fractal Volatility Compression
See the Market’s Volatility DNA.
The Fractal Volatility Compression (FVC) is a next-generation tool for traders who want to see volatility compression and expansion across multiple timeframes and volatility engines—not just price, but the very structure of volatility itself.
What Makes FVC Unique?
Dual-Engine Volatility:
Plots both classic price-based (Stdev) and meta-volatility (VoVix) compression/expansion, so you can see when the market is “coiling” or “exploding” on multiple levels.
Fractal, Multi-Timeframe Analysis:
Measures volatility on short, medium, and long timeframes, then normalizes each as a Z-score. The result: a true “coiled spring” detector that works on any asset, any timeframe.
Threshold Lines You Control:
Yellow center line: Your neutral baseline.
Green compression line: When crossed, the market is “spring-loading.”
Red expansion line: When crossed, volatility is breaking out.
All lines are solid, clean, and end before the dashboard for a professional look.
Agreement Fill: When both engines agree (both above or both below the center line), a bright fill highlights the zone—red for expansion, green for compression.
Signature Dashboard & Info Line:
Dashboard (right-middle) shows all Z-scores and FVC values, color-coded for instant clarity.
Compact info label for mobile or minimalist users.
Inputs & Customization
Thresholds: Set the yellow, green, and red lines to match your asset, timeframe, and risk tolerance.
Timeframes & Lengths: Tune the short, medium, and long volatility windows for your style.
Toggle Lines: Show/hide Stdev or VoVix FVC lines independently.
Dashboard & Info Line: Toggle for your workflow and screen size.
How to Use
Compression (below green): Market is “coiling” across timeframes—watch for explosive moves.
Expansion (above red): Volatility is breaking out—expect regime shifts or trend acceleration.
Agreement Fill: When both lines agree, the signal is strongest.
Not a Buy/Sell Signal: These are regime and structure signals—combine with your own
strategy and risk management.
Why should you use FVC?
See what others can’t:
Most tools show only one dimension of volatility. FVC reveals the fractal DNA of market compression and expansion. Works on any asset, any timeframe. Professional, clean, and fully customizable.
Fractal Volatility Compression (FVC):
Because the next big move is born in the market’s hidden compression.
For educational purposes only. Not financial advice. Always use proper risk management
Use with discipline. Trade your edge.
— Dskyz, for DAFE Trading Systems
Candle Eraser (New York Time, Dropdown)If you want to focus on first 3 hours of Asia, London> and New York, inspired by Stacey Burke Trading 12 Candle Window Concept
- Set your time to UTC-4 New York