Correlation X macroeconomicsFind the correlation between financial assets and the main Brazilian macroeconomic variables:
SELIC rate (Red)
PIB (Green)
Inflation (Blue)
Employment and income (Yellow)
Unlike other indicators that measure the correlation between two assets, the indicator "Correlation X macroeconomics" measures, for example, the correlation that the VALE3 asset has with the SELIC rate.
The correlation is obtained by calculating the variation suffered by a given asset on the day a given Brazilian macroeconomic variable is released.
This indicator can be used on any financial asset.
Use time frame chart = 1 day.
To calculate the correlation, data published by IBGE and the Central Bank of Brazil over a period of time are used. This time period is different depending on the selected macroeconomic variable. Namely:
16 PIB disclosures (4 years)
24 SELIC rate disclosures (3 years)
24 disclosures of IPCA and employment and income data (2 years)
You can select one or more macroeconomic variables to check the effect of correlation separately on each of them.
This indicator "Correlation X macroeconomics" will be updated monthly, as detailed below:
At the end of the day on which the PIB is released
At the end of the day on which employment and income data are released
At the end of the day following the day on which the SELIC rate is published
On the last business day of the month if none of the aforementioned disclosures occur
Ciclos
Label Selected DayThis Pine Script indicator allows users to highlight a specific day of the week on the chart. Users can select a day using the dropdown menu, and the script will mark all occurrences of that day.
The indicator is lightweight and non-intrusive, making it a great addition for traders who analyze market movements relative to specific days.
Moon+Lunar Cycle Vertical Delineation & Projection
Automatically highlights the exact candle in which Moonphase shifts occur.
Optionally including shifts within the Microphases of the total Lunar Cycle.
This allow traders to pre-emptively identify time-based points of volatility,
focusing on mean-reversion; further simplified via the use of projections.
Projections are calculated via candle count, values displayed in "Debug";
these are useful in understanding the function & underlying mechanics.
Wall Street Ai**Wall Street Ai – Advanced Technical Indicator for Market Analysis**
**Overview**
Wall Street Ai is an advanced, AI-powered technical indicator meticulously engineered to provide traders with in-depth market analysis and insight. By leveraging state-of-the-art artificial intelligence algorithms and comprehensive historical price data, Wall Street Ai is designed to identify significant market turning points and key price levels. Its sophisticated analytical framework enables traders to uncover potential shifts in market momentum, assisting in the formulation of strategic trading decisions while maintaining the highest standards of objectivity and reliability.
**Key Features**
- **Intelligent Pattern Recognition:**
Wall Street Ai employs advanced machine learning techniques to analyze historical price movements and detect recurring patterns. This capability allows it to differentiate between typical market noise and meaningful signals indicative of potential trend reversals.
- **Robust Noise Reduction:**
The indicator incorporates a refined volatility filtering system that minimizes the impact of minor price fluctuations. By isolating significant price movements, it ensures that the analytical output focuses on substantial market shifts rather than ephemeral variations.
- **Customizable Analytical Parameters:**
With a wide range of adjustable settings, Wall Street Ai can be fine-tuned to align with diverse trading strategies and risk appetites. Traders can modify sensitivity, threshold levels, and other critical parameters to optimize the indicator’s performance under various market conditions.
- **Comprehensive Data Analysis:**
By harnessing the power of artificial intelligence, Wall Street Ai performs a deep analysis of historical data, identifying statistically significant highs and lows. This analysis not only reflects past market behavior but also provides valuable insights into potential future turning points, thereby enhancing the predictive aspect of your trading strategy.
- **Adaptive Market Insights:**
The indicator’s dynamic algorithm continuously adjusts to current market conditions, adapting its analysis based on real-time data inputs. This adaptive quality ensures that the indicator remains relevant and effective across different market environments, whether the market is trending strongly, consolidating, or experiencing volatility.
- **Objective and Reliable Analysis:**
Wall Street Ai is built on a foundation of robust statistical methods and rigorous data validation. Its outputs are designed to be objective and free from any exaggerated claims, ensuring that traders receive a clear, unbiased view of market conditions.
**How It Works**
Wall Street Ai integrates advanced AI and deep learning methodologies to analyze a vast array of historical price data. Its core algorithm identifies and evaluates critical market levels by detecting patterns that have historically preceded significant market movements. By filtering out non-essential fluctuations, the indicator emphasizes key price extremes and trend changes that are likely to impact market behavior. The system’s adaptive nature allows it to recalibrate its analytical parameters in response to evolving market dynamics, providing a consistently reliable framework for market analysis.
**Usage Recommendations**
- **Optimal Timeframes:**
For the most effective application, it is recommended to utilize Wall Street Ai on higher timeframe charts, such as hourly (H1) or higher. This approach enhances the clarity of the detected patterns and provides a more comprehensive view of long-term market trends.
- **Market Versatility:**
Wall Street Ai is versatile and can be applied across a broad range of financial markets, including Forex, indices, commodities, cryptocurrencies, and equities. Its adaptable design ensures consistent performance regardless of the asset class being analyzed.
- **Complementary Analytical Tools:**
While Wall Street Ai provides profound insights into market behavior, it is best utilized in combination with other analytical tools and techniques. Integrating its analysis with additional indicators—such as trend lines, support/resistance levels, or momentum oscillators—can further refine your trading strategy and enhance decision-making.
- **Strategy Testing and Optimization:**
Traders are encouraged to test Wall Street Ai extensively in a simulated trading environment before deploying it in live markets. This allows for thorough calibration of its settings according to individual trading styles and risk management strategies, ensuring optimal performance across diverse market conditions.
**Risk Management and Best Practices**
Wall Street Ai is intended to serve as an analytical tool that supports informed trading decisions. However, as with any technical indicator, its outputs should be interpreted as part of a comprehensive trading strategy that includes robust risk management practices. Traders should continuously validate the indicator’s findings with additional analysis and maintain a disciplined approach to position sizing and risk control. Regular review and adjustment of trading strategies in response to market changes are essential to mitigate potential losses.
**Conclusion**
Wall Street Ai offers a cutting-edge, AI-driven approach to technical analysis, empowering traders with detailed market insights and the ability to identify potential turning points with precision. Its intelligent pattern recognition, adaptive analytical capabilities, and extensive noise reduction make it a valuable asset for both experienced traders and those new to market analysis. By integrating Wall Street Ai into your trading toolkit, you can enhance your understanding of market dynamics and develop a more robust, data-driven trading strategy—all while adhering to the highest standards of analytical integrity and performance.
day of Month | xilixMonthly Marker (1D Only)
The Monthly Marker indicator automatically highlights a specific day of the month on a daily (1D) chart by drawing a vertical line. Users can select their desired day of the month and customize the line color.
Features:
✅ Marks the chosen day of each month with a vertical line.
✅ Customizable line color (set in the indicator settings).
✅ Helps traders quickly identify key monthly dates.
Note: This indicator will not work on lower timeframes (e.g., 4H, 1H) and will show an error if applied outside the 1D timeframe.
Best Use Cases: Monthly trend tracking, economic event alignment, and custom date-based analysis. 🚀
Intraday Low Engulf Line This indicator currently work on Future product as it track the intraday low for the daily session from 6pm to 5pm EST. You may have to manually adjust the code if there is a time difference, or day light saving.
This indicator will track all new intraday low through out the session. Once a new intraday low is made, the indicator will display the high of that candle as an engulf target.
If the next candle making a intraday low, this engulf target will be updated. Until there is no more intraday low is made, we will see a engulf target line which is the high of the candle that make the most recent intraday low.
If there is any candle body is below the intraday low engulf life, you can expect to place a buy stop order to trade the bullish reversal.
You may want to use 5m or 15m, or 30M timeframe to reduce the noise of this indicator.
Your stop loss will be set at the intraday low. Therefore a higher time frame 5m is better for entry, however 1m timeframe will give you the best reward.
The idea is that Indraday low engulf line can be a target for bullish reversal or a bullish retest.
Another way to use this this intraday low engulf line is to treat it as a support. If the support break, the trend can be bearish too.
You have to develop your own price action strategy how to trade this.
I will also add an intraday High engulf indicator later.
EM Yield Curve IndexThis script calculates the Emerging Markets (EM) Yield Curve Index by aggregating the 2-year and 10-year bond yields of major emerging economies. The bond yields are weighted based on each country's bond market size, with data sourced from TradingView. The yield curve is derived by subtracting the 2-year yield from the 10-year yield, providing insights into economic conditions, risk sentiment, and potential recessions in emerging markets. The resulting EM Yield Curve Index is plotted for visualization.
Note: In some cases, TradingView's TVC data did not provide a 2-year bond yield. When this occurred, the best available alternative yield (such as 3-month, 1-year or 4-year yields) was used to approximate the short-term interest rate for that country.
Mswing HommaThe Mswing is a momentum oscillator that calculates the rate of price change over 20 and 50 periods (days/weeks). Apart from quantifying momentum, it can be used for assessing relative strength, sectoral rotation & entry/exit signals.
Quantifying Momentum Strength
The Mswing's relationship with its EMA (e.g., 5-period or 9-period) is used for momentum analysis:
• M Swing >0 and Above EMA: Momentum is positive and accelerating (ideal for entries).
• M Swing >0 and Below EMA: Momentum is positive but decelerating (caution).
• M Swing <0 and Above EMA: Momentum is negative but improving (watch for reversals).
• M Swing <0 and Below EMA: Momentum is negative and worsening (exit or avoid).
Relative Strength Scanning (M Score)
Sort stocks by their M Swing using TradingView’s Pine scanner.
Compare the Mswing scores of indices/sectors to allocate capital to stronger groups (e.g., renewables vs. traditional energy).
Stocks with strong Mswing scores tend to outperform during bullish phases, while weak ones collapse faster in downtrends.
Entry and Exit Signals
Entry: Buy when Mswing crosses above 0 + price breaks key moving averages (50-day SMA). Use Mswing >0 to confirm valid breakouts. Buy dips when Mswing holds above EMA during retracements.
Exit: Mswing can be used for exiting a stock in 2 ways:
• Sell in Strength: Mswing >4 (overbought).
• Sell in Weakness: Mswing <0 + price below 50-day SMA.
Multi-Timeframe Analysis
• Daily: For swing trades.
• Weekly: For trend confirmation.
• Monthly: For long-term portfolio adjustments.
Crypto Money Flow TrackerAlerts now trigger automatically – no manual setup needed!
✔ Alerts will notify you when:
OI change (15m) is greater than or below the threshold
Price change (15m) is greater than or below the threshold
✔ Messages will display exact percentage changes in OI and price.
Similar Bars Pattern DetecterDescription:
The Similar Bars Pattern Detector is a professional Pine Script indicator designed for TradingView users who want to identify sequences of similar candlesticks in a row. Whether you're looking for bullish or bearish patterns, this tool helps you spot repeating formations based on customizable settings.
Features:
✅ Detects patterns of consecutive similar bars
✅ Works for both bullish and bearish trends
✅ Uses tick-based range filtering for precise detection
✅ Fully customizable: adjust number of candles, trend type, and range
✅ Highlights detected patterns directly on the chart
🔹 Ideal for traders who rely on pattern recognition to confirm trends and price movements.
🔹 Works across all markets and timeframes.
💡 How to Use:
1️⃣ Set the number of candles to detect a repeating pattern.
2️⃣ Choose bullish or bearish trend direction.
3️⃣ Adjust the tick range to fine-tune pattern similarity.
🚀 Enhance your trading analysis with this powerful pattern recognition tool!
Custom Time Alert with Vertical Line📌 Detailed Explanation of the Custom Time Alert with Vertical Line in Pine Script v5
This script is a time-based alert system designed for TradingView. It allows traders to set a specific hour and minute for alerts and provides visual indicators on the chart, including a marker when the alert triggers and a vertical line at the alert time.
🔹 Main Features
Custom Alert Time → Users can specify the exact hour and minute for an alert.
Time Zone Offset Support → Users can manually adjust their local UTC offset to ensure alerts trigger at the correct time.
Real-Time Alert Condition → When the market reaches the set time, an alert notification is triggered.
Chart Visualization → A red marker appears when the alert is activated, and a blue vertical line is drawn at the alert time.
Automated Calculation → The script adjusts the alert time based on the user’s time zone settings.
🛠️ How It Works
User Input for Alert Time
The script allows users to enter their desired alert hour (0-23) and minute (0-59).
This ensures the alert triggers at the exact specified time.
Time Zone Offset Handling
Users enter their UTC offset (e.g., New York is -5, Tokyo is +9).
This ensures alerts work correctly regardless of the user’s location.
Time Calculation
The script adjusts the TradingView time by adding the time zone offset in milliseconds.
This converts the UTC-based TradingView time into the user’s local time.
Checking for a Time Match
The script constantly checks if the current hour and minute match the user-defined alert time.
If they match, the script activates an alert.
Triggering Alerts
The script uses TradingView’s alertcondition() function to create an alert.
When the time matches, TradingView sends a notification (e.g., pop-up, sound, or mobile alert).
Chart Markers for Visual Alerts
A red marker is displayed on the chart when the alert triggers.
A blue vertical line is drawn at the exact alert time.
📌 Example Use Cases
📈 1. Forex Traders Monitoring Market Opens
A forex trader who trades the London session wants an alert when the market opens at 8:00 AM UTC.
The trader sets:
Alert Hour = 8
Alert Minute = 0
Time Zone Offset = 0 (for UTC)
When the market reaches 8:00 AM UTC, the script triggers an alert.
📈 2. Stock Market Open Alerts
A trader in New York (EST) wants an alert at 9:30 AM Eastern Time (New York Stock Exchange open).
New York’s UTC offset is -5.
The trader sets:
Alert Hour = 9
Alert Minute = 30
Time Zone Offset = -5
The script ensures the alert triggers at 9:30 AM EST.
📈 3. Crypto Trader Watching a Specific Time
A crypto trader wants an alert for a specific strategy at 3:00 PM in Tokyo (UTC+9).
Tokyo’s UTC offset is +9.
The trader sets:
Alert Hour = 15
Alert Minute = 0
Time Zone Offset = +9
The script ensures the alert triggers exactly at 3:00 PM Tokyo time.
CCT Pi Cycle Top/BottomPi Cycle Top/bottom: The Ultimate Market Cycle Indicator
Introduction
The Pi Cycle Top/bottom Indicator is one of the most reliable tools for identifying Bitcoin market cycle peaks and bottoms. Its effectiveness lies in the strategic combination of moving averages that historically align with major market cycle reversals. Unlike traditional moving average crossovers, this indicator applies an advanced iterative approach to pinpoint price extremes with higher accuracy.
This version, built entirely with Pine Script™ v6, introduces unprecedented precision in detecting both the Pi Cycle Top and Pi Cycle Bottom, eliminating redundant labels, optimizing visual clarity, and ensuring the indicator adapts dynamically to evolving market conditions.
What is the Pi Cycle Theory?
The Pi Cycle Top and Pi Cycle Bottom were originally introduced based on a simple yet profound discovery: key moving average crossovers consistently align with macro market tops and bottoms.
Pi Cycle Top: The crossover of the 111-day Simple Moving Average (SMA) and the 350-day SMA multiplied by 2 has historically signaled market tops with astonishing accuracy.
Pi Cycle Bottom: The intersection of the 150-day Exponential Moving Average (EMA) and the 471-day SMA has repeatedly marked significant market bottoms.
While traditional moving average strategies often suffer from lag and false signals, the Pi Cycle Indicator enhances accuracy by applying a range-based scanning methodology, ensuring that only the most critical reversals are detected.
How This Indicator Works
Unlike basic moving average crossovers, this script introduces a unique iteration process to refine the detection of Pi Cycle points. Here’s how it works:
Detecting Crossovers:
Identifies the Golden Cross (bullish crossover) and Death Cross (bearish crossover) for both the Pi Cycle Top and Pi Cycle Bottom.
Iterating Through the Cycle:
Instead of plotting a simple crossover point, this script scans the range between each Golden and Death Cross to identify the absolute lowest price (Pi Cycle Bottom) and highest price (Pi Cycle Top) within that cycle.
Precision Labeling:
The indicator dynamically adjusts label positioning:
If the price at the crossover is below the fast moving average → the label is placed on the moving average with a downward pointer.
If the price is above the fast moving average → the label is placed below the candle with an upward pointer.
This ensures optimal visibility and prevents misleading signal placement.
Advanced Pine Script v6 Features:
Labels and moving average names are only shown on the last candle, reducing chart noise while maintaining clarity.
Offers full user customization, allowing traders to toggle:
Pi Cycle Top & Bottom visibility
Moving average labels
Crossover labels
Why This Indicator is Superior
This script is not just another moving average crossover tool—it is a market cycle tracker designed for long-term investors and analysts who seek:
✔ High-accuracy macro cycle identification
✔ Elimination of false signals using an iterative range-based scan
✔ Automatic detection of market extremes without manual adjustments
✔ Optimized visuals with smart label positioning
✔ First-of-its-kind implementation using Pine Script™ v6 capabilities
How to Use It?
Bull Market Tops:
When the Pi Cycle Top indicator flashes, consider the potential for a market cycle peak.
Historically, Bitcoin has corrected significantly after these signals.
Bear Market Bottoms:
When the Pi Cycle Bottom appears, it suggests a macro accumulation phase.
These signals have aligned perfectly with historical cycle bottoms.
Final Thoughts
The Pi Cycle Top/bottom Indicator is a must-have tool for traders, investors, and analysts looking to anticipate long-term trend reversals with precision. With its refined methodology, superior label positioning, and cutting-edge Pine Script™ v6 optimizations, this is the most reliable version ever created.
Personal Time Zone: Days of WeekThis is probably the simplest indicator I have ever made.
It just gives you a the days of weeks in your specified time zone and puts the day on the first bar in your time zone.
You can use UTC time format or named time zones like the default.
Just for fun I tried to give it symbols that sort of relate the old gods that the days of week were named after and even colors that one could argue match, but it was all in fun because it was so simple I felt I had to add something.
Enjoy.
Elliptic bands
Why Elliptic?
Unlike traditional indicators (e.g., Bollinger Bands with constant standard deviation multiples), the elliptic model introduces a cyclical, non-linear variation in band width. This reflects the idea that price movements often follow rhythmic patterns, widening and narrowing in a predictable yet dynamic way, akin to natural market cycles.
Buy: When the price enters from below (green triangle).
Sell: When the price enters from above (red triangle).
Inputs
MA Length: 50 (This is the period for the central Simple Moving Average (SMA).)
Cycle Period: 50 (This is the elliptic cycle length.)
Volatility Multiplier: 2.0 (This value scales the band width.)
Mathematical Foundation
The indicator is based on the ellipse equation. The basic formula is:
Ellipse Equation:
(x^2) / (a^2) + (y^2) / (b^2) = 1
Solving for y:
y = b * sqrt(1 - (x^2) / (a^2))
Parameters Explained:
a: Set to 1 (normalized).
x: Varies from -1 to 1 over the period.
b: Calculated as:
ta.stdev(close, MA Length) * Volatility Multiplier
(This represents the standard deviation of the close prices over the MA period, scaled by the volatility multiplier.)
y (offset): Represents the band distance from the moving average, forming the elliptic cycle.
Behavior
Bands:
The bands are narrow at the cycle edges (when the offset is 0) and become widest at the midpoint (when the offset equals b).
Trend:
The central moving average (MA) shows the overall trend direction, while the bands adjust according to the volatility.
Signals:
Standard buy and sell signals are generated when the price interacts with the bands.
Practical Use
Trend Identification:
If the price is above the MA, it indicates an uptrend; if below, a downtrend.
Support and Resistance:
The elliptic bands act as dynamic support and resistance levels.
Narrowing bands may signal potential trend reversals.
Breakouts:
Bias TableOverview
The Bias Table Indicator is a multi-timeframe analysis tool designed to provide a quick sentiment overview across multiple timeframes. It combines signals from Moving Averages (MAs) and Oscillators to determine market bias, helping traders make more informed decisions.
Key Features
✔ Multi-Timeframe Analysis (MTF) – Displays market bias across up to five timeframes.
✔ Customizable Signals – Choose whether bias is based on Moving Averages (MAs), Oscillators, or a combination of both.
✔ Visual Table Format – The indicator presents the bias as a color-coded table in the bottom-right corner of the chart for quick reference.
✔ Adjustable Colors & Display Settings – Users can customize colors for different sentiment states (Strong Buy, Buy, Neutral, Sell, Strong Sell).
How It Works
Bias Calculation: The indicator evaluates market conditions using preset values (which can be replaced with actual logic) to determine sentiment for each timeframe.
Multi-Timeframe Support: The table can display bias from hourly to monthly timeframes, giving traders a broader view of market conditions.
Customizable Signals: Users can filter the table to show bias based only on MAs, Oscillators, or a combination of both.
Interpreting the Table
📊 Timeframes: The leftmost column shows selected timeframes (e.g., 1H, 4H, 1D, 1W, 1M).
📈 Signal Columns:
MAs – Bias based on Moving Averages.
Oscillators – Bias based on momentum indicators like RSI, Stochastics, etc.
All – A combined bias based on both MAs & Oscillators.
🚦 Color-Coded Ratings:
🔵 Strong Buy – High bullish strength.
🔹 Buy – Moderate bullish sentiment.
⚪ Neutral – No clear trend.
🔸 Sell – Moderate bearish sentiment.
🔴 Strong Sell – High bearish strength.
Best Used For:
📈 Trend Confirmation: Validate signals from your primary strategy.
⏳ Multi-Timeframe Analysis: See whether short-term and long-term trends align.
⚡ Quick Sentiment Check: Get a high-level view of market conditions without analyzing multiple indicators separately.
Customization Options:
Select which timeframes to include in the table.
Choose whether to base bias on MAs, Oscillators, or both.
Adjust colors for each signal type.
Bitcoin MVRV Z-Score Indicator### **What This Script Does (In Plain English)**
Imagine Bitcoin has a "fair price" based on what people *actually paid* for it (called the **Realized Value**). This script tells you if Bitcoin is currently **overpriced** or **underpriced** compared to that fair price, using math.
---
### **How It Works (Like a Car Dashboard)**
1. **The Speedometer (Z-Score Line)**
- The blue line (**Z-Score**) acts like a speedometer for Bitcoin’s price:
- **Above Red Line** → Bitcoin is "speeding" (overpriced).
- **Below Green Line** → Bitcoin is "parked" (underpriced).
2. **The Warning Lights (Colors)**
- **Red Background**: "Slow down!" – Bitcoin might be too expensive.
- **Green Background**: "Time to fuel up!" – Bitcoin might be a bargain.
3. **The Alarms (Alerts)**
- Your phone buzzes when:
- Green light turns on → "Buy opportunity!"
- Red light turns on → "Be careful – might be time to sell!"
---
### **Real-Life Example**
- **2021 Bitcoin Crash**:
- The red light turned on when Bitcoin hit $60,000+ (Z-Score >7).
- A few months later, Bitcoin crashed to $30,000.
- **2023 Rally**:
- The green light turned on when Bitcoin was around $20,000 (Z-Score <0.1).
- Bitcoin later rallied to $35,000.
---
### **How to Use It (3 Simple Steps)**
1. **Look at the Blue Line**:
- If it’s **rising toward the red zone**, Bitcoin is getting expensive.
- If it’s **falling toward the green zone**, Bitcoin is getting cheap.
2. **Check the Colors**:
- Trade carefully when the background is **red**.
- Look for buying chances when it’s **green**.
3. **Set Alerts**:
- Get notified when Bitcoin enters "cheap" or "expensive" zones.
---
### **Important Notes**
- **Not Magic**: This tool helps spot trends but isn’t perfect. Always combine it with other indicators.
- **Best for Bitcoin**: Works great for Bitcoin, not as well for altcoins.
- **Long-Term Focus**: Signals work best over months/years, not hours.
---
Think of it as a **thermometer for Bitcoin’s price fever** – it tells you when the market is "hot" or "cold." 🔥❄️
Supply & Demand Zones (by Wali Afridi)Description:
🚀 This indicator accurately detects Supply & Demand Zones by identifying swing highs and lows. It plots a single clean line for each zone and labels them as "SZ" (Supply Zone) and "DZ" (Demand Zone), ensuring a clear and minimalistic chart.
🔹 Features:
✅ Auto-detects recent Supply & Demand Zones
✅ Plots clean horizontal lines for the latest zones
✅ Displays "SZ" above the supply line & "DZ" below the demand line
✅ No duplicate labels—only one label per zone
✅ Minimal & clutter-free visualization
How to Use:
1️⃣ Add the indicator to your chart
2️⃣ Watch for Supply Zones (SZ) appearing above red lines – These indicate potential resistance areas where price may reverse or consolidate.
3️⃣ Watch for Demand Zones (DZ) appearing below green lines – These indicate strong support areas where price may bounce.
4️⃣ Use with other confirmations (Price Action, SMC, Volume) for better accuracy.
⚠️ Disclaimer:
This script is for educational purposes only and should not be considered financial advice. Always backtest and use risk management before applying it to live trading.
HTF Anchored FanSimilar to an Anchored VWAP, this lets you click a bar on an Daily, Weekly, or Monthly chart to add an "Anchored Fan" which displays lines at up to 6 levels above and below the chosen Anchor Point. Useful to measure the retracement during swing moves.
You can reposition the fan by either hovering over the anchor or by clicking the name of the study to "activate" it, and then dragging. You can also change the Anchor Point in Settings.
By default the anchor uses the bar Close, but you can change this manually in settings OR you can use the fancy "Auto high/low" mode which is handy if you are mainly dropping the fan on local swing highs and lows.
The default line measures were chosen for ES (Futures) but the study should be usable with nearly anything as long as you adjust the settings to something appropriate for the ticker. If you want to use this on NQ, for example, it would be reasonable to multiple each of these settings by 3.5 or so.
NOTE: If the fan is way off the left side of the chart it's generally easiest to use Settings to move it back to close to "now".
M2SL/DXY RatioA custom financial ratio comparing:
Numerator: M2 Money Supply (M2SL)
U.S. monetary aggregate measuring cash, checking deposits, and easily convertible near money
Denominator: US Dollar Index (DXY)
Trade-weighted geometric mean of USD value against six major currencies
Simple Sessions========== TLDR ==========
The "Simple Sessions" indicator plots vertical lines and labels at the open and close of the US (New York), Asia (Tokyo), and Europe (London), daily session. The existing session indicators I could find all changed the background color of the chart for the entire session or added extra information to the chart that cluttered up my view. This is meant to be a less noisy and easy to interpret indication that the session you trade has started or is ending.
========== Features ==========
- Show or hide vertical lines for session opens and closes
- Show or hide labels for session opens and closes
- Show or hide each session individually
- Show or hide just the session close indications
- Change the color used for each session open and close
- Change the labels text, size, and text color
========== Limitations ==========
The session start and end times are hard coded in for their time zones and can't be changed:
- US (New York) - 9:30 - 16:00
- Asia (Tokyo) - 9:00 - 15:00
- Europe (London) - 8:30 - 16:30
========== Use Cases ==========
- Easily see when each session started and ended without the chart being too noisy
- Make it easier to identify price action patterns and trade setups that may occur on the open of each session
=============================
If you'd like more features or options feel free to request them in the comments.
Inverted USDT DominanceInverted USDT Dominance Indicator
This simple yet powerful indicator plots the inverted USDT Dominance (USDT.D), making it visually intuitive to analyze market sentiment shifts. Typically, USDT dominance rises when investors seek stability, indicating a "risk-off" market environment. Conversely, it falls when investors pursue riskier assets like cryptocurrencies, signaling a "risk-on" environment.
Why invert the USDT Dominance chart?
By flipping USDT Dominance around the zero line, this indicator allows traders and investors to more clearly visualize its correlation and divergence with traditional market indicators like the 10-year Treasury yield (TNX), Bitcoin, or equity indices. A rising line on this inverted indicator intuitively indicates increasing market risk appetite, whereas a falling line highlights growing risk aversion.
Use cases:
Quickly visualize market sentiment (risk-on vs. risk-off).
Identify divergences and correlations between crypto markets and traditional financial instruments.
Enhance portfolio allocation decisions by clearly seeing sentiment changes.
[GYTS-CE] Market Regime Detector🧊 Market Regime Detector (Community Edition)
🌸 Part of GoemonYae Trading System (GYTS) 🌸
🌸 --------- INTRODUCTION --------- 🌸
💮 What is the Market Regime Detector?
The Market Regime Detector is an advanced, consensus-based indicator that identifies the current market state to increase the probability of profitable trades. By distinguishing between trending (bullish or bearish) and cyclic (range-bound) market conditions, this detector helps you select appropriate tactics for different environments. Instead of forcing a single strategy across all market conditions, our detector allows you to adapt your approach based on real-time market behaviour.
💮 The Importance of Market Regimes
Markets constantly shift between different behavioural states or "regimes":
• Bullish trending markets - characterised by sustained upward price movement
• Bearish trending markets - characterised by sustained downward price movement
• Cyclic markets - characterised by range-bound, oscillating behaviour
Each regime requires fundamentally different trading approaches. Trend-following strategies excel in trending markets but fail in cyclic ones, while mean-reversion strategies shine in cyclic markets but underperform in trending conditions. Detecting these regimes is essential for successful trading, which is why we've developed the Market Regime Detector to accurately identify market states using complementary detection methods.
🌸 --------- KEY FEATURES --------- 🌸
💮 Consensus-Based Detection
Rather than relying on a single method, our detector employs two complementary detection methodologies that analyse different aspects of market behaviour:
• Dominant Cycle Average (DCA) - analyzes price movement relative to its lookback period, a proxy for the dominant cycle
• Volatility Channel - examines price behaviour within adaptive volatility bands
These diverse perspectives are synthesised into a robust consensus that minimises false signals while maintaining responsiveness to genuine regime changes.
💮 Dominant Cycle Framework
The Market Regime Detector uses the concept of dominant cycles to establish a reference framework. You can input the dominant cycle period that best represents the natural rhythm of your market, providing a stable foundation for regime detection across different timeframes.
💮 Intuitive Parameter System
We've distilled complex technical parameters into intuitive controls that traders can easily understand:
• Adaptability - how quickly the detector responds to changing market conditions
• Sensitivity - how readily the detector identifies transitions between regimes
• Consensus requirement - how much agreement is needed among detection methods
This approach makes the detector accessible to traders of all experience levels while preserving the power of the underlying algorithms.
💮 Visual Market Feedback
The detector provides clear visual feedback about the current market regime through:
• Colour-coded chart backgrounds (purple shades for bullish, pink for bearish, yellow for cyclic)
• Colour-coded price bars
• Strength indicators showing the degree of consensus
• Customizable colour schemes to match your preferences or trading system
💮 Integration in the GYTS suite
The Market Regime Detector is compatible with the GYTS Suite , i.e. it passes the regime into the 🎼 Order Orchestrator where you can set how to trade the trending and cyclic regime.
🌸 --------- CONFIGURATION SETTINGS --------- 🌸
💮 Adaptability
Controls how quickly the Market Regime detector adapts to changing market conditions. You can see it as a low-frequency, long-term change parameter:
Very Low: Very slow adaptation, most stable but may miss regime changes
Low: Slower adaptation, more stability but less responsiveness
Normal: Balanced between stability and responsiveness
High: Faster adaptation, more responsive but less stable
Very High: Very fast adaptation, highly responsive but may generate false signals
This setting affects lookback periods and filter parameters across all detection methods.
💮 Sensitivity
Controls how sensitive the detector is to market regime transitions. This acts as a high-frequency, short-term change parameter:
Very Low: Requires substantial evidence to identify a regime change
Low: Less sensitive, reduces false signals but may miss some transitions
Normal: Balanced sensitivity suitable for most markets
High: More sensitive, detects subtle regime changes but may have more noise
Very High: Very sensitive, detects minor fluctuations but may produce frequent changes
This setting affects thresholds for regime detection across all methods.
💮 Dominant Cycle Period
This parameter allows you to specify the market's natural rhythm in bars. This represents a complete market cycle (up and down movement). Finding the right value for your specific market and timeframe might require some experimentation, but it's a crucial parameter that helps the detector accurately identify regime changes. Most of the times the cycle is between 20 and 40 bars.
💮 Consensus Mode
Determines how the signals from both detection methods are combined to produce the final market regime:
• Any Method (OR) : Signals bullish/bearish if either method detects that regime. If methods conflict (one bullish, one bearish), the stronger signal wins. More sensitive, catches more regime changes but may produce more false signals.
• All Methods (AND) : Signals only when both methods agree on the regime. More conservative, reduces false signals but might miss some legitimate regime changes.
• Weighted Decision : Balances both methods with equal weighting. Provides a middle ground between sensitivity and stability.
Each mode also calculates a continuous regime strength value that's used for colour intensity in the 'unconstrained' display mode.
💮 Display Mode
Choose how to display the market regime colours:
• Unconstrained regime: Shows the regime strength as a continuous gradient. This provides more nuanced visualisation where the intensity of the colour indicates the strength of the trend.
• Consensus only: Shows only the final consensus regime with fixed colours based on the detected regime type.
The background and bar colours will change to indicate the current market regime:
• Purple shades: Bullish trending market (darker purple indicates stronger bullish trend)
• Pink shades: Bearish trending market (darker pink indicates stronger bearish trend)
• Yellow: Cyclic (range-bound) market
💮 Custom Colour Options
The Market Regime Detector allows you to customize the colour scheme to match your personal preferences or to coordinate with other indicators:
• Use custom colours: Toggle to enable your own colour choices instead of the default scheme
• Transparency: Adjust the transparency level of all regime colours
• Bullish colours: Define custom colours for strong, medium, weak, and very weak bullish trends
• Bearish colours: Define custom colours for strong, medium, weak, and very weak bearish trends
• Cyclic colour: Define a custom colour for cyclic (range-bound) market conditions
🌸 --------- DETECTION METHODS --------- 🌸
💮 Dominant Cycle Average (DCA)
The Dominant Cycle Average method forms a key part of our detection system:
1. Theoretical Foundation :
The DCA method builds on cycle analysis and the observation that in trending markets, price consistently remains on one side of a moving average calculated using the dominant cycle period. In contrast, during cyclic markets, price oscillates around this average.
2. Calculation Process :
• We calculate a Simple Moving Average (SMA) using the specified lookback period - a proxy for the dominant cycle period
• We then analyse the proportion of time that price spends above or below this SMA over a lookback window. The theory is that the price should cross the SMA each half cycle, assuming that the dominant cycle period is correct and price follows a sinusoid.
• This lookback window is adaptive, scaling with the dominant cycle period (controlled by the Adaptability setting)
• The different values are standardised and normalised to possess more resolving power and to be more robust to noise.
3. Regime Classification :
• When the normalised proportion exceeds a positive threshold (determined by Sensitivity setting), the market is classified as bullish trending
• When it falls below a negative threshold, the market is classified as bearish trending
• When the proportion remains between these thresholds, the market is classified as cyclic
💮 Volatility Channel
The Volatility Channel method complements the DCA method by focusing on price movement relative to adaptive volatility bands:
1. Theoretical Foundation :
This method is based on the observation that trending markets tend to sustain movement outside of normal volatility ranges, while cyclic markets tend to remain contained within these ranges. By creating adaptive bands that adjust to current market volatility, we can detect when price behaviour indicates a trending or cyclic regime.
2. Calculation Process :
• We first calculate a smooth base channel center using a low pass filter, creating a noise-reduced centreline for price
• True Range (TR) is used to measure market volatility, which is then smoothed and scaled by the deviation factor (controlled by Sensitivity)
• Upper and lower bands are created by adding and subtracting this scaled volatility from the centreline
• Price is smoothed using an adaptive A2RMA filter, which has a very flat and stable behaviour, to reduce noise while preserving trend characteristics
• The position of this smoothed price relative to the bands is continuously monitored
3. Regime Classification :
• When smoothed price moves above the upper band, the market is classified as bullish trending
• When smoothed price moves below the lower band, the market is classified as bearish trending
• When price remains between the bands, the market is classified as cyclic
• The magnitude of price's excursion beyond the bands is used to determine trend strength
4. Adaptive Behaviour :
• The smoothing periods and deviation calculations automatically adjust based on the Adaptability setting
• The measured volatility is calculated over a period proportional to the dominant cycle, ensuring the detector works across different timeframes
• Both the center line and the bands adapt dynamically to changing market conditions, making the detector responsive yet stable
This method provides a unique perspective that complements the DCA approach, with the consensus mechanism synthesising insights from both methods.
🌸 --------- USAGE GUIDE --------- 🌸
💮 Starting with Default Settings
The default settings (Normal for Adaptability and Sensitivity, Weighted Decision for Consensus Mode) provide a balanced starting point suitable for most markets and timeframes. Begin by observing how these settings identify regimes in your preferred instruments.
💮 Finding the Optimal Dominant Cycle
The dominant cycle period is a critical parameter. Here are some approaches to finding an appropriate value:
• Start with typical values, usually something around 25 works well
• Visually identify the average distance between significant peaks and troughs
• Experiment with different values and observe which provides the most stable regime identification
• Consider using cycle-finding indicators to help identify the natural rhythm of your market
💮 Adjusting Parameters
• If you notice too many regime changes → Decrease Sensitivity or increase Consensus requirement
• If regime changes seem delayed → Increase Adaptability
• If a trending regime is not detected, the market is automatically assigned to be in a cyclic state
• If you want to see more nuanced regime transitions → Try the "unconstrained" display mode (note that this will not affect the output to other indicators)
💮 Trading Applications
Regime-Specific Strategies:
• Bullish Trending Regime - Use trend-following strategies, trail stops wider, focus on breakouts, consider holding positions longer, and emphasize buying dips
• Bearish Trending Regime - Consider shorts, tighter stops, focus on breakdown points, sell rallies, implement downside protection, and reduce position sizes
• Cyclic Regime - Apply mean-reversion strategies, trade range boundaries, apply oscillators, target definable support/resistance levels, and use profit-taking at extremes
Strategy Switching:
Create a set of rules for each market regime and switch between them based on the detector's signal. This approach can significantly improve performance compared to applying a single strategy across all market conditions.
GYTS Suite Integration:
• In the GYTS 🎼 Order Orchestrator, select the '🔗 STREAM-int 🧊 Market Regime' as the market regime source
• Note that the consensus output (i.e. not the "unconstrained" display) will be used in this stream
• Create different strategies for trending (bullish/bearish) and cyclic regimes. The GYTS 🎼 Order Orchestrator is specifically made for this.
• The output stream is actually very simple, and can possibly be used in indicators and strategies as well. It outputs 1 for bullish, -1 for bearish and 0 for cyclic regime.
🌸 --------- FINAL NOTES --------- 🌸
💮 Development Philosophy
The Market Regime Detector has been developed with several key principles in mind:
1. Robustness - The detection methods have been rigorously tested across diverse markets and timeframes to ensure reliable performance.
2. Adaptability - The detector automatically adjusts to changing market conditions, requiring minimal manual intervention.
3. Complementarity - Each detection method provides a unique perspective, with the collective consensus being more reliable than any individual method.
4. Intuitiveness - Complex technical parameters have been abstracted into easily understood controls.
💮 Ongoing Refinement
The Market Regime Detector is under continuous development. We regularly:
• Fine-tune parameters based on expanded market data
• Research and integrate new detection methodologies
• Optimise computational efficiency for real-time analysis
Your feedback and suggestions are very important in this ongoing refinement process!
Shadow Edge (Example)This script tracks hourly price extremes (highs/lows) and their equilibrium (midpoint), plotting them as dynamic reference lines on your chart. It helps visualize intraday support/resistance levels and potential price boundaries.
Key Features
Previous Hour Levels (Static Lines):
PH (Previous Hour High): Red line.
PL (Previous Hour Low): Green line.
P.EQ (Previous Hour Equilibrium): Blue midpoint between PH and PL.
Current Hour Levels (Dynamic/Dotted Lines):
MuEH (Current Hour High): Yellow dashed line (updates in real-time).
MuEL (Current Hour Low): Orange dashed line (updates in real-time).
Labels: Clear text labels on the right edge of the chart for easy readability.
How It Works
Hourly Tracking:
Detects new hours using the hour(time) function.
Resets high/low values at the start of each hour.
Stores the previous hour’s PH, PL, and P.EQ when a new hour begins.
Dynamic Updates:
Continuously updates MuEH and MuEL during the current hour to reflect the latest extremes.
Customization
Toggle visibility of lines via inputs:
Enable/disable PH, PL, P.EQ, MuEH, MuEL individually.
Adjustable colors and line styles (solid for previous hour, dashed for current hour).
Use Case
Intraday Traders: Identify hourly ranges, breakout/retracement opportunities, or mean-reversion setups.
Visual Reference: Quickly see where price is relative to recent hourly activity.
Technical Notes
Overlay: Plots directly on the price chart.
Efficiency: Uses var variables to preserve values between bars.
Labels: Only appear on the latest bar to avoid clutter.
This tool simplifies intraday price action analysis by combining historical and real-time hourly data into a single visual framework.