Detrended OscillatorDetrended Oscillator – User Manual
________________________________________
Disclaimer: To avoid any discomfort, please be aware that this oscillator won’t be free to use in the future and will require a small one-time lifetime subscription.
Overview
The Detrended Oscillator is a powerful technical analysis tool designed to measure the momentum of price movements by removing longer-term trends. It highlights short-term cycles and helps traders identify overbought or oversold conditions, potential reversals, and the strength of market trends in a unique way like no other oscillator (see at the end – Trading Tips Advanced).
What is a Detrended Oscillator?
A detrended oscillator isolates cyclical price behaviour by eliminating broader market trends, offering clearer signals for potential turning points. This helps traders focus on shorter-term market fluctuations, making it easier to identify reversals and short-term trading opportunities.
________________________________________
How It Works
This oscillator calculates the difference between two Simple Moving Averages (SMA):
• Fast SMA (SMA Period 1): Quick-reacting moving average.
• Slow SMA (SMA Period 2): Slow-reacting moving average, capturing broader market moves.
The difference between these SMAs represents short-term momentum and cyclical changes, displayed visually as the oscillator.
________________________________________
Inputs Explained
Detrended Oscillator Settings:
• SMA Period 1 (Fast): Controls responsiveness; lower values track short-term cycles closely.
• SMA Period 2 (Slow): Captures longer-term trend context.
• Oscillator Source: Price data source used for calculation (typically closing prices).
Moving Average (MA) Options:
• Length: Defines the smoothing length for MA.
• Source: Select between the oscillator itself (SMA Difference) or price (Close).
• Offset: Shifts the MA forward/backward in time for forecasting or alignment.
• Show Moving Average: Toggle display of MA.
• Type: Choose among SMA, EMA, SMMA, WMA, VWMA, or SMA combined with Bollinger Bands.
• BB StdDev: Standard deviation multiplier, adjusts Bollinger Bands width.
Oscillator Boundaries (Levels for Overbought/Oversold Conditions):
• Number of Peaks/Lows to Average: Sets how many historical extremes are counted for primary boundary levels.
• Enable Fixed Lines: Toggles the visibility of calculated boundary lines.
• Alert Trigger Level (%): Distance from boundaries to trigger alerts, adjustable to user preference.
• Enable Alerts: Toggle alerts for boundary crossings.
Secondary Oscillator Boundaries:
• Provides a second set of boundaries.
• Line Style, Colour, Width, Opacity: Customizes appearance for visual distinction.
________________________________________
Alerts and Notifications
The Detrended Oscillator includes customizable alerts for enhanced trade management:
• Primary Boundary Touch Alert: Triggered when the oscillator crosses primary calculated boundaries.
• Secondary Boundary Touch Alert: Triggered when oscillator touches secondary-calculated boundaries.
• Combined Alert: Activated when the oscillator touches either set of boundaries, maximizing awareness of market conditions.
• Value cross alerts – like any other oscillator.
________________________________________
Trading Tips
• Trend Identification: Oscillator above zero suggests bullish momentum, below zero bearish momentum.
• Reversals: Watch for oscillator crossings near boundaries as potential reversal signals.
• Divergences: Divergence between price and oscillator often precedes reversals, enhancing entry/exit precision.
________________________________________
Trading Tips Advanced
• The Detrended Oscillator has a few unique characteristics that no other oscillator possesses.
• Please note that all the examples presented are using the oscillator default parameters, which we find to be optimal for our trading methods.
• Let’s review some of these characteristics:
The Boundaries – While the Detrended Oscillator is not confined to a fixed range like the RSI, as an example, the oscillator does tend to move in a confined range that is specific to every asset.
This characteristic helps the users dramatically to prepper for reversals.
In the oscillators inputs, you can choose based on which timeframe to calculate the boundaries, our recommendation is to use Chart or one timeframe higher, i.e. for Daily chart the weekly, for weekly chart the monthly, and same in intraday.
AAPL – In the weekly chart, you can see over 5 years how the oscillator respected its own boundary (yellow arrows).
drive.google.com
What is also noticeable and important are divergences, we can see the blue arrows marking lower highs on the oscillator and higher highs on price, and from there we go down, long before Trump’s Tariffs.
But notice something else, at the end of the oscillator there are 4 dots (2 blue up and 2 orange down) these are the makers for our Alert boundaries, which as mentioned before all examples are using the default setting.
Note how the divergence and point of reversal is aligned 1 to 1 with our alert level which is no coincidence as we can see that this level of the oscillator was also a significant level along the years, and our code mathematically finds that.
So, to summarize the first point, boundaries, divergences and historically significant levels can greatly support us in timing reversals.
The advantage of the built-in boundaries is not only visual which is important, but moreover the ability to utilize the watchlist alert to the maximum.
New Boundary Extreme – Often, when the oscillator set a new extreme or visit the historical extreme, price and trend will reverse ONLY when the oscillator will RETEST the previous extreme. Sounds crazy?! Let’s check…
BTC Daily – blue arrows
drive.google.com
S&P 500 monthly – notice again how our trigger alert default setting is right on the money (also now with the tariffs crash).
drive.google.com
Level of significance –
Each asset in each timeframe can indicate the level of significance, where it is more likely that the asset will find support or resistance.
S&P 500 Weekly – see how 3 consecutive corrections finished with the same reading on the Detrended Oscillator.
drive.google.com
An advanced user can recognize these levels and either adjust the alert triggers accordingly or set a separate alert based on the value crossing.
drive.google.com
Happy Trading!
MAD - Trading
Trendtrading
Trend Trading IndicatorThis trend trading indicator uses multiple different custom formulas to identify market trends as well as identify when the market is moving sideways. It has a master trend that will show you the trend using the color of the candles and then there are multiple different types of entry and confluence signals that will appear as different chart shapes above or below the candles to inform you about when to enter a trade and how strong the trend is so you know whether to hold a position longer or get out. There is also a panel at the bottom of the chart that shows you the trend strength for 5 different timeframes so you can easily identify the short and long term trends and scan through charts quickly to find markets with the strongest trends.
The indicator can be customized to fit your trading style by adjusting the timeframes for the master trend, which timeframes affect signals, turning on or off the various entry & confluence signals, turning on or off ranging market filters and more. It can be adjusted to react quickly for intraday trading or use long timeframes for swing trading or only trading when the market is in a strong long term trend.
The indicator also has a built in trend direction value that can be sent to other indicators to be used as a trend filter as well by setting the source value on an external indicator to use the trend direction value from this indicator. This is useful for preventing signals from coming in on other indicators when they go against the trend that this indicator has identified according to the settings it is configured with.
How To Use This Indicator Properly
This indicator is designed to only give signals when the market is trending and filter out the sideways price action for you. Due to this, depending on the timeframe settings you use, there may be extended periods where there are no signals because the market is going sideways. You can adjust your timeframe settings to react faster or slower by lowering the timeframes used and turning off some of the higher timeframes or use all of the timeframes available and only get signals when the market is in a strong long term trend for the safest trades.
The indicator uses a master trend that needs to show a trend before any other confluence signals can come in. The master trend will show up by coloring the candles blue when the trend is bullish or orange when the trend is bearish according to the settings you have chosen. When the market is not trending, the candles will be colored grey. This helps to keep you out of trades when the market is going sideways. You will only be able to see the master trend by using the colored candles though, so make sure to turn the chart’s candle coloring off so it doesn’t override the indicator candle coloring.
Once a trend has been established, then other signals will begin to show up if the trend is strong and various parameters are met. The indicator includes the following types of signals:
Master Trend Signals
Strong Trend Buy & Sell Signals
Pullback During Strong Trend Signals
Strong All Timeframe Trend Signals
Trend Strength Score Signals
The indicator also has multiple filters you can use to customize the master trend to allow more or less signals to come in. The more filters you have on, the better and more likely the signals are to be winners because it will only give signals when there are very strong trends on all timeframes. If you want a lot of signals for intraday scalping, you can turn off most of the filters and just use lower timeframes for the master trend settings. The following filters can be used to customize the trend parameters:
Signals Only Allowed In Direction Of Timeframes 4 & 5
Trend Of Timeframe #1 Used For Master Trend Signals
Trend Of Timeframe #2 Used For Master Trend Signals
Trend Of Timeframe #3 Used For Master Trend Signals
Trend Of Timeframe #4 Used For Master Trend Signals
Trend Of Timeframe #5 Used For Master Trend Signals
No Master Trend Signals If This Timeframe Is Ranging - #1
No Master Trend Signals If This Timeframe Is Ranging - #2
No Master Trend Signals If This Timeframe Is Ranging - #3
Make sure to keep all trend timeframes in order from 1-5 for best results, even if they are turned off. The indicator is programmed to compare each timeframe to the next one, so keeping the timeframes in order will give you proper calculations. For example: timeframes 1-5 should be 15, 60, 240, 1D, 1W or 240, 1D, 1W, 1M, 3M and so on.
The indicator has alerts for bullish and bearish versions of each type of signal so you can get notified when a chart is trending strongly.
Market Hours Available To Use The Indicator On
The indicator works on stocks, crypto, forex and futures markets and other markets that have the same hours, you just need to select the hours that the market you are trading has in the main indicator settings to get the correct signals. There are options for stock hours(6.5 hours a day, 5 days per week), futures/forex hours(23 hours a day, 5 days per week) and crypto hours(24 hours a day, 7 days per week). Just select the correct option in the dropdown menu and the indicator will calculate based on those hours.
Master Trend Settings
The master trend is calculated using Timeframes 1-5, the setting for whether to use timeframes 1-5 for signals, ranging market filters 1-3 and only allow signals in the direction of timeframes 4 & 5. These settings will affect how the overall trend is calculated, which has to be trending in order for any confluence signals to come in.
Set timeframe 1 to a higher timeframe than your chart is set to. For example if you trade the 1 minute or 5 minute chart, timeframe #1 needs to be set to something higher than your chart so 15, 60 or 240. Then set timeframes 2-5 to be one timeframe higher than the previous one. So if timeframe 1 is 60, then timeframe 2 should be 240 and so on. Make sure to do this even if you do not turn on each timeframe to be used for master trend signals as the higher timeframes will still affect the confluence signals.
Turn on or off the toggle for each timeframe if you want the master trend to use. Keeping just lower timeframes on will give more signals for short term trends and leaving all of the timeframes on will only give signals when all of the timeframes are trending. I recommend keeping timeframes 1 & 2 on at the very least and then turning on or off timeframes 3-5 based on how many signals you want and how strong you want the trend to be in order for signals to be given.
Ranging Market Filters
The indicator has parameters to detect if the market is ranging or moving sideways on each timeframe and will show this by coloring the trend strength score in the bottom panel grey for that timeframe. When the market is ranging, it is best to not trade because there is no established trend. Use these filters to increase the probability of the master trend and confluence trend signals being correct and moving in the direction of the trend.
If you turn on the ranging market filters, you will not get any signals if the market is detected as ranging on any of the timeframes you have turned on for the ranging market filters.
You can use 1, 2 or all 3 ranging market filters to dial in the indicator to your preference. Make sure to backtest it and look at historical data to see how this will affect the indicator and choose what settings work best for your style of trading.
Signals Only Allowed In Direction Of Timeframes 4 & 5
If you only want to make sure you are trading in the direction of the long term trend, turn this setting on. It will prevent the indicator from giving any signals that are not in the same direction as the long term trends and increase your probability for winning trades.
This setting allows you to quickly filter out any noise that you will get from lower timeframe trends that are not in the same direction as the long term trends and helps to ensure you stick to the overall trend. Markets will usually make much faster and larger moves in the direction of the overall trend and have high resistance, choppy moves when going in the opposite direction, so this will help you avoid getting into those trades even if you don’t have timeframes 4 & 5 turned on in the master trend timeframe settings.
Strong Buy & Sell Signals
When the master trend detects a trending market and the trend is strong on all 5 timeframes, the indicator will show crosses on the chart meaning these are great entry points to get into the market with positions in the direction of the trend. There are 3 levels of these signals and will show as small crosses, medium crosses and large crosses. The larger the cross is, the stronger the trend is and is more likely to continue the trend.
Use these strong buy & sell signal crosses as entry points and place your stop loss at the most recent major pivot. Then trail your stop loss with the trade to lock in profits.
Pullbacks During Strong Trend Signals
When there is a strong trend on timeframes 3-5 and a pullback on timeframes 1 & 2, then move back in the direction of the higher timeframe trend, this will fire a signal to enter a trade in the direction of the trend. These are excellent entries since the market has pulled back, allowing you to have a good entry with low potential drawdown.
These signals will appear as label tag or price tag looking signals. Use these for your entries and then place a stop loss just beyond the most recent major pivot and trail your stop loss as the trade moves in your favor to lock in profits.
Strong All Timeframe Trend Signals
When the trend is strong on all timeframes that you have set to use for master trend signals, the indicator will show circles/dots on the chart above or below the candles. There is also a second type of strong trend calculation that it uses that will detect a strong trend in a slightly different way and that formula will paint a background color on the chart as extra confluence. When the background color and dots show up at the same time, that means both formulas are showing strong trends.
Use these dots and background coloring to confirm your position and continue to hold it for more gains. Strong trends typically continue in the same direction so use these signals as extra confluence to hold your position and stay in the trade.
Trend Strength Score Signals
Each timeframe will have a trend strength score calculated. If you turn the visuals on in the master trend timeframe settings, they will show up as an oscillator in the bottom panel. It will show red for bearish trends and green for bullish trends and grey when the market is ranging. It will also show a label next to each timeframe telling you the score out of the maximum score for that timeframe.
Pay attention to these as they will give you a very quick way to read the long term and short term trends. When all timeframes are trending strongly, the background will paint red or green to notify you of strong trends that you can trade.
When the long term trends agree, but short term trends are going against the long term, look for the short term trends to reverse and use those areas as entry positions for longer trades in the direction of the overall trend. Doing this really helps to identify possible reversals and keep you from getting into those types of trades too early.
Timeframes The Indicator Can Be Used On
The indicator is setup to be used on the following chart timeframes: 15 seconds, 30 seconds, 1 minute, 2 minute, 3 minute, 5 minute, 10 minute, 15 minute, 30 minute, 1 hour, 2 hour, 4 hour, 6 hour, 8 hour, 12 hour and 1 day charts.
If your chart is set to a different timeframe than the ones listed above, it will not calculate properly, so make sure your chart is on the correct timeframe.
Markets The Indicator Can Be Used On
The indicator has 3 modes for various market hours. The type of market doesn’t matter, what matters is how many hours that market is open for. Almost all markets fall under 3 types of opening hours so we have provided the ability for the indicator to calculate correctly on all 3 types of market hours. The hours it can use are: stocks(6.5 hours per day, 5 days per week), crypto(24 hours per day, 7 days per week) and futures/forex(23 hours per day, 5 days per week).
You will need to update this setting from the dropdown at the top of the indicator settings to match the chart that you are on for it to calculate correctly.
Filtering Other Indicators Using The Trend Direction Of This Indicator
The indicator has a built in trend direction value that can be sent to other indicators and used as a filter. By setting an input.source() value on other indicators that are on the same chart as this indicator, you can set that indicator to do or not do whatever you want when this trend indicator shows a trend or not.
The name of the source you can use on your external indicator is called Trend Direction To Send To External Indicators. The values it sends are as follows: 0 when there is no master trend direction, 1 when the master trend is bullish and -1 when the master trend is bearish.
By using this source, you can prevent other indicators from giving sell signals during up trends, prevent other indicators from giving buy signals during down trends and prevent other indicators from giving any signals when the market is ranging or not showing an established trend.
Alerts Available To Use
The indicator has alerts for bullish versions as well as bearish versions of each type of signal available. Use these alerts to notify you of strong trends on markets that you may not have the charts up for at all times but still want to trade.
Institutional Quantum Momentum Impulse [BullByte]## Overview
The Institutional Quantum Momentum Impulse (IQMI) is a sophisticated momentum oscillator designed to detect institutional-level trend strength, volatility conditions, and market regime shifts. It combines multiple advanced technical concepts, including:
- Quantum Momentum Engine (Hilbert Transform + MACD Divergence + Stochastic Energy)
- Fractal Volatility Scoring (GARCH + Keltner-based volatility)
- Dynamic Adaptive Bands (Self-adjusting thresholds based on efficiency)
- Market Phase Detection (Volume + Momentum alignment)
- Liquidity & Cumulative Delta Analysis
The indicator provides a Z-score normalized momentum reading, making it ideal for mean-reversion and trend-following strategies.
---
## Key Features
### 1. Quantum Momentum Core
- Combines Hilbert Transform, MACD divergence, and Stochastic Energy into a single composite momentum score.
- Normalized using a Z-score for statistical significance.
- Smoothed with EMA/WMA/HMA for cleaner signals.
### 2. Dynamic Adaptive Bands
- Upper/Lower bands adjust based on volatility and efficiency ratio .
- Acts as overbought/oversold zones when momentum reaches extremes.
### 3. Market Phase Detection
- Identifies bullish , bearish , or neutral phases using:
- Volume-Weighted MA alignment
- Fractal momentum extremes
### 4. Volatility & Liquidity Filters
- Fractal Volatility Score (0-100 scale) shows market instability.
- Liquidity Check ensures trades are taken in favorable spread conditions.
### 5. Dashboard & Visuals
- Real-time dashboard with key metrics:
- Momentum strength, volatility, efficiency, cumulative delta, and market regime.
- Gradient coloring for intuitive momentum visualization .
---
## Best Trade Setups
### 1. Trend-Following Entries
- Signal :
- QM crosses above zero + Market Phase = Bullish + ADX > 25
- Cumulative Delta rising (buying pressure)
- Confirmation :
- Efficiency > 0.5 (strong momentum quality)
- Liquidity = High (tight spreads)
### 2. Mean-Reversion Entries
- Signal :
- QM touches upper band + Volatility expanding
- Market Regime = Ranging (ADX < 25)
- Confirmation :
- Efficiency < 0.3 (weak momentum follow-through)
- Cumulative Delta divergence (price high but delta declining)
### 3. Breakout Confirmation
- Signal :
- QM holds above zero after a pullback
- Market Phase shifts to Bullish/Bearish
- Confirmation :
- Volatility rising (expansion phase)
- Liquidity remains high
---
## Recommended Timeframes
- Intraday (5M - 1H): Works well for scalping & swing trades.
- Swing Trading (4H - Daily): Best for trend-following setups.
- Position Trading (Weekly+): Useful for macro trend confirmation.
---
## Input Customization
- Resonance Factor (1.0 - 3.618 ): Adjusts MACD divergence sensitivity.
- Entropy Filter (0.382/0.50/0.618) : Controls stochastic damping.
- Smoothing Type (EMA/WMA/HMA) : Changes momentum responsiveness.
- Normalization Period : Adjusts Z-score lookback.
---
The IQMI is a professional-grade momentum indicator that combines institutional-level concepts into a single, easy-to-read oscillator. It works across all markets (stocks, forex, crypto) and is ideal for traders who want:
✅ Early trend detection
✅ Volatility-adjusted signals
✅ Institutional liquidity insights
✅ Clear dashboard for quick analysis
Try it on TradingView and enhance your trading edge! 🚀
Happy Trading!
- BullByte
HALC SYHALC SY @CK
Heikin Ashi Last Candle shows color of the last closed 30m heikin ashi candle for every new candle on your graph indicating local trend for scalp & short term trading in rder to help u choose right direction in your 1-5m tf trading. Non-repainting & designed for use on any graph type incl HA, Renko and other problematic syntetic as well as any of your own.
Dont recommend as entry signal but strong support to confirm/deny your trade system entry signal. Enjoy!
XGBoost Approximation Indicator with HTF Filter Ver. 3.2XGBoost Approx Indicator with Higher Timeframe Filter Ver. 3.2
What It Is
The XGBoost Approx Indicator is a technical analysis tool designed to generate trading signals based on a composite of multiple indicators. It combines Simple Moving Average (SMA), Relative Strength Index (RSI), MACD, Rate of Change (ROC), and Volume to create a composite indicator score. Additionally, it incorporates a higher timeframe filter (HTF) to enhance trend confirmation and reduce false signals.
This indicator helps traders identify long (buy) and short (sell) opportunities based on a weighted combination of trend-following and momentum indicators.
How to Use It Properly
Setup and Configuration:
Add the indicator to your TradingView chart.
Customize input settings based on your trading strategy. Key configurable inputs include:
HTF filter (default: 1-hour)
SMA, RSI, MACD, and ROC lengths
Custom weightings for each component
Thresholds for buy and sell signals
Understanding the Signals:
Green "Long" Label: Appears when the composite indicator crosses above the buy threshold, signaling a potential buy opportunity.
Red "Short" Label: Appears when the composite indicator crosses below the sell threshold, signaling a potential sell opportunity.
These signals are filtered by a higher timeframe SMA trend to improve accuracy.
Alerts:
The indicator provides alert conditions for long and short entries.
Traders can enable alerts in TradingView to receive real-time notifications when a new signal is triggered.
Safety and Best Practices
Use in Conjunction with Other Analysis: Do not rely solely on this indicator. Combine it with price action, support/resistance levels, and fundamental analysis for better decision-making.
Adjust Settings for Your Strategy: The default settings may not suit all markets or timeframes. Test different configurations before trading live.
Backtest Before Using in Live Trading: Evaluate the indicator’s past performance on historical data to assess its effectiveness in different market conditions.
Avoid Overtrading: False signals can occur, especially in low volatility or choppy markets. Use additional confirmation (e.g., trendlines or moving averages).
Risk Management: Always set stop-loss levels and position sizes to limit potential losses.
AIWAY - CryptoPulse TPAIWAY - CryptoPulse TP
Overview
The "AIWAY - CryptoPulse TP" indicator is a powerful yet user-friendly tool tailored for cryptocurrency trading on TradingView. Built with Pine Script v5, this indicator combines Supertrend, moving averages, and advanced trend analysis to generate clear Buy and Sell signals. It goes further by providing precise Entry points, a Stop Loss, and three Take Profit (TP) levels based on customizable Risk-to-Reward (R:R) ratios. Whether you're a beginner or an experienced trader, this indicator simplifies decision-making while offering flexibility through adjustable settings.
Key Features
• Signal Types: Choose between "ALL SIGNALS" (based on Supertrend and SMA) or "SMART+ SIGNALS" (refined stochastic-RSI signals).
• Entry, Stop Loss, and Targets: Displays Entry, Stop Loss, and three Take Profit levels (TP1, TP2, TP3) with adjustable R:R ratios.
• Trend Visualization: Includes optional Trend Candles, Moving Averages, and a Multi-Timeframe (MTF) Trend Dashboard for broader market context.
• Customizable Sensitivity: Adjust the Supertrend sensitivity (0.5–12) to suit your trading style or market volatility.
• Cryptocurrency Focus: Optimized for crypto markets but adaptable to other assets.
How to Use
1. Add the Indicator: Load "AIWAY - CryptoPulse TP" onto your TradingView chart.
2. Select Signal Type:
o ALL SIGNALS: Triggers "BUY" when price crosses above Supertrend and is above the 9-period SMA; "SELL" when price crosses below Supertrend and is below the 9-period SMA. Labels appear on the chart.
o SMART+ SIGNALS: Triggers refined "Smart Buy+" (green) and "Smart Sell+" (red) signals based on a smoothed Stochastic-RSI crossover, ideal for filtering noise.
3. Interpret Entry and Targets:
o Entry: Marked with an orange dashed line and label (e.g., "Entry: 1234.5") at the closing price of the signal candle.
o Stop Loss: Shown as a red solid line and label (e.g., "Stop Loss: 1200"), calculated as a percentage below/above the entry (default: 2%).
o Take Profit Levels: Three green solid lines and labels (TP1, TP2, TP3) based on R:R ratios (default: 1:1, 1.5:1, 2:1). For example, if Entry is 1000 and Stop Loss is 980, TP1 = 1020, TP2 = 1030, TP3 = 1040.
4. Adjust Settings:
o Go to the indicator’s settings: tweak "Sensitivity" for Supertrend responsiveness, adjust "Stop Loss Distance" (%), and modify TP R:R ratios under "TAKE PROFIT / STOP LOSS".
o Enable optional features like "Moving Average" or "Trend Dashboard" for additional context.
5. Trade Execution:
o Buy: Enter a long position at the Entry price when a Buy signal appears. Set your stop loss and take profits as indicated.
o Sell: Enter a short position at the Entry price when a Sell signal appears, using the provided Stop Loss and TP levels.
o Monitor the chart for signal confirmation and adjust based on market conditions.
Settings Breakdown
• Signals: "ALL SIGNALS" (default) or "SMART+ SIGNALS".
• Sensitivity: Default 10; lower for tighter signals, higher for broader trends.
• Show TP/SL: Enable to display Entry, Stop Loss, and TP levels (default: true).
• Stop Loss Distance: Default 2% (adjustable).
• Take Profit R:R: TP1 = 1:1, TP2 = 1.5:1, TP3 = 2:1 (customizable).
• Trend Tools: Toggle Moving Average, Trend Cloud, or Dashboard as needed.
Example
• Buy Signal: Price crosses above Supertrend at 5000, SMA9 confirms. Entry = 5000, Stop Loss = 4900 (2% below), TP1 = 5100 (1:1), TP2 = 5150 (1.5:1), TP3 = 5200 (2:1).
• Sell Signal: Price crosses below Supertrend at 4800, SMA9 confirms. Entry = 4800, Stop Loss = 4896 (2% above), TP1 = 4704 (1:1), TP2 = 4656 (1.5:1), TP3 = 4608 (2:1).
Disclaimer
This indicator is provided for educational and informational purposes only and should not be considered financial advice. Trading involves significant risk, and past performance is not indicative of future results. Always conduct your own research and consult with a qualified financial advisor before making trading decisions. The creator of this indicator is not responsible for any losses incurred.
Notes
• Best used on cryptocurrency pairs but can be adapted to other markets.
• Optimized on 30m timeframe or lower
• Combine with other analysis tools for confirmation.
Enjoy trading with AIWAY - CryptoPulse TP! Let me know your feedback in the comments.
Invite Only 2 MA Color Dir Detection This script has default value of 10 and 20 EMA and if you check the 'Filling' box on settings then you will get the color coding, which is easy to comprehend. Long trade as soon as the stream turns green, No Trade in Purple zone and Short in Red zone. Best is to take enter as soon as color changes or when price comes closer to the stream of colors.
TrendLibrary "Trend"
calculateSlopeTrend(source, length, thresholdMultiplier)
Parameters:
source (float)
length (int)
thresholdMultiplier (float)
Purpose:
The primary goal of this function is to determine the short-term trend direction of a given data series (like closing prices). It does this by calculating the slope of the data over a specified period and then comparing that slope against a dynamic threshold based on the data's recent volatility. It classifies the trend into one of three states: Upward, Downward, or Flat.
Parameters:
`source` (Type: `series float`): This is the input data series you want to analyze. It expects a series of floating-point numbers, typically price data like `close`, `open`, `hl2` (high+low)/2, etc.
`length` (Type: `int`): This integer defines the lookback period. The function will analyze the `source` data over the last `length` bars to calculate the slope and standard deviation.
`thresholdMultiplier` (Type: `float`, Default: `0.1`): This is a sensitivity factor. It's multiplied by the standard deviation to determine how steep the slope needs to be before it's considered a true upward or downward trend. A smaller value makes it more sensitive (detects trends earlier, potentially more false signals), while a larger value makes it less sensitive (requires a stronger move to confirm a trend).
Calculation Steps:
Linear Regression: It first calculates the value of a linear regression line fitted to the `source` data over the specified `length` (`ta.linreg(source, length, 0)`). Linear regression finds the "best fit" straight line through the data points.
Slope Calculation: It then determines the slope of this linear regression line. Since `ta.linreg` gives the *value* of the line on the current bar, the slope is calculated as the difference between the current bar's linear regression value (`linRegValue`) and the previous bar's value (`linRegValue `). A positive difference means an upward slope, negative means downward.
Volatility Measurement: It calculates the standard deviation (`ta.stdev(source, length)`) of the `source` data over the same `length`. Standard deviation is a measure of how spread out the data is, essentially quantifying its recent volatility.
Adaptive Threshold: An adaptive threshold (`threshold`) is calculated by multiplying the standard deviation (`stdDev`) by the `thresholdMultiplier`. This is crucial because it means the definition of a "flat" trend adapts to the market's volatility. In volatile times, the threshold will be wider, requiring a larger slope to signal a trend. In quiet times, the threshold will be narrower.
Trend Determination: Finally, it compares the calculated `slope` to the adaptive `threshold`:
If the `slope` is greater than the positive `threshold`, the trend is considered **Upward**, and the function returns `1`.
If the `slope` is less than the negative `threshold` (`-threshold`), the trend is considered **Downward**, and the function returns `-1`.
If the `slope` falls between `-threshold` and `+threshold` (inclusive of 0), the trend is considered **Flat**, and the function returns `0`.
Return Value:
The function returns an integer representing the determined trend direction:
`1`: Upward trend
`-1`: Downward trend
`0`: Flat trend
In essence, this library function provides a way to gauge trend direction using linear regression, but with a smart filter (the adaptive threshold) to avoid classifying minor noise or low-volatility periods as significant trends.
MA Smoothed RSI For Loop | OpusMA Smoothed RSI For Loop | Opus
Technical Indicator Overview
The MA Smoothed RSI For Loop | Opus is an innovative technical tool 🛠️ that combines traditional RSI with multiple moving average smoothing options and a unique for-loop calculation method. This indicator provides enhanced trend detection and momentum analysis by applying customizable moving averages to the RSI calculation and implementing a weighted comparison system across multiple timeframes.
Key Features 🌟
• Multi-MA Smoothing Options ✅: Supports 8 different moving average types (EMA, SMA, WMA, VWMA, HMA, RMA, DEMA, or None) for RSI smoothing 📊
• Weighted For-Loop Analysis 🔄: Implements a sophisticated loop calculation that compares current values against historical data with optional weighting ⚡
• Dynamic Color Signals 🎨: Features customizable color themes (Synthwave, Origins, Outrun, Lush, Eighties, Sapphire, Scarlet Blues) for enhanced visual interpretation 🎯
• Comprehensive Dashboard 📊: Includes a detailed information panel with signal strength, trend direction, and duration metrics 📈
Usage Guidelines 📋
• Bullish Signal (Above Upper Threshold) ✅: Enter long positions when the indicator crosses above the upper threshold (default 40) 🚀
• Bearish Signal (Below Lower Threshold) ❌: Consider short positions when the indicator falls below the lower threshold (default -40) 🛑
• Trend Confirmation : Use the weighted for-loop calculation to confirm trend strength and direction 💪
• Signal Stars : Watch for decorative signal markers that appear at trend changes ⭐
Customizable Settings ⚙️
RSI Settings :
• Length : Adjust the RSI calculation period (default: 14) 🔧
• Source : Select price source for RSI calculation (default: close) 📊
Moving Average Options :
• Type : Choose from 8 different MA types for smoothing 📈
• Smooth Length : Set the period for MA smoothing (default: 3) ⚙️
For Loop Parameters :
• Range : Define the comparison range (default: 1 to 50) 🔄
• Weighted Calculation: Toggle weighted vs. unweighted comparison 🎚️
Threshold Settings :
• Upper Threshold: Adjust bullish signal level (default: 40) 📈
• Lower Threshold: Adjust bearish signal level (default: -40) 📉
Applications 🌍
The MA Smoothed RSI For Loop | Opus is particularly effective for:
• Trend identification and confirmation across multiple timeframes
• Momentum analysis with reduced noise through MA smoothing
• Entry and exit signal generation with customizable sensitivity
• Market regime detection through the weighted for-loop calculation
Technical Methodology (Bonus Section) 🔍
1. RSI Calculation :
• Computes traditional RSI using the specified price source and length
• Applies the selected moving average type to smooth the RSI values
2. For-Loop Analysis :
• Compares current values against historical data within the specified range
• Implements optional weighting to give more importance to recent price action
3. Signal Generation :
• Generates signals based on threshold crossings
• Calculates trend strength and duration for additional confirmation
The indicator includes built-in alerts for both long and short signals, a customizable dashboard with three display styles (Minimal, Standard, Full), decorative elements like pulse effects and signal stars for enhanced visualization, and supports multiple color themes for different visual preferences.
All under a Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0) © 2025 Opus Capital 💼.
Triple Confirmation Scalper v2Bu strateji, trend takibi ve aşırı alım/satım koşullarını birleştirir. İşlem sinyallerini filtrelemek için hacim artışını kullanır.
This strategy combines trend following and overbought/sold conditions. It uses volume spike to filter out trading signals.
Triple Confirmation Scalper
3 temel gösterge + 2 filtre kullanarak yalancı sinyalleri minimize eder.
1. Kullanılan Göstergeler ve Parametreler:
Gösterge Parametreler Amacı
EMA 9 9 periyot (Close) Kısa vadeli momentum.
EMA 21 21 periyot (Close) Trend yönü.
RSI 14 periyot Aşırı alım/satım.
VWAP 20 periyot Ortalama giriş çıkış fiyatı.
OBV (On-Balance Volume) Hacim trendi.
Özellikler ve Optimizasyonlar:
Gelişmiş VWAP Hesaplaması: HLC3 (high+low+close/3) kullanarak daha doğru VWAP değerleri
Dinamik Risk Yönetimi:
Stop-loss: Son 5 mumun en düşük/en yüksek seviyesi ±%1
Take-profit: %1.5 kar hedefi (1.5:1 risk/reward)
Hacim Analizi:
OBV göstergesiyle hacim trendi onayı
20 periyotluk hacim ortalaması üzerinde spike kontrolü
Görselleştirmeler:
EMA'lar ve VWAP bantları çizilir
Trend yönüne göre arkaplan renklendirmesi
Alert Sistem:
Long/Short sinyalleri için tradingview alertleri
Strateji Ayarları:
%100 equity kullanımı
%0.1 komisyon hesaba katılmış
Long/Short pozisyonlara izin verilmiş
Daha agresif bir strateji için:
EMA periyotlarını 5-13 yapabilirsiniz
RSI eşiklerini 40-60 arasına çekebilirsiniz
Take-profit/Stop-loss oranlarını 2:1 yapabilirsiniz
“Triple Confirmation Scalper”
Minimizes false signals using 3 basic indicators + 2 filters.
1. Indicators and Parameters used:
Indicator Parameters Purpose
EMA 9 9 period (Close) Short-term momentum.
EMA 21 21 periods (Close) Trend direction.
RSI 14 periods Overbought/sold.
VWAP 20 periods Average entry and exit price.
OBV (On-Balance Volume) Volume trend.
Features and Optimizations:
Advanced VWAP Calculation: more accurate VWAP values using HLC3 (high+low+close/3)
Dynamic Risk Management:
Stop-loss Lowest/highest level of the last 5 candles ±1
Take-profit: 1.5% profit target (1.5:1 risk/reward)
Volume Analysis:
Volume trend confirmation with OBV indicator
Spike control over 20-period volume averaging
Visualizations:
EMAs and VWAP bands are plotted
Background coloring according to trend direction
Alert System:
Tradingview alerts for Long/Short signals
Strategy Settings:
100% equity utilization
0.1% commission taken into account
Long/Short positions allowed
02 SMC + BB Breakout (Improved)This strategy combines Smart Money Concepts (SMC) with Bollinger Band breakouts to identify potential trading opportunities. SMC focuses on identifying key price levels and market structure shifts, while Bollinger Bands help pinpoint overbought/oversold conditions and potential breakout points. The strategy also incorporates higher timeframe trend confirmation to filter out trades that go against the prevailing trend.
Key Components:
Bollinger Bands:
Calculated using a Simple Moving Average (SMA) of the closing price and a standard deviation multiplier.
The strategy uses the upper and lower bands to identify potential breakout points.
The SMA (basis) acts as a centerline and potential support/resistance level.
The fill between the upper and lower bands can be toggled by the user.
Higher Timeframe Trend Confirmation:
The strategy allows for optional confirmation of the current trend using a higher timeframe (e.g., daily).
It calculates the SMA of the higher timeframe's closing prices.
A bullish trend is confirmed if the higher timeframe's closing price is above its SMA.
This helps filter out trades that go against the prevailing long-term trend.
Smart Money Concepts (SMC):
Order Blocks:
Simplified as recent price clusters, identified by the highest high and lowest low over a specified lookback period.
These levels are considered potential areas of support or resistance.
Liquidity Zones (Swing Highs/Lows):
Identified by recent swing highs and lows, indicating areas where liquidity may be present.
The Swing highs and lows are calculated based on user defined lookback periods.
Market Structure Shift (MSS):
Identifies potential changes in market structure.
A bullish MSS occurs when the closing price breaks above a previous swing high.
A bearish MSS occurs when the closing price breaks below a previous swing low.
The swing high and low values used for the MSS are calculated based on the user defined swing length.
Entry Conditions:
Long Entry:
The closing price crosses above the upper Bollinger Band.
If higher timeframe confirmation is enabled, the higher timeframe trend must be bullish.
A bullish MSS must have occurred.
Short Entry:
The closing price crosses below the lower Bollinger Band.
If higher timeframe confirmation is enabled, the higher timeframe trend must be bearish.
A bearish MSS must have occurred.
Exit Conditions:
Long Exit:
The closing price crosses below the Bollinger Band basis.
Or the Closing price falls below 99% of the order block low.
Short Exit:
The closing price crosses above the Bollinger Band basis.
Or the closing price rises above 101% of the order block high.
Position Sizing:
The strategy calculates the position size based on a fixed percentage (5%) of the strategy's equity.
This helps manage risk by limiting the potential loss per trade.
Visualizations:
Bollinger Bands (upper, lower, and basis) are plotted on the chart.
SMC elements (order blocks, swing highs/lows) are plotted as lines, with user-adjustable visibility.
Entry and exit signals are plotted as shapes on the chart.
The Bollinger band fill opacity is adjustable by the user.
Trading Logic:
The strategy aims to capitalize on Bollinger Band breakouts that are confirmed by SMC signals and higher timeframe trend. It looks for breakouts that align with potential market structure shifts and key price levels (order blocks, swing highs/lows). The higher timeframe filter helps avoid trades that go against the overall trend.
In essence, the strategy attempts to identify high-probability breakout trades by combining momentum (Bollinger Bands) with structural analysis (SMC) and trend confirmation.
Key User-Adjustable Parameters:
Bollinger Bands Length
Standard Deviation Multiplier
Higher Timeframe
Higher Timeframe Confirmation (on/off)
SMC Elements Visibility (on/off)
Order block lookback length.
Swing lookback length.
Bollinger band fill opacity.
This detailed description should provide a comprehensive understanding of the strategy's logic and components.
***DISCLAIMER: This strategy is for educational purposes only. It is not financial advice. Past performance is not indicative of future results. Use at your own risk. Always perform thorough backtesting and forward testing before using any strategy in live trading.***
Auto TrendLines [TradingFinder] Support Resistance Signal Alerts🔵 Introduction
The trendline is one of the most essential tools in technical analysis, widely used in financial markets such as Forex, cryptocurrency, and stocks. A trendline is a straight line that connects swing highs or swing lows and visually indicates the market’s trend direction.
Traders use trendlines to identify price structure, the strength of buyers and sellers, dynamic support and resistance zones, and optimal entry and exit points.
In technical analysis, trendlines are typically classified into three categories: uptrend lines (drawn by connecting higher lows), downtrend lines (formed by connecting lower highs), and sideways trends (moving horizontally). A valid trendline usually requires at least three confirmed touchpoints to be considered reliable for trading decisions.
Trendlines can serve as the foundation for a variety of trading strategies, such as the trendline bounce strategy, valid breakout setups, and confluence-based analysis with other tools like candlestick patterns, divergences, moving averages, and Fibonacci levels.
Additionally, trendlines are categorized into internal and external, and further into major and minor levels, each serving unique roles in market structure analysis.
🔵 How to Use
Trendlines are a key component in technical analysis, used to identify market direction, define dynamic support and resistance zones, highlight strategic entry and exit points, and manage risk. For a trendline to be reliable, it must be drawn based on structural principles—not by simply connecting two arbitrary points.
🟣 Selecting Pivot Types Based on Trend Direction
The first step is to determine the market trend: uptrend, downtrend, or sideways.
Then, choose pivot points that match the trend type :
In an uptrend, trendlines are drawn by connecting low pivots, especially higher lows.
In a downtrend, trendlines are formed by connecting high pivots, specifically lower highs.
It is crucial to connect pivots of the same type and structure to ensure the trendline is valid and analytically sound.
🟣 Pivot Classification
This indicator automatically classifies pivot points into two categories :
Major Pivots :
MLL : Major Lower Low
MHL : Major Higher Low
MHH : Major Higher High
MLH : Major Lower High
These define the primary structure of the market and are typically used in broader structural analysis.
Minor Pivots :
mLL: minor Lower Low
mHL: minor Higher Low
mHH: minor Higher High
mLH: minor Lower High
These are used for drawing more precise trendlines within corrective waves or internal price movements.
Example : In a downtrend, drawing a trendline from an MHH to an mHH creates structural inconsistency and introduces noise. Instead, connect points like MHL to MHL or mLH to mLH for a valid trendline.
🟣 Drawing High-Precision Trendlines
To ensure a reliable trendline :
Use pivots of the same classification (Major with Major or Minor with Minor).
Ensure at least three valid contact points (three touches = structural confirmation).
Draw through candles with the least deviation (choose wicks or bodies based on confluence).
Preferably draw from right to left for better alignment with current market behavior.
Use parallel lines to turn a single trendline into a trendline zone, if needed.
🟣 Using Trendlines for Trade Entries
Bounce Entry: When price approaches the trendline and shows signs of reversal (e.g., a reversal candle, divergence, or support/resistance), enter in the direction of the trend with a logical stop-loss.
Breakout Entry: When price breaks through the trendline with strong momentum and a confirmation (such as a retest or break of structure), consider trading in the direction of the breakout.
🟣 Trendline-Based Risk Management
For bounce entries, the stop-loss is placed below the trendline or the last pivot low (in an uptrend).
For breakout entries, the stop-loss is set behind the breakout candle or the last structural level.
A broken trendline can also act as an exit signal from a trade.
🟣 Combining Trendlines with Other Tools (Confluence)
Trendlines gain much more strength when used alongside other analytical tools :
Horizontal support and resistance levels
Moving averages (such as EMA 50 or EMA 200)
Fibonacci retracement zones
Candlestick patterns (e.g., Engulfing, Pin Bar)
RSI or MACD divergences
Market structure breaks (BoS / ChoCH)
🔵 Settings
Pivot Period : This defines how sensitive the pivot detection is. A higher number means the algorithm will identify more significant pivot points, resulting in longer-term trendlines.
Alerts
Alert :
Enable or disable the entire alert system
Set a custom alert name
Choose how often alerts trigger (every time, once per bar, or on bar close)
Select the time zone for alert timestamps (e.g., UTC)
Each trendline type supports two alert types :
Break Alert : Triggered when price breaks the trendline
React Alert : Triggered when price reacts or bounces off the trendline
These alerts can be independently enabled or disabled for all trendline categories (Major/Minor, Internal/External, Up/Down).
Display :
For each of the eight trendline types, you can control :
Whether to show or hide the line
Whether to delete the previous line when a new one is drawn
Color, line style (solid, dashed, dotted), extension direction (e.g., right only), and width
Major lines are typically thicker and more opaque, while minor lines appear thinner and more transparent.
All settings are designed to give the user full control over the appearance, behavior, and alert system of the indicator, without requiring manual drawing or adjustments.
🔵 Conclusion
A trendline is more than just a line on the chart—it is a structural, strategic, and flexible tool in technical analysis that can serve as the foundation for understanding price behavior and making trading decisions. Whether in trending markets or during corrections, trendlines help traders identify market direction, key zones, and high-potential entry and exit points with precision.
The accuracy and effectiveness of a trendline depend on using structurally valid pivot points and adhering to proper market logic, rather than relying on guesswork or personal bias.
This indicator is built to solve that exact problem. It automatically detects and draws multiple types of trendlines based on actual price structure, separating them into Major/Minor and Internal/External categories, and respecting professional analytical principles such as pivot type, trend direction, and structural location.
[COG]Adaptive Volatility Bands# Adaptive Volatility Bands (AVB) Indicator Guide for Traders
## Special Acknowledgment 🙌
This script is inspired by and builds upon the foundational work of **DonovanWall**, a respected contributor to the trading community. His innovative approach to adaptive indicators has been instrumental in developing this advanced trading tool.
## What is the Adaptive Volatility Bands Indicator?
The Adaptive Volatility Bands (AVB) is a sophisticated technical analysis tool designed to help traders understand market dynamics by creating dynamic, responsive price channels that adapt to changing market conditions. Unlike traditional static indicators, this script uses advanced mathematical techniques to create flexible bands that adjust to market volatility in real-time.
## Key Features and Inputs
### 1. Price and Filtering Options
- **Price Source**: Determines the base price used for calculations (default is HLC3 - Average of High, Low, and Close)
- **Filter Poles**: Controls the smoothness of the indicator (1-9 poles)
- Lower values: More responsive, more noise
- Higher values: Smoother, but slower to react
### 2. Volatility and Band Settings
- **Sample Length**: Determines how many bars are used to calculate volatility (default 144)
- **Volatility Multiplier**: Adjusts the width of the main bands (default 1.414)
- **Outer Band Multiplier**: Controls the width of the outer bands (default 2.5)
- **Inner Band Ratio**: Positions the inner bands between the center and outer bands (default 0.25)
### 3. Advanced Processing Options
- **Lag Reduction Mode**: Helps reduce indicator delay
- **Fast Response Mode**: Makes the indicator more responsive to recent price changes
### 4. Signal and Visualization Options
- **Show Entry Signals**: Displays buy and sell signals
- **Signal Display Style**: Choose between labels or shapes
- **Range Filter**: Adds an additional filter for signal validation
## How the Indicator Works
The Adaptive Volatility Bands create a dynamic price channel with three key components:
1. **Center Line**: Represents the core trend direction
2. **Inner Bands**: Closer to the center line
3. **Outer Bands**: Wider bands that show broader price potential
### Color Dynamics
- The indicator uses a smart color gradient system
- Colors change based on price position within the bands
- Helps visualize bullish (green/blue) and bearish (red) market conditions
## Trading Strategies for Beginners
### Basic Entry Signals
- **Buy Signal**:
- Price touches the center line from below
- Candle is bullish (closes higher than it opens)
- Price is above the center line
- Trend is upward
- **Sell Signal**:
- Price touches the center line from above
- Candle is bearish (closes lower than it opens)
- Price is below the center line
- Trend is downward
### Risk Management Tips
1. Use the bands to identify:
- Potential trend changes
- Volatility levels
- Support and resistance areas
2. Combine with other indicators for confirmation
3. Always use stop-loss orders
4. Adjust parameters to match your trading style and asset
## When to Use This Indicator
Best suited for:
- Trending markets
- Swing trading
- Identifying potential entry and exit points
- Understanding market volatility
### Recommended Markets
- Stocks
- Forex
- Cryptocurrencies
- Futures
## Customization
The script offers extensive customization:
- Adjust smoothness
- Change band multipliers
- Modify color schemes
- Enable/disable features like lag reduction
## Important Considerations for Beginners
🚨 **Disclaimer**:
- No indicator guarantees profits
- Always practice with a demo account first
- Learn and understand the indicator before live trading
- Market conditions change, so continually adapt your strategy
## Getting Started
1. Add the script to your TradingView chart
2. Experiment with different settings
3. Backtest on historical data
4. Start with small positions
5. Continuously learn and improve
Happy Trading! 📈🔍
Cumulative Histogram TickThis script is designed to create a cumulative histogram based on tick data from a specific financial instrument. The histogram resets at the start of each trading session, which is defined by a fixed time.
Key Components:
Tick Data Retrieval:
The script fetches the closing tick values from the specified instrument using request.security("TICK.NY", timeframe.period, close). This line ensures that the script works with the tick data for each bar on the chart.
Session Start and End Detection:
Start Hour: The script checks if the current bar's time is 9:30 AM (hour == 9 and minute == 30). This is used to reset the cumulative value at the beginning of each trading session.
End Hour: It also checks if the current bar's time is 4:00 PM (hour == 16). However, this condition is used to prevent further accumulation after the session ends.
Cumulative Value Management:
Reset: When the start hour condition is met (startHour), the cumulative value (cumulative) is reset to zero. This ensures that each trading session starts with a clean slate.
Accumulation: For all bars that are not at the end hour (not endHour), the tick value is added to the cumulative total. This process continues until the end of the trading session.
Histogram Visualization:
The cumulative value is plotted as a histogram using plot.style_histogram. The color of the histogram changes based on whether the cumulative value is positive (green) or negative (red).
Usage
This script is useful for analyzing intraday market activity by visualizing the accumulation of tick data over a trading session. It helps traders identify trends or patterns within each session, which can be valuable for making informed trading decisions.
Enhanced Fuzzy SMA Analyzer (Multi-Output Proxy) [FibonacciFlux]EFzSMA: Decode Trend Quality, Conviction & Risk Beyond Simple Averages
Stop Relying on Lagging Averages Alone. Gain a Multi-Dimensional Edge.
The Challenge: Simple Moving Averages (SMAs) tell you where the price was , but they fail to capture the true quality, conviction, and sustainability of a trend. Relying solely on price crossing an average often leads to chasing weak moves, getting caught in choppy markets, or missing critical signs of trend exhaustion. Advanced traders need a more sophisticated lens to navigate complex market dynamics.
The Solution: Enhanced Fuzzy SMA Analyzer (EFzSMA)
EFzSMA is engineered to address these limitations head-on. It moves beyond simple price-average comparisons by employing a sophisticated Fuzzy Inference System (FIS) that intelligently integrates multiple critical market factors:
Price deviation from the SMA ( adaptively normalized for market volatility)
Momentum (Rate of Change - ROC)
Market Sentiment/Overheat (Relative Strength Index - RSI)
Market Volatility Context (Average True Range - ATR, optional)
Volume Dynamics (Volume relative to its MA, optional)
Instead of just a line on a chart, EFzSMA delivers a multi-dimensional assessment designed to give you deeper insights and a quantifiable edge.
Why EFzSMA? Gain Deeper Market Insights
EFzSMA empowers you to make more informed decisions by providing insights that simple averages cannot:
Assess True Trend Quality, Not Just Location: Is the price above the SMA simply because of a temporary spike, or is it supported by strong momentum, confirming volume, and stable volatility? EFzSMA's core fuzzyTrendScore (-1 to +1) evaluates the health of the trend, helping you distinguish robust moves from noise.
Quantify Signal Conviction: How reliable is the current trend signal? The Conviction Proxy (0 to 1) measures the internal consistency among the different market factors analyzed by the FIS. High conviction suggests factors are aligned, boosting confidence in the trend signal. Low conviction warns of conflicting signals, uncertainty, or potential consolidation – acting as a powerful filter against chasing weak moves.
// Simplified Concept: Conviction reflects agreement vs. conflict among fuzzy inputs
bullStrength = strength_SB + strength_WB
bearStrength = strength_SBe + strength_WBe
dominantStrength = max(bullStrength, bearStrength)
conflictingStrength = min(bullStrength, bearStrength) + strength_N
convictionProxy := (dominantStrength - conflictingStrength) / (dominantStrength + conflictingStrength + 1e-10)
// Modifiers (Volatility/Volume) applied...
Anticipate Potential Reversals: Trends don't last forever. The Reversal Risk Proxy (0 to 1) synthesizes multiple warning signs – like extreme RSI readings, surging volatility, or diverging volume – into a single, actionable metric. High reversal risk flags conditions often associated with trend exhaustion, providing early warnings to protect profits or consider counter-trend opportunities.
Adapt to Changing Market Regimes: Markets shift between high and low volatility. EFzSMA's unique Adaptive Deviation Normalization adjusts how it perceives price deviations based on recent market behavior (percentile rank). This ensures more consistent analysis whether the market is quiet or chaotic.
// Core Idea: Normalize deviation by recent volatility (percentile)
diff_abs_percentile = ta.percentile_linear_interpolation(abs(raw_diff), normLookback, percRank) + 1e-10
normalized_diff := raw_diff / diff_abs_percentile
// Fuzzy sets for 'normalized_diff' are thus adaptive to volatility
Integrate Complexity, Output Clarity: EFzSMA distills complex, multi-factor analysis into clear, interpretable outputs, helping you cut through market noise and focus on what truly matters for your decision-making process.
Interpreting the Multi-Dimensional Output
The true power of EFzSMA lies in analyzing its outputs together:
A high Trend Score (+0.8) is significant, but its reliability is amplified by high Conviction (0.9) and low Reversal Risk (0.2) . This indicates a strong, well-supported trend.
Conversely, the same high Trend Score (+0.8) coupled with low Conviction (0.3) and high Reversal Risk (0.7) signals caution – the trend might look strong superficially, but internal factors suggest weakness or impending exhaustion.
Use these combined insights to:
Filter Entry Signals: Require minimum Trend Score and Conviction levels.
Manage Risk: Consider reducing exposure or tightening stops when Reversal Risk climbs significantly, especially if Conviction drops.
Time Exits: Use rising Reversal Risk and falling Conviction as potential signals to take profits.
Identify Regime Shifts: Monitor how the relationship between the outputs changes over time.
Core Technology (Briefly)
EFzSMA leverages a Mamdani-style Fuzzy Inference System. Crisp inputs (normalized deviation, ROC, RSI, ATR%, Vol Ratio) are mapped to linguistic fuzzy sets ("Low", "High", "Positive", etc.). A rules engine evaluates combinations (e.g., "IF Deviation is LargePositive AND Momentum is StrongPositive THEN Trend is StrongBullish"). Modifiers based on Volatility and Volume context adjust rule strengths. Finally, the system aggregates these and defuzzifies them into the Trend Score, Conviction Proxy, and Reversal Risk Proxy. The key is the system's ability to handle ambiguity and combine multiple, potentially conflicting factors in a nuanced way, much like human expert reasoning.
Customization
While designed with robust defaults, EFzSMA offers granular control:
Adjust SMA, ROC, RSI, ATR, Volume MA lengths.
Fine-tune Normalization parameters (lookback, percentile). Note: Fuzzy set definitions for deviation are tuned for the normalized range.
Configure Volatility and Volume thresholds for fuzzy sets. Tuning these is crucial for specific assets/timeframes.
Toggle visual elements (Proxies, BG Color, Risk Shapes, Volatility-based Transparency).
Recommended Use & Caveats
EFzSMA is a sophisticated analytical tool, not a standalone "buy/sell" signal generator.
Use it to complement your existing strategy and analysis.
Always validate signals with price action, market structure, and other confirming factors.
Thorough backtesting and forward testing are essential to understand its behavior and tune parameters for your specific instruments and timeframes.
Fuzzy logic parameters (membership functions, rules) are based on general heuristics and may require optimization for specific market niches.
Disclaimer
Trading involves substantial risk. EFzSMA is provided for informational and analytical purposes only and does not constitute financial advice. No guarantee of profit is made or implied. Past performance is not indicative of future results. Use rigorous risk management practices.
Multi-Fibonacci Trend Average[FibonacciFlux]Multi-Fibonacci Trend Average (MFTA): An Institutional-Grade Trend Confluence Indicator for Discerning Market Participants
My original indicator/Strategy:
Engineered for the sophisticated demands of institutional and advanced traders, the Multi-Fibonacci Trend Average (MFTA) indicator represents a paradigm shift in technical analysis. This meticulously crafted tool is designed to furnish high-definition trend signals within the complexities of modern financial markets. Anchored in the rigorous principles of Fibonacci ratios and augmented by advanced averaging methodologies, MFTA delivers a granular perspective on trend dynamics. Its integration of Multi-Timeframe (MTF) filters provides unparalleled signal robustness, empowering strategic decision-making with a heightened degree of confidence.
MFTA indicator on BTCUSDT 15min chart with 1min RSI and MACD filters enabled. Note the refined signal generation with reduced noise.
MFTA indicator on BTCUSDT 15min chart without MTF filters. While capturing more potential trading opportunities, it also generates a higher frequency of signals, including potential false positives.
Core Innovation: Proprietary Fibonacci-Enhanced Supertrend Averaging Engine
The MFTA indicator’s core innovation lies in its proprietary implementation of Supertrend analysis, strategically fortified by Fibonacci ratios to construct a truly dynamic volatility envelope. Departing from conventional Supertrend methodologies, MFTA autonomously computes not one, but three distinct Supertrend lines. Each of these lines is uniquely parameterized by a specific Fibonacci factor: 0.618 (Weak), 1.618 (Medium/Golden Ratio), and 2.618 (Strong/Extended Fibonacci).
// Fibonacci-based factors for multiple Supertrend calculations
factor1 = input.float(0.618, 'Factor 1 (Weak/Fibonacci)', minval=0.01, step=0.01, tooltip='Factor 1 (Weak/Fibonacci)', group="Fibonacci Supertrend")
factor2 = input.float(1.618, 'Factor 2 (Medium/Golden Ratio)', minval=0.01, step=0.01, tooltip='Factor 2 (Medium/Golden Ratio)', group="Fibonacci Supertrend")
factor3 = input.float(2.618, 'Factor 3 (Strong/Extended Fib)', minval=0.01, step=0.01, tooltip='Factor 3 (Strong/Extended Fib)', group="Fibonacci Supertrend")
This multi-faceted architecture adeptly captures a spectrum of market volatility sensitivities, ensuring a comprehensive assessment of prevailing conditions. Subsequently, the indicator algorithmically synthesizes these disparate Supertrend lines through arithmetic averaging. To achieve optimal signal fidelity and mitigate inherent market noise, this composite average is further refined utilizing an Exponential Moving Average (EMA).
// Calculate average of the three supertends and a smoothed version
superlength = input.int(21, 'Smoothing Length', tooltip='Smoothing Length for Average Supertrend', group="Fibonacci Supertrend")
average_trend = (supertrend1 + supertrend2 + supertrend3) / 3
smoothed_trend = ta.ema(average_trend, superlength)
The resultant ‘Smoothed Trend’ line emerges as a remarkably responsive yet stable trend demarcation, offering demonstrably superior clarity and precision compared to singular Supertrend implementations, particularly within the turbulent dynamics of high-volatility markets.
Elevated Signal Confluence: Integrated Multi-Timeframe (MTF) Validation Suite
MFTA transcends the limitations of conventional trend indicators by incorporating an advanced suite of three independent MTF filters: RSI, MACD, and Volume. These filters function as sophisticated validation protocols, rigorously ensuring that only signals exhibiting a confluence of high-probability factors are brought to the forefront.
1. Granular Lower Timeframe RSI Momentum Filter
The Relative Strength Index (RSI) filter, computed from a user-defined lower timeframe, furnishes critical momentum-based signal validation. By meticulously monitoring RSI dynamics on an accelerated timeframe, traders gain the capacity to evaluate underlying momentum strength with precision, prior to committing to signal execution on the primary chart timeframe.
// --- Lower Timeframe RSI Filter ---
ltf_rsi_filter_enable = input.bool(false, title="Enable RSI Filter", group="MTF Filters", tooltip="Use RSI from lower timeframe as a filter")
ltf_rsi_timeframe = input.timeframe("1", title="RSI Timeframe", group="MTF Filters", tooltip="Timeframe for RSI calculation")
ltf_rsi_length = input.int(14, title="RSI Length", minval=1, group="MTF Filters", tooltip="Length for RSI calculation")
ltf_rsi_threshold = input.int(30, title="RSI Threshold", minval=0, maxval=100, group="MTF Filters", tooltip="RSI value threshold for filtering signals")
2. Convergent Lower Timeframe MACD Trend-Momentum Filter
The Moving Average Convergence Divergence (MACD) filter, also calculated on a lower timeframe basis, introduces a critical layer of trend-momentum convergence confirmation. The bullish signal configuration rigorously mandates that the MACD line be definitively positioned above the Signal line on the designated lower timeframe. This stringent condition ensures a robust indication of converging momentum that aligns synergistically with the prevailing trend identified on the primary timeframe.
// --- Lower Timeframe MACD Filter ---
ltf_macd_filter_enable = input.bool(false, title="Enable MACD Filter", group="MTF Filters", tooltip="Use MACD from lower timeframe as a filter")
ltf_macd_timeframe = input.timeframe("1", title="MACD Timeframe", group="MTF Filters", tooltip="Timeframe for MACD calculation")
ltf_macd_fast_length = input.int(12, title="MACD Fast Length", minval=1, group="MTF Filters", tooltip="Fast EMA length for MACD")
ltf_macd_slow_length = input.int(26, title="MACD Slow Length", minval=1, group="MTF Filters", tooltip="Slow EMA length for MACD")
ltf_macd_signal_length = input.int(9, title="MACD Signal Length", minval=1, group="MTF Filters", tooltip="Signal SMA length for MACD")
3. Definitive Volume Confirmation Filter
The Volume Filter functions as an indispensable arbiter of trade conviction. By establishing a dynamic volume threshold, defined as a percentage relative to the average volume over a user-specified lookback period, traders can effectively ensure that all generated signals are rigorously validated by demonstrably increased trading activity. This pivotal validation step signifies robust market participation, substantially diminishing the potential for spurious or false breakout signals.
// --- Volume Filter ---
volume_filter_enable = input.bool(false, title="Enable Volume Filter", group="MTF Filters", tooltip="Use volume level as a filter")
volume_threshold_percent = input.int(title="Volume Threshold (%)", defval=150, minval=100, group="MTF Filters", tooltip="Minimum volume percentage compared to average volume to allow signal (100% = average)")
These meticulously engineered filters operate in synergistic confluence, requiring all enabled filters to definitively satisfy their pre-defined conditions before a Buy or Sell signal is generated. This stringent multi-layered validation process drastically minimizes the incidence of false positive signals, thereby significantly enhancing entry precision and overall signal reliability.
Intuitive Visual Architecture & Actionable Intelligence
MFTA provides a demonstrably intuitive and visually rich charting environment, meticulously delineating trend direction and momentum through precisely color-coded plots:
Average Supertrend: Thin line, green/red for uptrend/downtrend, immediate directional bias.
Smoothed Supertrend: Bold line, teal/purple for uptrend/downtrend, cleaner, institutionally robust trend.
Dynamic Trend Fill: Green/red fill between Supertrends quantifies trend strength and momentum.
Adaptive Background Coloring: Light green/red background mirrors Smoothed Supertrend direction, holistic trend perspective.
Precision Buy/Sell Signals: ‘BUY’/‘SELL’ labels appear on chart when trend touch and MTF filter confluence are satisfied, facilitating high-conviction trade action.
MFTA indicator applied to BTCUSDT 4-hour chart, showcasing its effectiveness on higher timeframes. The Smoothed Length parameter is increased to 200 for enhanced smoothness on this timeframe, coupled with 1min RSI and Volume filters for signal refinement. This illustrates the indicator's adaptability across different timeframes and market conditions.
Strategic Applications for Institutional Mandates
MFTA’s sophisticated design provides distinct advantages for advanced trading operations and institutional investment mandates. Key strategic applications include:
High-Probability Trend Identification: Fibonacci-averaged Supertrend with MTF filters robustly identifies high-probability trend continuations and reversals, enhancing alpha generation.
Precision Entry/Exit Signals: Volume and momentum-filtered signals enable institutional-grade precision for optimized risk-adjusted returns.
Algorithmic Trading Integration: Clear signal logic facilitates seamless integration into automated trading systems for scalable strategy deployment.
Multi-Asset/Timeframe Versatility: Adaptable parameters ensure applicability across diverse asset classes and timeframes, catering to varied trading mandates.
Enhanced Risk Management: Superior signal fidelity from MTF filters inherently reduces false signals, supporting robust risk management protocols.
Granular Customization and Parameterized Control
MFTA offers unparalleled customization, empowering users to fine-tune parameters for precise alignment with specific trading styles and market conditions. Key adjustable parameters include:
Fibonacci Factors: Adjust Supertrend sensitivity to volatility regimes.
ATR Length: Control volatility responsiveness in Supertrend calculations.
Smoothing Length: Refine Smoothed Trend line responsiveness and noise reduction.
MTF Filter Parameters: Independently configure timeframes, lookback periods, and thresholds for RSI, MACD, and Volume filters for optimal signal filtering.
Disclaimer
MFTA is meticulously engineered for high-quality trend signals; however, no indicator guarantees profit. Market conditions are unpredictable, and trading involves substantial risk. Rigorous backtesting and forward testing across diverse datasets, alongside a comprehensive understanding of the indicator's logic, are essential before live deployment. Past performance is not indicative of future results. MFTA is for informational and analytical purposes only and is not financial or investment advice.
Forexsom MA Crossover SignalsA Trend-Following Trading Indicator for TradingView
Overview
This indicator plots two moving averages (MA) on your chart and generates visual signals when they cross, helping traders identify potential trend reversals. It is designed to be simple yet effective for both beginners and experienced traders.
Key Features
✅ Dual Moving Averages – Plots a Fast MA (default: 9-period) and a Slow MA (default: 21-period)
✅ Customizable MA Types – Choose between EMA (Exponential Moving Average) or SMA (Simple Moving Average)
✅ Clear Buy/Sell Signals – Displays "BUY" (green label) when the Fast MA crosses above the Slow MA and "SELL" (red label) when it crosses below
✅ Alerts – Get notified when new signals appear (compatible with TradingView alerts)
✅ Clean Visuals – Easy-to-read moving averages with adjustable colors
How It Works
Bullish Signal (BUY) → Fast MA crosses above Slow MA (suggests uptrend)
Bearish Signal (SELL) → Fast MA crosses below Slow MA (suggests downtrend)
Best Used For
✔ Trend-following strategies (swing trading, day trading)
✔ Confirming trend reversals
✔ Filtering trade entries in combination with other indicators
Customization Options
Adjust Fast & Slow MA lengths
Switch between EMA or SMA for smoother or more responsive signals
Why Use This Indicator?
Simple & Effective – No clutter, just clear signals
Works on All Timeframes – From scalping (1M, 5M) to long-term trading (4H, Daily)
Alerts for Real-Time Trading – Never miss a signal
Trendline Breaks with Multi Fibonacci Supertrend StrategyTMFS Strategy: Advanced Trendline Breakouts with Multi-Fibonacci Supertrend
Elevate your algorithmic trading with institutional-grade signal confluence
Strategy Genesis & Evolution
This advanced trading system represents the culmination of a personal research journey, evolving from my custom " Multi Fibonacci Supertrend with Signals " indicator into a comprehensive trading strategy. Built upon the exceptional trendline detection methodology pioneered by LuxAlgo in their " Trendlines with Breaks " indicator, I've engineered a systematic framework that integrates multiple technical factors into a cohesive trading system.
Core Fibonacci Principles
At the heart of this strategy lies the Fibonacci sequence application to volatility measurement:
// Fibonacci-based factors for multiple Supertrend calculations
factor1 = input.float(0.618, 'Factor 1 (Weak/Fibonacci)', minval = 0.01, step = 0.01)
factor2 = input.float(1.618, 'Factor 2 (Medium/Golden Ratio)', minval = 0.01, step = 0.01)
factor3 = input.float(2.618, 'Factor 3 (Strong/Extended Fib)', minval = 0.01, step = 0.01)
These precise Fibonacci ratios create a dynamic volatility envelope that adapts to changing market conditions while maintaining mathematical harmony with natural price movements.
Dynamic Trendline Detection
The strategy incorporates LuxAlgo's pioneering approach to trendline detection:
// Pivotal swing detection (inspired by LuxAlgo)
pivot_high = ta.pivothigh(swing_length, swing_length)
pivot_low = ta.pivotlow(swing_length, swing_length)
// Dynamic slope calculation using ATR
slope = atr_value / swing_length * atr_multiplier
// Update trendlines based on pivot detection
if bool(pivot_high)
upper_slope := slope
upper_trendline := pivot_high
else
upper_trendline := nz(upper_trendline) - nz(upper_slope)
This adaptive trendline approach automatically identifies key structural market boundaries, adjusting in real-time to evolving chart patterns.
Breakout State Management
The strategy implements sophisticated state tracking for breakout detection:
// Track breakouts with state variables
var int upper_breakout_state = 0
var int lower_breakout_state = 0
// Update breakout state when price crosses trendlines
upper_breakout_state := bool(pivot_high) ? 0 : close > upper_trendline ? 1 : upper_breakout_state
lower_breakout_state := bool(pivot_low) ? 0 : close < lower_trendline ? 1 : lower_breakout_state
// Detect new breakouts (state transitions)
bool new_upper_breakout = upper_breakout_state > upper_breakout_state
bool new_lower_breakout = lower_breakout_state > lower_breakout_state
This state-based approach enables precise identification of the exact moment when price breaks through a significant trendline.
Multi-Factor Signal Confluence
Entry signals require confirmation from multiple technical factors:
// Define entry conditions with multi-factor confluence
long_entry_condition = enable_long_positions and
upper_breakout_state > upper_breakout_state and // New trendline breakout
di_plus > di_minus and // Bullish DMI confirmation
close > smoothed_trend // Price above Supertrend envelope
// Execute trades only with full confirmation
if long_entry_condition
strategy.entry('L', strategy.long, comment = "LONG")
This strict requirement for confluence significantly reduces false signals and improves the quality of trade entries.
Advanced Risk Management
The strategy includes sophisticated risk controls with multiple methodologies:
// Calculate stop loss based on selected method
get_long_stop_loss_price(base_price) =>
switch stop_loss_method
'PERC' => base_price * (1 - long_stop_loss_percent)
'ATR' => base_price - long_stop_loss_atr_multiplier * entry_atr
'RR' => base_price - (get_long_take_profit_price() - base_price) / long_risk_reward_ratio
=> na
// Implement trailing functionality
strategy.exit(
id = 'Long Take Profit / Stop Loss',
from_entry = 'L',
qty_percent = take_profit_quantity_percent,
limit = trailing_take_profit_enabled ? na : long_take_profit_price,
stop = long_stop_loss_price,
trail_price = trailing_take_profit_enabled ? long_take_profit_price : na,
trail_offset = trailing_take_profit_enabled ? long_trailing_tp_step_ticks : na,
comment = "TP/SL Triggered"
)
This flexible approach adapts to varying market conditions while providing comprehensive downside protection.
Performance Characteristics
Rigorous backtesting demonstrates exceptional capital appreciation potential with impressive risk-adjusted metrics:
Remarkable total return profile (1,517%+)
Strong Sortino ratio (3.691) indicating superior downside risk control
Profit factor of 1.924 across all trades (2.153 for long positions)
Win rate exceeding 35% with balanced distribution across varied market conditions
Institutional Considerations
The strategy architecture addresses execution complexities faced by institutional participants with temporal filtering and date-range capabilities:
// Time Filter settings with flexible timezone support
import jason5480/time_filters/5 as time_filter
src_timezone = input.string(defval = 'Exchange', title = 'Source Timezone')
dst_timezone = input.string(defval = 'Exchange', title = 'Destination Timezone')
// Date range filtering for precise execution windows
use_from_date = input.bool(defval = true, title = 'Enable Start Date')
from_date = input.time(defval = timestamp('01 Jan 2022 00:00'), title = 'Start Date')
// Validate trading permission based on temporal constraints
date_filter_approved = time_filter.is_in_date_range(
use_from_date, from_date, use_to_date, to_date, src_timezone, dst_timezone
)
These capabilities enable precise execution timing and market session optimization critical for larger market participants.
Acknowledgments
Special thanks to LuxAlgo for the pioneering work on trendline detection and breakout identification that inspired elements of this strategy. Their innovative approach to technical analysis provided a valuable foundation upon which I could build my Fibonacci-based methodology.
This strategy is shared under the same Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license as LuxAlgo's original work.
Past performance is not indicative of future results. Conduct thorough analysis before implementing any algorithmic strategy.
Original Gann Swing Chart Rules [AlgoFuego]🔵 Original Gann Swing Chart Rules
An advanced indicator built on W.D. Gann’s original rules, enhanced with innovative mechanical trend-following methods.
🔹 Description
This indicator functions by balancing short-term adaptability with long-term trend analysis.
The indicator incorporates Gann’s principles alongside mechanical trend-following techniques to offer a structured method for analyzing trends and detecting potential market reversals.
Golden Rule: Non-trend bars are excluded from analysis, and each new bar is compared with the previous trend bar, it highlights significant swing points with greater clarity.
🔸 The core concept behind the golden rule on which this indicator is built.
The person watching the tide coming, wanting to pinpoint the exact spot that signals the high tide, places a stick in the sand at the points where the incoming waves reach until the stick reaches a position where the waves no longer rise, and eventually recedes enough to show that the tide has shifted.
This method is effective for monitoring and identifying tides and floods in the stock market.
🔸Rule 1: The trend bar is everything.
→It is a bar that forms a new high, low, or both.
🔸Rule 2: The professional traders track new highs and lows.
🔸Rule 3: The hidden bar is nothing.
→It is a bar that does not form a new high, low, or both.
🔸Rule 4: The sea has a wavy nature, and the market as well.
🔸Rule 5: The slope is the immediate direction of the swing.
Downward slope
→The downslope is the descending slope of a swing, shows a decline, reflecting a bearish price trend.
Upward slope
→The upslope is the ascending slope of a swing, shows an incline, reflecting a bullish price trend.
🔸Rule 6: The start and end of the movement are the swing points.
→The lowest or highest price of the last bar in the direction of the slope represents the swing point after the slopes direction changes.
Valley
→It is the lowest price of the last bar in a downslope before the market turns to a upslope.
End=> Downward slope and Start=> Upward slope
Peak
→It is the highest price of the last bar in a upslope before the market turns to an downslope.
End=> Upward slope and Start=> Downward slope
🔸Rule 7: The Golden Rule: Ignore all no-trend bars and compare the new bar with the previous trend bar.
→Applying the golden rule in upward slope
→Applying the golden rule in downward slope
🔸 Related content: Personal words of W.D Gann from the book Wall Street Stock Selector.
→"This was only one month's reaction the same as March 1925. The market held in a dull narrow range for about 2 months while accumulation was taking place and in June the main trend turned up again."
→The beginning of the main trend and the formation of the Valley.
→The beginning of the main trend and the formation of the Peak.
🔸 Rule 8: The Closing Price of the Bar to Understand Movement Direction.
Sequence is important
→ Downward bar
→ Upward bar
🔸 Outside Bar Rules
→Explanation of rules and calculations.
🔸 How does a trend start?
Upward trend
Trend change from Downward to Upward.
Prices must take out the nearest 'Peak' and the Trend was previously Downward.
A breakout above the previous peak signals a bullish reversal.
→ Model 1 - Dropping Valley Reversal
The market forms a dropping valley, followed by a breakout above the previous peak.
→ Model 2 - Equal Valley Reversal
The market forms an equal valley, followed by a breakout above the previous peak.
→ Model 3 - Rising Valley Reversal
The market forms a rising valley, followed by a breakout above the previous peak.
Downward trend
Trend change from Upward to Downward.
Prices must take out the nearest ‘Valley' and the Trend was previously Upward.
A breakdown below the previous valley signals a bearish reversal.
→ Model 1 - Rising Peak Reversal
The market forms a rising peak, followed by a breakdown below the previous valley.
→ Model 2 - Equal Peak Reversal
The market forms an equal peak, followed by a breakdown below the previous valley.
→ Model 3 - Dropping Peak Reversal
The market forms a dropping peak, followed by a breakdown below the previous valley.
🔸 The fractal nature of markets
Rising wave
→ The rising wave is the entire bull market between turning points
High point : When the Main trend turns from upward to downward, the peak of the primary trend is formed.
Dropping wave
→ The Dropping wave is the entire bear market between turning points.
Low point : When the Main trend turns from downward to upward, the primary trend valley is formed.
Fractal nature application.
Everything in one picture.
🔹 Features
Strict adherence to the rules: Follows the Original Gann Swing Chart Rules to detect swing points.
Fractal analysis: Uses trend bars and fractal analysis to identify swing points.
Robust functionality: Engineered to handle complex market conditions with advanced logic.
Custom alerts: Alerts for peak/valley completion, main and primary trend reversals & continuations.
Golden rule application: Filters out non-trend bars by comparing only with the last trend bar.
Reversal & trend detection: Applies eight outside bar rules to detect trend reversals and continuations.
Dynamic customization: Fully customizable settings.
🔹 Settings overview
Fine-tune the indicator to match your unique trading strategy by adjusting trend settings, customizing alerts, and modifying visualization options.
1. Main trend settings
Hide/Show Main trend options: Instantly hide all main trend options (alerts remain separate).
Main trendline display & alerts: Toggle trendline visibility and set alerts for peaks and valleys.
Trendline customization: Adjust styles, colors, and slopes for upward/downward trends.
Peaks & Valleys markers: Show/hide points and customize their color and size.
Opposite Main trend turning points: Enable alerts and modify style, width, color, and offset.
Breakout/Breakdown points: Set alerts and customize their appearance.
2. Primary trend settings
Hide/Show primary trend options: Instantly hide all primary trend options (alerts remain separate).
Primary trendline display & alerts: Toggle trendline visibility and set alerts for peaks and valleys.
Trendline customization: Adjust styles, colors, and slopes for upward/downward trends.
Peaks & Valleys markers: Show/hide points and customize their color and size.
Opposite primary trend turning points: Enable alerts and modify style, width, color, and offset.
Breakout/Breakdown points: Set alerts and customize their appearance.
3. Additional options
Tooltips display: Control tooltip visibility for labels and languages.
Candle/Bar coloring: Customize candle and bar colors based on algorithm-selected trends.
🔸 Additional features
🔹Custom reading of bars.
The arrow represents the direction of the slope, the dot is the type of trend, and the line is the closing price.
🔹 Advanced Moving Average Activator
The Advanced Moving Average Activator, this setting calculates the average closing prices of trend bars only, which are the only bars considered by Gann.
The advantage of this method is that it helps avoid hidden bars that are not accounted for, making the difference more evident in a ranging market. The values are updated only when new highs or lows occur.
Additionally, you can set alerts when the price closes above or below the moving average.
🔹 Bar Counter
After a trend change, you can see exactly when the shift occurred and customize the type of trend you want to track.
For example, by conducting your own research on the assets you trade, based on historical data, you might discover valuable insights, such as the primary trend possibly lasting longer than 20 bars!
You can use these insights to refine your trading strategy and make more data-driven decisions.
🔹 How to use
Step 1: Configure the settings and choose your trading approach
Adjust the indicator settings to match your trading style and market conditions.
Effectively using the indicator starts with selecting your preferred trading style.
You can trade in alignment with the primary trend, capitalize on market reversals, or take advantage of breakouts.
Trading with the primary trend: Best for traders who prefer longer-term positions with higher stability.
Trading reversals: Ideal for those looking to enter at potential turning points but requires additional confirmation.
Trading breakouts: Suitable for traders targeting strong price movements after key level breakouts.
Adapting to market volatility: Monitor changing volatility and adjust your strategy accordingly for optimal results.
Step 2: Analyze the chart
Apply the indicator to your TradingView chart and interpret swing signals for informed decisions.
Carefully study the chart patterns to detect subtle signals.
Check if similar signals worked well in past market conditions.
Use multi-timeframe analysis for a broader perspective.
Step 3: Trade with the primary trend
Utilize trend direction to align trades with prevailing market movements.
Always trade in the direction of the primary trend.
Confirm the trend direction using multiple indicators or by relying on the primary trend as confirmation!.
Avoid trading against strong market momentum.
Step 4: Identify entry signals
Use indicator signals to identify ideal trade entry points.
Look for confirmation before entering a trade.
Wait for clear signals to avoid false entries.
Practice on a demo account to build confidence in your entry strategy.
Step 5: Apply risk management
Define stop-loss and take-profit levels to protect your capital effectively.
Set stop-loss orders at strategic levels to limit potential losses.
Risk only a small percentage of your capital per trade.
Adjust risk levels based on your overall portfolio performance.
Step 6: Confirm with trend analysis
Validate trends using additional indicators for a higher probability of success.
Use complementary tools to confirm trend direction.
Monitor trend changes to adjust your strategy promptly.
Keep an eye on volume indicators for added confirmation.
Step 7: Execute the trade
Enter trades based on confirmed signals and predefined strategy rules.
Ensure all your criteria are met before executing a trade.
Stay disciplined and stick to your strategy.
Review market conditions right before execution.
Step 8: Monitor the trade
Track trade performance and make adjustments as necessary.
Keep an eye on market conditions throughout the trade.
Be ready to adjust your strategy if unexpected events occur.
Use trailing stops to secure profits while allowing for gains.
Step 9: Implement exit strategy
Close trades strategically based on your pre-established exit plan.
Plan your exit strategy in advance and adhere to it.
Consider partial exits to secure profits along the way.
Avoid emotional decisions when closing trades.
Step 10: Review performance
Analyze past trades to continuously refine and improve your strategy.
Regularly review and document your trades for insights.
Identify patterns in both your successes and mistakes.
Update your strategy based on comprehensive performance reviews.
🔹 Disclosure
While this script is useful and provides insight into market tops, bottoms, and trend trading, it's critical to understand that past performance is not necessarily indicative of future results and there are many more factors that go into being a profitable trader.
Logarithmic Regression Channel-Trend [BigBeluga]
This indicator utilizes logarithmic regression to track price trends and identify overbought and oversold conditions within a trend. It provides traders with a dynamic channel based on logarithmic regression, offering insights into trend strength and potential reversal zones.
🔵Key Features:
Logarithmic Regression Trend Tracking: Uses log regression to model price trends and determine trend direction dynamically.
f_log_regression(src, length) =>
float sumX = 0.0
float sumY = 0.0
float sumXSqr = 0.0
float sumXY = 0.0
for i = 0 to length - 1
val = math.log(src )
per = i + 1.0
sumX += per
sumY += val
sumXSqr += per * per
sumXY += val * per
slope = (length * sumXY - sumX * sumY) / (length * sumXSqr - sumX * sumX)
average = sumY / length
intercept = average - slope * sumX / length + slope
Regression-Based Channel: Plots a log regression channel around the price to highlight overbought and oversold conditions.
Adaptive Trend Colors: The color of the regression trend adjusts dynamically based on price movement.
Trend Shift Signals: Marks trend reversals when the log regression line cross the log regression line 3 bars back.
Dashboard for Key Insights: Displays:
- The regression slope (multiplied by 100 for better scale).
- The direction of the regression channel.
- The trend status of the logarithmic regression band.
🔵Usage:
Trend Identification: Observe the regression slope and channel direction to determine bullish or bearish trends.
Overbought/Oversold Conditions: Use the channel boundaries to spot potential reversal zones when price deviates significantly.
Breakout & Continuation Signals: Price breaking outside the channel may indicate strong trend continuation or exhaustion.
Confirmation with Other Indicators: Combine with volume or momentum indicators to strengthen trend confirmation.
Customizable Display: Users can modify the lookback period, channel width, midline visibility, and color preferences.
Logarithmic Regression Channel-Trend is an essential tool for traders who want a dynamic, regression-based approach to market trends while monitoring potential price extremes.
Parabolic SAR Deviation [BigBeluga]Parabolic SAR + Deviation is an enhanced Parabolic SAR indicator designed to detect trends while incorporating deviation levels and trend change markers for added depth in analyzing price movements.
🔵 Key Features:
> Parabolic SAR with Optimized Settings:
Built on the classic Parabolic SAR, this version uses predefined default settings to enhance its ability to detect and confirm trends.
Clear trend direction is indicated by smooth trend lines, allowing traders to easily visualize market movements.
Trend Change Markers:
When a trend change occurs based on the SAR, the indicator plots a triangle at the trend change point.
The triangle is accompanied by the price value of the trend change, allowing traders to identify key reversal points instantly.
> Deviation Levels:
Four deviation levels are automatically plotted when a trend change occurs (up or down).
Uptrend: Deviation levels are positioned above the entry point.
Downtrend: Deviation levels are positioned below the entry point.
Levels are labeled with numbers 1 to 4, representing increasing degrees of deviation.
> Dynamic Level Updates:
When the price crosses a deviation level, the level becomes dashed and its label changes to display the volume at the breakout point.
This volume information helps traders assess the strength of the breakout and the potential for trend continuation or reversal.
> Volume Analysis at Breakpoints:
The volume displayed at crossed deviation levels provides insight into the strength of the price movement.
High volume at a breakout may indicate strong momentum, while low volume could signal potential exhaustion or a false breakout.
🔵 Usage:
Identify Trends: Use the trend change triangles and smooth SAR trend lines to confirm whether the market is trending up or down.
Analyze Deviation Levels: Monitor deviation levels **1–4** to identify potential breakout points and assess the degree of price deviation from the entry point.
Observe Trend Change Points: Utilize the triangles and price labels to quickly spot significant trend changes.
Volume Insights: Evaluate the volume displayed at crossed levels to determine the strength of the breakout and assess the likelihood of trend continuation or reversal.
Risk Management: Use deviation levels as potential stop-loss or take-profit zones, depending on the strength of the trend and volume conditions.
Parabolic SAR + Deviation is an essential tool for traders seeking a straightforward yet powerful method to identify trends, analyze price deviations, and gain insights into volume dynamics at critical breakout and trend change levels.
TheRookAlgoPROThe Rook Algo PRO is an automated strategy that uses ICT dealing ranges to get in sync with potential market trends. It detects the market sentiment and then place a sell or a buy trade in premium/discount or in breakouts with the desired risk management.
Why is useful?
This algorithm is designed to help traders to quickly identify the current state of the market and easily back test their strategy over longs periods of time and different markets its ideal for traders that want to profit on potential expansions and want to avoid consolidations this algo will tell you when the expansion is likely to begin and when is just consolidating and failing moves to avoid trading.
How it works and how it does it?
The Algo detects the current and previous market structure to identify current ranges and ICT dealing ranges that are created when the market takes buyside liquidity and sellside liquidity, it will tell if the market is in a consolidation, expansion, retracement or in a potential turtle soup environment, it will tell if the range is small or big compared to the previous one. Is important to use it in a trending markets because when is ranging the signals lose effectiveness.
This algo is similar to the previously released the Rook algo with the additional features that is an automated strategy that can take trades using filters with the desired risk reward and different entry types and trade management options.
Also this version plots FVGS(fair value gaps) during expansions, and detects consolidations with a box and the mid point or average. Some bars colors are available to help in the identification of the market state. It has the option to show colors of the dealing ranges first detected state.
How to use it?
Start selecting the desired type of entry you want to trade, you can choose to take Discount longs, premium sells, breakouts longs and sells, this first four options are the selected by default. You can enable riskier options like trades without confirmation in premium and discount or turtle soup of the current or previous dealing range. This last ones are ideal for traders looking to enter on a counter trend but has to be used with caution with a higher timeframe reference.
In the picture below we can see a premium sell signal configuration followed by a discount buy signal It display the stop break even level and take profit.
This next image show how the riskier entries work. Because we are not waiting for a confirmation and entering on a counter trend is normal to experience some stop losses because the stop is very tight. Should only be used with a clear Higher timeframe reference as support of the trade idea. This algo has the option to enable standard deviations from the normal stop point to prevent liquidity sweeps. The purple or blue arrows indicate when we are in a potential turtle soup environment.
The algo have a feature called auto-trade enable by default that allow for a reversal of the current trade in case it meets the criteria. And also can take all possible buys or all possible sells that are riskier entries if you just want to see the market sentiment. This is useful when the market is very volatile but is moving not just ranging.
Then we configure the desired trade filters. We have the options to trade only when dealing ranges are in sync for a more secure trend, or we can disable it to take riskier trades like turtle soup trades. We can chose the minimum risk reward to take the trade and the target extension from the current range and the exit type can be when we hit the level or in a retracement that is the default setting. These setting are the most important that determine profitability of the strategy, they has be adjusted depending on the timeframe and market we are trading.
The stop and target levels can also be configured with standard deviations from the current range that way can be adapted to the market volatility.
The Algo allow the user to chose if it want to place break even, or trail the stop. In the picture below we can see it in action. This can work when the trend is very strong if not can lead to multiple reentries or loses.
The last option we can configure is the time where the trades are going to be taken, if we trade usually in the morning then we can just add the morning time by default is set to the morning 730am to 1330pm if you want to trade other times you should change this. Or if we want to enter on the ICT macro times can also be added in a filter. Trade taken with the macro times only enable is visible in the picture below.
Strategy Results
The results are obtained using 2000usd in the MNQ! In the 15minutes timeframe 1 contract per trade. Commission are set to 2USD, slippage to 1tick, the backtesting range is from May 2 2024 to March 2025 for a total of 119 trades, this Strategy default settings are designed to take trades on the daily expansions, trail stop and Break even is activated the exit on profit is on a retracement, and for loses when the stop is hit. The auto-trade option is enable to allow to detect quickly market changes. The strategy give realistic results, makes around 200% of the account in around a year. 1.4 profit factor with around 37% profitable trades. These results can be further improve and adapted to the specific style of trading using the filters.
Remember entries constitute only a small component of a complete winning strategy. Other factors like risk management, position-sizing, trading frequency, trading fees, and many others must also be properly managed to achieve profitability. Past performance doesn’t guarantee future results.
Summary of features
-Easily Identify the current dealing range and market state to avoid consolidations
-Recognize expansions with FVGs and consolidation with shaded boxes
-Recognize turtle soups scenarios to avoid fake out breakout
-Configurable automated trades in premium/discount or breakouts
-Auto-trade option that allow for reversal of the current trade when is no longer valid
-Time filter to allow only entries around the times you trade or on the macro times.
-Risk Reward filter to take the automated trades with visible stop and take profit levels
-Customizable trade management take profit, stop, breakeven level with standard deviations
-Trail stop option to secure profit when price move in your favor
-Option to exit on a close, retracement or reversal after hitting the take profit level
-Option to exit on a close or reversal after hitting stop loss
-Dashboard with instant statistics about the strategy current settings and market sentiment
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.
[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!