EnhancedSignalGeneratorLibrary "EnhancedSignalGenerator"
Enhanced Signal Generator – clean v6 implementation (UDT-based)
generateAdvancedSignal(unifiedScore, trendComp, momInd, volFactor, qualScore, cyclePos, regime)
Generates advanced signal analysis with multi-pathway evaluation
Parameters:
unifiedScore (float) : Unified market score input
trendComp (float) : Trend component analysis factor
momInd (float) : Momentum indicator value
volFactor (float) : Volatility adjustment factor
qualScore (float) : Quality assessment metric
cyclePos (float) : Market cycle position (0.0-1.0, where 0.5 = neutral cycle phase)
regime (string) : Market regime classification string ("bull", "bear", "sideways", "volatile")
Returns: Signal Comprehensive signal analysis result
analyzePatternSignals(h, l, c, v, w, reg)
Analyzes pattern-based signal components with multi-dimensional price action evaluation
Parameters:
h (float) : High price value for range analysis
l (float) : Low price value for support/resistance detection
c (float) : Close price value for momentum assessment
v (float) : Volume data for confirmation analysis
w (int) : Analysis window period for pattern formation timeframe
reg (string) : Market regime string for context-aware pattern interpretation
Returns: Signal Pattern analysis signal with comprehensive technical evaluation
optimizeSignalParameters(s, p, w, m)
Optimizes signal generation parameters through advanced statistical analysis
Parameters:
s (array) : Signal array input for performance evaluation
p (array) : Parameter array input for optimization target values
w (int) : Window period for rolling optimization analysis
m (string) : Optimization method string ("sharpe", "sortino", "calmar", "variance")
Returns: float Optimization result score representing parameter fitness
Signal
Signal data structure for market analysis
Fields:
dir (series int) : Signal direction: +1 bull, -1 bear, 0 flat
strength (series float) : Signal strength magnitude (0-1)
conf (series float) : Confidence level (0-1)
rationale (series string) : Human-readable explanation
source (series string) : Signal source classification
quality (series float) : Blended quality assessment score
Indicators and strategies
PrecisionQualitySynthesizerLibrary "PrecisionQualitySynthesizer"
Precision-Quality Synthesizer – slim compile-safe shell
assessComprehensiveQuality(sig, ref, win, wIn)
Parameters:
sig (float)
ref (float)
win (int)
wIn (array)
RobustDecomposerLibrary "RobustDecomposer"
Robust signal decomposer – minimal, compile‑safe scaffold
decompose(price, window, lambda)
Parameters:
price (float)
window (int)
lambda (float)
OptimizedGPPredictorLibrary "OptimizedGPPredictor"
predict(price, lookback, kernel)
Parameters:
price (float)
lookback (int)
kernel (string)
AdvancedCycleAnalyzerLibrary "AdvancedCycleAnalyzer"
Advanced Cycle Analyzer (warning‑free)
Spectral power, autocorrelation cycles — all user functions run every bar.
NOTE: Bin count set to 16 for brevity. Increase BIN_COUNT if higher resolution is needed.
getSpectrum(src, length)
Parameters:
src (float)
length (int)
getPrimaryCycle(src, window)
Parameters:
src (float)
window (int)
EnhancedMathLibraryLibrary "EnhancedMathLibrary"
Enhanced Mathematical Library: advanced statistical algorithms, signal processing, and numerical methods
performStatisticalAnalysis(dataSeries, referenceSeries, windowLength)
Parameters:
dataSeries (float)
referenceSeries (float)
windowLength (int)
conditionSignalRobust(inputSignal, windowLength, outlierThreshold, adaptiveClipping)
Parameters:
inputSignal (float)
windowLength (int)
outlierThreshold (float)
adaptiveClipping (bool)
calculateAdvancedMathFunctions(inputValue, signalSeries, transformWindow)
Parameters:
inputValue (float)
signalSeries (float)
transformWindow (int)
performNumericalComputation(functionData, initialRoot, integrationStep, computationWindow)
Parameters:
functionData (float)
initialRoot (float)
integrationStep (float)
computationWindow (int)
Scanner Candles v2.01The "Scanner Candle v.2.01" is an indicator classifies candles based on the body/range ratio: indecisive (small body, ≤50%), decisive (medium body), explosive (large body, ≥70%). It includes EMAs to identify trends and "Reset Candles" (RC), small-bodied candles near EMAs, signaling potential reversals or continuations. Useful for analyzing volatility, breakouts, reversals, and risk management.
Description of the indicator:
The "Scanner Candle v.2.01" indicator classifies candles into three categories based on the proportion of the candle's body to its range (high-low):
Indecisive: candles with a small body (≤ set threshold, default 50%), indicating low volatility or market uncertainty.
Decisive: candles with a medium body, reflecting a clear but not extreme price movement.
Explosive: candles with a large body (≥ set threshold, default 70%), signaling strong directional moves.
Additionally, the indicator includes:
Customizable exponential moving averages (EMAs) to identify trends and support/resistance levels.
Detection of "Reset Candles" (RC), specific candles (e.g., dojis, ) with a small bodies body near EMAs, useful for identifying potential reversal or continuation points.
Coloring and visualization:
Candles are colored by category (white for indecisive, orange for decisive, purple for explosive).
Reset Candles are marked with circles above/below the candle (green for bullish, red for bearish).
Potential uses:
Volatility analysis: Identifying uncertain (indecisive), directional (decisive), or impulsive (explosive) market phases.
Breakout trading: Explosive candles can signal entry opportunities on strong moves.
Reversal detection: Reset Candles near EMAs can indicate turning points or trend continuation.
Trend-following support: Integrated EMAs contextualize candles within the main trend.
Risk management: Indecisive candles suggest avoiding trades in low-directionality phases.
The indicator is customizable (thresholds, colors, thresholdsEMAs, ) and adaptable to various timeframes and strategies, from day trading to swing trading.
Reset Candles:
Reset Candles (RC) are specific candles signaling potential reversals or continuations, often near EMAs. They are defined by:
Small body: Body < 5% of the range of the last 10 candles, indicating low volatility (e.g., doji).
EMA proximity: The candle is near or crosses a defined EMA (e.g., 10, 60, or 223 periods).
Trend conditions: Follows a red candle, with the close of the previous previous candles above a specific EMA, suggesting a potential bullish resumption or stabilization.
Limited spike: The candle has minimal tails (spikes, ) below a set threshold (default 1%).
Minimum timeframe: Appears on timeframes ≥ set value (default 5 minutes) or daily charts.
Non-consecutive: Not preceded by other RCs in the last 3 candles.
Types:
Doji_fin: Green circle above, signaling a bullish bullish setup near longer EMAs.
Dojifin_2: Yellow Red circle below, signaling a bearish setup near shorter EMAs.
Trading uses:
Reversal: RCs near EMAs signal bounces or rejections, ideal for counter-trend trades.
Continuation: In trends, RCs indicate pauses before trend resumption, offering low-risk entries.
Support/resistance confirmation: EMA proximity strengthens the level's significance.
Risk management: Small bodies and EMA proximity allow tight stop-losses.
Limitations:
False signals: Common in volatile or sideways markets; use with additional confirmation.
Timeframe dependency: More reliable on higher timeframes (e.g., 1-hour or daily).
Customization needed: Thresholds (e.g., spike, timeframe) must be tailored to the market.
Conclusion:
Reset Candles highlight low-volatility moments near technical levels (EMAs) that may precede significant moves. They are ideal for precise entries with tight stops in reversal or continuation strategies but require clear market context and additional confirmation for optimal effectiveness.
#ema #candlepattern #scalping
بو عمر//@version=5
indicator("بو عمر", overlay=true)
// SMA 1000 على إطار الدقيقة
sma_1min = request.security(syminfo.tickerid, "1", ta.sma(close, 1000), barmerge.gaps_off, barmerge.lookahead_on)
plot(sma_1min, title=" 1Min", color=color.blue, linewidth=2)
// SMA 1000 على إطار 5 دقائق
sma_5min = request.security(syminfo.tickerid, "5", ta.sma(close, 1000), barmerge.gaps_off, barmerge.lookahead_on)
plot(sma_5min, title=" 5Min", color=color.orange, linewidth=2)
// SMA 1000 على إطار 15 دقيقة
sma_15min = request.security(syminfo.tickerid, "15", ta.sma(close, 1000), barmerge.gaps_off, barmerge.lookahead_on)
plot(sma_15min, title=" 15Min", color=color.green, linewidth=2)
// ====== Labels ======
// نستخدم var حتى لا تُعاد إنشاء الملصقات كل شمعة، بل يتم تحديث موقعها فقط
var label lbl_1min = label.new(x=na, y=na, text="1Min", style=label.style_label_left, color=color.blue, textcolor=color.white)
label.set_xy(lbl_1min, bar_index, sma_1min)
label.set_text(lbl_1min, "1Min ")
label.set_color(lbl_1min, color.blue)
var label lbl_5min = label.new(x=na, y=na, text="5Min", style=label.style_label_left, color=color.orange, textcolor=color.white)
label.set_xy(lbl_5min, bar_index, sma_5min)
label.set_text(lbl_5min, "5Min")
label.set_color(lbl_5min, color.orange)
var label lbl_15min = label.new(x=na, y=na, text="15Min ", style=label.style_label_left, color=color.green, textcolor=color.white)
label.set_xy(lbl_15min, bar_index, sma_15min)
label.set_text(lbl_15min, "15Min ")
label.set_color(lbl_15min, color.green)
Pivot P ve 200 EMA Kesişimpivotlarala 200 günlük ema kesişince sinyal veriyor alta düşünce short üste cıkınca long
BTCUSD Liquidity Pulse Divergence | Investing Crypto StrategyStrategy type: Daily on-chain liquidity trend-follower (long-only)
What it does
The strategy goes long BTCUSD only when fresh capital and whale accumulation line up with price‐action strength:
Stable-coin Supply Shock
7-day % change in combined USDT + USDC market-cap
• Trade regime is ON when today’s change ranks above the chosen percentile of the last perc_len days (default 35 th).
Whale Wallet Momentum
Rate-of-change in the number of wallets holding ≥ 10 000 BTC
• Must be positive to confirm stealth buying.
Trend & Timing Filters
• Daily close > EMA(ema_len) ⟶ only trade with the dominant trend.
• Same-bar RSI(14) > rsi_gate and close > VWAP ⟶ avoid dead-cat moves.
Risk Engine
• Entry size = min(risk cap, volatility-weight) % of equity.
• Stop-loss = weekly ATR × atr_mult below entry.
• Flat immediately if stable-coin Z-score turns < 0 or whale ROC flips < 0.
All calculations are forward-safe: every higher-timeframe request uses lookahead_off.
Default inputs
Parameter Purpose Default
Stable-Δ percentile >` Supply-shock threshold 35
Percentile window Look-back (days) 100
Whale ROC length Accumulation window (days) 40
RSI gate Momentum confirm 50
Trend EMA length Macro filter (days) 100
Weekly-ATR stop × Stop distance 3.0
Back-test properties (shown in “Properties” tab)
Setting Value
Initial capital 10 000 USD
Order size 5 % of equity
Pyramiding 1
Commission 0.10 %
Slippage 5 ticks
Fill orders Bar magnifier ✔ · On bar close ✔ · Standard OHLC ✔
How to use
Add the script to any BTCUSD 1-day chart (spot or perpetual). Can work with ETH and other crypto correlated assets with BTC.
Leave the chart timeframe at D; the code pulls weekly data internally.
Adjust inputs only if you understand their effect (hover each slider for a tooltip).
Keep commission/slippage realistic and forward-test on a demo account before risking live funds.
Important notes
Uses only publicly available on-chain feeds (CRYPTOCAP:USDT, CRYPTOCAP:USDC, BTC_ADDRESSESBALANCE10KUSD).
No request.security() look-ahead, no repainting, no intrabar assumptions.
Long-only by design—no hedging in bear markets.
Historical performance never guarantees future returns. Market micro-structure changes or data outages can affect results.
Credits
Written from scratch with TradingView built-ins; no external code reused. Special thanks to the TradingView community for the on-chain data feeds.
Trade smart, manage risk, and let the liquidity tide guide you!
ES 1m MA Envelope (200 SMA)This indicator plots a Moving Average Envelope around the 200-period Simple Moving Average (SMA) for use on the 1-minute chart of the E-mini S&P 500 futures (ES).
It features asymmetric bands to highlight short-term overbought/oversold zones and potential reversion setups:
Upper Band: +0.23% above the 200 SMA
Lower Band: -0.28% below the 200 SMA
This envelope is ideal for traders who recognize the “Stairs Up, Elevator Down” behavior of the S&P 500 — where price tends to grind up slowly and fall quickly.
🔍 Key Features:
Designed specifically for the 1-minute ES chart
Asymmetric thresholds for better fit with ES intraday dynamics
Supports mean reversion and breakout detection
Can be used to identify stretched price conditions or short-term entries/exits
Suggested Use:
Look for fade setups near the bands during ranging sessions
Combine with volume, RSI, or order flow tools for confirmation
Use alerts for quick reactions to overextended price moves
Daily Moving Averages on Intraday ChartDaily SMAs regardless of timeframe. Not much else to say about it.
MTF Quad Rotation Stochastic + MTF TMO
MTF Quad Rotation Stochastic + MTF TMO
This script is a comprehensive momentum and trend tool that combines multi-timeframe Stochastic Oscillators and True Momentum Oscillators (TMO) into a single, easy-to-read layout.
🔹 Multi-Timeframe Stochastic (Quad Rotation)
Plots 4 smoothed stochastic levels per timeframe (short to long lookbacks).
Supports 3 configurable timeframes, each plotted in separate visual zones (0–100, 100–200, 200–300).
Helps detect alignment or divergence of momentum across short, medium, and long-term views.
Generates shape signals when all stochastics align in overbought/oversold zones (1TF, 2TF, 3TF logic).
🔹 Multi-Timeframe TMO (True Momentum Oscillator)
Displays TMO for 4 different user-selected timeframes.
Each TMO shows its main and signal line with dynamic color change and cloud fill based on direction.
Provides strong visual cues for momentum trend shifts and cross-timeframe confirmation.
Includes signal markers (triangles) when TMOs align for bullish or bearish momentum.
🔹 Additional Features
Customizable OB/OS levels, cloud transparency, and visual display controls.
Alerts built-in for overbought/oversold MTF conditions and TMO shifts.
Suitable for scalpers, intraday traders, and swing traders looking for confluence and momentum exhaustion.
This indicator helps you visually track momentum strength, reversals, and trend confirmation across multiple timeframes in real time.
DSPLN EMA Flip Strategy v6This script is part of the DSPLN Method, a rules-based trend-following system that trades price reactions around the 21 EMA with optional VWAP context and custom session filters.
🔹 Core Logic:
Enters long when price closes above the 21 EMA
Enters short when price closes below the 21 EMA
Exits when price closes back across the 21 EMA (trend shift)
Optional TP/SL levels can be toggled ON/OFF
Immediate re-entry in the opposite direction after exit (flips positions)
Stops trading for the session after a winning trade is hit
Max 5 trades per session
🛠️ Features:
21 EMA & VWAP visual overlays
Customizable session start/end time
TP/SL settings in points
Toggle for using or ignoring TP/SL
Auto-shutdown after first win (discipline enforcement)
Trade log reset at session close
Smart label displays “✅ WIN - No More Trades” when strategy locks in
Use this to master EMA momentum flips with clear logic, strict discipline, and no emotional overtrading. Part of the DSPLN Method — Do So Patiently Listening Now.
LONDON RIPPER Breakout · Daytrade EURUSDWhat it does
The script hunts for the first decisive break of the Tokyo range when London liquidity comes online. It fires long or short only if:
Price leaves the Asia box (05 : 00 – 06 : 55 GMT).
The break occurs inside the EU Entry Window (07 : 00 – 08 : 30 GMT).
Relative Volume (rVol) confirms momentum
- Longs: rVol ≥ 1 - Shorts: rVol < 1
Bollinger Band filter adds extra thrust confirmation
- Longs: close > upper band - Shorts: close < lower band.
Stop-loss is always the opposite side of the Asia box. No targets—let the move run.
All orders are sent on bar close with standard OHLC fills—no repaint, no intrabar peeking.
Default inputs
Anchor TF ………… 1 Day (volume baseline)
rVol Length ………… 9 bars (cumulative mode)
Tokyo Session …… 05 : 00-06 : 55 GMT
EU Session (full) … 07 : 00-13 : 00 GMT
EU Entry Window … 07 : 00-08 : 30 GMT
BB Length ………… 20 | Basis MA: SMMA (RMA) | StDev Mult: 2
All times are editable and use the Session Time-Zone = GMT by default.
Strategy properties used in the back-test
Initial capital: 100 000
Order size: 5 % of equity | Pyramiding: 1
Commission: 0.0001 USD per contract
Slippage: 3 ticks
Recalculate: none | Fill orders: On bar close + Standard OHLC
Feel free to adjust these values to match your broker’s conditions.
How to use
Add the script to any intraday EURUSD chart (≤ 30 min works best from our testings).
Check that your broker’s session times line up—modify if needed.
Keep risk sensible; the default 5 % per trade is a placeholder, not advice.
Let the strategy run only during the European session; it auto-flattens outside 07-13 GMT.
Important notes
Requires a feed that supplies real volume (needed for rVol).
No request.security() with look-ahead—this code is 100 % forward-safe.
Past results never guarantee future returns. London news spikes can still blow through stops. Test before you trade live.
Credits
Built from scratch using only TradingView built-in functions and the official ta library. No external code reused.
Trade disciplined, and may the Ripper be with you!
Supertrend MACD StrategySupertrend MACD Strategy - Description & Usage Guide
🚀 EARLY ACCESS INDICATOR
This is an early access version of my Supertrend MACD Strategy.
📊 What Is This Indicator?
The Supertrend MACD Strategy combines the power of MACD signals with filtering mechanisms to work seamlessly across ALL trading instruments - from forex and crypto to stocks and commodities.
Unlike traditional MACD indicators that only work well on specific assets, this universal version automatically adapts to any market's price structure and volatility characteristics.
Key Features:
✅ Universal Compatibility - Works on ANY trading pair without manual adjustments
✅ Smart Multi-Filter System - Combines MACD, ATR, ADX, and higher timeframe analysis
✅ Non-Repainting Signals - Signals form after candle close and never change
✅ Trend Continuation Tracking - BUY+/SELL+ signals for trend strength
✅ Structure Break Detection - Identifies major market shifts
✅ Visual Signal Line - Clear trend state indicator on chart
🎯 How The Signals Work
Signal Types:
BUY (Green) - Initial buy signal when all filters align
SELL (Red) - Initial sell signal when all filters align
BUY+ (Purple) - Second confirmation signal in uptrend
SELL+ (Purple) - Second confirmation signal in downtrend
Triangle Arrows - Additional trend continuation signals (optional)
Signal Formation:
⚠️ IMPORTANT: All signals form AFTER the second candle closes and MAY NOT REPAINT. Once a signal appears, it's final and will never disappear or change position.
🛠️ How To Use This Indicator
Basic Setup:
Add the indicator to any chart (works on all timeframes)
Default settings work for most instruments
Enable "Show Debug Info" to see real-time filter values
Set up alerts for automated notifications
Entry Strategies:
Conservative Approach:
Enter on BUY+ or SELL+ signals (purple labels)
These are second confirmations with higher probability
Wait for signal line color to match your trade direction
Aggressive Approach:
Enter on first BUY or SELL signals (green/red labels)
Use tight stop losses below/above recent swing points
Scale in with additional positions on BUY+/SELL+ signals
Exit Strategies:
Exit when opposite signal appears
Use trailing stops following the signal line
Take partial profits at key resistance/support levels
🔧 Advanced Filter Explanations
ATR Volatility Filter:
Ensures sufficient market movement before signaling
Percentage-based for universal compatibility
Higher values = fewer but higher quality signals
ADX Trend Strength:
Confirms trend momentum before entry
Default 15 works for most markets
Higher values filter out weak trends
Higher Timeframe Confirmation:
Aligns signals with larger trend direction
Default 1-hour works for most timeframes
Use 4H for daily charts, Daily for weekly charts
Structure Break Detection:
Identifies when price breaks significant levels
BOS+ signals indicate strong momentum
Percentage-based for universal scaling
🚨 Important Disclaimers
Signal Timing:
Signals appear AFTER second candle close only
low chance of repainting - signals never change once formed
Real-time bar shows potential signal until close
Risk Management:
This indicator provides signals, not trade outcomes
Always use proper position sizing and stop losses
Backtest thoroughly before live trading
Markets can remain irrational longer than expected
Early Access Notes:
This is a pre-release version with ongoing improvements
Settings may be refined based on user feedback
Additional features planned for future updates
Report any issues or suggestions for enhancement
as said before this is indicator is in its early days so is subject to big changes
Version 1.0 (22 JUNE 25)
Trade responsibly and always conduct your own analysis before making trading decisions.
15m Engulfing MA Signal + Labelstrial script with changes required, difficult as of now to plot in chart with buy and sell signals
Cruce EMA + MACD + Alertas
🔔 EMA Crossover + MACD + RSI + Volume Strategy for High-Probability Buy Signals
Description:
This script is designed to detect solid buy opportunities in U.S. equities by combining multiple technical and volatility-based filters for higher precision:
- **Bullish crossover of EMAs (15 vs 28)** on the 4H chart
- **MACD confirmation** with bullish signal line crossover
- **Daily RSI between 30 and 70** to avoid overbought/oversold extremes
- **Minimum daily volume of 1 million shares**
- **Weekly volatility greater than 2%**
- Signals only appear in stocks showing a **bullish trend background**
When all conditions are met, the script displays a **green “BUY” label** below the candle and can also **trigger an automatic alert** if configured.
Perfect for technical traders looking for clean entries with multi-layered confirmations. Apply this script to a watchlist pre-filtered through TradingView’s Screener (e.g., Strong Buy, Buy, or Neutral analyst ratings).
---
Let me know if you want me to tailor it further for algo traders, swing traders, or even for a backtest version!
EPS & Sales Marker by Nikeshthis indicator marks quarter to quarter change of sales and earnings per share
RSI Mean ReversionRSI Mean Reversion Strategy - Volatility Optimized
This strategy combines RSI mean reversion signals with intelligent market filtering and volatility-adapted risk management to maximize performance across different market conditions.
What it does: Identifies high-probability reversal opportunities when RSI reaches extreme levels (≤30 oversold, ≥70 overbought), but only trades when market conditions favor mean reversion strategies.
How it works:
RSI Signals: 14-period RSI identifies oversold/overbought extremes
Smart Filtering: Avoids strong trending markets (>25% trend strength) where mean reversion fails
Volatility Adapted: 20% stop loss accommodates natural price fluctuations in volatile assets
Position Scaling: 5% equity per trade with pyramiding capability for strong setups
Trend Awareness: Uses 50-period MA to determine market direction
Key Features:
Volatility Optimized: 20% stop loss prevents premature exits in normal market noise
Risk Management: 1:1 risk/reward ratio (20% stop loss, 20% profit target)
Market Intelligence: Real-time suitability analysis prevents trading in unfavorable conditions
Automation Ready: Built-in alert conditions for automated execution
Visual Indicators:
Green background = Oversold in suitable market (BUY zone)
Red background = Overbought in suitable market (SELL zone)
Orange warnings = Strong trend detected - avoid trading
Info table shows real-time market conditions and trade status
Performance Optimizations:
Position size: 5% of equity for meaningful impact
Pyramiding: Up to 2 positions for scaling into winners
Designed for volatile assets that need breathing room
Best Used On:
Assets with 1%+ daily volatility in ranging or weak trending markets. Automatically filters out unsuitable conditions to protect capital.
This strategy addresses the main failure points of basic RSI systems by adding market context and volatility-appropriate risk management.
Siyonacci-powerWith this indicator:
Volume momentum volume line filters the trend.
ATR bands control volatility.
You get alerts for volume mismatch.
MSB peak-bottom breakouts are visible.
MACD momentum histogram in the bottom panel confirms the strength of the signal.
QoQ EPS & Sales (Vertical Labels)this indicator represents about QoQ growth of sales and earning per share
Siyonacci-CheapResult:
Single line %K → colors change depending on the signal
Overbought and oversold zones are indicated by levels 80–20
Orange color appears in indecisive signals