Monthly Seasonality Trend [DunesIsland]The Monthly Seasonality Trend is a indicator designed to analyze and visualize historical monthly seasonality patterns in financial markets. By calculating the average monthly return over a user-configurable lookback period (1 to 10 years), this indicator provides traders and investors with a clear projection of potential price movements for the current month, enabling data-driven decision-making.
How It Works
The indicator operates by retrieving monthly open and close prices for the specified lookback period (up to 10 years) and computing the average percentage return for the current month based on historical data. Key functionalities include:
Dynamic Trend Line: On the first trading day of each month, the indicator plots a line projecting the expected price trajectory, starting from the current close price and extending to the estimated end-of-month price based on the average historical return. The line is colored green for anticipated price increases or red for expected declines, offering an intuitive visual cue.
Average Return Label: A label is displayed at the start of each month, detailing the calculated average historical return for that month, expressed as a percentage, to provide context for the projected trend.
First Trading Day Marker: A small circle is plotted below the bar on the first trading day of each month, clearly marking the start of the projection period.
Adaptive Bar Counting: The indicator dynamically adjusts the length of the trend line based on the actual number of trading days in the previous month, ensuring accurate projections.
How to Interpret
Bullish Projection (Green Line): Indicates that historical data suggests an average price increase for the current month, potentially signaling buying opportunities.
Bearish Projection (Red Line): Suggests an average price decline based on historical trends, which may prompt caution or short-selling strategies.
Historical Context: The average return label provides a quantitative measure of past performance, helping traders assess the reliability of the projected trend.
Penunjuk dan strategi
Turtle Trading System + ATR Trailing StopIndicator Description: Turtle ATR Trailing Stop
The **Turtle ATR Trailing Stop** is a technical indicator designed to enhance the classic Turtle Trading System by incorporating a dynamic trailing stop based on the Average True Range (ATR). This indicator is ideal for traders seeking to manage risk and lock in profits on both long and short positions in trending markets.
Key Features:
- Turtle Trading Levels: Calculates the 20-day highest high and lowest low to identify potential breakout points, a core principle of the Turtle Trading System.
- ATR-Based Trailing Stop: Utilizes a trailing stop that adjusts dynamically based on a multiple of the ATR (default multiplier: 2.0), providing a volatility-adjusted exit mechanism.
- Position Flexibility: Supports both long and short positions, with the trailing stop positioned below the highest price for long trades and above the lowest price for short trades.
- Smooth Updates: The trailing stop updates on each bar, ensuring a more responsive adjustment to price movements, rather than only on new highs or lows.
- Reset Mechanism: Automatically resets the trailing stop when the price deviates significantly (configurable threshold, default 0.1%), adapting to major trend reversals.
- Alerts: Includes customizable alerts that trigger when the price reaches the trailing stop level, notifying traders of potential exit points.
- Debugging Tools: Features an on-chart debug table displaying ATR, Close, Highest Price, Lowest Price, Potential Stop, and Trailing Stop values for real-time analysis.
How It Works:
- For **Long Positions**: The trailing stop starts below the initial close price (minus 2*ATR) and moves up as the highest price increases, locking in profits while trailing at a fixed ATR distance.
- For **Short Positions**: The trailing stop starts above the initial close price (plus 2*ATR) and moves down as the lowest price decreases, protecting against upward price movements.
- The stop resets if the price falls (for long) or rises (for short) beyond the set threshold, ensuring adaptability to new market conditions.
Customization:
- Period Settings: Adjust the length for highs/lows (default 20) and ATR period (default 14).
- ATR Multiplier: Modify the distance of the trailing stop (default 2.0).
- Reset Threshold: Fine-tune the percentage at which the stop resets (default 0.1%).
- Position Type: Switch between "Long" and "Short" modes via input settings.
Usage:
Apply this indicator to any chart in TradingView, set your preferred parameters, and monitor the trailing stop line (yellow) alongside the Turtle highs (red) and lows (blue). Use the debug table to validate calculations and set alerts to stay informed of stop triggers.
This indicator combines the trend-following strength of the Turtle System with a flexible, ATR-based stop-loss strategy, making it a powerful tool for both manual and automated trading strategies.
Up/Down Volume Delta %this script is based on FractalTrade_'s rendition of the up/down volume bars.
the shortcomings of that chart were that large volume bars caused the auto-scaling to shrink smaller volume bar displays to the point where much of the data was too small to see.
in this chart, the bars are displaying the percent delta out of the total bar volume. this way, large overall volume bars do not cause visual compression to everything else in the chart.
I've used color modulation to indicate relation to a relative volume point, so users can still tell when overall volume is large or small. when volume is under a moving average, the bars will display at a basis transparency. when the volume is over the average, the brightness will increase up to a specific ratio of volume defined by the user.
for example, if basis transparency is at 20, and the full opacity ratio is at 3, and the volume average is at 1M, a volume of 750k will display the delta bar at the basis transparency. a volume of 3M will achieve full brightness. a volume of 2M will display with moderate brightness (about 60%), but still stand out against other bars with basis transparency.
areas of the chart that are either increasing bar sizes or increasing in brightness can indicate directional force. when volume delta direction contradicts the candle direction, this can indicate support / resistance.
First 15 Min H/L Breakout Signal V3 - Session Aware (Adaptive)this script checks the breakout on 1min time frame as compared to previous breakouts happened on 15min and 5min.
Support and Resistance Levels with BreaksThis indicator identifies dynamic support and resistance levels using pivot point analysis and provides clear trading signals when these levels are broken with volume confirmation. Enhanced version with improved signal clarity for better trading decisions.
## 🔧 Key Features
### Support & Resistance Detection
- Automatically identifies key pivot high and low levels
- Draws clear visual lines (red for resistance, blue for support)
- Configurable sensitivity with left/right bar settings
### Enhanced Trading Signals
- **BUY** signals when resistance is broken with volume confirmation
- **SELL** signals when support is broken with volume confirmation
- **Bull Wick** alerts for potential reversals at resistance
- **Bear Wick** alerts for potential reversals at support
### Volume Confirmation
- Built-in volume oscillator using 5 and 10-period EMAs
- Filters out low-volume false breakouts
- Adjustable volume threshold (default: 20%)
### Complete Alert System
- Support Broken alerts
- Resistance Broken alerts
- Bull Wick reversal alerts
- Bear Wick reversal alerts
## ⚙️ Settings
- **Show Breaks**: Toggle signal display
- **Left Bars**: Pivot detection lookback (default: 15)
- **Right Bars**: Pivot detection lookforward (default: 15)
- **Volume Threshold**: Minimum volume increase for valid signals (default: 20%)
## 📈 Best For
- Swing trading strategies
- Breakout confirmation
- Support/resistance trading
- Volume-based entry signals
## 🔍 How It Works
1. Identifies pivot highs/lows using configurable periods
2. Calculates volume oscillator for confirmation
3. Generates BUY signals on resistance breaks with volume
4. Generates SELL signals on support breaks with volume
5. Detects wick patterns for potential reversals
## 📋 Updates in This Version
- Enhanced BUY/SELL signal clarity (replaced generic "B" labels)
- Added Bull Wick and Bear Wick alert conditions
- Updated to Pine Script v6 compatibility
- Improved signal filtering and accuracy
## ⚠️ Disclaimer
This indicator is for educational and informational purposes only. Always conduct your own analysis and risk management before making trading decisions. Past performance does not guarantee future results.
---
**Original Script**: "Support and Resistance Levels with Breaks" by LuxAlgo
**License**: CC BY-NC-SA 4.0
**Enhanced by**: profitgang
**Version**: Pine Script v6
Real 10Y Yield (DGS10 - T10YIE)The Real 10Y Yield (DGS10 – T10YIE) indicator computes the inflation-adjusted U.S. 10-year Treasury yield by subtracting the 10-year breakeven inflation rate (T10YIE) from the nominal 10-year Treasury yield (DGS10), both sourced directly from FRED. By filtering out inflation expectations, this script reveals the true, real borrowing cost over a 10-year horizon—one of the most reliable gauges of overall risk sentiment and capital–market health.
How It Works
Data Inputs
• DGS10 (Nominal 10-Year Treasury Yield)
• T10YIE (10-Year Breakeven Inflation Rate)
Both series are fetched on a daily timeframe via request.security from FRED.
Real Yield Calculation
pine
Copy
Edit
real10y = DGS10 – T10YIE
A positive value indicates that nominal yields exceed inflation expectations (real yields are positive), while a negative value signals deep-negative real rates.
Thresholds & Coloring
• Bullish Zone: Real yield < –0.1 %
• Bearish Zone: Real yield > +0.1 %
The background turns green when real yields drop below –0.1 %, reflecting an ultra-accommodative environment that historically aligns with risk-on rallies. It turns red when real yields exceed +0.1 %, indicating expensive real borrowing costs and a potential shift toward risk-off.
Alerts
• Deep-Negative Real Yields (Bullish): Triggers when real yield < –0.1 %
• High Real Yields (Bearish): Triggers when real yield > +0.1 %
Why It’s Powerful
Forward-Looking Sentiment Gauge
Real yields incorporate both market-implied inflation and nominal rates, making them a leading indicator for risk appetite, equity flows, and crypto demand.
Clear, Actionable Zones
The –0.1 % / +0.1 % thresholds cleanly delineate structurally bullish vs. bearish regimes, removing noise and false signals common in nominal-only yield studies.
Macro & Cross-Asset Confluence
Combine with equity indices, dollar strength (DXY), or credit spreads for a fully contextual macro view. When real yields break deeper negative alongside weakening dollar, it often precedes stretch in risk assets.
Automatic Alerts
Never miss regime shifts—alerts notify you the moment real yields breach key zones, so you can align your strategy with prevailing macro momentum.
How to Use
Add to a separate pane for unobstructed visibility.
Monitor breaks beneath –0.1 % for early “risk-on” signals in stocks, commodities, and crypto.
Watch for climbs above +0.1 % to hedge or rotate into defensive assets.
Combine with your existing trend-following or mean-reversion strategies to improve timing around major market turning points.
–––
Feel free to adjust the threshold lines to your preferred sensitivity (e.g., tighten to ±0.05 %), or overlay with moving averages to smooth out whipsaws. This script is ideal for macro traders, portfolio managers, and quantitative quants who demand a distilled, inflation-adjusted view of real rates.
MACD EMA + Time FilterStrategy Description: MACD EMA + Time Filter
This strategy combines MACD momentum, EMA trend filtering, and an optional time-based session filter (GMT+7) to generate high-probability trading signals. It is designed for intraday or short-term trading on small timeframes, and allows both Buy and Sell setups with fixed Risk-Reward (RR) control.
✅ Key Components:
EMA Filter: Uses a 21-period Exponential Moving Average (EMA) to determine the trend direction.
MACD Confirmation: Entries are confirmed using MACD crossover signals with customizable fast, slow, and signal periods.
Time Filter: Trades are only taken during a defined session (e.g., 19:00–22:00 GMT+7), ideal for high-liquidity trading hours.
RR Management: Entry signals include automatic Stop Loss (SL) and Take Profit (TP) levels, based on a pip buffer and RR multiplier.
Custom Options:
Enable/disable Buy or Sell signals
Show/hide SL/TP labels
Optionally display EMA on chart
Daily Price Change (%)Description:
This script displays the percentage change of the last N candles either above each bar or along a shared horizontal line.
You can choose between two calculation methods:
Close vs Previous Close
Open vs Close
Labels are fully customizable:
Adjustable text size
Custom background color
Number of candles to display
Fixed 10% spacing above candles (prevents overlap)
Ideal for visualizing short-term momentum and price action in a clean, non-intrusive format.
Examples:
Disclaimer:
This script is provided for informational and educational purposes only.
The author assumes no liability for any financial losses, software errors, or misinterpretations.
Always do your own research and use trading tools at your own risk.
Essa - Market Structure DetectorA comprehensive tool for identifying real-time market structure patterns using pivot analysis, adaptive volatility filtering, and multi-timeframe confluence. This script highlights higher highs (HH), higher lows (HL), lower highs (LH), and lower lows (LL), while offering intelligent confirmations and optional visual aids.
Key Features:
Dynamic detection of HH, HL, LH, LL based on pivot structures
Adaptive sensitivity using ATR-based volatility filters
Confirmation logic based on breakout alignment
Optional ZigZag line rendering between key pivots
Customisable labels with confluence indicators
Multi-timeframe pattern scanning with auto-scaling timeframes
Info panel showing current pattern, trend bias, mode, and structure across 5 higher timeframes
Built-in alerts for structure shifts and high-confluence setups
This tool is ideal for traders who rely on structure-based entries, multi-timeframe confluence, and precision pattern recognition to anticipate trend reversals or continuations with high confidence.
Essa - Enhanced Fibonacci Confluence ToolkitA precision-engineered trading tool designed to identify high-probability reversal zones using price action alone. This version expands on traditional Fibonacci confluence techniques by integrating a multi-tiered market structure framework and advanced state management.
Key Features:
Fully automated CHoCH (Change of Character) detection
Tiered market structure logic (Short, Intermediate, Long-Term)
Dynamic Area of Interest (AOI) zone rendering
Automatic Fibonacci retracement plotting from swing highs/lows
Customisable Fibonacci levels (0% to 100%, including 23.6%, 61.8%, 65%, 78.6%)
Real-time Fibonacci invalidation logic with on-chart alerts
Bullish and bearish engulfing candle detection with structure-based filtering
Configurable swing labels (◉, △▽, H/L) with size control
Adjustable CHoCH line styles and widths
Optional display of Fibonacci level labels
Modular and efficient codebase with object-oriented architecture
Originally inspired by the LuxAlgo Fibonacci Confluence Toolkit (v5). Credit to LuxAlgo for the foundational concept.
Previous Day OHLC# Previous Day OHLC Levels Indicator
## Overview
The Previous Day OHLC indicator is a simple yet powerful tool that plots the Open, High, Low, and Close levels from previous trading sessions. This indicator helps traders identify key support and resistance levels based on historical price action, making it easier to spot potential reversal zones and breakout levels.
## Key Features
### 📊 **Previous Day OHLC Levels**
- Displays the Open, High, Low, and Close prices from 1-5 days ago
- Lines automatically extend to the right for easy visualization
- Updates daily to show the most relevant levels
### 🎨 **Fully Customizable Styling**
- **Individual Line Colors**: Choose unique colors for each OHLC level
- **Line Styles**: Select from Solid, Dashed, or Dotted lines for each level
- **Line Width**: Adjust thickness from 1-4 pixels for better visibility
- **Price Labels**: Display actual price values on each line with customizable sizing
### ⚙️ **Flexible Settings**
- **Lookback Period**: Choose to display levels from 1-5 days ago (maximum safety limit)
- **Label Control**: Toggle price labels on/off and adjust their size
- **Performance Optimized**: Clean code that won't slow down your charts
## How to Use
1. **Add to Chart**: Apply the indicator to any timeframe chart
2. **Customize Settings**: Adjust colors, styles, and lookback period to your preference
3. **Identify Levels**: Use the plotted lines as potential support/resistance zones
4. **Trade Setup**: Look for price reactions at these key levels for entry/exit signals
## Best Practices
- **Day Trading**: Use 1-day lookback for intraday support/resistance
- **Swing Trading**: Extend lookback to 2-5 days for broader context
- **Multi-Timeframe**: Combine with other timeframe analysis for confirmation
- **Risk Management**: Use these levels for stop-loss and take-profit placement
## Color Coding (Default)
- **Open**: Blue - Starting price of the previous session
- **High**: Green - Highest price reached
- **Low**: Red - Lowest price reached
- **Close**: Orange - Final price of the session
## Why This Indicator Works
Previous day OHLC levels are among the most watched price points by professional traders. These levels often act as:
- **Support/Resistance**: Price tends to react at these historical levels
- **Breakout Confirmation**: Strong moves beyond these levels can signal trend continuation
- **Reversal Zones**: Price often bounces from these key levels
- **Psychological Levels**: Market participants remember these important price points
## Technical Specifications
- **Pine Script Version**: v6
- **Overlay**: Yes (plots directly on price chart)
- **Performance**: Optimized for smooth chart operation
- **Compatibility**: Works on all timeframes and instruments
Perfect for traders of all experience levels who want to incorporate previous day levels into their technical analysis toolkit!
Essa's Sessions IndicatorOverview
This powerful tool is designed to visually map out the key trading sessions: Asia, London, and New York directly on your chart. By highlighting these periods and plotting their respective highs and lows, it helps you identify critical price levels, gauge market sentiment, and pinpoint potential breakout opportunities with ease.
What It Does
Visualizes Key Trading Sessions: Automatically draws colored backgrounds for the Asia, London, and New York sessions to show you exactly when the most important market activity is happening.
Plots Session Highs & Lows: Displays precise horizontal lines for the highest and lowest prices reached during each session, acting as key support and resistance levels.
Dual Timezone Mode: Easily switch between London (GMT/BST) and New York (EST/EDT) timezones with a single click. The indicator automatically adjusts all session times for you, ensuring accuracy no matter where you are.
Interactive & Informative Labels: Hover over any session high or low label to see a detailed tooltip containing:
The exact price level.
The session's price range (calculated in pips or points).
The total daily price range for broader context.
A simple volatility gauge (from "Low Vol 😴" to "High Vol 🔥").
Customizable Alerts: Enable breakout alerts to receive instant notifications the moment the price closes above a session high or below a session low.
Simple, powerful, and highly informative, this indicator is an essential tool for traders looking to build strategies around session-based price action.
Session VWAPsThis indicator plots volume-weighted average price (VWAP) lines for three major trading sessions: Tokyo, London, and New York. Each VWAP resets at the start of its session and tracks the average price weighted by volume during that window. You can choose the exact session times, turn individual sessions on or off, and optionally extend each VWAP line until the end of the trading day.
It’s designed to give you a clear view of how price is behaving relative to session-specific value areas. This can help in identifying session overlaps, shifts in price control, or whether price is holding above or below a particular session’s average. The indicator supports futures-style day rollovers and works across markets.
National Financial Conditions Index (NFCI)This is one of the most important macro indicators in my trading arsenal due to its reliability across different market regimes. I'm excited to share this with the TradingView community because this Federal Reserve data is not only completely free but extraordinarily useful for portfolio management and risk assessment.
**Important Disclaimers**: Be aware that some NFCI components are updated only monthly but carry significant weighting in the composite index. Additionally, the Fed occasionally revises historical NFCI data, so historical backtests should be interpreted with some caution. Nevertheless, this remains a crucial leading indicator for financial stress conditions.
---
## What is the National Financial Conditions Index?
The National Financial Conditions Index (NFCI) is a comprehensive measure of financial stress and liquidity conditions developed by the Federal Reserve Bank of Chicago. This indicator synthesizes over 100 financial market variables into a single, interpretable metric that captures the overall state of financial conditions in the United States (Brave & Butters, 2011).
**Key Principle**: When the NFCI is positive, financial conditions are tighter than average; when negative, conditions are looser than average. Values above +1.0 historically coincide with financial crises, while values below -1.0 often signal bubble-like conditions.
## Scientific Foundation & Research
The NFCI methodology is grounded in extensive academic research:
### Core Research Foundation
- **Brave, S., & Butters, R. A. (2011)**. "Monitoring financial stability: A financial conditions index approach." *Economic Perspectives*, 35(1), 22-43.
- **Hatzius, J., Hooper, P., Mishkin, F. S., Schoenholtz, K. L., & Watson, M. W. (2010)**. "Financial conditions indexes: A fresh look after the financial crisis." *US Monetary Policy Forum Report*, No. 23.
- **Kliesen, K. L., Owyang, M. T., & Vermann, E. K. (2012)**. "Disentangling diverse measures: A survey of financial stress indexes." *Federal Reserve Bank of St. Louis Review*, 94(5), 369-397.
### Methodological Validation
The NFCI employs Principal Component Analysis (PCA) to extract common factors from financial market data, following the methodology established by **English, W. B., Tsatsaronis, K., & Zoli, E. (2005)** in "Assessing the predictive power of measures of financial conditions for macroeconomic variables." The index has been validated through extensive academic research (Koop & Korobilis, 2014).
## NFCI Components Explained
This indicator provides access to all five official NFCI variants:
### 1. **Main NFCI**
The primary composite index incorporating all financial market sectors. This serves as the main signal for portfolio allocation decisions.
### 2. **Adjusted NFCI (ANFCI)**
Removes the influence of credit market disruptions to focus on non-credit financial stress. Particularly useful during banking crises when credit markets may be impaired but other financial conditions remain stable.
### 3. **Credit Sub-Index**
Isolates credit market conditions including corporate bond spreads, commercial paper rates, and bank lending standards. Important for assessing corporate financing stress.
### 4. **Leverage Sub-Index**
Measures systemic leverage through margin requirements, dealer financing, and institutional leverage metrics. Useful for identifying leverage-driven market stress.
### 5. **Risk Sub-Index**
Captures market-based risk measures including volatility, correlation, and tail risk indicators. Provides indication of risk appetite shifts.
## Practical Trading Applications
### Portfolio Allocation Framework
Based on the academic research, the NFCI can be used for portfolio positioning:
**Risk-On Positioning (NFCI declining):**
- Consider increasing equity exposure
- Reduce defensive positions
- Evaluate growth-oriented sectors
**Risk-Off Positioning (NFCI rising):**
- Consider reducing equity exposure
- Increase defensive positioning
- Favor large-cap, dividend-paying stocks
### Academic Validation
According to **Oet, M. V., Eiben, R., Bianco, T., Gramlich, D., & Ong, S. J. (2011)** in "The financial stress index: Identification of systemic risk conditions," financial conditions indices like the NFCI provide early warning capabilities for systemic risk conditions.
**Illing, M., & Liu, Y. (2006)** demonstrated in "Measuring financial stress in a developed country: An application to Canada" that composite financial stress measures can be useful for predicting economic downturns.
## Advanced Features of This Implementation
### Dynamic Background Coloring
- **Green backgrounds**: Risk-On conditions - potentially favorable for equity investment
- **Red backgrounds**: Risk-Off conditions - time for defensive positioning
- **Intensity varies**: Based on deviation from trend for nuanced risk assessment
### Professional Dashboard
Real-time analytics table showing:
- Current NFCI level and interpretation (TIGHT/LOOSE/NEUTRAL)
- Individual sub-index readings
- Change analysis
- Portfolio guidance (Risk On/Risk Off)
### Alert System
Professional-grade alerts for:
- Risk regime changes
- Extreme stress conditions (NFCI > 1.0)
- Bubble risk warnings (NFCI < -1.0)
- Major trend reversals
## Optimal Usage Guidelines
### Best Timeframes
- **Daily charts**: Recommended for intermediate-term positioning
- **Weekly charts**: Suitable for longer-term portfolio allocation
- **Intraday**: Less effective due to weekly update frequency
### Complementary Indicators
For enhanced analysis, combine NFCI signals with:
- **VIX levels**: Confirm stress readings
- **Credit spreads**: Validate credit sub-index signals
- **Moving averages**: Determine overall market trend context
- **Economic surprise indices**: Gauge fundamental backdrop
### Position Sizing Considerations
- **Extreme readings** (|NFCI| > 1.0): Consider higher conviction positioning
- **Moderate readings** (|NFCI| 0.3-1.0): Standard position sizing
- **Neutral readings** (|NFCI| < 0.3): Consider reduced conviction
## Important Limitations & Considerations
### Data Frequency Issues
**Critical Warning**: While the main NFCI updates weekly (typically Wednesdays), some underlying components update monthly. Corporate bond indices and commercial paper rates, which carry significant weight, may cause delayed reactions to current market conditions.
**Component Update Schedule:**
- **Weekly Updates**: Main NFCI composite, most equity volatility measures
- **Monthly Updates**: Corporate bond spreads, commercial paper rates
- **Quarterly Updates**: Banking sector surveys
- **Impact**: Significant portion of index weight may lag current conditions
### Historical Revisions
The Federal Reserve occasionally revises NFCI historical data as new information becomes available or methodologies are refined. This means backtesting results should be interpreted cautiously, and the indicator works best for forward-looking analysis rather than precise historical replication.
### Market Regime Dependency
The NFCI effectiveness may vary across different market regimes. During extended sideways markets or regime transitions, signals may be less reliable. Consider combining with trend-following indicators for optimal results.
**Bottom Line**: Use NFCI for medium-term portfolio positioning guidance. Trust the directional signals while remaining aware of data revision risks and update frequency limitations. This indicator is particularly valuable during periods of financial stress when reliable guidance is most needed.
---
**Data Source**: Federal Reserve Bank of Chicago
**Update Frequency**: Weekly (typically Wednesdays)
**Historical Coverage**: 1973-present
**Cost**: Free (public Fed data)
*This indicator is for educational and analytical purposes. Always conduct your own research and risk assessment before making investment decisions.*
## References
Brave, S., & Butters, R. A. (2011). Monitoring financial stability: A financial conditions index approach. *Economic Perspectives*, 35(1), 22-43.
English, W. B., Tsatsaronis, K., & Zoli, E. (2005). Assessing the predictive power of measures of financial conditions for macroeconomic variables. *BIS Papers*, 22, 228-252.
Hatzius, J., Hooper, P., Mishkin, F. S., Schoenholtz, K. L., & Watson, M. W. (2010). Financial conditions indexes: A fresh look after the financial crisis. *US Monetary Policy Forum Report*, No. 23.
Illing, M., & Liu, Y. (2006). Measuring financial stress in a developed country: An application to Canada. *Bank of Canada Working Paper*, 2006-02.
Kliesen, K. L., Owyang, M. T., & Vermann, E. K. (2012). Disentangling diverse measures: A survey of financial stress indexes. *Federal Reserve Bank of St. Louis Review*, 94(5), 369-397.
Koop, G., & Korobilis, D. (2014). A new index of financial conditions. *European Economic Review*, 71, 101-116.
Oet, M. V., Eiben, R., Bianco, T., Gramlich, D., & Ong, S. J. (2011). The financial stress index: Identification of systemic risk conditions. *Federal Reserve Bank of Cleveland Working Paper*, 11-30.
Recent Pullback Percentage//@version=5
indicator("Recent Pullback Percentage", shorttitle="Pullback %", format=format.percent)
// 定義回顧期間
lookbackPeriod = input.int(60, title="Lookback Period")
// 找到近期最高價
highestHigh = ta.highest(high, lookbackPeriod)
// 計算回檔百分比
pullbackPercent = ((close - highestHigh) / highestHigh)
plot(pullbackPercent, title="Pullback Percentage")
Divergence Strategy [Trendoscope®]🎲 Overview
The Divergence Strategy is a sophisticated TradingView strategy that enhances the Divergence Screener by adding automated trade signal generation, risk management, and trade visualization. It leverages the screener’s robust divergence detection to identify bullish, bearish, regular, and hidden divergences, then executes trades with precise entry, stop-loss, and take-profit levels. Designed for traders seeking automated trading solutions, this strategy offers customizable trade parameters and visual feedback to optimize performance across various markets and timeframes.
For core divergence detection features, including oscillator options, trend detection methods, zigzag pivot analysis, and visualization, refer to the Divergence Screener documentation. This description focuses on the strategy-specific enhancements for automated trading and risk management.
🎲 Strategy Features
🎯Automated Trade Signal Generation
Trade Direction Control : Restrict trades to long-only or short-only to align with market bias or strategy goals, preventing conflicting orders.
Divergence Type Selection : Choose to trade regular divergences (bullish/bearish), hidden divergences, or both, targeting reversals or trend continuations.
Entry Type Options :
Cautious : Enters conservatively at pivot points and exits quickly to minimize risk exposure.
Confident : Enters aggressively at the latest price and holds longer to capture larger moves.
Mixed : Combines conservative entries with delayed exits for a balanced approach.
Market vs. Stop Orders: Opt for market orders for instant execution or stop orders for precise price entry.
🎯 Enhanced Risk Management
Risk/Reward Ratio : Define a risk-reward ratio (default: 2.0) to set profit targets relative to stop-loss levels, ensuring consistent trade sizing.
Bracket Orders : Trades include entry, stop-loss, and take-profit levels calculated from divergence pivot points, tailored to the entry type and risk-reward settings.
Stop-Loss Placement : Stops are strategically set (e.g., at recent pivot or last price point) based on entry type, balancing risk and trade validity.
Order Cancellation : Optionally cancel pending orders when a divergence is broken (e.g., price moves past the pivot in the wrong direction), reducing invalid trades. This feature is toggleable for flexibility.
🎯 Trade Visualization
Target and Stop Boxes : Displays take-profit (lime) and stop-loss (orange) levels as boxes on the price chart, extending 10 bars forward for clear visibility.
Dynamic Trade Updates : Trade visualizations are added, updated, or removed as trades are executed, canceled, or invalidated, ensuring accurate feedback.
Overlay Integration : Trade levels overlay the price chart, complementing the screener’s oscillator-based divergence lines and labels.
🎯 Strategy Default Configuration
Capital and Sizing : Set initial capital (default: $1,000,000) and position size (default: 20% of equity) for realistic backtesting.
Pyramiding : Allows up to 4 concurrent trades, enabling multiple divergence-based entries in trending markets.
Commission and Margin : Accounts for commission (default: 0.01%) and margin (100% for long/short) to reflect trading costs.
Performance Optimization : Processes up to 5,000 bars dynamically, balancing historical analysis and real-time execution.
🎲 Inputs and Configuration
🎯Trade Settings
Direction : Select Long or Short (default: Long).
Divergence : Trade Regular, Hidden, or Both divergence types (default: Both).
Entry/Exit Type : Choose Cautious, Confident, or Mixed (default: Cautious).
Risk/Reward : Set the risk-reward ratio for profit targets (default: 2.0).
Use Market Order : Enable market orders for immediate entry (default: false, uses limit orders).
Cancel On Break : Cancel pending orders when divergence is broken (default: true).
🎯Inherited Settings
The strategy inherits all inputs from the Divergence Screener, including:
Oscillator Settings : Oscillator type (e.g., RSI, CCI), length, and external oscillator option.
Trend Settings : Trend detection method (Zigzag, MA Difference, External), MA type, and length.
Zigzag Settings : Zigzag length (fixed repaint = true).
🎲 Entry/Exit Types for Divergence Scenarios
The Divergence Strategy offers three Entry/Exit Type options—Cautious, Confident, and Mixed—which determine how trades are entered and exited based on divergence pivot points. This section explains how these settings apply to different divergence scenarios, with placeholders for screenshots to illustrate each case.
The divergence pattern forms after 3 pivots. The stop and entry levels are formed on one of these levels based on Entry/Exit types.
🎯Bullish Divergence (Reversal)
A bullish divergence occurs when price forms a lower low, but the oscillator forms a higher low, signaling a potential upward reversal.
💎 Cautious:
Entry : At the pivot high point for a conservative entry.
Exit : Stop-loss at the last pivot point (previous low that is higher than the current pivot low); take-profit at risk-reward ratio. Canceled if price breaks below the pivot (if Cancel On Break is enabled).
Behavior : Enters after confirmation and exits quickly to limit downside risk.
💎Confident:
Entry : At the last pivot low, (previous low which is higher than the current pivot low) for an aggressive entry.
Exit : Stop-loss at recent pivot low, which is the lowest point; take-profit at risk-reward ratio. Canceled if price breaks below the pivot. (lazy exit)
Behavior : Enters early to capture trend continuation, holding longer for gains.
💎Mixed:
Entry : At the pivot high point (conservative).
Exit : Stop-loss at the recent pivot point that has resulted in lower low (lazy exit). Canceled if price breaks below the pivot.
Behavior : Balances entry caution with extended holding for trend continuation.
🎯Bearish Divergence (Reversal)
A bearish divergence occurs when price forms a higher high, but the oscillator forms a lower high, indicating a potential downward reversal.
💎Cautious:
Entry : At the pivot low point (lower high) for a conservative short entry.
Exit : Stop-loss at the previous pivot high point (previous high); take-profit at risk-reward ratio. Canceled if price breaks above the pivot (if Cancel On Break is enabled).
Behavior : Enters conservatively and exits quickly to minimize risk.
💎Confident:
Entry : At the last price point (previous high) for an aggressive short entry.
Exit : Stop-loss at the pivot point; take-profit at risk-reward ratio. Canceled if price breaks above the pivot.
Behavior : Enters early to maximize trend continuation, holding longer.
💎Mixed:
Entry : At the previous piot high point (conservative).
Exit : Stop-loss at the last price point (delayed exit). Canceled if price breaks above the pivot.
Behavior : Combines conservative entry with extended holding for downtrend gains.
🎯Bullish Hidden Divergence (Continuation)
A bullish hidden divergence occurs when price forms a higher low, but the oscillator forms a lower low, suggesting uptrend continuation. In case of Hidden bullish divergence, b]Entry is always on the previous pivot high (unless it is a market order)
💎Cautious:
Exit : Stop-loss at the recent pivot low point (higher than previous pivot low); take-profit at risk-reward ratio. Canceled if price breaks below the pivot (if Cancel On Break is enabled).
Behavior : Enters after confirmation and exits quickly to limit downside risk.
💎Confident:
Exit : Stop-loss at previous pivot low, which is the lowest point; take-profit at risk-reward ratio. Canceled if price breaks below the pivot. (lazy exit)
Behavior : Enters early to capture trend continuation, holding longer for gains.
🎯Bearish Hidden Divergence (Continuation)
A bearish hidden divergence occurs when price forms a lower high, but the oscillator forms a higher high, suggesting downtrend continuation. In case of Hidden Bearish divergence, b]Entry is always on the previous pivot low (unless it is a market order)
💎Cautious:
Exit : Stop-loss at the latest pivot high point (which is a lower high); take-profit at risk-reward ratio. Canceled if price breaks above the pivot (if Cancel On Break is enabled).
Behavior : Enters conservatively and exits quickly to minimize risk.
💎Confident/Mixed:
Exit : Stop-loss at the previous pivot high point; take-profit at risk-reward ratio. Canceled if price breaks above the pivot.
Behavior : Uses the late exit point to hold longer.
🎲 Usage Instructions
🎯Add to Chart:
Add the Divergence Strategy to your TradingView chart.
The oscillator and divergence signals appear in a separate pane, with trade levels (target/stop boxes) overlaid on the price chart.
🎯Configure Settings:
Adjust trade settings (direction, divergence type, entry type, risk-reward, market orders, cancel on break).
Modify inherited Divergence Screener settings (oscillator, trend method, zigzag length) as needed.
Enable/disable alerts for divergence notifications.
🎯Interpret Signals:
Long Trades: Triggered on bullish or bullish hidden divergences (if allowed), shown with green/lime lines and labels.
Short Trades: Triggered on bearish or bearish hidden divergences (if allowed), shown with red/orange lines and labels.
Monitor lime (target) and orange (stop) boxes for trade levels.
Review strategy performance metrics (e.g., profit/loss, win rate) in the strategy tester.
🎯Backtest and Optimize:
Use TradingView’s strategy tester to evaluate performance on historical data.
Fine-tune risk-reward, entry type, position sizing, and cancellation settings to suit your market and timeframe.
For questions, suggestions, or support, contact Trendoscope via TradingView or official support channels. Stay tuned for updates and enhancements to the Divergence Strategy!
Belev Echad IndicatorSmart Indicator showing SMA (20, 50, 100, 200), ATR, RSI values as well as the respected company's name as a watermark for educational purposes in Belev Echad.
CPR by myBiniyogThis is a clean, professional CPR (Central Pivot Range) + Pivot Points indicator built using Pine Script v6.
🔹 What it plots:
• Central Pivot Range (Pivot, TC, BC)
• Daily, Weekly, and Monthly pivot levels
• Classic Support (S1, S2, S3) and Resistance (R1, R2, R3)
🔹 Customization:
• Enable/disable CPR or pivot levels separately
• Toggle weekly and monthly pivot visibility
• Color-coded: Blue for CPR, Green for supports, Red for resistances
• Weekly levels are plotted as crosses, monthly as circles
🔹 Trading Ideas:
• Narrow CPR suggests breakout potential
• Price above CPR = bullish bias, below CPR = bearish
• Use pivot levels for intraday support/resistance reference
🎯 Ideal for intraday, swing, and positional traders looking to track dynamic support-resistance zones using CPR-based logic.
Built with ❤️ by **myBiniyog**
⚠️ For educational use only. This indicator does not provide buy/sell signals or investment advice.
MaayaBaseLibrary "MaayaBase"
TODO: add library description here
GetMaayaBaseValues(pivotTimeframe)
TODO: add function description here
Parameters:
pivotTimeframe (string)
Returns: TODO: add what function returns
BG 3:00 / 2:00 Candle High/Low LinesBG 3:00 Candle High/Low Lines
This indicator highlights the high and low of the 1-hour candle exactly at 3:00 AM Bulgarian local time (EET/EEST). Horizontal lines are drawn at these levels and extended 5 hours forward, providing clear visualization of key daily levels.
Key Features:
Automatically adjusts for Bulgarian local time, including daylight saving time changes.
Marks only the 3:00 AM candle on the 1-hour chart for a clean and focused view.
Allows customizable colors for the high and low lines separately.
Lines extend 5 hours ahead to aid in tracking important support and resistance levels.
Ideal for traders analyzing the Bulgarian market or anyone interested in monitoring the 3:00 AM Europe/Sofia time frame.
Use this tool to identify crucial price levels aligned with Bulgarian time and enhance your intraday trading strategy.
RSI + Fibonacci Bollinger BandsIn the current context of the cryptocurrency market, the search for effective trading strategies has become an imperative for investors. In this regard, developing completely new and innovative scripts in TradingView, with a high probability of profit, represents a stimulating challenge. The following is a proposed strategy that, while it may integrate existing elements of the TradingView ecosystem, establishes a distinctive and avant-garde approach to analyzing the price of Bitcoin against Tether (USDT).
The essence of this script lies in the combination of analytical tools that are not usually joined in common practice. One can start from traditional indicators, such as Bollinger Bands and the Relative Strength Index (RSI), but their implementation must be revisited to obtain an unprecedented result. Instead of using these indicators conventionally, it is suggested to create an adaptive divergence indicator that not only detects overbought or oversold conditions, but also adjusts its parameters based on the recent volatility of the market.
The proposal focuses on a system that uses a 50-period exponential moving average as a baseline, combined with Bollinger Bands to establish support and resistance levels. However, instead of simply observing the breaking of these bands, buy and sell signals would be implemented based on corroborations from the volatility-adjusted RSI. This approach would allow capturing trend changes more efficiently and with minimal delay in the execution of orders.
In addition, an alert system could be included that notifies the trader of divergences between the price and the RSI, which could increase the chances of anticipating crucial movements in the market. The implementation of this functionality would be carried out through the use of Pine Script version 6, which would guarantee optimized and modern code.
In conclusion, the creation of an innovative script for analyzing the price of Bitcoin against USDT in TradingView should focus on the development of synergistic strategies that transcend conventional methods. The combination of well-established indicators, adapted to the dynamic conditions of the market, can offer traders a valuable tool in their arsenal. Innovation, in this area, is essential to adapt to a constantly changing environment and maximize profit opportunities.
Weekend Trap
Weekend Trap Indicator
A comprehensive weekend range analysis tool designed to identify and track low-liquidity weekend price movements with advanced market maker detection.
What is the Weekend Trap?
The Weekend Trap refers to price ranges established during low-liquidity weekend periods (Saturday 5:00 AM to Monday 5:00 AM Perth time) when institutional trading is minimal.
Key Features
📊 Weekend Range Detection
Automatically identifies weekend periods based on Perth timezone
Creates visual rectangles showing weekend high/low ranges
Displays 50% midline for key pivot levels
Configurable range cutoff (default: Sunday 3:00 PM)
🎯 Advanced Market Maker Detection
PVSRA-style volume analysis for institutional activity identification
4-color coding system:
🟢 Lime: 200% Bull volume (Peak volume + bullish candle)
🔴 Red: 200% Bear volume (Peak volume + bearish candle)
🔵 Blue: 150% Bull volume (Rising volume + bullish candle)
🟣 Fuchsia: 150% Bear volume (Rising volume + bearish candle)
Weighted volume calculation for better peak detection
Circles positioned above bars for clear visualization
📈 Range Analytics
Clean range labels showing:
Absolute price range
Percentage movement
Historical analysis with configurable lookback period
Current weekend tracking with real-time updates
Settings Overview
Core Settings
Weeks to Backtest (1-52): Number of completed weekends to display
Show Weekend Trap Rectangles: Toggle rectangle visibility
Use Wicks for Rectangle Height: Include wicks vs. body-only ranges
Sunday Range Cutoff Hour: When to stop updating weekend range
Visual Customization
Rectangle colors and borders
Market maker marker sizes (tiny to large)
PVSRA color scheme for different volume levels
Label display options
Market Maker Detection
Automatic PVSRA analysis during weekend periods
150% threshold: Volume ≥ 150% of 10-period average
200% threshold: Volume ≥ 200% of average OR weighted volume peak
Real-time detection with immediate visual feedback
How to Use
Add to your chart (works on any timeframe, recommended: 1H-4H)
Set your preferred lookback period (default: 4 weeks)
Observe weekend ranges and note market maker activity
Monitor volume spikes indicated by colored circles
Analysis Applications
Weekend Range Analysis
Identify price ranges during low-liquidity periods
Track historical weekend price movements
Analyze range size and frequency patterns
Market Maker Detection
Identify institutional accumulation/distribution
Spot manipulation during low-liquidity periods
Analyze volume patterns and anomalies
Historical Pattern Recognition
Weekend range comparison across multiple periods
Multiple timeframe analysis capability
Volume pattern identification
Technical Details
Timezone: Australia/Perth (GMT+8)
Weekend Period: Saturday 5:00 AM → Monday 5:00 AM
Volume Analysis: 10-period moving average baseline
Weighted Volume: Volume × (High - Low) for peak detection
Object Management: Automatic cleanup based on lookback period
Best Practices
Use on liquid markets (major forex pairs, crypto, indices)
Adjust lookback period based on analysis timeframe
Monitor during Asia-Pacific trading hours for best results
Consider fundamental events that may affect weekend gaps
Credits
Volume analysis inspired by PVSRA (Price Volume Spread Range Analysis) methodology for institutional activity detection.
This indicator is designed for educational and analysis purposes.