matrixx Global Sessions + Good/Premium Spread ZonesSimple (enough) Script that allows you to visualize the major trading sessions, with some QoL stuff, Includes a "Monday Open" bar for reference when zooming out.
By default no one 'session' is turned on; instead, we have;
Good Zone - where spread tends to close up enough for (me) to trade in the 1-minute timezones
Premium Zone - where the tightest spreads tend to happen and I (you?) can get more aggressive with Stop Losses, and moment-to-moment trade accuracy.
The Monday Open - for reference.
You are able to go into the settings and turn these on and off at will, making any combination of 'zones' you prefer, and can colour code them, as well.
Points of Difference;
You can turn on and off any group or set of sessions for an overview;
Additionally, this is coded so that if there is a "Daylight Saving" or other localized timezone shift, it should be reflected correcty, as timezones are calculated based on each sessions' data, not arbitrarily with +/- as most of the other scripts that do similar to this one.
Monday Open
you can toggle sessions, or instead toggle the 'off hour' zones, at will
Multitimeframe
MTF Fibonacci Pivots with Mandelbrot FractalsMTF Fibonacci Pivots with Mandelbrot Fractals: Advanced Market Structure Analysis
Overview
The MTF Fibonacci Pivots with Mandelbrot Fractals indicator represents a significant advancement in technical analysis by combining multi-timeframe Fibonacci pivot levels with sophisticated fractal pattern recognition. This powerful tool identifies key support and resistance zones while predicting potential price reversals with remarkable accuracy.
Key Capabilities
This indicator provides traders with three distinct layers of market structure analysis:
Automatic Timeframe Adaptation: The primary pivot set automatically adjusts to your chart's timeframe, ensuring relevant support and resistance levels for your specific trading horizon.
1-Year Fibonacci Pivots: The second layer displays yearly pivots that reveal long-term market cycles and institutional price levels that often act as significant reversal points.
3-Year Fibonacci Pivots: The third layer unveils major market structure zones that typically remain relevant for extended periods, offering strategic context for position trading and long-term investment decisions.
Predictive Technology
What truly distinguishes this indicator is its advanced predictive capability powered by:
Mandelbrot Fractal Pattern Recognition: The indicator implements a sophisticated fractal detection algorithm that identifies recurring price patterns across multiple timeframes. Unlike conventional fractal indicators, it incorporates noise filtering and adaptive sensitivity to market volatility.
Tesla's 3-6-9 Principle Integration: The system incorporates Nikola Tesla's mathematical principle through a cubic Mandelbrot equation (Z_{n+1} = Z_n^3 + C where Z_0 = 0), creating a unique approach to pattern recognition that aligns with natural market rhythms.
Historical Pattern Matching: When a current price pattern exhibits strong similarity to historical formations, the indicator generates predictive targets with confidence ratings. Each prediction undergoes rigorous validation against multiple parameters including trend alignment, volatility context, and mathematical coherence.
Visual Intelligence System
The indicator's visual presentation enhances trading decision-making through:
Confidence-Based Visualization: Predictions display with intuitive star ratings, percentage confidence scores, and contextual information including price movement magnitude and estimated time to target.
Adaptive Color Harmonization: The color system intelligently adjusts to provide optimal visibility while maintaining a professional appearance suitable for any chart setup.
Trend Alignment Indicators: Each prediction includes references to the broader trend context, helping traders avoid counter-trend trades unless the reversal signal carries exceptional strength.
Strategic Applications
This indicator excels in multiple trading scenarios:
Intraday Trading: Identify high-probability reversal zones with precise timing
Swing Trading: Anticipate significant market turns at key structural levels
Position Trading: Recognize major cycle shifts for strategic entry and exit
The automatic 1-year and 3-year Fibonacci pivots provide institutional-grade reference points that typically define major market movements. These longer timeframes reveal critical zones that might be invisible on shorter-term analysis, giving you a significant edge in understanding where price is likely to encounter substantial buying or selling pressure.
This innovative approach to market analysis combines classical Fibonacci mathematics with cutting-edge fractal theory to create a comprehensive market structure visualization system that illuminates both present support/resistance levels and future price targets with exceptional clarity.
Setting Up MTF Fibonacci Pivots with Mandelbrot Fractals
Initial Setup
Adding this indicator to your TradingView charts is straightforward:
Navigate to the "Indicators" button on your chart toolbar
Search for "MTF Fibonacci Pivots with Mandelbrot Fractals"
Select the indicator to add it to your chart
A configuration panel will appear with various setting categories
Recommended Settings
The indicator comes pre-configured with optimal default settings, but you may want to adjust them based on your trading style:
For Day Trading (Timeframes 1-minute to 1-hour)
Pivots Timeframe 1: Auto (automatically adapts to your chart)
Pivots Timeframe 2: Daily
Pivots Timeframe 3: Weekly
Fractal Sensitivity: 2-3
Fractal Lookback Period: 20
Prediction Strength: 2
Color Theme: High Contrast or Dark Mode
For Swing Trading (Timeframes 4-hour to Daily)
Pivots Timeframe 1: Daily
Pivots Timeframe 2: Weekly
Pivots Timeframe 3: Monthly
Fractal Sensitivity: 1-2
Fractal Lookback Period: 30
Prediction Strength: 2-3
Color Theme: Default or Dimmed
For Position Trading (Timeframes Daily to Weekly)
Pivots Timeframe 1: Weekly
Pivots Timeframe 2: Monthly
Pivots Timeframe 3: Quarterly
Fractal Sensitivity: 1
Fractal Lookback Period: 50
Prediction Strength: 1
Color Theme: Monochrome or Pastel
Restoring Default Settings
If you've adjusted settings and wish to return to the defaults:
Right-click on the indicator name on your chart
Select "Settings" from the context menu
In the settings dialog, look for the "Reset All" button at the bottom
Confirm the reset when prompted
Alternatively, you can remove the indicator and add it again for a fresh start with default settings.
Advanced Settings Guidance
Visual Appearance
Use Gradient Colors: Enable for better visual differentiation between pivot levels
Color Transparency: 15% provides an optimal balance between visibility and chart clutter
Line Width: 1-2 for cleaner charts, 3+ for enhanced visibility
Fractal Analysis
Enable Fractal Analysis: Keep enabled for prediction capabilities
Fractal Box Spacing: Higher values (5-10) for cleaner displays, lower values (1-3) for more signals
Maximum Forecast Bars: 20 is optimal for most timeframes, adjust higher for longer predictions
Performance Considerations
Enable Self-Optimization: Keep enabled to maintain smooth chart performance
Resource Priority: Use "Balanced" for most computers, "Performance" for older systems
Force Pivot Display: Enable only when checking specific historical periods
Common Setup Mistakes to Avoid
Setting all timeframes too close together (e.g., Daily, Daily, Weekly) reduces the multi-timeframe advantage
Using high fractal sensitivity (4+) on noisy markets creates excessive signals
Setting fractal box spacing too low causes cluttered prediction boxes
Disabling self-optimization may cause performance issues on complex charts
Using incompatible color themes for your chart background reduces visibility
The indicator's power comes from its default 1-year and 3-year Fibonacci pivot settings, which highlight institutional levels while the auto-timeframe setting adapts to your trading horizon. These carefully balanced defaults provide an excellent starting point for most traders.
For optimal results, I recommend making minimal adjustments at first, then gradually customizing settings as you become familiar with the indicator's behavior in your specific markets and timeframes.
Screenshots:
MACD with TrendIndicator Name: MACD with Trend & Multi-Timeframe Dashboard
Why Use This Indicator?
Two MACDs for Double Confirmation:
It integrates both a standard MACD (fast/slow lengths of your choice) and a Trend MACD (longer lengths). The standard MACD identifies short-term momentum shifts, while the Trend MACD helps confirm the higher-level market trend.
Multi-Timeframe 50/200 SMA Overview:
A built-in dashboard quickly shows whether the 50-period moving average is above or below the 200-period moving average across multiple timeframes (Monthly, Weekly, Daily, etc.). At a glance, you can see if higher timeframes agree with your immediate trading setup.
Clear Buy/Sell Signals:
The script plots buy arrows when the MACD histogram crosses from negative to positive, plus an additional label for the Trend MACD crossing. The same goes for sell signals if momentum flips from positive to negative. This clarity can reduce guesswork.
Customizable & Intuitive:
Easily adjust moving average types (SMA or EMA), lengths, and source inputs to suit different asset classes or personal preferences. Visual color coding helps you quickly interpret bullish vs. bearish conditions.
Recommended Trading Approach
Identify Overall Trend
Check the Trend MACD histogram and the multi-timeframe dashboard (50/200 SMAs). If you see bullish alignment on higher timeframes (e.g., Daily, Weekly) and the Trend MACD is above zero, you know the market environment is supportive for long trades.
Pinpoint Entry Using Standard MACD
Wait for the standard MACD histogram to cross above zero or for a labeled “Buy Signal.” This indicates short-term momentum turning bullish in sync with the broader trend. If the market is already trending up (confirmed by the dashboard), the probability of a successful long entry often improves.
Set a Stop-Loss & Take-Profit
While not included in the code, adding an ATR- or price-based stop-loss can protect against sudden reversals. A simple approach is risking 1–2% per trade and aiming for a 1.5–2× reward relative to that risk.
Monitor Sell Signals
If the short-term MACD crosses below zero—triggering a “Sell Signal”—and the Trend MACD also turns down (or the dashboard flips bearish), consider exiting the position or tightening stops. This alignment of short- and long-term indicators often signals a shift in momentum that could threaten your open profits.
Summary
The MACD with Trend & Multi-Timeframe Dashboard is a versatile, all-in-one toolkit. It combines the immediacy of short-term MACD signals, the validation of a longer-term trend oscillator, and the broader insight of multi-timeframe moving averages. Whether you are a swing trader looking for alignment across bigger trends or a shorter-term trader wanting clear momentum triggers, this indicator helps streamline decision-making and reduce noise.
Disclaimer: As with all technical analysis tools, there is no guarantee of success. Always combine indicator signals with sound risk management and a thorough understanding of market conditions
Multi-Timeframe Stochastic RSI ArrowsMulti-Timeframe Stochastic RSI Arrows Indicator by The Venetian
Dear Moderators before you torch me alive theres nothing groundbreaking just very handy indicator for some users.
This indicator provides traders with a jet fighter-style heads-up display for market momentum across multiple timeframes. By displaying Stochastic RSI directional arrows for 12 different timeframes simultaneously, it offers a comprehensive view of market conditions without requiring multiple chart windows.
How It Works
The indicator calculates the Stochastic RSI for each of 12 common timeframes (1m to 3M) and represents directional movements with intuitive arrows:
- ▲ Green up arrow = Rising momentum
- ▼ Red down arrow = Falling momentum
- ◄► Yellow horizontal arrows = Flat/sideways momentum
- ► Gray right arrow = Just peaked (crossed above overbought)
- ◄ Gray left arrow = Just bottomed (crossed below oversold)
Each timeframe's status appears with its label (e.g., "1m ▲") in a clean, vertically-stacked display using ATR-based spacing to maintain consistent visual appearance regardless of price scale.
Key Features
- ATR-Based Spacing : Uses Average True Range to maintain consistent distances between labels even as chart scale changes
- Multi-Timeframe Analysis: Easily spot divergences and confluences across timeframes (1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 1D, 1W, 1M, 3M)
- Sensitivity Control: Adjust flat detection sensitivity to filter out noise
- Customisable Appearance: Modify arrow size, vertical spacing, and show/hide timeframe labels
- Overbought/Oversold Detection: Highlights when momentum has peaked or bottomed at extreme levels
- Trading Applications
- Trend Alignment: Quickly identify when multiple timeframes align in the same direction
- Divergence Detection: Spot when shorter timeframes begin to shift against longer ones
- Entry/Exit Timing: Use crossovers of significant timeframes as potential signals
- Market Context: Maintain awareness of the bigger picture while trading shorter timeframes
This indicator doesn't break new ground technically but excels in presenting complex multi-timeframe information in a clean, actionable format — much like a pilot's heads-up display provides critical information at a glance. The ATR-based positioning ensures consistent visibility across different instruments and market conditions.
Great effort has been made for this script to adhere to TradingView's Pine Script house rules and focuses on trader usability rather than introducing novel technical concepts.
FlexATRFlexATR: A Dynamic Multi-Timeframe Trading Strategy
Overview: FlexATR is a versatile trading strategy that dynamically adapts its key parameters based on the timeframe being used. It combines technical signals from exponential moving averages (EMAs) and the Relative Strength Index (RSI) with volatility-based risk management via the Average True Range (ATR). This approach helps filter out false signals while adjusting to varying market conditions — whether you’re trading on a daily chart, intraday charts (30m, 60m, or 5m), or even on higher timeframes like the 4-hour or weekly charts.
How It Works:
Multi-Timeframe Parameter Adaptation: FlexATR is designed to automatically adjust its indicator settings depending on the timeframe:
Daily and Weekly: On higher timeframes, the strategy uses longer periods for the fast and slow EMAs and standard periods for RSI and ATR to capture more meaningful trend confirmations while minimizing noise.
Intraday (e.g., 30m, 60m, 5m, 4h): The parameters are converted from “days” into the corresponding number of bars. For instance, on a 30-minute chart, a “day” might equal 48 bars. The preset values for a 30-minute chart have been slightly reduced (e.g., a fast EMA is set at 0.35 days instead of 0.4) to improve reactivity while maintaining robust filtering.
Signal Generation:
Entry Signals: The strategy enters long positions when the fast EMA crosses above the slow EMA and the RSI is above 50, and it enters short positions when the fast EMA crosses below the slow EMA with the RSI below 50. This dual confirmation helps ensure that signals are reliable.
Risk Management: The ATR is used to compute dynamic levels for stop loss and profit target:
Stop Loss: For a long position, the stop loss is placed at Price - (ATR × Stop Loss Multiplier). For a short position, it is at Price + (ATR × Stop Loss Multiplier).
Profit Target: The profit target is similarly set using the ATR multiplied by a designated profit multiplier.
Dynamic Trailing Stop: FlexATR further incorporates a dynamic trailing stop (if enabled) that adjusts according to the ATR. This trailing stop follows favorable price movements at a distance defined by a multiplier, locking in gains as the trend develops. The use of a trailing stop helps protect profits without requiring a fixed exit point.
Capital Allocation: Each trade is sized at 10% of the total equity. This percentage-based position sizing allows the strategy to scale with your account size. While the current setup assumes no leverage (a 1:1 exposure), the inherent design of the strategy means you can adjust the leverage externally if desired, with risk metrics scaling accordingly.
Visual Representation: For clarity and accessibility (especially for those with color vision deficiencies), FlexATR employs a color-blind friendly palette (the Okabe-Ito palette):
EMA Fast: Displayed in blue.
EMA Slow: Displayed in orange.
Stop Loss Levels: Rendered in vermilion.
Profit Target Levels: Shown in a distinct azzurro (light blue).
Benefits and Considerations:
Reliability: By requiring both EMA crossovers and an RSI confirmation, FlexATR filters out a significant amount of market noise, which reduces false signals at the expense of some delayed entries.
Adaptability: The automatic conversion of “day-based” parameters into bar counts for intraday charts means the strategy remains consistent across different timeframes.
Risk Management: Using the ATR for both fixed and trailing stops allows the strategy to adapt to changing market volatility, helping to protect your capital.
Flexibility: The strategy’s inputs are customizable via the input panel, allowing traders to fine-tune the parameters for different assets or market conditions.
Conclusion: FlexATR is designed as a balanced, adaptive strategy that emphasizes reliability and robust risk management across a variety of timeframes. While it may sometimes enter trades slightly later due to its filtering mechanism, its focus on confirming trends helps reduce the likelihood of false signals. This makes it particularly attractive for traders who prioritize a disciplined, multi-timeframe approach to capturing market trends.
Ben Adaji Time Zone CheckerIf you are trading from Nigeria, you need to set your TradingView timezone to West Africa Time (WAT, UTC+1). This ensures that your charts, market sessions, and time-based indicators align correctly with your local time.
To set this up on TradingView:
Click on the gear icon (Chart Settings).
Navigate to the Time Zone section.
Select UTC+1:00 West Africa Time (WAT) from the list.
This adjustment helps you track market movements accurately in sync with your local trading hours.
Market Structure Break with Volume & ATR#### Indicator Overview:
The *Market Structure Break with Volume & ATR (MSB+VolATR)* indicator is designed to identify significant market structure breakouts and breakdowns using a combination of price action, volume analysis, and volatility (ATR). It is particularly useful for traders who rely on higher timeframes for swing trading or positional trading. The indicator highlights bullish and bearish breakouts, retests, fakeouts, and potential buy/sell signals based on RSI overbought/oversold conditions.
---
### Key Features:
1. *Market Structure Analysis*:
- Identifies swing highs and lows on a user-defined higher timeframe.
- Detects breakouts and breakdowns when price exceeds these levels with volume and ATR validation.
2. *Volume Validation*:
- Ensures breakouts are accompanied by above-average volume, reducing the likelihood of false signals.
3. *ATR Filter*:
- Filters out insignificant breakouts by requiring the breakout size to exceed a multiple of the ATR.
4. *RSI Integration*:
- Adds a momentum filter by considering overbought/oversold conditions using RSI.
5. *Visual Enhancements*:
- Draws colored boxes to highlight breakout zones.
- Labels breakouts, retests, and fakeouts for easy interpretation.
- Displays stop levels for potential trades.
6. *Alerts*:
- Provides alert conditions for buy and sell signals, enabling real-time notifications.
---
### Input Settings and Their Effects:
1. **Timeframe (tf):
- Determines the higher timeframe for market structure analysis.
- *Effect*: A higher timeframe (e.g., 1D) reduces noise and provides more reliable swing points, while a lower timeframe (e.g., 4H) may generate more frequent but less reliable signals.
2. **Lookback Period (length):
- Defines the number of historical bars used to identify significant highs and lows.
- *Effect*: A longer lookback period (e.g., 50) captures broader market structure, while a shorter period (e.g., 20) reacts faster to recent price action.
3. **ATR Length (atr_length):
- Sets the period for ATR calculation.
- *Effect*: A shorter ATR length (e.g., 14) reacts faster to recent volatility, while a longer length (e.g., 21) smooths out volatility spikes.
4. **ATR Multiplier (atr_multiplier):
- Filters insignificant breakouts by requiring the breakout size to exceed ATR × multiplier.
- *Effect*: A higher multiplier (e.g., 0.2) reduces false signals but may miss smaller breakouts.
5. **Volume Multiplier (volume_multiplier):
- Sets the volume threshold for breakout validation.
- *Effect*: A higher multiplier (e.g., 1.0) ensures stronger volume confirmation but may reduce the number of signals.
6. **RSI Length (rsi_length):
- Defines the period for RSI calculation.
- *Effect*: A shorter RSI length (e.g., 10) makes the indicator more sensitive to recent price changes, while a longer length (e.g., 20) smooths out RSI fluctuations.
7. *RSI Overbought/Oversold Levels*:
- Sets the thresholds for overbought (default: 70) and oversold (default: 30) conditions.
- *Effect*: Adjusting these levels can make the indicator more or less conservative in generating signals.
8. **Stop Loss Multiplier (SL_Multiplier):
- Determines the distance of the stop-loss level from the entry price based on ATR.
- *Effect*: A higher multiplier (e.g., 2.0) provides wider stops, reducing the risk of being stopped out prematurely but increasing potential losses.
---
### How It Works:
1. *Breakout Detection*:
- A bullish breakout occurs when the close exceeds the highest high of the lookback period, with volume above the threshold and breakout size exceeding ATR × multiplier.
- A bearish breakout occurs when the close falls below the lowest low of the lookback period, with similar volume and ATR validation.
2. *Retest Logic*:
- After a breakout, if price retests the breakout zone without closing beyond it, a retest label is displayed.
3. *Fakeout Detection*:
- If price briefly breaks out but reverses back into the range, a fakeout label is displayed.
4. *Buy/Sell Signals*:
- A sell signal is generated when price reverses below a bullish breakout zone and RSI is overbought.
- A buy signal is generated when price reverses above a bearish breakout zone and RSI is oversold.
5. *Stop Levels*:
- Stop-loss levels are plotted based on ATR × SL_Multiplier, providing a visual guide for risk management.
---
### Who Can Use It and How:
1. *Swing Traders*:
- Use the indicator on daily or 4-hour timeframes to identify high-probability breakout trades.
- Combine with other technical analysis tools (e.g., trendlines, Fibonacci levels) for confirmation.
2. *Positional Traders*:
- Apply the indicator on weekly or daily charts to capture long-term trends.
- Use the stop-loss levels to manage risk over extended periods.
3. *Algorithmic Traders*:
- Integrate the buy/sell signals into automated trading systems.
- Use the alert conditions to trigger trades programmatically.
4. *Risk-Averse Traders*:
- Adjust the ATR and volume multipliers to filter out low-probability trades.
- Use wider stop-loss levels to avoid premature exits.
---
### Where to Use It:
- *Forex*: Identify breakouts in major currency pairs.
- *Stocks*: Spot trend reversals in high-volume stocks.
- *Commodities*: Trade breakouts in gold, oil, or other commodities.
- *Crypto*: Apply to Bitcoin, Ethereum, or other cryptocurrencies for volatile breakout opportunities.
---
### Example Use Case:
- *Timeframe*: 1D
- *Lookback Period*: 50
- *ATR Length*: 14
- *ATR Multiplier*: 0.1
- *Volume Multiplier*: 0.5
- *RSI Length*: 14
- *RSI Overbought/Oversold*: 70/30
- *SL Multiplier*: 1.5
In this setup, the indicator will:
1. Identify significant swing highs and lows on the daily chart.
2. Validate breakouts with volume and ATR filters.
3. Generate buy/sell signals when price reverses and RSI confirms overbought/oversold conditions.
4. Plot stop-loss levels for risk management.
---
### Conclusion:
The *MSB+VolATR* indicator is a versatile tool for traders seeking to capitalize on market structure breakouts with added confirmation from volume and volatility. By customizing the input settings, traders can adapt the indicator to their preferred trading style and risk tolerance. Whether you're a swing trader, positional trader, or algorithmic trader, this indicator provides actionable insights to enhance your trading strategy.
JL - DWM OHLCThis indicator plots the following price levels on your chart automatically AND will not show up if you are using a timeframe bigger than 60 minutes, 1 day, or 1 week.
Here are the price levels that are automatically plotted for you, and so you know the styling is different for Daily, Weekly, Monthly levels so you can easily distinguish between them:
- Prior Day: High / Low / Close
- Current Day: Open
- Prior Week: High / Low / Close
- Current Week: Open
- Prior Month: High / Low / Close
- Current Month: Open
These plots are timeframe dependent and will not plot on subsequently higher timeframes, here is how they work:
Daily Price Levels are only shown on timeframes that are smaller than 60 minutes.
Weekly Price Levels are only shown on timeframes smaller than 1 Day.
Monthly Price Levels are only shown on timeframes smaller than 1 Week.
This way, you can turn on the indicator and not have to think about turning off certain price levels if you switch to a larger / longer timeframe than what you typically use.
For example, Daily OHLC price levels will quickly clutter the 60 minute chart, and likely you don't need to know the HLC of the Prior Day if you are looking at the 60 minute chart. Therefor it may be helpful to automatically hide the Daily price level plots, and only show the Weekly and Monthly plots on the 60 minute timeframe.
I hope you find this indicator helpful, thanks for reading.
Air Gap MTF with alert settingsWhat it shows:
This indicator will show a horizontal line at a price where each EMAs are on on different time frames, which will remove the effort of having to flick through different time frames or look at different chart.
The lines itself will move in real time as price moves and therefore as the EMA values changes so no need to manually adjustment the lines.
How to use it:
The price gap between each of the lines are known as "air gaps", which are essentially zones price can move with less resistance. Therefore bigger the airgap there is more likely more movement in price.
In other words, where lines are can be a resistance (or support) and can expect price stagnation or rejection.
On the chart it is clear to see lines are acting as resistances/supports.
Key settings:
The time frame are fixed to: 30min, 1hr and 4hr. This cannot be changed as of now.
EMA values for each time frame are user changeable in the settings, and up to 4 different values can be chosen for each time frame. Default is 5,12,34 and 50 for each timeframe.
Line colour, thickness and style can be user adjusted. Start point for where line will be drawn can be changed in the settings, either: start of day, user defined start or across the chart. In case of user defined scenario user can input a number that specifies a offset from current candle.
Label colour, font, alignment, text size and text itself can be user adjusted in the settings. Price can be also displayed if user chooses to do so. Position of label (offset from current candle) is user specified and can be adjusted by the user.
Both the lines and labels can be turned off (both and individually), for each lines.
Alert Settings:
Manually, user can set alerts for when price crosses a specific line.
This can be done by:
right click on any of line
choose first option (add alert on...)
On the second option under condition, use the dropdown menu to choose the desired EMA/timeframe to set alert for.
Hit "create" at bottom right of option
----------------------------------------------------------------------
If anything is not clear please let me know!
Clean OHLC Lines | BaksPlots clean, non-repainting OHLC lines from higher timeframes onto your chart. Ideal for tracking key price levels (open, high, low, close) with precision and minimal clutter.
Core Functionality
Clean OHLC Lines = Historical Levels + Non-Repainting Logic
• Uses lookahead=on to anchor historical lines, ensuring no repainting.
• Displays OHLC lines for customizable timeframes (15min to Monthly).
• Optional candlestick boxes for visual context.
Key Features
• Multi-Timeframe OHLC:
Plot lines from 15min, 30min, 1H, 4H, Daily, Weekly, or Monthly timeframes.
• Non-Repainting Logic:
Historical lines remain static and never recalculate.
• Customizable Styles:
Adjust colors, line widths (1px-4px), and transparency for high/low/open/close lines.
• Candle Display:
Toggle candlestick boxes with bull/bear colors and adjustable borders.
• Past Lines Limit:
Control how many historical lines are displayed (1-500 bars).
User Inputs
• Timeframe:
Select the OHLC timeframe (e.g., "D" for daily).
• # Past Lines:
Limit historical lines to avoid overcrowding (default: 10).
• H/L Mode:
Draw high/low lines from the current or previous period.
• O/C Mode:
Anchor open/close lines to today’s open or yesterday’s close.
• Line Styles:
Customize colors, transparency, and styles (solid/dotted/dashed).
• Candle Display:
Toggle boxes/wicks and adjust bull/bear colors.
Important Notes
⚠️ Alignment:
• Monthly/weekly timeframes use fixed approximations (30d/7d).
• For accuracy, ensure your chart’s timeframe ≤ the selected OHLC timeframe (e.g., use 1H chart for daily lines).
⚠️ Performance:
• Reduce # Past Lines on low-end devices for smoother performance.
Risk Disclaimer
Trading involves risk. OHLC lines reflect historical price levels and do not predict future behavior. Use with other tools and risk management.
Open-Source Notice
This script is open-source under the Mozilla Public License 2.0. Modify or improve it freely, but republishing must follow TradingView’s House Rules.
📈 Happy trading!
Arbitrage Synthetic Spread Chart v2Powerful tool for analyzing market divergences and identifying arbitrage opportunities! It creates a synthetic spread chart between two assets, displaying it in a clear format and helping traders spot moments of maximum decorrelation.
How does it work?
The indicator takes the closing prices of two assets and calculates their difference (spread):
spread = price1 - price2
Then, it constructs a price channel based on the highest and lowest values of the spread over a given period:
-Upper boundary: The highest spread value over the period
- Lower boundary: The lowest spread value over the period
- Middle line: The average of the upper and lower boundaries
Additionally, the indicator calculates the **correlation** between the two assets, helping traders assess their relationship strength.
How to use it?
When the spread reaches the channel boundaries, it may indicate an abnormal divergence between the assets. This serves as a signal for arbitrage trading:
✅ At the upper boundary: Sell Asset 1 and buy Asset 2
✅ At the lower boundary: Buy Asset 1 and sell Asset 2
XAUUSD Correlation IndicatorXAUUSD Correlation Indicator
Questo indicatore per TradingView calcola e visualizza la correlazione tra il prezzo di XAUUSD (oro) e una serie di altri asset finanziari, tra cui valute (EURUSD, AUDUSD, NZDUSD, GBPUSD), metalli preziosi (platino, argento), indici azionari (SPX500, DJI, NASDAQ) e il dollaro statunitense (DXY).
L'indicatore offre:
1. Correlazione: Calcola la correlazione tra XAUUSD e gli altri asset su un periodo personalizzabile, dove un numero superiore allo 0 indica una correlazione positiva ed un numero inferiore allo 0 indica una correlazione negativa.
2. Variazione percentuale: Mostra la variazione percentuale dei prezzi degli asset rispetto all'apertura.
3. Visualizzazione personalizzabile: Permette di ordinare i dati in base alla correlazione o alla variazione percentuale.
4. Tabella interattiva: I risultati sono visualizzati in una tabella colorata, con opzioni per personalizzare i colori di sfondo, testo e bordi.
Ideale per trader e analisti che vogliono monitorare le relazioni tra l'oro e altri mercati in tempo reale, questo strumento aiuta a identificare opportunità di trading basate su correlazioni e tendenze di mercato.
[#ps #mft] RDT's Real Relative StrengthIndicator to use with Pine Screener for filtering watchlists with RDT's Real Relative Strength.
See r/realdaytrading for more info on the RRS.
How to:
1. Mark the indicator as "Favorite".
2. Open Pine Screener.
3. Choose a watchlist.
4. Choose this indicator.
5. Change the settings as needed.
6. Make sure you set timeframe to "5 minutes" and not the default "1 day".
If you choose "Bullish trend", then "Signal X" is a shortcut for RRS > 0 for that timeframe. Similarly "Bearish trend" for "Signal X" means RRS < 0.
Pro-tip #1: use Symbol syncing between tabs to easily go over the results.
Pro-tip #2: you can have two tabs open for "Bullish" and "Bearish" pine screeners (even synced to the same color), so you don't have to change settings everytime.
Multi-Timeframe MACD Strategy ver 1.0Multi-Timeframe MACD Strategy: Enhanced Trend Trading with Customizable Entry and Trailing Stop
This strategy utilizes the Moving Average Convergence Divergence (MACD) indicator across multiple timeframes to identify strong trends, generate precise entry and exit signals, and manage risk with an optional trailing stop loss. By combining the insights of both the current chart's timeframe and a user-defined higher timeframe, this strategy aims to improve trade accuracy, reduce exposure to false signals, and capture larger market moves.
Key Features:
Dual Timeframe Analysis: Calculates and analyzes the MACD on both the current chart's timeframe and a user-selected higher timeframe (e.g., Daily MACD on a 1-hour chart). This provides a broader market context, helping to confirm trends and filter out short-term noise.
Configurable MACD: Fine-tune the MACD calculation with adjustable Fast Length, Slow Length, and Signal Length parameters. Optimize the indicator's sensitivity to match your trading style and the volatility of the asset.
Flexible Entry Options: Choose between three distinct entry types:
Crossover: Enters trades when the MACD line crosses above (long) or below (short) the Signal line.
Zero Cross: Enters trades when the MACD line crosses above (long) or below (short) the zero line.
Both: Combines both Crossover and Zero Cross signals, providing more potential entry opportunities.
Independent Timeframe Control: Display and trade based on the current timeframe MACD, the higher timeframe MACD, or both. This allows you to focus on the information most relevant to your analysis.
Optional Trailing Stop Loss: Implements a configurable trailing stop loss to protect profits and limit potential losses. The trailing stop is adjusted dynamically as the price moves in your favor, based on a user-defined percentage.
No Repainting: Employs lookahead=barmerge.lookahead_off in the request.security() function to prevent data leakage and ensure accurate backtesting and real-time signals.
Clear Visual Signals (Optional): Includes optional plotting of the MACD and Signal lines for both timeframes, with distinct colors for easy visual identification. These plots are for visual confirmation and are not required for the strategy's logic.
Suitable for Various Trading Styles: Adaptable to swing trading, day trading, and trend-following strategies across diverse markets (stocks, forex, cryptocurrencies, etc.).
Fully Customizable: All parameters are adjustable, including timeframes, MACD Settings, Entry signal type and trailing stop settings.
How it Works:
MACD Calculation: The strategy calculates the MACD (using the standard formula) for both the current chart's timeframe and the specified higher timeframe.
Trend Identification: The relationship between the MACD line, Signal line, and zero line is used to determine the current trend for each timeframe.
Entry Signals: Buy/sell signals are generated based on the selected "Entry Type":
Crossover: A long signal is generated when the MACD line crosses above the Signal line, and both timeframes are in agreement (if both are enabled). A short signal is generated when the MACD line crosses below the Signal line, and both timeframes are in agreement.
Zero Cross: A long signal is generated when the MACD line crosses above the zero line, and both timeframes agree. A short signal is generated when the MACD line crosses below the zero line and both timeframes agree.
Both: Combines Crossover and Zero Cross signals.
Trailing Stop Loss (Optional): If enabled, a trailing stop loss is set at a specified percentage below (for long positions) or above (for short positions) the entry price. The stop-loss is automatically adjusted as the price moves favorably.
Exit Signals:
Without Trailing Stop: Positions are closed when the MACD signals reverse according to the selected "Entry Type" (e.g., a long position is closed when the MACD line crosses below the Signal line if using "Crossover" entries).
With Trailing Stop: Positions are closed if the price hits the trailing stop loss.
Backtesting and Optimization: The strategy automatically backtests on the chart's historical data, allowing you to assess its performance and optimize parameters for different assets and timeframes.
Example Use Cases:
Confirming Trend Strength: A trader on a 1-hour chart sees a bullish MACD crossover on the current timeframe. They check the MTF MACD strategy and see that the Daily MACD is also bullish, confirming the strength of the uptrend.
Filtering Noise: A trader using a 15-minute chart wants to avoid false signals from short-term volatility. They use the strategy with a 4-hour higher timeframe to filter out noise and only trade in the direction of the dominant trend.
Dynamic Risk Management: A trader enters a long position and enables the trailing stop loss. As the price rises, the trailing stop is automatically adjusted upwards, protecting profits. The trade is exited either when the MACD reverses or when the price hits the trailing stop.
Disclaimer:
The MACD is a lagging indicator and can produce false signals, especially in ranging markets. This strategy is for educational and informational purposes only and should not be considered financial advice. Backtest and optimize the strategy thoroughly, combine it with other technical analysis tools, and always implement sound risk management practices before using it with real capital. Past performance is not indicative of future results. Conduct your own due diligence and consider your risk tolerance before making any trading decisions.
Quantum Moving Average - QMA (TechnoBlooms)The Quantum Moving Average (QMA) is an innovative and advanced Moving Average model designed for traders seeking a more adaptive and precise trend analysis. Unlike traditional moving averages, it integrates a multi-timeframe approach, dynamically selecting and weighting four different timeframes to provide traders with more accurate and reliable trend prediction.
Key Features
Multi-Timeframe averaging
QMA calculates its value based on four different timeframes, offering a broader perspective on market trends.
Dynamic Weighting Mechanism
Unlike fixed weight Moving Averages, QMA assigns adaptive weightage to the selected timeframes, enhancing its responsiveness.
Superior Trend Detection
Provides a smoother and more reliable trend curve reducing noise or false signals.
Enhanced Market Analysis
QMA helps traders identify trend shifts earlier by incorporating multi-timeframe confluence.
Multi-Timeframe Parabolic SAR Strategy ver 1.0Multi-Timeframe Parabolic SAR Strategy (MTF PSAR) - Enhanced Trend Trading
This strategy leverages the power of the Parabolic SAR (Stop and Reverse) indicator across multiple timeframes to provide robust trend identification, precise entry/exit signals, and dynamic trailing stop management. By combining the insights of both the current chart's timeframe and a user-defined higher timeframe, this strategy aims to improve trading accuracy, reduce risk, and capture more significant market moves.
Key Features:
Dual Timeframe Analysis: Simultaneously analyzes the Parabolic SAR on the current chart and a higher timeframe (e.g., Daily PSAR on a 1-hour chart). This allows you to align your trades with the dominant trend and filter out noise from lower timeframes.
Configurable PSAR: Fine-tune the PSAR calculation with adjustable Start, Increment, and Maximum values to optimize sensitivity for your trading style and the asset's volatility.
Independent Timeframe Control: Choose to display and trade based on either or both the current timeframe PSAR and the higher timeframe PSAR. Focus on the most relevant information for your analysis.
Clear Visual Signals: Distinct colors for the current and higher timeframe PSAR dots provide a clear visual representation of potential entry and exit points.
Multiple Entry Strategies: The strategy offers flexible entry conditions, allowing you to trade based on:
Confirmation: Both current and higher timeframe PSAR signals agree and the current timeframe PSAR has just flipped direction. (Most conservative)
Current Timeframe Only: Trades based solely on the current timeframe PSAR, ideal for when the higher timeframe is less relevant or disabled.
Higher Timeframe Only: Trades based solely on the higher timeframe PSAR.
Dynamic Trailing Stop (PSAR-Based): Implements a trailing stop-loss based on the current timeframe's Parabolic SAR. This helps protect profits by automatically adjusting the stop-loss as the price moves in your favor. Exits are triggered when either the current or HTF PSAR flips.
No Repainting: Uses lookahead=barmerge.lookahead_off in the security() function to ensure that the higher timeframe data is accessed without any data leakage, preventing repainting issues.
Fully Configurable: All parameters (PSAR settings, higher timeframe, visibility, colors) are adjustable through the strategy's settings panel, allowing for extensive customization and optimization.
Suitable for Various Trading Styles: Applicable to swing trading, day trading, and trend-following strategies across various markets (stocks, forex, cryptocurrencies, etc.).
How it Works:
PSAR Calculation: The strategy calculates the standard Parabolic SAR for both the current chart's timeframe and the selected higher timeframe.
Trend Identification: The direction of the PSAR (dots below price = uptrend, dots above price = downtrend) determines the current trend for each timeframe.
Entry Signals: The strategy generates buy/sell signals based on the chosen entry strategy (Confirmation, Current Timeframe Only, or Higher Timeframe Only). The Confirmation strategy offers the highest probability signals by requiring agreement between both timeframes.
Trailing Stop Exit: Once a position is entered, the strategy uses the current timeframe PSAR as a dynamic trailing stop. The stop-loss is automatically adjusted as the PSAR dots move, helping to lock in profits and limit losses. The strategy exits when either the Current or HTF PSAR changes direction.
Backtesting and Optimization: The strategy automatically backtests on the chart's historical data, allowing you to evaluate its performance and optimize the settings for different assets and timeframes.
Example Use Cases:
Trend Confirmation: A trader on a 1-hour chart observes a bullish PSAR flip on the current timeframe. They check the MTF PSAR strategy and see that the Daily PSAR is also bullish, confirming the strength of the uptrend and providing a high-probability long entry signal.
Filtering Noise: A trader on a 5-minute chart wants to avoid whipsaws caused by short-term price fluctuations. They use the strategy with a 1-hour higher timeframe to filter out noise and only trade in the direction of the dominant trend.
Dynamic Risk Management: A trader enters a long position and uses the current timeframe PSAR as a trailing stop. As the price rises, the PSAR dots move upwards, automatically raising the stop-loss and protecting profits. The trade is exited when the current (or HTF) PSAR flips to bearish.
Disclaimer:
The Parabolic SAR is a lagging indicator and can produce false signals, particularly in ranging or choppy markets. This strategy is intended for educational and informational purposes only and should not be considered financial advice. It is essential to backtest and optimize the strategy thoroughly, use it in conjunction with other technical analysis tools, and implement sound risk management practices before using it with real capital. Past performance is not indicative of future results. Always conduct your own due diligence and consider your risk tolerance before making any trading decisions.
Multi-Timeframe PSAR Indicator ver 1.0Enhance your trend analysis with the Multi-Timeframe Parabolic SAR (MTF PSAR) indicator! This powerful tool displays the Parabolic SAR (Stop and Reverse) from both the current chart's timeframe and a higher timeframe, all in one convenient view. Identify potential trend reversals and set dynamic trailing stops with greater confidence by understanding the broader market context.
Key Features:
Dual Timeframe Analysis: Simultaneously visualize the PSAR on your current chart and a user-defined higher timeframe (e.g., see the Daily PSAR while trading on the 1-hour chart). This helps you align your trades with the dominant trend.
Customizable PSAR Settings: Fine-tune the PSAR calculation with adjustable Start, Increment, and Maximum values. Optimize the indicator's sensitivity to match your trading style and the volatility of the asset.
Independent Timeframe Control: Choose to display either or both the current timeframe PSAR and the higher timeframe PSAR. Focus on the information most relevant to your analysis.
Clear Visual Representation: Distinct colors for the current and higher timeframe PSAR dots make it easy to differentiate between the two. Quickly identify potential entry and exit points.
Configurable Colors You can easily change colors of Current and HTF PSAR.
Standard PSAR Logic: Uses the classic Parabolic SAR algorithm, providing a reliable and widely-understood trend-following indicator.
lookahead=barmerge.lookahead_off used in the security function, there is no data leak or repainting.
Benefits:
Improved Trend Identification: Spot potential trend changes earlier by observing divergences between the current and higher timeframe PSAR.
Enhanced Risk Management: Use the PSAR as a dynamic trailing stop-loss to protect profits and limit potential losses.
Greater Trading Confidence: Make more informed decisions by considering the broader market trend.
Reduced Chart Clutter: Avoid the need to switch between multiple charts to analyze different timeframes.
Versatile Application: Suitable for various trading styles (swing trading, day trading, trend following) and markets (stocks, forex, crypto, etc.).
How to Use:
Add to Chart: Add the "Multi-Timeframe PSAR" indicator to your TradingView chart.
Configure Settings:
PSAR Settings: Adjust the Start, Increment, and Maximum values to control the PSAR's sensitivity.
Multi-Timeframe Settings: Select the desired "Higher Timeframe PSAR" resolution (e.g., "D" for Daily). Enable or disable the display of the current and/or higher timeframe PSAR using the checkboxes.
Interpret Signals:
Current Timeframe PSAR: Dots below the price suggest an uptrend; dots above the price suggest a downtrend.
Higher Timeframe PSAR: Provides context for the overall trend. Agreement between the current and higher timeframe PSAR strengthens the trend signal. Divergences may indicate potential reversals.
Trade Management:
Use PSAR dots as dynamic trailing stop.
Example Use Cases:
Confirming Trend Strength: A trader on a 1-hour chart sees the 1-hour PSAR flip bullish (dots below the price). They check the MTF PSAR and see that the Daily PSAR is also bullish, confirming the strength of the uptrend.
Identifying Potential Reversals: A trader sees the current timeframe PSAR flip bearish, but the higher timeframe PSAR remains bullish. This divergence could signal a potential pullback within a larger uptrend, or a warning of a more significant reversal.
Trailing Stops: A trader enters a long position and uses the current timeframe PSAR as a trailing stop, moving their stop-loss up as the PSAR dots rise.
Disclaimer: The Parabolic SAR is a lagging indicator and may produce false signals, especially in ranging markets. It is recommended to use this indicator in conjunction with other technical analysis tools and risk management strategies. Past performance is not indicative of future results.
MTF TTM Squeeze ProOverview
The MTF TTM Squeeze Pro indicator helps traders identify market compression (squeeze) conditions and analyze momentum across multiple timeframes. It is based on the TTM Squeeze concept, which uses Bollinger Bands and Keltner Channels to detect price consolidation periods that often precede strong breakouts.
This script enhances the standard TTM Squeeze by providing a multi-timeframe view, allowing traders to assess market conditions across intraday, daily, and weekly charts simultaneously.
⸻
How It Works
1. Squeeze Detection using Bollinger Bands & Keltner Channels
• High Compression Squeeze (Orange): Strongest squeeze, indicating extreme consolidation.
• Medium Compression Squeeze (Red): Moderate squeeze, potential breakout setup.
• Low Compression Squeeze (Black): Mild squeeze, possible momentum shift.
• No Squeeze (Green): Market is trending, no consolidation detected.
2. Momentum Analysis
The script features a custom linear regression momentum oscillator to gauge market direction:
• Positive rising momentum (Aqua) suggests bullish acceleration.
• Positive falling momentum (Blue) indicates slowing bullish momentum.
• Negative rising momentum (Red) signals bearish weakening.
• Negative falling momentum (Yellow) represents strengthening bearish momentum.
3. Multi-Timeframe Display
The indicator provides a table panel showing squeeze conditions and momentum colors for:
✅ 15m, 30m, 55m, 78m, 195m, Daily (D), and Weekly (W) timeframes.
This makes it easier to spot confluences across different periods, helping traders align their entries with larger trends.
⸻
How to Use
✔️ Look for a high compression squeeze (orange dots) as potential breakout zones.
✔️ Check if momentum colors are aligned across multiple timeframes to confirm direction.
✔️ Trade in the direction of momentum once the squeeze is released.
Best Used For:
📈 Swing Trading – Identify multi-day setups using the D/W squeeze signals.
📉 Intraday Trading – Use 15m-78m signals for faster entries and exits.
⸻
Credits & Open-Source Compliance
This script is inspired by the original TTM Squeeze Pro and based on open-source contributions from the TradingView community. Significant modifications include:
✔️ Improved multi-timeframe data request for momentum & squeeze.
✔️ Enhanced visual display with a compact and informative table panel.
✔️ Added detailed documentation for better usability.
📌 Original Source: TradingView Script by Beardy_Fred
⸻
Final Notes
✅ Designed for stocks, forex, and crypto.
✅ Fully customizable squeeze & momentum settings.
Enjoy trading, and may the squeeze be with you! 🚀
SuperTrend Bar Counter - DolphinTradeBot
OVERVIEW
This indicator calculates the lengths of upward and downward trends based on the specified SuperTrend settings and timeframe. It then takes the average length of the entered number of swings and compares the current trend durations with these averages. The main goal is to anticipate potential reversals in advance.
HOW IS IT WORK ?
The indicator actually contains two different but conceptually similar metrics.
The first part; shows how long the Supertrend stays in an upward or downward trend in real time. Additionally, it analyzes how close the current value is to the average of the Supertrend bar count for the given input.
The second part; aims to provide a different perspective on general trend analysis. It calculates the average duration of upward and downward trends in bars based on the SuperTrend indicator settings within a specified period and timeframe. If, contrary to expectations, downward trends last longer than upward trends, the background is colored green, indicating a prediction that the trend will continue upward.
Explanation of the second part logic: As you know, moving averages or similar approaches that follow the price are often correct when looking back retrospectively, but they cannot serve as leading indicators in real-time trading.That's why, when performing trend analysis, I wanted to introduce a completely different perspective based on price movement, yet still grounded in price action itself.
This phenomenon is partly due to the nature of the SuperTrend itself. After strong price movements, SuperTrend tends to reverse direction much more quickly during pullbacks. Following a strong upward move, a downward trend is detected much earlier and tends to last longer. The indicator provides an alternative perspective by analyzing which directional movement occurs more rapidly and uses this insight for trend prediction.
HOW TO USE ?
It can be used to identify potential price reversals or to assess whether the price is generally cheap or expensive.
In the settings section, you can adjust the SuperTrend parameters and timeframes for the values displayed in the table.
In the second part, you can configure the values used for general trend analysis.
NOTE
Things to be aware of: As the chart's timeframe decreases, pulling data from higher timeframes becomes more difficult. For example, when the chart is set to a 5-minute timeframe, it may fail to retrieve swing periods from the daily timeframe. Similarly, on a 4-hour chart, when calculating the average swing, there might be enough data for only 5 periods instead of 20.
Please keep in mind that this indicator was created solely to provide an idea. It should only be considered as a perspective or a supporting tool that influences your decision by no more than 5% at most.
[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!
Higher Timeframe Support/ResistanceMulti-Timeframe Support/Resistance Indicator
This TradingView indicator helps you monitor important support and resistance levels based on the previous candle’s high, low, and close from a higher timeframe. By default, it uses a daily timeframe, but you can adjust this to any timeframe you want.
Key Features:
- Previous Candle High (PCH) and Previous Candle Low (PCL):
These levels are plotted on your chart (if enabled) and can act as potential support and
resistance zones. You can toggle the visibility of these levels.
- Pivot, Resistance (R1), and Support (S1):
The script calculates Pivot, R1 (Resistance), and S1 (Support) levels based on the previous
candle's price action from the selected higher timeframe.
These levels are displayed on your chart and can be used to identify potential breakout or
reversal points.
- Alert Feature:
Alerts are triggered when the price approaches any of these key levels (PCH, PCL, Pivot, R1,
or S1) within a specified threshold (e.g., 0.5%).
This helps traders react quickly to potential price movements near critical levels.
- Visual Representation:
The script visually fills the areas between Pivot and R1 (Resistance-Pivot Zone) and Pivot and
S1 (Support-Pivot Zone) with color for easy identification of key price zones.
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.
HTF Vertical LinesShow selected high time frame divider in your current time frame.
Not a magic, just a helper script myself use, if any suggestion/feature you want to add(but I won't promise I will add), don't hesitate to message me.