Andean Oscillator (Variant Sr.K)Andean Oscillator (Variant Sr.K)
The Andean Oscillator is a momentum and trend indicator designed for manual trading.
It measures the relative strength between buyers and sellers, helping to identify trend changes and momentum zones.
Key Features:
Bipolar Oscillator: shows the difference between bullish and bearish strength.
Colored Histogram: green indicates bullish momentum, red bearish; intensity reflects strength.
Signal Line (EMA): smooths the oscillator for trend change confirmation.
Dynamic ±1σ Levels: highlight extreme momentum zones.
Zero-Cross Markers: triangles visually signal trend bias changes.
Optional Alerts: get notifications when the oscillator crosses zero.
Recommended Use:
Assess momentum direction and strength.
Detect trend changes via zero-crosses or signal line crossovers.
Manual trading with clear visual confirmation, no automation required.
Customizable Settings:
Length: oscillator calculation period.
Signal Length: EMA period of the signal line.
Show ±1σ Levels: toggle dynamic reference lines on/off.
Ideal for traders seeking a visual, reliable tool that combines momentum and trend strength in a clear and actionable way
Trend Analizi
Multi-Timeframe Candle Color Dashboard (ฺBy WutTrader)// This description should be added to the script's information section on TradingView.
//
// === คู่มือการใช้งาน: Multi-Timeframe Candle Color Dashboard ===
//
// **ภาพรวม:**
// อินดิเคเตอร์นี้แสดงสีของแท่งเทียนจากหลายไทม์เฟรม (M1, M5, M15, M30, H1, H4, D1) บนหน้าจอเดียว
// เพื่อช่วยให้คุณเห็นภาพรวมของแนวโน้มในแต่ละช่วงเวลาได้อย่างรวดเร็ว
//
// - **🟢 สีเขียว:** แสดงว่าแท่งเทียนเป็นขาขึ้น (Bullish) ตามจำนวนแท่งที่กำหนด
// - **🔴 สีแดง:** แสดงว่าแท่งเทียนเป็นขาลง (Bearish) ตามจำนวนแท่งที่กำหนด
// - **⚪ สีเทา:** แสดงว่ายังไม่มีทิศทางที่ชัดเจน
//
// **วิธีการใช้งาน:**
// 1. **การดูสัญญาณ:** ใช้ Dashboard เพื่อยืนยันว่าหลายไทม์เฟรมมีแนวโน้มไปในทิศทางเดียวกัน
// - **ตัวอย่าง:** หากคุณกำลังดูชาร์ต M5 แล้วพบว่า M15, M30 และ H1 เป็นสีเขียวทั้งหมด
// แสดงว่ามีแนวโน้มขาขึ้นที่แข็งแกร่งในภาพรวม ซึ่งอาจเป็นจังหวะที่ดีสำหรับการเข้าซื้อ
// 2. **การตั้งค่า:** คุณสามารถปรับแต่งการแสดงผลได้ในเมนู "Settings"
// - **Global Settings:** เลือกเปิด/ปิดการแสดงผลของแต่ละไทม์เฟรมที่คุณต้องการ
// - **Dashboard Style:** เลือกว่าจะให้ Dashboard แสดงผลเป็นแนวตั้ง (Vertical) หรือแนวนอน (Horizontal)
// - **Color Settings:** ปรับสีสำหรับแนวโน้มขาขึ้น (Bullish) และขาลง (Bearish) ได้ตามใจชอบ
//
// **การตั้งค่าการแจ้งเตือน (Alert):**
// อินดิเคเตอร์นี้รองรับการแจ้งเตือนเมื่อทุกไทม์เฟรมที่คุณเปิดใช้งานเป็นสีเขียวทั้งหมด
// 1. ไปที่เมนู "Alert" (รูปกระดิ่ง) ที่ด้านบนของ TradingView
// 2. ตั้งค่า "Condition" เป็นชื่ออินดิเคเตอร์นี้: `Multi-Timeframe Candle Color Dashboard`
// 3. ตั้งค่า "Condition" เป็น `Bullish Alert`
// 4. ตั้งค่า "Frequency" เป็น `Once Per Bar Close`
//
// === User Manual: Multi-Timeframe Candle Color Dashboard ===
//
// **Overview:**
// This indicator displays the candle color from multiple timeframes (M1, M5, M15, M30, H1, H4, D1) on a single screen,
// helping you to quickly see the trend direction across different time periods.
//
// - **🟢 Green:** Indicates that candles are bullish for the specified number of lookback bars.
// - **🔴 Red:** Indicates that candles are bearish for the specified number of lookback bars.
// - **⚪ Gray:** Indicates a neutral or undefined trend.
//
// **How to Use:**
// 1. **Signal Confirmation:** Use the dashboard to confirm that multiple timeframes are moving in the same direction.
// - **Example:** If you are on an M5 chart and see that the M15, M30, and H1 timeframes are all green,
// it suggests a strong overall bullish momentum, which could be a good entry signal.
// 2. **Settings:** You can customize the display in the "Settings" menu.
// - **Global Settings:** Select which timeframes you want to show or hide.
// - **Dashboard Style:** Choose between a vertical or horizontal layout for the dashboard.
// - **Color Settings:** Adjust the colors for bullish and bearish trends to your preference.
//
// **Setting up an Alert:**
// This indicator supports an alert when all enabled timeframes turn completely green.
// 1. Go to the "Alert" menu (bell icon) at the top of TradingView.
// 2. Set the "Condition" to the name of this indicator: `Multi-Timeframe Candle Color Dashboard`.
// 3. Set the "Condition" to `Bullish Alert`.
// 4. Set the "Frequency" to `Once Per Bar Close`.
Fibonacci TraderA tool to plot fibonacci levels and the first extension automatically. Works with most time frame not unless the swings are too extreme. If the script is unable to detect the fib levels, better to stay out of the trade until price cools down.
Chanpreet Moving AveragesChanpreet Moving Averages
by Chanpreet Singh
This script plots up to four customizable moving averages (SMA, EMA, SMMA/RMA, WMA, VWMA).
You can adjust:
Moving average type
Source (close, open, hl2, etc.)
Length
Color
An optional input lets you select a higher or custom timeframe for the moving averages (e.g., daily MA on a 1-hour chart). If left empty, the script calculates them on the current chart timeframe, so the lines scale and move naturally when zooming or panning.
This tool is designed for educational and visualization purposes, helping traders see trend direction and potential areas of dynamic support/resistance.
⚠️ Disclaimer: This script does not provide financial advice or trading signals. Use it at your own risk. Always do your own research before making trading decisions.
High Volume Candle Zones (Neutral)Contact the publisher to get full content into using this indicator to its full potential. Will help identify key areas in the market. Can be used on all time frames for confluence
Extended Majors Rotation System | AlphaNattExtended Majors Rotation System | AlphaNatt
A sophisticated cryptocurrency rotation system that dynamically allocates capital to the strongest trending major cryptocurrencies using multi-layered relative strength analysis and adaptive filtering techniques.
"In crypto markets, the strongest get stronger. This system identifies and rides the leaders while avoiding the laggards through mathematical precision."
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 SYSTEM OVERVIEW
The Extended Majors Rotation System (EMRS) is a quantitative momentum rotation strategy that:
Analyzes 10 major cryptocurrencies simultaneously
Calculates relative strength between all possible pairs (45 comparisons)
Applies fractal dimension analysis to identify trending behavior
Uses adaptive filtering to reduce noise while preserving signals
Dynamically allocates to the mathematically strongest asset
Implements multi-layer risk management through market regime filters
Core Philosophy:
Rather than trying to predict which cryptocurrency will perform best, the system identifies which one is already performing best relative to all others and maintains exposure until leadership changes.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 WHAT MAKES THIS SYSTEM UNEQUIVOCALLY UNIQUE
1. True Relative Strength Matrix
Unlike simple momentum strategies that look at individual asset performance, EMRS calculates the complete relative strength matrix between all assets. Each asset is compared against every other asset using fractal analysis, creating a comprehensive strength map of the entire crypto market.
2. Hurst Exponent Integration
The system employs the Hurst Exponent to distinguish between:
Trending behavior (H > 0.5) - where momentum is likely to persist
Mean-reverting behavior (H < 0.5) - where reversals are likely
Random walk (H ≈ 0.5) - where no edge exists
This ensures the system only takes positions when mathematical evidence of persistence exists.
3. Dual-Layer Filtering Architecture
Combines two advanced filtering techniques:
Laguerre Polynomial Filters: Provides low-lag smoothing with minimal distortion
Kalman-like Adaptive Smoothing: Adjusts filter parameters based on market volatility
This dual approach preserves important price features while eliminating noise.
4. Market Regime Awareness
The system monitors overall crypto market conditions through multiple lenses and only operates when:
The broad crypto market shows positive technical structure
Sufficient trending behavior exists across major assets
Risk conditions are favorable
5. Rank-Based Selection with Trend Confirmation
Rather than simply choosing the top-ranked asset, the system requires:
High relative strength ranking
Positive individual trend confirmation
Alignment with market regime
This multi-factor approach reduces false signals and whipsaws.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛡️ SYSTEM ROBUSTNESS & DEVELOPMENT METHODOLOGY
Pre-Coding Design Philosophy
This system was completely designed before any code was written . The mathematical framework, indicator selection, and parameter ranges were determined through:
Theoretical analysis of market microstructure
Study of persistence and mean reversion in crypto markets
Mathematical modeling of relative strength dynamics
Risk framework development based on regime theory
No Post-Optimization
Zero parameter fitting: All parameters remain at their originally designed values
No curve fitting: The system uses the same settings across all market conditions
No cherry-picking: Parameters were not adjusted after seeing results
This approach ensures the system captures genuine market dynamics rather than historical noise
Parameter Robustness Testing
Extensive testing was conducted to ensure stability:
Sensitivity Analysis: System maintains positive expectancy across wide parameter ranges
Walk-Forward Analysis: Consistent performance across different time periods
Regime Testing: Performs in both trending and choppy conditions
Out-of-Sample Validation
System was designed on a selection of 10 assets
System was tested on multiple baskets of 10 other random tokens, to simualte forwards testing
Performance remains consistent across baskets
No adjustments made based on out-of-sample results
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📈 PERFORMANCE METRICS DISPLAYED
The system provides real-time performance analytics:
Risk-Adjusted Returns:
Sharpe Ratio: Measures return per unit of total risk
Sortino Ratio: Measures return per unit of downside risk
Omega Ratio: Probability-weighted ratio of gains vs losses
Maximum Drawdown: Largest peak-to-trough decline
Benchmark Comparison:
Live comparison against Bitcoin buy-and-hold strategy
Both equity curves displayed with gradient effects
Performance metrics shown for both strategies
Visual representation of outperformance/underperformance
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔧 OPERATIONAL MECHANICS
Asset Universe:
The system analyzes 10 major cryptocurrencies, customizable through inputs:
Bitcoin (BTC)
Ethereum (ETH)
Solana (SOL)
XRP
BNB
Dogecoin (DOGE)
Cardano (ADA)
Chainlink (LINK)
Additional majors
Signal Generation Process:
Calculate relative strength matrix
Apply Hurst Exponent analysis to each ratio
Rank assets by aggregate relative strength
Confirm individual asset trend
Verify market regime conditions
Allocate to highest-ranking qualified asset
Position Management:
Single asset allocation (no diversification)
100% in strongest trending asset or 100% cash
Daily rebalancing at close
No leverage employed in base system
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 VISUAL INTERFACE
Information Dashboard:
System state indicator (ON/OFF)
Current allocation display
Real-time performance metrics
Sharpe, Sortino, Omega ratios
Maximum drawdown tracking
Net profit multiplier
Equity Curves:
Cyan curve: System performance with gradient glow effect
Magenta curve: Bitcoin HODL benchmark with gradient
Visual comparison of both strategies
Labels indicating current values
Alert System:
Alerts fire when allocation changes
Displays selected asset symbol
"CASH" alert when system goes defensive
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ IMPORTANT CONSIDERATIONS
Appropriate Use Cases:
Medium to long-term crypto allocation
Systematic approach to crypto investing
Risk-managed exposure to cryptocurrency markets
Alternative to buy-and-hold strategies
Limitations:
Daily rebalancing required
Not suitable for high-frequency trading
Requires liquid markets for all assets
Best suited for spot trading (no derivatives)
Risk Factors:
Cryptocurrency markets are highly volatile
Past performance does not guarantee future results
System can underperform in certain market conditions
Not financial advice - for educational purposes only
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎓 THEORETICAL FOUNDATION
The system is built on several academic principles:
1. Momentum Anomaly
Extensive research shows that assets exhibiting strong relative momentum tend to continue outperforming in the medium term (Jegadeesh & Titman, 1993).
2. Fractal Market Hypothesis
Markets exhibit fractal properties with periods of persistence and mean reversion (Peters, 1994). The Hurst Exponent quantifies these regimes.
3. Adaptive Market Hypothesis
Market efficiency varies over time, creating periods where momentum strategies excel (Lo, 2004).
4. Cross-Sectional Momentum
Relative strength strategies outperform time-series momentum in cryptocurrency markets due to the high correlation structure.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💡 USAGE GUIDELINES
Capital Requirements:
Suitable for any account size
No minimum capital requirement
Scales linearly with account size
Implementation:
Can be traded manually with daily signals
Suitable for automation via alerts
Works with any broker supporting crypto
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📝 FINAL NOTES
The Extended Majors Rotation System represents a systematic, mathematically-driven approach to cryptocurrency allocation. By combining relative strength analysis with fractal market theory and adaptive filtering, it aims to capture the persistent trends that characterize crypto bull markets while avoiding the drawdowns of buy-and-hold strategies.
The system's robustness comes not from optimization, but from sound mathematical principles applied consistently. Every component was chosen for its theoretical merit before any backtesting occurred, ensuring the system captures genuine market dynamics rather than historical artifacts.
"In the race between cryptocurrencies, bet on the horse that's already winning - but only while the track conditions favour racing."
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Developed by AlphaNatt | Quantitative Rotation Systems
Version: 1.0
Strategy Type: Momentum Rotation
Classification: Systematic Trend Following
Not financial advice. Always DYOR.
ZenAlgo - MarsThis indicator is a momentum-based oscillator built around a modified RSI calculation and subsequent smoothing with moving averages. It introduces a layered structure where divergences, signal crossovers, histogram dynamics, and multi-timeframe tables all combine into a comprehensive framework. The purpose is not to forecast markets with certainty but to provide structured context on momentum shifts, divergences, and trend bias.
Core Calculation
The base source is the closing price.
From it, relative upward and downward movements are measured over a chosen lookback length (by preset or manual input).
These values are normalized into an oscillator bounded between 0–100, equivalent to a traditional RSI structure.
This oscillator is smoothed by a moving average (SMA by default), producing the main line (MA).
A secondary smoothing (EMA by default) of the MA produces a signal line, against which crossovers are monitored.
Why this structure:
RSI captures momentum imbalance between gains and losses. Smoothing removes noise and makes divergences more stable to identify. Adding a signal line allows crossover events to highlight relative strengthening or weakening momentum phases.
Zones and Visual Guides
Static horizontal levels are placed at 70 (upper bound), 50 (mid-line), and 30 (lower bound).
The region between 30–70 is softly filled to emphasize the neutral zone.
Color changes on the MA line occur depending on whether it is above or below the signal line.
Why these levels:
Values above 70 or below 30 are commonly interpreted as overextended regions. A central 50 line separates positive from negative bias. These anchors allow consistent interpretation of oscillator movements.
Crossover Events
Alerts and conditions are defined for when the MA crosses above or below the signal line.
These are not entry signals by themselves but indicate shifts in relative momentum strength.
Divergence Detection
Divergences are calculated on the smoothed MA rather than raw RSI.
Four conditions are tracked:
Regular bullish (price makes a lower low while MA makes a higher low).
Hidden bullish (price higher low with MA lower low).
Regular bearish (price higher high with MA lower high).
Hidden bearish (price lower high with MA higher high).
Each detected divergence is marked with shapes and labeled "R" (regular) or "H" (hidden).
Why divergences are used:
They highlight when oscillator momentum disagrees with price structure. Regular divergences often suggest exhaustion, while hidden divergences may appear during continuation phases.
RSI & MA Multi-Timeframe Table
A table can be displayed showing RSI and MA values across multiple timeframes (1m, 5m, 15m, 1h, 4h, 1D).
For each, the relationship (Rising, Falling, Neutral) is determined by comparing RSI and MA.
Colors are adjusted depending on value ranges (extreme low, oversold, overbought, etc.).
Added value:
Instead of analyzing divergences or crossovers only on one chart, the table provides a compact overview of aligned or conflicting conditions across timeframes.
Strong and Warning Indications
"Strong" mark (Diamond) appear when the MA is firmly biased above or below 50 and hidden divergence supports the trend.
"Warning" mark (Triangle) appear when bias is strong but a regular divergence forms in the opposite direction.
Shapes mark these conditions, and alerts are available.
Why this distinction:
Hidden divergences often accompany continuation phases, while regular divergences may challenge the prevailing bias. Marking them separately allows the user to distinguish between potential trend reinforcement versus warning conditions.
Signal Table
A separate table summarizes:
Overall trend bias (Bull, Full Bull, Bear, Full Bear, Flat).
Time spent in each key zone.
Current MA trend (Rising, Falling, Flat).
Visual icons and color codes provide quick interpretation.
Time in Zones
The indicator measures how many bars (converted into minutes) the MA has spent:
above 70
above 50
below 50
below 30
These values appear in the signal table.
Why this matters:
Extended time in an extreme zone can show persistent momentum. Quick reversals versus sustained positioning give different context for bias strength.
MA vs Signal Histogram
A histogram plots the difference between MA and signal line, shifted around the 50 level.
Rising differences are shown with brighter coloring, falling differences with faded tones.
This emphasizes whether momentum is accelerating or decelerating.
Daily VWAP Integration
When the MA crosses the 50 level, additional conditions check whether the histogram is aligned and whether price is above or below the daily VWAP.
Only when both momentum bias and VWAP alignment agree are triangle markers shown.
Why VWAP is included:
VWAP serves as an intraday mean reference. Requiring alignment between oscillator momentum and price position relative to VWAP reduces random crossover noise.
Added Value Over Free Indicators
Divergences are calculated on smoothed momentum rather than raw RSI, reducing false positives.
Integration of multi-timeframe tables avoids the need to manually switch charts.
Bias measurement in terms of time spent in zones adds a temporal dimension often missing in basic oscillators.
Combining histogram dynamics with VWAP filtering provides context not present in typical RSI or MA overlays.
Limitations and Disclaimers
Divergences are not predictive on their own; price may continue without respecting them.
Extreme readings (e.g., above 70) can remain extended for long periods, especially in strong trends.
Multi-timeframe aggregation may introduce repainting effects when lower timeframes update faster than higher ones.
Signals must be interpreted in broader market context; the indicator does not provide trade entries or exits by itself.
How to Interpret Values
Above 70: momentum is strongly stretched upward.
Below 30: momentum is strongly stretched downward.
Crossing 50: often marks a structural change in directional bias.
MA rising vs. falling: tracks whether momentum pressure is increasing or decreasing.
Divergence labels: "R" = potential reversal, "H" = potential continuation.
Tables: confirm whether bias is consistent across multiple timeframes.
Best Use
Observe divergences in conjunction with bias tables to understand whether short-term moves align with higher-timeframe conditions.
Treat "Strong" and "Warning" markers as contextual alerts, not direct signals.
Use the histogram and VWAP alignment to filter out weaker crossovers.
Combine with price action and risk management rather than using in isolation.
Short SellingStrong sell signal confirmed on 5-minute higher timeframe with same conditions.
Square off half/full signals as defined.
Target lines drawn bold based on previous swing lows and extended as described.
Blue candle color when RSI below 30.
EMA Support & ResistanceEducational Purpose only
This indicator combines VWAP, multiple Exponential Moving Averages (EMA 20,/VWAP ), Support and Resistance
VWAP (Volume Weighted Average Price) helps identify fair value and intraday bias.
EMA 20 act as dynamic support and resistance levels for short, medium, and long-term trends.
CPR (Central Pivot Range) is calculated from the previous day’s High, Low, and Close. It provides intraday reference zones S1/S2/S3 & R1/R2/R3 that traders use to gauge market direction and trend strength.
This tool is built for educational purposes only — to help visualize common support & resistance zones and learn how VWAP + EMAs + S/R interact in live markets. It is not financial advice and should not be used as a standalone trading system.
10-Crypto Normalized IndexOverview
This indicator builds a custom index for up to 10 cryptocurrencies and plots their combined trend as a single line. Each coin is normalized to 100 at a user-selected base date (or at its first available bar), then averaged (equally or by your custom weights). The result lets you see the market direction of your basket at a glance.
How it works
For each symbol, the script finds a base price (first bar ≥ the chosen base date; or the first bar in history if base-date normalization is off).
It converts the current price to a normalized value: price / base × 100.
It then computes a weighted average of those normalized values to form the index.
A dotted baseline at 100 marks the starting point; values above/below 100 represent % performance vs. the base.
Key inputs
Symbols (10 max): Default set: BTC, ETH, SOL, POL, OKB, BNB, SUI, LINK, 1INCH, TRX (USDT pairs). You can change exchange/quote (keep all the same quote, e.g., all USDT).
Weights: Toggle equal weights or enter custom weights. Custom weights are auto-normalized internally, so they don’t need to sum to 1.
Base date: Year/Month/Day (default: 2025-06-01). Turning normalization off uses each symbol’s first available bar as its base.
Smoothing: Optional SMA to reduce noise.
Show baseline: Toggle the horizontal line at 100.
Interpretation
Index > 100 and rising → your basket is up since the base date.
Index < 100 and falling → down since the base date.
Use shorter timeframes for intraday sentiment, higher timeframes for swing/trend context.
Default basket & weights (editable)
Order: BTC, ETH, SOL, POL, OKB, BNB, SUI, LINK, 1INCH, TRX.
Default custom weight factors: 30, 30, 20, 10, 10, 5, 5, 5, 5, 5 (auto-normalized).
Base date: 2025-06-01.
Highlight 10-11 AM NY//@version=5
indicator("Highlight 10-11 AM NY", overlay=true)
// Inputs for flexibility
startHour = input.int(10, "Start Hour (NY time)")
endHour = input.int(11, "End Hour (NY time)")
// Check if the current bar is within the session (uses chart time zone)
inSession = (hour(time, syminfo.timezone) >= startHour) and (hour(time, syminfo.timezone) < endHour)
// Highlight background
bgcolor(inSession ? color.new(color.yellow, 85) : na)
Smart Money Flow Index (SMFI) - This tool is useful for comparing price action with underlying money flow and spotting where smart money may be entering or exiting the market.
Momentum / RSI -> PROFABIGHI_CAPITAL🌟 Overview
This Momentum / RSI → PROFABIGHI_CAPITAL implements an innovative dual-indicator system combining momentum calculation with RSI analysis for enhanced market acceleration and deceleration detection.
It provides Momentum-based RSI calculation applying oscillator analysis to momentum values rather than direct price , Dual-display toggle system enabling switching between momentum and smoothed RSI visualization , Advanced multi-method smoothing with nine moving average options for RSI refinement , and Conditional visualization framework with context-appropriate reference lines and threshold levels for comprehensive momentum oscillator analysis.
🔧 Innovative Momentum-RSI Architecture
Professional momentum oscillator framework calculating price momentum and applying RSI analysis for enhanced acceleration detection
Momentum Period Configuration providing adjustable lookback period for momentum calculation balancing sensitivity versus stability
RSI-on-Momentum Implementation applying Relative Strength Index calculation to momentum values rather than direct price for unique market insight
RSI Length Management offering configurable RSI calculation period for momentum oscillator responsiveness adjustment
Display Mode Selection enabling toggle between momentum visualization and smoothed RSI display for flexible analysis approach
Extreme Level Configuration supporting custom overbought and oversold thresholds for momentum-based RSI signals
📊 Advanced Dual-Smoothing Framework
Nine Smoothing Methods supporting SMA, EMA, WMA, HMA, RMA, LSMA, DEMA, TEMA, and VIDYA for comprehensive momentum-RSI refinement
Primary Smoothing Layer providing first-level momentum-RSI smoothing with configurable method selection and period adjustment
Secondary Smoothing Integration enabling additional smoothing layer with independent method and period configuration for enhanced signal clarity
VIDYA Volatility Adaptation implementing Variable Index Dynamic Average with volatility-based smoothing adjustment for market condition responsiveness
Advanced MA Calculations including DEMA and TEMA implementations for reduced lag and improved momentum signal quality
Comparison Mode Activation supporting dual-line analysis with crossover detection between different smoothing configurations
⚙️ Mathematical Implementation Framework
Momentum Calculation Engine using Pine Script momentum function for accurate price acceleration measurement over specified periods
RSI-on-Momentum Formula applying standard RSI calculation methodology to momentum values for oscillator-based acceleration analysis
VIDYA Implementation calculating volatility-adjusted smoothing factor with mathematical precision and boundary constraint management
DEMA Mathematical Framework implementing double exponential moving average with lag reduction for responsive momentum-RSI smoothing
TEMA Advanced Calculation using triple exponential moving average formulation for enhanced smoothing with minimal signal delay
Null Value Protection ensuring continuous calculation through proper handling of undefined values and mathematical edge cases
🔄 Dual-Display System Architecture
Mode Toggle Implementation providing seamless switching between momentum display and smoothed momentum-RSI visualization
Momentum Visualization Mode displaying raw momentum values with positive/negative color coding for immediate acceleration direction identification
RSI Visualization Mode showing smoothed momentum-RSI values with extreme level color coding for overbought/oversold condition detection
Conditional Plotting Logic ensuring only relevant indicators are displayed based on selected visualization mode for clean chart presentation
Context-Appropriate Reference Lines displaying zero line for momentum mode and RSI levels for oscillator mode automatically
Synchronized Color Systems maintaining consistent color schemes across different display modes for intuitive analysis
📈 Enhanced Signal Generation Logic
Momentum Direction Signals using green/red color coding for positive and negative momentum values indicating market acceleration direction
Extreme Level Detection identifying overbought conditions above extreme high threshold and oversold conditions below extreme low threshold
Dual-Smoothing Comparison generating crossover signals when first smoothed momentum-RSI crosses above or below second smoothed line
Color-Coded Momentum-RSI States displaying dark green for extreme overbought, dark red for extreme oversold, and gray for neutral zones
Crossover Signal Generation providing visual confirmation of momentum-RSI line intersections for enhanced signal validation
Signal Persistence Framework maintaining color states until opposing conditions develop for clear trend identification
🎨 Conditional Visualization Framework [/b>
Mode-Specific Reference Lines displaying zero line only during momentum mode and RSI threshold lines only during oscillator mode
Dynamic Color Assignment adapting line colors based on current indicator values and selected visualization mode
Momentum Zero Line showing horizontal reference at zero level with dashed styling for momentum direction assessment
RSI Threshold Lines displaying extreme high, extreme low, and middle reference levels with appropriate transparency
Comparison Mode Synchronization coordinating dual-line colors when secondary smoothing comparison is enabled
[b>Background Raw RSI Display optionally showing unsmoothed momentum-RSI when smoothing is applied for reference comparison
⚡ Performance Optimization Features [/b>
Conditional Computation calculating smoothed values only when RSI display mode is selected for computational efficiency
Efficient MA Switching using optimized switch statements for moving average method selection with minimal processing overhead
Memory Management implementing efficient variable usage and calculation sequences for real-time performance
Real-Time Updates providing immediate momentum and momentum-RSI values with dynamic color changes
[b>Error Prevention Framework incorporating validation and fallback mechanisms for reliable indicator operation across market conditions
Null Value Handling ensuring continuous calculation through proper mathematical validation and edge case management
🔍 Advanced Analysis Applications
Momentum Acceleration Detection identifying periods of increasing or decreasing price acceleration through momentum-RSI oscillator behavior
Divergence Analysis Opportunities comparing price action with momentum-RSI for potential reversal signal identification
Overbought/Oversold Momentum detecting extreme momentum conditions using RSI methodology for enhanced timing precision
[b>Crossover Strategy Implementation utilizing dual-smoothing crossovers for momentum-based entry and exit signal generation
Market Phase Identification [/b> recognizing acceleration, deceleration, and consolidation phases through momentum-RSI analysis
Multi-Timeframe Coordination [/b> supporting different period configurations for various trading styles and market analysis approaches
✅ Key Takeaways
Innovative momentum-RSI implementation applying oscillator analysis to momentum values for enhanced market acceleration detection
Dual-display system enabling seamless switching between momentum visualization and smoothed RSI analysis for flexible market assessment
Advanced multi-method smoothing supporting nine different moving averages with VIDYA volatility adaptation for optimal signal quality
Conditional visualization framework with mode-specific reference lines and context-appropriate threshold displays for clean analysis
Mathematical precision implementation using proper momentum calculation and RSI formulation with comprehensive error handling
Dual-smoothing comparison system enabling crossover analysis between independently configured momentum-RSI lines for enhanced signal generation
Performance-optimized design with conditional computation and efficient algorithms for real-time momentum oscillator analysis without performance impact
BEC levels and external vol liteBEC Levels & External Vol Lite – Description
The lite version of the BEC VSA indicator is a streamlined variant designed for faster performance and simplicity. Several advanced features from the full version have been removed to focus on core functionality:
Purpose of Lite Version:
Faster execution with minimal inputs.
Focused on essential visual cues.
Reduced memory footprint and simplified logic for lightweight charts.
LQC GUIDED PATH - CONFIRMATION🎯 LQC GUIDED PATH - CONFIRMATION
Never Trade in the Wrong Direction Again!
🚦 REVOLUTIONARY PSYCHOLOGICAL COLOR SYSTEM:
✅ 🟢 GREEN PATH = GO LONG (Confirmed bullish bias)
✅ 🔵 BLUE PATH = GO SHORT (Confirmed bearish bias)
✅ 🟡 YELLOW PATH = WEAK SIGNAL (Wait for confirmation)
✅ ⚪ GRAY PATH = NEUTRAL (No clear direction)
✅ 🔴 RED BACKGROUND = DANGER ZONE (Near key levels - STOP!)
🛡️ MULTI-LAYER CONFIRMATION SYSTEM:
✅ Trend Confirmation - Dynamic EMA alignment
✅ Momentum Confirmation - RSI + MACD validation
✅ Volume Confirmation - Above-average volume surge
✅ Price Action Confirmation - Strong candle closes
✅ Key Level Protection - Daily/Premarket/Yesterday levels
⚠️ PEAK PROFIT PROTECTION:
✅ Tracks Maximum Profit Achieved
✅ Warns When Peak is Reached: “BEYOND THIS = YOUR RISK”
✅ Prevents Giving Back Gains
✅ One-Time Warning System
✅ Customizable Threshold Settings
🔑 KEY LEVELS INCLUDED:
✅ Daily High/Low - Orange dashed lines
✅ Premarket High/Low - Blue dotted lines
✅ Yesterday High/Low - Gray solid lines
✅ Overnight High/Low - Purple lines
✅ Automatic Danger Zone Detection
📊 CUSTOMIZABLE DASHBOARD:
✅ 6 Position Options (Top/Bottom/Middle Left/Right)
✅ 4 Size Options (Tiny/Small/Normal/Large)
✅ Complete ON/OFF Control
✅ Real-Time Status Updates
✅ Confirmation Counter (X/3 CONFIRMED)
🎛️ ADAPTIVE SENSITIVITY
さくらんぼーい//@version=6
indicator("さくらんぼーい", overlay=true, max_labels_count=500, max_lines_count=500)
//==================== Inputs ====================//
// ---- Anchor (shared) ----
grpA = "Anchor (shared)"
anchorMode = input.string("Time", "Anchor Mode", options= , group=grpA)
anchorTime = input.time(timestamp("2025-06-24T20:31:00"), "Anchor Time (exchange)", group=grpA)
anchorBarsAgo = input.int(100, "Anchor Bars Ago", minval=1, group=grpA)
anchorPriceMode = input.string("Close", "Anchor Price", options= , group=grpA)
anchorPriceManual = input.float(0.0, "Manual Anchor Price (0=auto)", step=0.0001, group=grpA)
// ---- Light-Cone ----
grpLC = "Light-Cone ATR"
atrLen = input.int(14, "ATR Length", minval=1, group=grpLC)
atrTF = input.timeframe("", "ATR Timeframe (blank=same)", group=grpLC)
projBars = input.int(60, "Projection Horizon (bars)", minval=1, group=grpLC)
coneMode = input.string("Diffusive √n", "Cone Growth Mode", options= , group=grpLC)
mult = input.float(1.0, "ATR Multiplier (σ-ish)", step=0.1, minval=0.0, group=grpLC)
wickMode = input.string("Close", "Height uses", options= , group=grpLC)
coneFillCol= input.color(color.new(color.teal, 90), "Cone Fill", group=grpLC)
coneLineCol= input.color(color.new(color.aqua, 40), "Cone Edge", group=grpLC)
// ---- Light-Cone guide lines ----
grpFan = "Light-Cone Guides (0.5c / 1.5c)"
showFan = input.bool(true, "Show 0.5c & 1.5c guide lines", group=grpFan)
fan05Color = input.color(color.new(color.aqua, 75), "0.5c line", group=grpFan)
fan15Color = input.color(color.new(color.aqua, 60), "1.5c line", group=grpFan)
fanWidth = input.int(1, "Guide line width", minval=1, maxval=3, group=grpFan)
// ---- √n Stripes ----
grpZ = "Convergence (√n stripes)"
stepBars = input.int(20, "Base Step (bars)", minval=1, group=grpZ)
maxOrderM = input.int(8, "Max Order M (m²)", minval=1, maxval=50, group=grpZ)
halfWindow = input.int(2, "Stripe Half-Width (bars)", minval=0, group=grpZ)
stripeColor = input.color(color.new(color.fuchsia, 86), "Stripe Color", group=grpZ)
showCenters = input.bool(false, "Draw Stripe Center Lines", group=grpZ)
// ---- Fractal ----
grpF = "Fractal (Pivot) Detector"
leftP = input.int(2, "Left bars (L)", minval=1, group=grpF)
rightP = input.int(2, "Right bars (R)", minval=1, group=grpF)
hitColHi = input.color(color.new(color.lime, 0), "Pivot High Mark", group=grpF)
hitColLo = input.color(color.new(color.red, 0), "Pivot Low Mark", group=grpF)
// ---- Display / Limits ----
grpO = "Display / Limits"
showHitTable = input.bool(true, "Show m² Hit Table", group=grpO)
limitScreen = input.bool(true, "Reduce drawing near screen", group=grpO)
screenPastBars = input.int(5000, "Screen past window (bars)", minval=100, group=grpO)
futureLimitBars= input.int(500, "FUTURE draw limit (TV max 500)", minval=0, maxval=500, group=grpO)
// ---- Bias Panel ----
grpB = "Bias Panel"
showBiasPanel = input.bool(true, "Show Bias Panel", group=grpB)
biasTf = input.timeframe("15", "HTF timeframe", group=grpB)
emaFast = input.int(20, "HTF EMA fast", minval=1, group=grpB)
emaSlow = input.int(50, "HTF EMA slow", minval=2, group=grpB)
zThresh = input.float(0.30, "Z threshold (±)", step=0.05, group=grpB)
railLookback = input.int(20, "Rail lookback bars", minval=5, group=grpB)
railPct = input.float(0.40, "Rail touch ratio (0–1)", minval=0.1, maxval=0.9, step=0.05, group=grpB)
// ---- Positions (NEW) ----
panelCorner = input.string("Top-Right", "Bias Panel Position",
options= , group=grpB)
hitsCorner = input.string("Top-Left", "Hits Table Position",
options= , group=grpO)
// ---- Helpers: table positions ----
f_pos(s) =>
p = position.top_left
if s == "Top-Right"
p := position.top_right
else if s == "Bottom-Left"
p := position.bottom_left
else if s == "Bottom-Right"
p := position.bottom_right
p
//==================== Anchor Resolve ====================//
var int anchorBar = na
var float anchorPrice = na
var label anchorLbl = na
// 初バー保護付きタイム検索
f_find_anchor_bar_by_time(_t) =>
ta.valuewhen(nz(time , time ) < _t and time >= _t, bar_index, 0)
if anchorMode == "Time"
anchorBar := f_find_anchor_bar_by_time(anchorTime)
else
// バッファ下限保護
anchorBar := math.max(0, bar_index - anchorBarsAgo)
// アンカー価格(安全取得)
f_price_at_anchor(_bar) =>
float _v = na
if anchorPriceMode == "Close"
_v := ta.valuewhen(bar_index == _bar, close, 0)
else if anchorPriceMode == "High"
_v := ta.valuewhen(bar_index == _bar, high, 0)
else if anchorPriceMode == "Low"
_v := ta.valuewhen(bar_index == _bar, low, 0)
else if anchorPriceMode == "Open"
_v := ta.valuewhen(bar_index == _bar, open, 0)
_v
float autoPrice = na
if not na(anchorBar) and anchorBar <= bar_index
autoPrice := f_price_at_anchor(anchorBar)
anchorPrice := (anchorPriceMode == "Manual" and anchorPriceManual != 0.0) ? anchorPriceManual : autoPrice
bool anchorOK = not na(anchorBar) and anchorBar >= 0 and anchorBar <= bar_index + futureLimitBars and not na(anchorPrice)
// ラベル
if anchorOK
if na(anchorLbl)
anchorLbl := label.new(anchorBar, anchorPrice, "Anchor", xloc=xloc.bar_index, yloc=yloc.price, style=label.style_label_down, textcolor=color.black, color=color.yellow, size=size.tiny)
else
label.set_x(anchorLbl, anchorBar), label.set_y(anchorLbl, anchorPrice)
//==================== Light-Cone (ATR-based) ====================//
float atrSame = ta.atr(atrLen)
float atrOther = request.security(syminfo.tickerid, atrTF, ta.atr(atrLen), gaps=barmerge.gaps_off, lookahead=barmerge.lookahead_off)
float baseATR = (na(atrTF) or atrTF == "") ? atrSame : atrOther
float c_main = mult * baseATR
int horizon = math.min(projBars, futureLimitBars)
var line upL = na
var line dnL = na
var line up05 = na
var line dn05 = na
var line up15 = na
var line dn15 = na
var linefill coneFill = na
f_growth(_n) =>
coneMode == "Linear n" ? _n : math.sqrt(_n)
if anchorOK
if not na(coneFill)
linefill.delete(coneFill)
if not na(upL)
line.delete(upL)
if not na(dnL)
line.delete(dnL)
if not na(up05)
line.delete(up05)
if not na(dn05)
line.delete(dn05)
if not na(up15)
line.delete(up15)
if not na(dn15)
line.delete(dn15)
int x1 = anchorBar + horizon
float dyPer= (wickMode == "Wick (High/Low)") ? c_main * 0.5 : c_main
float grow = f_growth(horizon)
float upY = anchorPrice + dyPer * grow
float dnY = anchorPrice - dyPer * grow
float upY05 = anchorPrice + (dyPer * 0.5) * grow
float dnY05 = anchorPrice - (dyPer * 0.5) * grow
float upY15 = anchorPrice + (dyPer * 1.5) * grow
float dnY15 = anchorPrice - (dyPer * 1.5) * grow
upL := line.new(anchorBar, anchorPrice, x1, upY, xloc=xloc.bar_index, extend=extend.none, color=coneLineCol, width=2)
dnL := line.new(anchorBar, anchorPrice, x1, dnY, xloc=xloc.bar_index, extend=extend.none, color=coneLineCol, width=2)
coneFill := linefill.new(upL, dnL, color=coneFillCol)
if showFan
up05 := line.new(anchorBar, anchorPrice, x1, upY05, xloc=xloc.bar_index, extend=extend.none, color=fan05Color, width=fanWidth)
dn05 := line.new(anchorBar, anchorPrice, x1, dnY05, xloc=xloc.bar_index, extend=extend.none, color=fan05Color, width=fanWidth)
up15 := line.new(anchorBar, anchorPrice, x1, upY15, xloc=xloc.bar_index, extend=extend.none, color=fan15Color, width=fanWidth)
dn15 := line.new(anchorBar, anchorPrice, x1, dnY15, xloc=xloc.bar_index, extend=extend.none, color=fan15Color, width=fanWidth)
//==================== √n Stripes ====================//
var array centers = array.new_int()
array.clear(centers)
if not na(anchorBar)
for m = 1 to maxOrderM
array.push(centers, anchorBar + stepBars * m * m)
f_in_any_stripe(_bi) =>
sz = array.size(centers)
if sz == 0
false
else
bool hit = false
for i = 0 to sz - 1
int c0 = array.get(centers, i)
if _bi >= c0 - halfWindow and _bi <= c0 + halfWindow
hit := true
hit
// どの m² ストライプか(なければ na)
f_stripe_index(_bi) =>
int mFound = na
if array.size(centers) > 0
for m = 1 to maxOrderM
int cCenter = array.get(centers, m - 1)
if _bi >= cCenter - halfWindow and _bi <= cCenter + halfWindow
mFound := m
mFound
bgcolor(f_in_any_stripe(bar_index) ? stripeColor : na)
if showCenters and array.size(centers) > 0
for i = 0 to array.size(centers) - 1
int c0 = array.get(centers, i)
bool withinFutureLimit = c0 <= bar_index + futureLimitBars
bool nearScreen = not limitScreen or (c0 >= bar_index - screenPastBars and c0 <= bar_index + futureLimitBars)
if withinFutureLimit and nearScreen
line.new(c0, high, c0, low, xloc=xloc.bar_index, extend=extend.both, color=color.new(color.white, 70), width=1)
//==================== Fractal Detection ====================//
isPH = not na(ta.pivothigh(high, leftP, rightP))
isPL = not na(ta.pivotlow (low , leftP, rightP))
int pivotCenter = bar_index - rightP
hitPH = isPH and f_in_any_stripe(pivotCenter)
hitPL = isPL and f_in_any_stripe(pivotCenter)
//==================== m² Hit Table (robust) ====================//
var table tbHits = na
var hitsHi = array.new_int()
var hitsLo = array.new_int()
f_sync_len_int(_arr, _n, _fill) =>
while array.size(_arr) < _n
array.push(_arr, _fill)
while array.size(_arr) > _n
array.pop(_arr)
_arr
f_safe_get_int(_arr, _idx) =>
(_idx >= 0 and _idx < array.size(_arr)) ? array.get(_arr, _idx) : 0
// 毎バー長さ同期
f_sync_len_int(hitsHi, maxOrderM, 0)
f_sync_len_int(hitsLo, maxOrderM, 0)
// 集計
if (hitPH or hitPL) and array.size(centers) > 0
int nC = array.size(centers)
int nM = math.min(maxOrderM, nC)
for m = 1 to nM
int c0 = array.get(centers, m - 1)
if pivotCenter >= c0 - halfWindow and pivotCenter <= c0 + halfWindow
if hitPH
array.set(hitsHi, m - 1, f_safe_get_int(hitsHi, m - 1) + 1)
if hitPL
array.set(hitsLo, m - 1, f_safe_get_int(hitsLo, m - 1) + 1)
// 表示
if showHitTable and barstate.islast
if na(tbHits)
tbHits := table.new(f_pos(hitsCorner), 3, maxOrderM + 1, border_width=1)
table.cell(tbHits, 0, 0, "m²", bgcolor=color.new(color.blue, 20), text_color=color.white)
table.cell(tbHits, 1, 0, "PH▲", bgcolor=color.new(color.green,10), text_color=color.white)
table.cell(tbHits, 2, 0, "PL▼", bgcolor=color.new(color.red, 10), text_color=color.white)
int rows = array.size(hitsHi)
int nRow = math.min(maxOrderM, rows)
for m = 1 to nRow
table.cell(tbHits, 0, m, str.tostring(m) + "²")
table.cell(tbHits, 1, m, str.tostring(f_safe_get_int(hitsHi, m - 1)))
table.cell(tbHits, 2, m, str.tostring(f_safe_get_int(hitsLo, m - 1)))
//==================== Bias Components ====================//
// 1) HTF trend
bool htfBull = request.security(syminfo.tickerid, biasTf, ta.ema(close, emaFast) > ta.ema(close, emaSlow), gaps=barmerge.gaps_off)
bool htfBear = request.security(syminfo.tickerid, biasTf, ta.ema(close, emaFast) < ta.ema(close, emaSlow), gaps=barmerge.gaps_off)
int scHTF = htfBull ? 1 : (htfBear ? -1 : 0)
string stHTF = htfBull ? "Bull" : (htfBear ? "Bear" : "—")
// 2) Cone Z
float z = 0.0
if anchorOK
int barsFromAnchor = math.max(1, bar_index - anchorBar)
float dyPerNow = (wickMode == "Wick (High/Low)") ? (mult * baseATR * 0.5) : (mult * baseATR)
float growNow = f_growth(math.min(barsFromAnchor, horizon))
float denom = dyPerNow * growNow
z := denom != 0 ? (close - anchorPrice) / denom : 0.0
int scZ = z > zThresh ? 1 : (z < -zThresh ? -1 : 0)
string stZ = anchorOK ? ("z=" + str.tostring(z, "#.00")) : "no anchor"
// 3) Rail-hug(0.5c〜1.0c帯を High/Low の“タッチ”で判定)
// ← 初期バー安全:参照本数を bar_index にクリップ
int effLookback = math.min(railLookback, bar_index) // bar_index 本目までは 0..bar_index しか参照不可
int upTouch = 0, dnTouch = 0
if anchorOK and effLookback > 0
for i = 0 to effLookback - 1
int barsFA = math.max(1, (bar_index - i) - anchorBar)
float growI = f_growth(math.min(barsFA, horizon))
float dyPerI = (wickMode == "Wick (High/Low)") ? (mult * baseATR * 0.5) : (mult * baseATR)
float up05I = anchorPrice + dyPerI * 0.5 * growI
float up10I = anchorPrice + dyPerI * 1.0 * growI
float dn05I = anchorPrice - dyPerI * 0.5 * growI
float dn10I = anchorPrice - dyPerI * 1.0 * growI
upTouch += (high >= up05I and low <= up10I) ? 1 : 0
dnTouch += (low <= dn05I and high >= dn10I) ? 1 : 0
float upRatio = effLookback > 0 ? (upTouch * 1.0) / effLookback : 0.0
float dnRatio = effLookback > 0 ? (dnTouch * 1.0) / effLookback : 0.0
bool railUp = upRatio > railPct
bool railDn = dnRatio > railPct
int scRail = railUp ? 1 : (railDn ? -1 : 0)
string stRail = anchorOK ? (railUp ? ("Up " + str.tostring(upRatio*100, "#") + "%") : (railDn ? ("Dn " + str.tostring(dnRatio*100, "#") + "%") : "—")) : "no anchor"
// 4) Stripe entry → 最初のフラクタル(帯を出た後確定も拾う)
var bool stripeIn = false
var int stripeIdxActive = na
var int stripeEnterBar = na
var int stripeLastStart = na
var int stripeLastEnd = na
var int stripeLastIdx = na
var string firstFrac = "" // "PL" or "PH" or ""
int nowIdx = f_stripe_index(bar_index)
bool nowInStripe = not na(nowIdx)
if nowInStripe and not stripeIn
stripeIn := true
stripeIdxActive := nowIdx
stripeEnterBar := bar_index
firstFrac := ""
else if not nowInStripe and stripeIn
stripeIn := false
stripeLastStart := stripeEnterBar
stripeLastEnd := bar_index - 1
stripeLastIdx := stripeIdxActive
if (isPH or isPL)
int pc = pivotCenter
int pcIdx = f_stripe_index(pc)
bool inActive = stripeIn and not na(stripeIdxActive) and pcIdx == stripeIdxActive and pc >= nz(stripeEnterBar, pc)
bool inClosed = (not stripeIn) and not na(stripeLastIdx) and pcIdx == stripeLastIdx and pc >= nz(stripeLastStart, pc) and pc <= nz(stripeLastEnd, pc)
if firstFrac == "" and (inActive or inClosed)
firstFrac := isPL ? "PL" : (isPH ? "PH" : "")
int scFrac = firstFrac == "PL" ? 1 : (firstFrac == "PH" ? -1 : 0)
string stFrac = firstFrac == "" ? "—" : ("1st " + firstFrac + (not stripeIn and not na(stripeLastIdx) ? " @m=" + str.tostring(stripeLastIdx) : (not na(stripeIdxActive) ? " @m=" + str.tostring(stripeIdxActive) : "")))
// 5) Structure break(簡易)
var float lastPH = na
var float lastPL = na
float ph = ta.pivothigh(high, 2, 2)
float pl = ta.pivotlow (low , 2, 2)
if not na(ph)
lastPH := ph
if not na(pl)
lastPL := pl
bool bullBreak = not na(lastPH) and close > lastPH
bool bearBreak = not na(lastPL) and close < lastPL
int scStruct = bullBreak ? 1 : (bearBreak ? -1 : 0)
string stStruct = bullBreak ? "Break ↑" : (bearBreak ? "Break ↓" : "—")
// ---- Total ----
int biasScore = scHTF + scZ + scRail + scFrac + scStruct
string biasDir = biasScore >= 3 ? "UP" : (biasScore <= -3 ? "DOWN" : "NEUTRAL")
//==================== Bias Panel (table, corner selectable) ====================//
var table tbBias = na
color colG = color.new(color.green, 10)
color colR = color.new(color.red, 10)
color colN = color.new(color.gray, 70)
f_col(v) =>
v > 0 ? colG : (v < 0 ? colR : colN)
if showBiasPanel and barstate.islast
if na(tbBias)
tbBias := table.new(f_pos(panelCorner), 3, 8, border_width=1)
table.cell(tbBias, 0, 0, "Bias Panel", text_color=color.white, bgcolor=color.new(color.blue, 20), text_halign=text.align_center)
table.merge_cells(tbBias, 0, 0, 2, 0)
table.cell(tbBias, 0, 1, "Card", text_halign=text.align_center)
table.cell(tbBias, 1, 1, "State", text_halign=text.align_center)
table.cell(tbBias, 2, 1, "±1", text_halign=text.align_center)
// rows
table.cell(tbBias, 0, 2, "HTF ("+biasTf+")")
table.cell(tbBias, 1, 2, stHTF)
table.cell(tbBias, 2, 2, str.tostring(scHTF), bgcolor=f_col(scHTF), text_halign=text.align_center)
table.cell(tbBias, 0, 3, "Cone z")
table.cell(tbBias, 1, 3, stZ)
table.cell(tbBias, 2, 3, str.tostring(scZ), bgcolor=f_col(scZ), text_halign=text.align_center)
table.cell(tbBias, 0, 4, "Rail 0.5c")
table.cell(tbBias, 1, 4, stRail)
table.cell(tbBias, 2, 4, str.tostring(scRail), bgcolor=f_col(scRail), text_halign=text.align_center)
table.cell(tbBias, 0, 5, "Fractal")
table.cell(tbBias, 1, 5, stFrac)
table.cell(tbBias, 2, 5, str.tostring(scFrac), bgcolor=f_col(scFrac), text_halign=text.align_center)
table.cell(tbBias, 0, 6, "Structure")
table.cell(tbBias, 1, 6, stStruct)
table.cell(tbBias, 2, 6, str.tostring(scStruct), bgcolor=f_col(scStruct), text_halign=text.align_center)
color totCol = biasScore>=3?colG:(biasScore<=-3?colR:colN)
table.cell(tbBias, 0, 7, "TOTAL", bgcolor=color.new(color.black, 0), text_color=color.white, text_halign=text.align_center)
table.cell(tbBias, 1, 7, biasDir, bgcolor=totCol, text_color=color.white, text_halign=text.align_center)
table.cell(tbBias, 2, 7, str.tostring(biasScore), bgcolor=totCol, text_color=color.white, text_halign=text.align_center)
//==================== Alerts ====================//
alertcondition(biasScore >= 3, "Bias UP", "Bias score >= +3")
alertcondition(biasScore <= -3, "Bias DOWN", "Bias score <= -3")
alertcondition(hitPH, "Fractal High in Convergence", "Pivot High detected inside √n convergence stripe.")
alertcondition(hitPL, "Fractal Low in Convergence", "Pivot Low detected inside √n convergence stripe.")
دستیار ترید (By Vahid.Jafarzadeh) 🇮🇷🎉 The first Persian indicator on TradingView, released for free to celebrate my daughter's birthday. 🎉
Trading Assistant (By Vahid.Jz) is an all-in-one tool designed to simplify analysis and improve accuracy. It acts as an intelligent trading partner.
Features:
- Market Structure detection
- Multi-Timeframe "Third Eye" analysis
- Professional Order Blocks recognition
- Fair Value Gaps (FVGs) detection
- Customizable alerts
- Fully Persian interface
Free to use. Contact on Telegram: @vahidjz
“Trading is not a destination; it’s the journey — a path of learning, growth, and experience.”
[DEM] Relative Strength Signal (With Backtesting) Relative Strength Signal (With Backtesting) is a momentum indicator that generates trading signals based on when an asset reaches its highest or lowest relative strength compared to the SPY benchmark over a 20-period lookback window. The indicator calculates relative strength by dividing the current asset's price by SPY's price, then triggers buy signals when this ratio hits a 20-period high (indicating maximum outperformance) and sell signals when it reaches a 20-period low (indicating maximum underperformance). To prevent signal clustering and improve practical utility, the indicator includes a built-in filter that requires a minimum number of bars (default 20) to pass between signals of the same type, ensuring adequate spacing for meaningful trade opportunities. The system includes comprehensive backtesting functionality that tracks signal accuracy, average returns, and signal frequency over time, displaying these performance metrics in a detailed statistics table to help traders evaluate the effectiveness of trading on relative strength extremes versus the broader market.
[DEM] Parabolic SAR Bars (PSAR Bars) Parabolic SAR Bars is a visual enhancement of the traditional Parabolic SAR indicator that uses dynamic color coding to represent the relative position and momentum of price versus the SAR levels. The indicator calculates the percentage difference between the closing price and the Parabolic SAR value, then applies either a gradient color scheme that transitions from red to blue based on the relative strength within a 20-period range, or a momentum-based coloring system using purple, blue, and red to indicate directional changes. Both the SAR plot points and the price bars themselves are colored according to this system, creating an intuitive visual representation where traders can quickly assess not just whether price is above or below the SAR, but also the strength and momentum of that relationship. This approach transforms the binary nature of traditional Parabolic SAR signals into a more nuanced visual tool that helps identify the intensity of trending conditions and potential momentum shifts before actual SAR reversals occur.
[DEM] Multi-RSI Signal (With Backtesting) Multi-RSI Signal (With Backtesting) is a technical indicator that generates buy signals based on multiple RSI (Relative Strength Index) timeframes simultaneously reaching oversold conditions. The indicator monitors RSI values across seven different periods (2, 3, 4, 5, 6, 8, 25, 50, and 100) and triggers a buy signal only when all shorter-term RSIs (2-8 periods) drop below specific thresholds (mostly below 10-20) while longer-term RSIs (25, 50, 100) remain within defined ranges, indicating a confluence of oversold conditions across multiple timeframes. The system includes comprehensive backtesting capabilities that track signal accuracy, average returns, and signal frequency over time, displaying these performance metrics in a real-time statistics table. Unlike typical single-RSI approaches, this multi-timeframe methodology aims to filter out false signals by requiring alignment across various RSI periods, though it currently only generates buy signals with no corresponding sell signal logic implemented.
[DEM] Moving Average Signal (With Backtesting) Moving Average Signal (With Backtesting) is designed to generate buy and sell signals using a highly configurable moving average system with over 20 different moving average types (including EMA, SMA, HMA, ALMA, McGinley, TRAMA, and others) combined with dynamic upper and lower bands based on standard deviation or ATR multipliers. It also includes a comprehensive backtesting framework to evaluate the historical performance of these signals. The indicator overlays directly on the price chart, plotting the moving average with upper and lower bands while coloring bars green when price is above the upper band, red when below the lower band, and purple when between the bands. The strategy generates buy signals when price crosses above the upper band after being below it for one bar but above it for the previous three bars (indicating a breakout after brief consolidation), and sell signals under opposite conditions with the lower band, creating a momentum-based system that filters for sustained moves beyond the moving average envelope while offering extensive customization options and integrated backtesting metrics.