트렌드 어낼리시스
Hurst Exponent - Detrended Fluctuation AnalysisIn stochastic processes, chaos theory and time series analysis, detrended fluctuation analysis (DFA) is a method for determining the statistical self-affinity of a signal. It is useful for analyzing time series that appear to be long-memory processes and noise.
█ OVERVIEW
We have introduced the concept of Hurst Exponent in our previous open indicator Hurst Exponent (Simple). It is an indicator that measures market state from autocorrelation. However, we apply a more advanced and accurate way to calculate Hurst Exponent rather than simple approximation. Therefore, we recommend using this version of Hurst Exponent over our previous publication going forward. The method we used here is called detrended fluctuation analysis. (For folks that are not interested in the math behind the calculation, feel free to skip to "features" and "how to use" section. However, it is recommended that you read it all to gain a better understanding of the mathematical reasoning).
█ Detrend Fluctuation Analysis
Detrended Fluctuation Analysis was first introduced by by Peng, C.K. (Original Paper) in order to measure the long-range power-law correlations in DNA sequences . DFA measures the scaling-behavior of the second moment-fluctuations, the scaling exponent is a generalization of Hurst exponent.
The traditional way of measuring Hurst exponent is the rescaled range method. However DFA provides the following benefits over the traditional rescaled range method (RS) method:
• Can be applied to non-stationary time series. While asset returns are generally stationary, DFA can measure Hurst more accurately in the instances where they are non-stationary.
• According the the asymptotic distribution value of DFA and RS, the latter usually overestimates Hurst exponent (even after Anis- Llyod correction) resulting in the expected value of RS Hurst being close to 0.54, instead of the 0.5 that it should be. Therefore it's harder to determine the autocorrelation based on the expected value. The expected value is significantly closer to 0.5 making that threshold much more useful, using the DFA method on the Hurst Exponent (HE).
• Lastly, DFA requires lower sample size relative to the RS method. While the RS method generally requires thousands of observations to reduce the variance of HE, DFA only needs a sample size greater than a hundred to accomplish the above mentioned.
█ Calculation
DFA is a modified root-mean-squares (RMS) analysis of a random walk. In short, DFA computes the RMS error of linear fits over progressively larger bins (non-overlapped “boxes” of similar size) of an integrated time series.
Our signal time series is the log returns. First we subtract the mean from the log return to calculate the demeaned returns. Then, we calculate the cumulative sum of demeaned returns resulting in the cumulative sum being mean centered and we can use the DFA method on this. The subtraction of the mean eliminates the “global trend” of the signal. The advantage of applying scaling analysis to the signal profile instead of the signal, allows the original signal to be non-stationary when needed. (For example, this process converts an i.i.d. white noise process into a random walk.)
We slice the cumulative sum into windows of equal space and run linear regression on each window to measure the linear trend. After we conduct each linear regression. We detrend the series by deducting the linear regression line from the cumulative sum in each windows. The fluctuation is the difference between cumulative sum and regression.
We use different windows sizes on the same cumulative sum series. The window sizes scales are log spaced. Eg: powers of 2, 2,4,8,16... This is where the scale free measurements come in, how we measure the fractal nature and self similarity of the time series, as well as how the well smaller scale represent the larger scale.
As the window size decreases, we uses more regression lines to measure the trend. Therefore, the fitness of regression should be better with smaller fluctuation. It allows one to zoom into the “picture” to see the details. The linear regression is like rulers. If you use more rulers to measure the smaller scale details you will get a more precise measurement.
The exponent we are measuring here is to determine the relationship between the window size and fitness of regression (the rate of change). The more complex the time series are the more it will depend on decreasing window sizes (using more linear regression lines to measure). The less complex or the more trend in the time series, it will depend less. The fitness is calculated by the average of root mean square errors (RMS) of regression from each window.
Root mean Square error is calculated by square root of the sum of the difference between cumulative sum and regression. The following chart displays average RMS of different window sizes. As the chart shows, values for smaller window sizes shows more details due to higher complexity of measurements.
The last step is to measure the exponent. In order to measure the power law exponent. We measure the slope on the log-log plot chart. The x axis is the log of the size of windows, the y axis is the log of the average RMS. We run a linear regression through the plotted points. The slope of regression is the exponent. It's easy to see the relationship between RMS and window size on the chart. Larger RMS equals less fitness of the regression. We know the RMS will increase (fitness will decrease) as we increases window size (use less regressions to measure), we focus on the rate of RMS increasing (how fast) as window size increases.
If the slope is < 0.5, It means the rate of of increase in RMS is small when window size increases. Therefore the fit is much better when it's measured by a large number of linear regression lines. So the series is more complex. (Mean reversion, negative autocorrelation).
If the slope is > 0.5, It means the rate of increase in RMS is larger when window sizes increases. Therefore even when window size is large, the larger trend can be measured well by a small number of regression lines. Therefore the series has a trend with positive autocorrelation.
If the slope = 0.5, It means the series follows a random walk.
█ FEATURES
• Sample Size is the lookback period for calculation. Even though DFA requires a lower sample size than RS, a sample size larger > 50 is recommended for accurate measurement.
• When a larger sample size is used (for example = 1000 lookback length), the loading speed may be slower due to a longer calculation. Date Range is used to limit numbers of historical calculation bars. When loading speed is too slow, change the data range "all" into numbers of weeks/days/hours to reduce loading time. (Credit to allanster)
• “show filter” option applies a smoothing moving average to smooth the exponent.
• Log scale is my work around for dynamic log space scaling. Traditionally the smallest log space for bars is power of 2. It requires at least 10 points for an accurate regression, resulting in the minimum lookback to be 1024. I made some changes to round the fractional log space into integer bars requiring the said log space to be less than 2.
• For a more accurate calculation a larger "Base Scale" and "Max Scale" should be selected. However, when the sample size is small, a larger value would cause issues. Therefore, a general rule to be followed is: A larger "Base Scale" and "Max Scale" should be selected for a larger the sample size. It is recommended for the user to try and choose a larger scale if increasing the value doesn't cause issues.
The following chart shows the change in value using various scales. As shown, sometimes increasing the value makes the value itself messy and overshoot.
When using the lowest scale (4,2), the value seems stable. When we increase the scale to (8,2), the value is still alright. However, when we increase it to (8,4), it begins to look messy. And when we increase it to (16,4), it starts overshooting. Therefore, (8,2) seems to be optimal for our use.
█ How to Use
Similar to Hurst Exponent (Simple). 0.5 is a level for determine long term memory.
• In the efficient market hypothesis, market follows a random walk and Hurst exponent should be 0.5. When Hurst Exponent is significantly different from 0.5, the market is inefficient.
• When Hurst Exponent is > 0.5. Positive Autocorrelation. Market is Trending. Positive returns tend to be followed by positive returns and vice versa.
• Hurst Exponent is < 0.5. Negative Autocorrelation. Market is Mean reverting. Positive returns trends to follow by negative return and vice versa.
However, we can't really tell if the Hurst exponent value is generated by random chance by only looking at the 0.5 level. Even if we measure a pure random walk, the Hurst Exponent will never be exactly 0.5, it will be close like 0.506 but not equal to 0.5. That's why we need a level to tell us if Hurst Exponent is significant.
So we also computed the 95% confidence interval according to Monte Carlo simulation. The confidence level adjusts itself by sample size. When Hurst Exponent is above the top or below the bottom confidence level, the value of Hurst exponent has statistical significance. The efficient market hypothesis is rejected and market has significant inefficiency.
The state of market is painted in different color as the following chart shows. The users can also tell the state from the table displayed on the right.
An important point is that Hurst Value only represents the market state according to the past value measurement. Which means it only tells you the market state now and in the past. If Hurst Exponent on sample size 100 shows significant trend, it means according to the past 100 bars, the market is trending significantly. It doesn't mean the market will continue to trend. It's not forecasting market state in the future.
However, this is also another way to use it. The market is not always random and it is not always inefficient, the state switches around from time to time. But there's one pattern, when the market stays inefficient for too long, the market participants see this and will try to take advantage of it. Therefore, the inefficiency will be traded away. That's why Hurst exponent won't stay in significant trend or mean reversion too long. When it's significant the market participants see that as well and the market adjusts itself back to normal.
The Hurst Exponent can be used as a mean reverting oscillator itself. In a liquid market, the value tends to return back inside the confidence interval after significant moves(In smaller markets, it could stay inefficient for a long time). So when Hurst Exponent shows significant values, the market has just entered significant trend or mean reversion state. However, when it stays outside of confidence interval for too long, it would suggest the market might be closer to the end of trend or mean reversion instead.
Larger sample size makes the Hurst Exponent Statistics more reliable. Therefore, if the user want to know if long term memory exist in general on the selected ticker, they can use a large sample size and maximize the log scale. Eg: 1024 sample size, scale (16,4).
Following Chart is Bitcoin on Daily timeframe with 1024 lookback. It suggests the market for bitcoin tends to have long term memory in general. It generally has significant trend and is more inefficient at it's early stage.
US Sessions R4D1🇬🇧 English
US Sessions R4D1 - Market Session Highlighter
Visualize US market sessions directly on your chart with beautiful color overlays and an interactive dashboard.
🎯 FEATURES:
- Automatic session detection based on New York time
- Color-coded background for each session
- Session start labels with customizable size
- Real-time dashboard showing current session status
- Fully customizable colors and settings
📊 SESSIONS:
- 🌙 Premarket: 4:00-9:30 NY
- 🔔 US Open: 9:30-11:30 NY (Power Hour!)
- 🍔 Lunch: 11:30-13:30 NY (Low Volume)
- 📈 Afternoon: 13:30-16:00 NY
- 🌃 After Hours: 16:00-20:00 NY
⚙️ SETTINGS:
- Toggle each session on/off
- Customize all colors
- Label size: tiny to huge
- Dashboard position: any corner
- Show/hide labels and dashboard
Perfect for day traders who want to track market sessions at a glance. Know exactly when the US market opens, when volume typically drops during lunch, and when the afternoon push begins.
Works on all timeframes and instruments.
Combined Up down with volumeIndicates the day with a purple dot where price moved up or down by 5% or more
6x EMA Set (5/20/50/100/200/300)This Pine Script indicator utilizes six Exponential Moving Averages (5, 20, 50, 100, 200, and 300 EMA) to visualize market trends and support/resistance levels across multiple timeframes on a single chart. The code is highly customizable, allowing the user to input and adjust the period length and color for each EMA directly within the indicator settings. The calculation engine uses Pine Script v5's optimized ta.ema() function to compute each average based on the closing price, with the EMA formula naturally weighting recent price action more heavily. This multi-layered structure enables the trader to quickly compare short-term momentum (Fast EMAs) against long-term structural trends (Slow EMAs).
Relative Volume EMA (RVOL)Relative Volume EMA (RVOL) measures the current bar’s volume relative to its typical volume over a selected lookback period.
It helps traders identify whether a price move is supported by real participation or if it’s occurring on weak, low-quality volume.
This version uses:
RVOL = Current Volume ÷ Volume EMA
Volume EMA Length: adjustable
Signal Threshold: a customizable horizontal line (default = 1.2)
How to Use
1. RVOL > 1.2 → High-Quality Momentum
A value above 1.2 indicates that the current bar has at least 20% more volume than normal, suggesting:
Strong conviction
Algorithmic activity
Momentum-backed breakout or breakdown
Higher probability trend continuation
These bars are ideal for confirming entries after a technical setup (e.g., pullback, engulfing pattern, Ichimoku trend confirmation, etc.).
2. RVOL < 1.0 → Weak or Low-Quality Move
When RVOL is below 1.0:
Volume is below average
Moves are more likely to fail or reverse
Breakouts are unreliable
Triggers lack institutional participation
These bars are best avoided for trade entries.
Why This Indicator Is Useful
In many strategies, price alone is not enough.
RVOL acts as a filter to ensure that your signals occur during times when the market is actually active and committed.
Typical use cases:
Confirm trend-following entries
Validate pullbacks and breakout candles
Filter out low-volume chop
Identify session-based volume surges
Improve risk-to-reward quality by entering only during true momentum
Recommended Settings
EMA Length: 20
Threshold Line: 1.2
Works well on Forex, Crypto, and Indices
Best used on 15m, 30m, 1H, and 4H charts
DH EMA 28/72/200 Unified Ribbon (Scaled HTF)Unified EMA Ribbon (28/72/200)
This indicator merges two popular EMA systems — 21/55/200 and 34/89/200 — into a single, smoother trend-tracking ribbon.
Each pair of EMAs is averaged to create:
EMA 28 (average of 21 & 34)
EMA 72 (average of 55 & 89)
EMA 200 retained as long-term trend filter
The unified ribbon reduces noise, improves trend clarity, and provides clean pullback zones for high-probability entries, especially on the H1 timeframe.
HTF Bias & Session DashboardHTF Bias Dashboard is a lightweight tool that summarizes higher-timeframe direction and session context on any chart. It is designed for traders who want a quick directional overview directly on their chart.
Included components
• D1 and H4 Bias
Bias is calculated using a configurable EMA.
– If price is above the higher-timeframe EMA → bullish bias
– If price is below the higher-timeframe EMA → bearish bias
This provides a simple directional filter that helps avoid trades against the broader trend.
• Session Information
The dashboard detects the current UTC session and displays expected volatility conditions:
– Asia: low volatility / accumulation
– London: expansion
– New York: continuation or reversal conditions
This helps with timing decisions and understanding market behavior during different periods.
• Symbol and Info Row
Displays the active symbol along with a small info label for context.
How to use
This dashboard is intended for directional context only.
A common approach is:
– Trade in the direction of both D1 and H4 when they agree
– Be more cautious when the two biases diverge
– Consider session phase before making timing decisions
It works on any market and any timeframe.
Notes
• This tool does not include signals or alerts.
• It is meant for context only, not for generating entries or exits.
• This script is original, open-source, and provided for educational and research purposes.
Feedback and suggestions are welcome.
CCI Threshold HistogramSynopsis
The Custom CCI Indicator by Simon20cent enhances traditional CCI analysis with adjustable smoothing and a momentum-based histogram. The histogram highlights key thresholds, turning green above +100 and red below –100 to clearly identify strong bullish or bearish momentum. Both the CCI and smoothed CCI lines can be toggled for a cleaner view, making this tool effective for spotting momentum shifts, breakout conditions, and potential entry zones with improved clarity.
Price Volume Trend to buyThis indicator use PVT (price volume tendency) as background whith colors and labels to smart indicate if you are on buyer or seller scenario
3-Daumen-RegelThis indicator evaluates three key market conditions and summarizes them in a compact table using simple thumbs-up / thumbs-down signals. It’s designed specifically for daily timeframes and helps you quickly assess whether a market is showing technical strength or weakness.
The Three Checks
Price Above the 200-Day SMA
Indicates the long-term trend direction. A thumbs-up means the price is trading above the 200-day moving average.
Positive Performance During the First 5 Trading Days of the Year (YTD Start)
Measures early-year strength. If not enough bars are available, a warning is shown.
Price Above the YTD Level
Compares the current price to the first trading day’s close of the year.
Color Coding for Instant Clarity
Green: Condition met
Red: Condition not met
This creates a compact “thumbs check” that gives you a quick read on the market’s technical health.
Note
The indicator is intended for daily charts. A message appears if a different timeframe is used.
Sector Rotation - Risk Preference Indicator# Sector Rotation - Risk Preference Indicator
## Overview
This indicator measures market risk appetite by comparing the relative strength between **Aggressive** and **Defensive** sectors. It provides a clean, single-line visualization to help traders identify market sentiment shifts and potential trend reversals.
## How It Works
The indicator calculates a **Bullish/Bearish Ratio** by dividing the average price of aggressive sector ETFs by defensive sector ETFs, then normalizing to a baseline of 100.
**Formula:**
- Ratio = (Aggressive Sectors Average / Defensive Sectors Average) × 100
**Interpretation:**
- **Ratio > 100**: Risk-on sentiment (Aggressive sectors outperforming Defensive)
- **Ratio < 100**: Risk-off sentiment (Defensive sectors outperforming Aggressive)
- **Ratio ≈ 100**: Neutral (Both sector groups performing equally)
## Default Sectors
**Defensive Sectors** (Safe havens during uncertainty):
- XLP - Consumer Staples Select Sector SPDR Fund
- XLU - Utilities Select Sector SPDR Fund
- XLV - Health Care Select Sector SPDR Fund
**Aggressive Sectors** (Growth-oriented, higher risk):
- XLK - Technology Select Sector SPDR Fund
- XBI - SPDR S&P Biotech ETF
- XRT - SPDR S&P Retail ETF
## Features
✅ **Fully Customizable Sectors** - Choose any ETFs/tickers for each sector group
✅ **Smoothing Control** - Adjustable SMA period to reduce noise (default: 2)
✅ **Clean Visualization** - Single blue line for easy interpretation
✅ **Multi-timeframe Support** - Works on any timeframe
✅ **Lightweight** - Minimal calculations for fast performance
## Settings
### Defensive Sectors Group
- **Defensive Sector 1**: First defensive ETF ticker (default: XLP)
- **Defensive Sector 2**: Second defensive ETF ticker (default: XLU)
- **Defensive Sector 3**: Third defensive ETF ticker (default: XLV)
### Aggressive Sectors Group
- **Aggressive Sector 1**: First aggressive ETF ticker (default: XLK)
- **Aggressive Sector 2**: Second aggressive ETF ticker (default: XBI)
- **Aggressive Sector 3**: Third aggressive ETF ticker (default: XRT)
### Display Settings
- **Smoothing Length**: SMA period for ratio smoothing (default: 2, range: 1-50)
- Lower values = More responsive but noisier
- Higher values = Smoother but more lagging
## Use Cases
### 1. Market Regime Identification
- **Rising Ratio (trending up)** → Bull market / Risk-on environment
- Aggressive sectors leading, investors chasing growth
- Favorable for long positions in tech, growth stocks
- **Falling Ratio (trending down)** → Bear market / Risk-off environment
- Defensive sectors leading, investors seeking safety
- Consider defensive positioning or short opportunities
### 2. Divergence Analysis
- **Bullish Divergence**: Price makes new lows but ratio rises
- Suggests underlying strength returning
- Potential market bottom forming
- **Bearish Divergence**: Price makes new highs but ratio falls
- Suggests weakening momentum
- Potential market top forming
### 3. Trend Confirmation
- **Strong uptrend + Rising ratio** → Confirmed bullish trend
- **Strong downtrend + Falling ratio** → Confirmed bearish trend
- **Uptrend + Falling ratio** → Weakening trend, watch for reversal
- **Downtrend + Rising ratio** → Potential trend exhaustion
## Best Practices
⚠️ **Timeframe Selection**
- Recommended: Daily, 4H, 1H for cleaner signals
- Lower timeframes (15m, 5m) may produce noisy signals
⚠️ **Complementary Analysis**
- Use alongside price action and volume analysis
- Combine with support/resistance levels
- Not designed as a standalone trading system
⚠️ **Market Conditions**
- Most effective in trending markets
- Less reliable during ranging/consolidation periods
- Works best in liquid, well-traded sectors
⚠️ **Customization Tips**
- Can substitute with international sectors (EWU, EWZ, etc.)
- Can use crypto sectors (DeFi vs Layer1, etc.)
- Adjust smoothing based on trading style (day trading = 2-5, swing = 10-20)
## Display Options
### Default View (overlay=false)
- Shows in separate pane below chart
- Dedicated scale for ratio values
### Alternative View
- Can be moved to main chart pane (drag indicator)
I typically overlay this indicator on the SPY daily chart to observe divergences. I don’t focus on specific values but rather on the direction of the trend.
The author is not responsible for any trading losses incurred using this indicator.
## Support & Feedback
For questions, feature requests, or bug reports:
- Comment below
- Send a private message
- Check for updates regularly
If you find this indicator useful, please:
- ⭐ Leave a like/favorite
- 💬 Share your experience in comments
- 📊 Share charts showing interesting patterns
MTF Trading Helper & Multi AlertsHi dear fellows, I´m using this indicator for my trading, so every then and when I will publish updates on this one.
This indicator should help to identify the right trading setup. I´m using it to trade index futures and stocks.
MTF Trading Helper & Multi Alerts
Overview
This indicator provides a clear visual representation of trend direction across three timeframes. It helps traders identify trend alignment, potential reversals, and optimal entry/exit points by analyzing the relationship between different smoothed timeframes.
You can set up multiple alerts (as one alert in Tradingview)
How It Works
The indicator displays three colored circles representing the smoothed candle direction on three different timeframes:
Bottom plot represents the overall trend direction, the plot in the middle shows intermediate momentum, and the one on top captures short-term price action.
When a color change occurs, the circle appears in a darker shade to highlight the transition.
🟢 Green = Bullish - 🔴 Red = Bearish
This change can also trigger multiple alerts.
Timeframe Settings - important
Choose between two trading setups, either for:
Intraday 1-minute candles or 1h for swing trading. Set up your chart accordingly to that timeframe.
Intraday | 1Min chart candles
Swing | 1 hour chart candles
Plots
TF3 represents the overall trend direction (bottom), TF2 shows intermediate momentum (middle), and TF1 captures short-term price action (top).
Interpretation & Strategy Alerts
1. Trend Bullish (TF3 turns Green)
The higher timeframe has shifted bullish - a potential new uptrend is forming.
Example: You're watching ES-mini on the Intraday setting. TF3 turns green after being red for several days. This signals the broader trend may be shifting bullish - consider looking for long opportunities.
2. Trend Bearish (TF3 turns Red)
The higher timeframe has shifted bearish - consider protecting profits or exiting long positions.
Example: You hold a long position in Es-mini. TF3 turns red, indicating the macro trend is weakening. This is your signal to take profits or tighten stop-losses.
3. Possible Accumulation (TF3 Red + TF2 turns Green)
While the overall trend is still bearish, the medium timeframe shows buying pressure. Smart money may be accumulating - watch closely for a potential trend reversal.
Example: Es-mini has been in a downtrend (TF3 red). Suddenly TF2 turns green while TF3 remains red. This could indicate institutional buying before a reversal. Don't buy yet, but add it to your watchlist and wait for confirmation.
4. Trend Continuation (TF3 Green + TF2 turns Green)
The medium timeframe realigns with the bullish macro trend - a potential buying opportunity as momentum returns to the uptrend.
Example: Es-mini is in an uptrend (TF3 green). After a pullback, TF2 was red but now turns green again. The pullback appears to be over - this is a trend continuation signal and a potential entry point.
5. Buy the Dip (TF3 + TF2 Green + TF1 turns Green)
All timeframes are now aligned bullish. The short-term pullback is complete and price is resuming the uptrend - optimal entry for short-term trades.
Example: Es-mini is trending up (TF3 + TF2 green). A small dip caused TF1 to turn red briefly. When TF1 turns green again, all three timeframes are aligned - this is your "Buy the Dip" signal with strong confirmation.
6. Sell the Dip (TF3 + TF2 Green + TF1 turns Red)
Short-term weakness within an uptrend. This can be used to take partial profits, wait for a better entry, or trail stops tighter.
Example: You're long on ES-mini with TF3 and TF2 green. TF1 turns red, indicating short-term selling pressure. Consider taking partial profits here and wait for TF1 to turn green again (Buy the Dip) to add back to your position.
How to Use
Choose your scenario: Select "Intraday" 1min-chart for day trading or "Swing" 1h-chart for swingtrading
Enable alerts: Turn on the strategy alerts you want to receive in the settings
Wait for signals: Let the indicator notify you when conditions align
Confirm with price action: Always use additional confirmation before entering trades
Best Practices
✅ Use TF3 as your trend filter - only take longs when TF3 turns green and hold them :)
✅ Use TF2 for timing - wait for TF2 to align with TF3 for swings.
✅ Use TF2 for early entries (accumulation phase) when TF3 is still red. Watch out!
✅ Use TF1 for entries when TF3 and TF2 are green. Only buy if TF1 is red. Keep it short and sweet.
✅ Combine with support/resistance levels for better entries
✅ Use proper risk management - no indicator is 100% accurate
Disclaimer
This indicator is for educational purposes only. Past performance does not guarantee future results. Always do your own research and use proper risk management. Never risk more than you can afford to lose.
Psychological levels [Kodologic] Psychological levels
Markets are not random, they are driven by human psychology and algorithmic order flow. A well-known phenomenon in trading is the "Whole Number Bias" — the tendency for price to react significantly at clean, round numbers (e.g., Bitcoin at $95,000 or EURUSD at 1.0500).
Manually drawing horizontal lines at every round number is tedious, clutters your object tree, and distracts you from analyzing price action.
Psychological levels Numbers is a workflow utility designed to solve this problem. It automatically projects a clean, customizable grid of key price levels onto your chart, helping you instantly identify areas where liquidity and orders are likely to cluster.
Why This Indicator Helps Traders :
Professional traders know that "00" and "50" levels act as magnets for price. Here is how this tool assists in your analysis:
1. Institutional Footprints : Large institutions and bank algorithms often execute orders at whole numbers to simplify accounting. This script highlights these potential liquidity zones automatically.
2. Support & Resistance Discovery: You will often notice price wicking or reversing exactly on these grid lines. This helps in spotting natural support and resistance without needing complex technical analysis.
3. Cognitive Load Reduction: Instead of calculating where the next "major level" is, the grid is visually present, allowing you to focus on candlestick patterns and market structure.
Features :
Dynamic Calculation : The grid updates automatically as price moves, you never have to redraw lines.
Zero Clutter : The lines are drawn using code, meaning they do not appear in your manual drawing tools list or clutter your object tree.
Fully Customizable Step : You define what constitutes a "Round Number" for your specific asset class (Forex, Crypto, Indices, or Stocks).
Visual Control : Adjust line styles (Solid, Dotted, Dashed), colors, and transparency to keep your chart aesthetic and readable.
How to Use in Your Strategy :
1. Target Setting (Take Profit)
If you are in a long position, use the next upper grid line as a logical Take Profit area. Price often gravitates toward these whole numbers before reversing or consolidating.
2. Stop Loss Placement
Avoid placing Stop Losses exactly on a round number, as these are often "stop hunted." Instead, use the grid to visualize the level and place your stop slightly *below* or *above* the round number for better protection.
3. Confluence Trading
Do not use these lines in isolation. Look for Confluence :
Example: If a Fibonacci 61.8% level lines up exactly with a Round Number grid line, that level becomes a high-probability reversal zone.
Settings Guide (Important)
Since every asset is priced differently, you must adjust the "levels Step Size" to match your instrument:
Forex (e.g., EURUSD, GBPUSD): Set Step Size to `0.0050` (50 pips) or `0.0100` (100 pips).
Crypto (e.g., BTCUSD): Set Step Size to `500` or `1000`.
Indices (e.g., US30, SPX500): Set Step Size to `100` or `500`.
Gold (XAUUSD):** Set Step Size to `10`.
Disclaimer: This tool is for educational and visual aid purposes only. It does not provide buy or sell signals. Always manage your risk.
MFM – Light Context HUD (Minimal)Overview
MFM Light Context HUD is the free version of the Market Framework Model. It gives you a fast and clean view of the current market regime and phase without signals or chart noise. The HUD shows whether the asset is in a bullish or bearish environment and whether it is in a volatile, compression, drift, or neutral phase. This helps you read structure at a glance.
Asset availability
The free version works only on a selected list of five assets.
Supported symbols are
SP:SPX
TVC:GOLD
BINANCE:BTCUSD
BINANCE:ETHUSDT
OANDA:EURUSD
All other assets show a context banner only.
How it works
The free version uses fixed settings based on the original MFM model. It calculates the regime using a higher timeframe RSI ratio and identifies the current phase using simplified momentum conditions. The chart stays clean. Only a small HUD appears in the top corner. Full visual phases, ratio logic, signals, and auto tune are part of the paid version.
The free version shows the phase name only. It does not display colored phase zones on the chart.
Phase meaning
The Market Framework Model uses four structural phases to describe how the market
behaves. These are not signals but context layers that show the underlying environment.
Volatile (Phase 1)
The market is in a fast, unstable or directional environment. Price can move aggressively with
stronger momentum swings.
Compression (Phase 2)
The market is in a contracting state. Momentum slows and volatility decreases. This phase
often appears before expansion, but it does not predict direction.
Drift (Phase 3)
The market moves in a more controlled, persistent manner. Trends are cleaner and volatility
is lower compared to volatile phases.
No phase
No clear structural condition is active.
These phases describe market structure, not trade entries. They help you understand the conditions you are trading in.
Cross asset context
The Market Framework Model reads markets as a multi layer system. The full version includes cross asset analysis to show whether the asset is acting as a leader or lagger relative to its benchmark. The free version uses the same internal benchmark logic for regime detection but does not display the cross asset layer on the chart.
Cross asset structure is a core part of the MFM model and is fully available in the paid version.
Included in this free version
Higher timeframe regime
Current phase name
Clean chart output
Context only
Works on a selected set of assets
Not included
No forecast signals
No ratio leader or lagger logic
No MRM zones
No MPF timing
No auto tune
The full version contains all features of the complete MFM model.
Full version
You can find the full indicator here:
payhip.com
More information
Model details and documentation:
mfm.inratios.com
Momentum Framework Model free HUD indicator User Guide: mfm.inratios.com
Disclaimer
The Market Framework Model (MFM) and all related materials are provided for educational and informational purposes only. Nothing in this publication, the indicator, or any associated charts should be interpreted as financial advice, investment recommendations, or trading signals. All examples, visualizations, and backtests are illustrative and based on historical data. They do not guarantee or imply any future performance. Financial markets involve risk, including the potential loss of capital, and users remain fully responsible for their own decisions. The author and Inratios© make no representations or warranties regarding the accuracy, completeness, or reliability of the information provided. MFM describes structural market context only and should not be used as the sole basis for trading or investment actions.
By using the MFM indicator or any related insights, you agree to these terms.
© 2025 Inratios. Market Framework Model (MFM) is protected via i-Depot (BOIP) – Ref. 155670. No financial advice.
ICT Fair Value Gap (FVG) Detector │ Auto-Mitigated │ 2025Accurate ICT / Smart Money Concepts Fair Value Gap (FVG) detector
Features:
• Detects both Bullish (-FVG) and Bearish (+FVG) using strict 3-candle rule
• Boxes automatically extend right until price mitigates them
• Boxes auto-delete when price closes inside the gap (true mitigation)
• No repainting – 100% reliable
• Clean, lightweight, and works on all markets & timeframes
• Fully customizable colors and transparency
How to use:
– Bullish FVG (green) = potential support / buy zone in uptrend
– Bearish FVG (red) = potential resistance / sell zone in downtrend
Exactly matches The Inner Circle Trader (ICT) methodology used by thousands of SMC traders in 2024–2025.
Enjoy and trade safe!
Mean-Reversion with CooldownThis strategy requires no indicators or fundamental analysis. It is designed for longer-term positions and works especially well on unleveraged instruments with strong long-term upward trends, such as precious metals. Feel free to experiment with different timeframes — I’ve found that 1-hour charts work particularly well for cryptocurrencies.
The idea is to filter out ongoing bear phases as effectively as possible and capitalize on long-term bull runs.
The script implements an idea that came to me in a state of complete sleep deprivation: open a random long position with a fixed take-profit (TP) and a tight stop-loss (SL).
If the TP is hit — great, we simply try again.
If the SL is triggered — too bad, we pause for a while and then try again.
## Cooldown (Waiting) Mechanism
The waiting mechanism is simple: the more consecutive SL hits we get, the longer we wait before opening the next trade. The waiting time is measured in closed candles, and thus depends on the timeframe you are using.
## Two cooldown calculation modes are currently supported:
### 1. FIBONACCI
The cooldown follows the Fibonacci sequence, based on the number of consecutive losses:
1st loss → wait 1 bar
2nd loss → wait 1 bar
3rd loss → wait 2 or 3 bars (depending on definition)
4th loss → wait 3 or 5 bars
etc.
### 2. POWER OF TWO
The cooldown increases exponentially:
1st loss → wait 2 bars
2nd loss → wait 4 bars
3rd loss → wait 8 bars
4th loss → wait 16 bars
and so on, using the formula 2ⁿ.
## Configurable Parameters
### Cooldown Pause Calculation
The settings allow you to define the SL and TP as percentages of the position value.
The "Cooldown Pause Calculation" option determines how the next cooldown duration is computed after a losing trade.
The system keeps track of how many consecutive losses have occurred since the last profitable trade. That counter is then used to compute how many bars we must wait before opening the next position.
### Maximum Cooldown
The "Max Cooldown Candles" setting defines the maximum number of bars we are allowed to wait before placing a new trade. This prevents the strategy from “locking itself out” for too long and mitigates the fear of missing out (FOMO).
Once the cooldown duration reaches this maximum, the system essentially wraps around and starts the progression again. In the script, this is handled using a simple modulo operation based on the chosen maximum.
Bull/Bear/Consolidation Zones Hariss 369This indicator helps to identify bullish, bearish, and consolidation zones using EMA and ATR-based calculations. It visually highlights zones on the chart and provides buy and sell signals with ATR-based stop-loss (SL) and take-profit (TP) levels.
Key Features:
EMA Trend Filter: Determines the direction of the market.
Bull / Bear / Consolidation Zones: Colored zones to easily spot market phases.
ATR-Based SL & TP: Automatic calculation for each trade signal.
Buy / Sell Signals: Based on price relative to EMA and consolidation zones.
Relative Volume (RVOL) Filter: Optional filter to trade only when volume is significant, helping reduce low-probability signals.
Extended Zones: Option to extend zones forward until a breakout occurs.
Customizable Inputs: EMA length, ATR length, multipliers, RVOL period & multiplier, and toggle RVOL filter.
How to Use:
Identify bull/bear/consolidation zones on your chart. (These are already there) You can change the line as well zone color according to your needs.
Look for buy signals above EMA and consolidation zone, or sell signals below EMA and consolidation zone. The buy and sell labels are already there.
Confirm with RVOL filter (optional) to ensure higher volume support.
Use the plotted SL and TP levels for trade management.
This tool is designed for trend-following and market structure traders who want a visual guide to high-probability trading zones combined with volume confirmation.
One can also trail with EMA in trending market.
Super-AO with Risk Management Alerts Template - 11-29-25Super-AO with Risk Management: ALERTS & AUTOMATION Edition
Signal Lynx | Free Scripts supporting Automation for the Night-Shift Nation 🌙
1. Overview
This is the Indicator / Alerts companion to the Super-AO Strategy.
While the Strategy version is built for backtesting (verifying profitability and checking historical performance), this Indicator version is built for Live Execution.
We understand the frustration of finding a great strategy, only to realize you can't easily hook it up to your trading bot. This script solves that. It contains the exact same "Super-AO" logic and "Risk Management Engine" as the strategy version, but it is optimized to send signals to automation platforms like Signal Lynx, 3Commas, or any Webhook listener.
2. Quick Action Guide (TL;DR)
Purpose: Live Signal Generation & Automation.
Workflow:
Use the Strategy Version to find profitable settings.
Copy those settings into this Indicator Version.
Set a TradingView Alert using the "Any Alert() function call" condition.
Best Timeframe: 4 Hours (H4) and above.
Compatibility: Works with any webhook-based automation service.
3. Why Two Scripts?
Pine Script operates in two distinct modes:
Strategy Mode: Calculates equity, drawdowns, and simulates orders. Great for research, but sometimes complex to automate.
Indicator Mode: Plots visual data on the chart. This is the preferred method for setting up robust alerts because it is lighter weight and plots specific values that automation services can read easily.
The Golden Rule: Always backtest on the Strategy, but trade on the Indicator. This ensures that what you see in your history matches what you execute in real-time.
4. How to Automate This Script
This script uses a "Visual Spike" method to trigger alerts. Instead of drawing equity curves, it plots numerical values at the bottom of your chart when a trade event occurs.
The Signal Map:
Blue Spike (2 / -2): Entry Signal (Long / Short).
Yellow Spike (1 / -1): Risk Management Close (Stop Loss / Trend Reversal).
Green Spikes (1, 2, 3): Take Profit Levels 1, 2, and 3.
Setup Instructions:
Add this indicator to your chart.
Open your TradingView "Alerts" tab.
Create a new Alert.
Condition: Select SAO - RM Alerts Template.
Trigger: Select Any Alert() function call.
Message: Paste your JSON webhook message (provided by your bot service).
5. The Logic Under the Hood
Just like the Strategy version, this indicator utilizes:
SuperTrend + Awesome Oscillator: High-probability swing trading logic.
Non-Repainting Engine: Calculates signals based on confirmed candle closes to ensure the alert you get matches the chart reality.
Advanced Adaptive Trailing Stop (AATS): Internally calculates volatility to determine when to send a "Close" signal.
6. About Signal Lynx
Automation for the Night-Shift Nation 🌙
We are providing this code open source to help traders bridge the gap between manual backtesting and live automation. This code has been in action since 2022.
If you are looking to automate your strategies, please take a look at Signal Lynx in your search.
License: Mozilla Public License 2.0 (Open Source). If you make beneficial modifications, please release them back to the community!
Super-AO with Risk Management Strategy Template - 11-29-25Super-AO Strategy with Advanced Risk Management Template
Signal Lynx | Free Scripts supporting Automation for the Night-Shift Nation 🌙
1. Overview
Welcome to the Super-AO Strategy. This is more than just a buy/sell indicator; it is a complete, open-source Risk Management (RM) Template designed for the Pine Script community.
At its core, this script implements a robust swing-trading strategy combining the SuperTrend (for macro direction) and the Awesome Oscillator (for momentum). However, the real power lies under the hood: a custom-built Risk Management Engine that handles trade states, prevents repainting, and manages complex exit conditions like Staged Take Profits and Advanced Adaptive Trailing Stops (AATS).
We are releasing this code to help traders transition from simple indicators to professional-grade strategy structures.
2. Quick Action Guide (TL;DR)
Best Timeframe: 4 Hours (H4) and above. Designed for Swing Trading.
Best Assets: "Well-behaved" assets with clear liquidity (Major Forex pairs, BTC, ETH, Indices).
Strategy Type: Trend Following + Momentum Confirmation.
Key Feature: The Risk Management Engine is modular. You can strip out the "Super-AO" logic and insert your own strategy logic into the template easily.
Repainting: Strictly Non-Repainting. The engine calculates logic based on confirmed candle closes.
3. Detailed Report: How It Works
A. The Strategy Logic: Super-AO
The entry logic is based on the convergence of two classic indicators:
SuperTrend: Determines the overall trend bias (Green/Red).
Awesome Oscillator (AO): Measures market momentum.
The Signal:
LONG (+2): SuperTrend is Green AND AO is above the Zero Line AND AO is Rising.
SHORT (-2): SuperTrend is Red AND AO is below the Zero Line AND AO is Falling.
By requiring momentum to agree with the trend, this system filters out many false signals found in ranging markets.
B. The Risk Management (RM) Engine
This script features a proprietary State Machine designed by Signal Lynx. Unlike standard strategies that simply fire orders, this engine separates the Signal from the Execution.
Logic Injection: The engine listens for a specific integer signal: +2 (Buy) or -2 (Sell). This makes the code a Template. You can delete the Super-AO section, write your own logic, and simply pass a +2 or -2 to the RM_EngineInput variable. The engine handles the rest.
Trade States: The engine tracks the state of the trade (Entry, In-Trade, Exiting) to prevent signal spamming.
Aggressive vs. Conservative:
Conservative Mode: Waits for a full trend reversal before taking a new trade.
Aggressive Mode: Allows for re-entries if the trend is strong and valid conditions present themselves again (Pyramiding Type 1).
C. Advanced Exit Protocols
The strategy does not rely on a single exit point. It employs a "Layered Defense" approach:
Hard Stop Loss: A fixed percentage safety net.
Staged Take Profits (Scaling Out): The script allows you to set 3 distinct Take Profit levels. For example, you can close 10% of your position at TP1, 10% at TP2, and let the remaining 80% ride the trend.
Trailing Stop: A standard percentage-based trailer.
Advanced Adaptive Trailing Stop (AATS): This is a highly sophisticated volatility stop. It calculates market structure using Hirashima Sugita (HSRS) levels and Bollinger Bands to determine the "floor" and "ceiling" of price action.
If volatility is high: The stop loosens to prevent wicking out.
If volatility is low: The stop tightens to protect profit.
D. Repainting Protection
Many Pine Script strategies look great in backtesting but fail in live trading because they rely on "real-time" price data that disappears when the candle closes.
This Risk Management engine explicitly pulls data from the previous candle close (close , high , low ) for its calculations. This ensures that the backtest results you see match the reality of live execution.
4. For Developers & Modders
We encourage you to tear this code apart!
Look for the section titled // Super-AO Strategy Logic.
Replace that block with your own RSI, MACD, or Price Action logic.
Ensure your logic outputs a 2 for Buy and -2 for Sell.
Connect it to RM_EngineInput.
You now have a fully functioning Risk Management system for your custom strategy.
5. About Signal Lynx
Automation for the Night-Shift Nation 🌙
This code has been in action since 2022 and is a known performer in PineScript v5. We provide this open source to help the community build better, safer automated systems.
If you are looking to automate your strategies, please take a look at Signal Lynx in your search.
License: Mozilla Public License 2.0 (Open Source). If you make beneficial modifications, please release them back to the community!
SHAMAZZ = Smoothed Heikin Ashi + MA + ZigZagSHAMAZZ: Smoothed Heikin Ashi + Moving Averages + ZigZag Structure
This script is a visual analysis tool that combines three components in one place:
Smoothed Heikin Ashi candles
• Candles are generated using a two-stage exponential smoothing process applied to open, high, low, and close
• Helps visualize general price direction and candle transitions
• Supports optional multi-timeframe views using TradingView’s request.security()
Moving Averages
• Includes two standard moving averages (SMA 50 and SMA 200 by default)
• These are plotted on the same timeframe as the main chart or a selected higher timeframe
• No trading signals or strategies are generated from the averages
ZigZag Pivot Mapping
• Identifies swing highs and lows based on user-selected pivot length
• Classifies pivots into simple categories such as higher high, lower high, higher low, or lower low
• Draws connecting lines between detected pivots
• Can optionally display small labels showing the pivot type
• The ZigZag is not predictive and only reflects swings already formed by the chosen pivot settings
Purpose
The script is meant as a charting helper for traders who want to visualize smoothed candles, major moving averages, and swing structure without switching indicators. It does not generate signals, alerts, or trading advice. It does not imply future outcomes, accuracy, or profitability.
Note on Higher Timeframes
When higher-timeframe values are requested, the script only displays confirmed higher-timeframe candle closes. No lookahead behavior is intended. Users who want the safest and strictest mode should keep all additional timeframe options disabled and use the indicator on one timeframe only.
How to Use
• Turn components on or off depending on your workflow
• Adjust pivot length to make the ZigZag more or less sensitive
• Use smoothed candles and moving averages as visual references
• Use ZigZag swings only for structure mapping, not for trade signals or forecasts
This tool is provided for visual analysis only and does not promise performance or predictive value.
$TGM | Topological Geometry Mapper (Custom)TGM | Topological Geometry Mapper (Custom) – 2025 Edition
The first indicator that reads market structure the way institutions actually see it: through persistent topological features (Betti-1 collapse) instead of lagging price patterns.
Inspired by algebraic topology and persistent homology, TGM distills regime complexity into a single, real-time proxy using the only two macro instruments that truly matter:
• CBOE:VIX – market fear & convexity
• TVC:DXY – dollar strength & global risk appetite
When the weighted composite β₁ persistence drops below the adaptive threshold → market structure radically simplifies. Noise dies. Order flow aligns. A directional explosion becomes inevitable.
Features
• Structural Barcode Visualization – instantly see complexity collapsing in real time
• Dynamic color system:
→ Neon green = long breakout confirmed
→ red = short breakout confirmed
→ yellow = simplification in progress (awaiting momentum)
→ deep purple = complex/noisy regime
• Clean HUD table with live β₁ value, threshold, regime status and timestamp
• Built-in high-precision alerts (Long / Short / Collapse)
• Zero repaint – uses only confirmed data
• Works on every timeframe and every market
Best used on:
BTC, ETH, ES/NQ, EURUSD, GBPUSD, NAS100, SPX500, Gold – anywhere liquidity is institutional.
This is not another repainted RSI or MACD mashup.
This is structural regime detection at the topological level.
Welcome to the future of market geometry.
Made with love for the real traders.
Open-source. No paywalls. No BS.
#topology #betti #smartmoney #ict #smc #orderflow #regime #institutional
🗓️ FTD Cycle Lite Tracker🗓️ FTD Cycle Lite Tracker (Open Source)This is the simplified, open-source companion to the premium FTD SPIKE PREDICTOR - ML Model.This Lite version focuses purely on time-based cyclic analysis, highlighting the periods when the market is approaching the most well-known FTD-related time windows, based on historical, cyclic patterns.It's the perfect tool for traders who want clean, visual confirmation of anticipated cyclic dates without the complexity or predictive power of a multi-factor model.Key Features of the Lite Version:T+35 Cycle Tracking: Highlights the approximate 49-day calendar cycle (representing 35 trading days) often associated with mandatory Failures-to-Deliver clearing.147-Day Major Cycle: Highlights the long-term institutional cycle commonly observed in assets with complex contract deadlines, anchored from the January 28, 2021 date.Custom Anchor Points: Both cycles allow you to adjust the anchor date to suit different ticker-specific patterns.Visual Windows: Provides clear background shading and shape markers to indicate when the critical 5-day cycle windows are active.👑 Upgrade to the Full Prediction Engine!The open-source Lite version only gives you the calendar dates. The full, proprietary indicator goes far beyond simple calendar counting by telling you how probable a spike is on those dates, and which other factors are confirming the risk.Why Upgrade?FeatureFTD Cycle Lite (Free)FTD SPIKE PREDICTOR (Premium)OutputCalendar Dates0-100% Probability ScoreLogic2 Time Cycles Only7 Weighted Features (ML Model)ConfirmationNoneVolume, Price, Volatility, OPEX, Swap RollConfidenceNone95% Confidence IntervalsSignalsDate MarkersCritical Alerts & Feature BreakdownUnlock the Full PowerYou can get the FTD SPIKE PREDICTOR - ML Model for a one-time fee of $50.00.Since TradingView's invite-only feature is not available, you can contact me directly to gain access:TradingView: Timmy741X.com (Twitter): TimmyCrypto78






















