Trend Filter (2-pole) [BigBeluga]Trend Filter (2-pole)
The Trend Filter (2-pole) is an advanced trend-following indicator based on a two-pole filter, which smooths out market noise while effectively highlighting trends and their strength. It incorporates color gradients and support/resistance dots to enhance trend visualization and decision-making for traders.
SP500:
🔵What is a Two-Pole Filter?
A two-pole filter is a digital signal processing technique widely used in electronics, control systems, and time series data analysis to smooth data and reduce noise.
//@function Two-pole filter
//@param src (series float) Source data (e.g., price)
//@param length (float) Length of the filter (higher value means smoother output)
//@param damping (float) Damping factor for the filter
//@returns (series float) Filtered value
method two_pole_filter(float src, int length, float damping) =>
// Calculate filter coefficients
float omega = 2.0 * math.pi / length
float alpha = damping * omega
float beta = math.pow(omega, 2)
// Initialize the filter variables
var float f1 = na
var float f2 = na
// Update the filter
f1 := nz(f1 ) + alpha * (src - nz(f1 ))
f2 := nz(f2 ) + beta * (f1 - nz(f2 ))
f2
It operates using two cascaded smoothing stages (poles), allowing for a more refined and responsive output compared to simple moving averages or other basic filters.
Two-pole filters are particularly valued for their ability to maintain smooth transitions while reducing lag, making them ideal for applications where precision and responsiveness are critical.
In trading, this filter helps detect trends by smoothing price data while preserving significant directional changes.
🔵Key Features of the Indicator:
Gradient-Colored Trend Filter Line: The main filter line dynamically changes color based on trend strength and direction:
- Green: Strong uptrend.
- Red: Strong downtrend.
- Yellow: Indicates a transition phase, signaling potential trend shifts.
Support and Resistance Dots with Signals:
- Dots are plotted below the filter line during uptrends and above it during downtrends.
- These dots represent consecutive rising or falling conditions of the filter line, which traders can set in the settings (e.g., the number of consecutive rises or falls required).
- The dots often act as dynamic support or resistance levels, providing valuable guidance during trends.
- Trend Signals:
Customizable Sensitivity: The indicator allows traders to adjust the filter length, damping factor, and the threshold for rising/falling conditions, enabling it to adapt to different trading styles and timeframes.
Bar Color Option: The indicator can optionally color bars to match the gradient of the filter line, enhancing visual clarity of trends directly on the price chart.
🔵How It Works:
The Trend Filter (2-pole) smooths price data using a two-pole filter, which reduces noise and highlights the underlying trend.
The gradient coloring of the filter line helps traders visually assess the strength and direction of trends.
Rising and falling conditions of the filter line are tracked, and dots are plotted when consecutive conditions meet the threshold, acting as potential support or resistance levels during trends.
The yellow transition color signals periods of indecision, helping traders anticipate potential reversals or consolidations.
🔵Use Cases:
Identify and follow strong uptrends and downtrends with gradient-based visual cues.
Use the yellow transition color to anticipate trend shifts or consolidation zones.
Leverage the plotted dots as dynamic support and resistance levels to refine entry and exit strategies.
Combine with other indicators for confirmation of trends and reversals.
This indicator is perfect for traders who want a visually intuitive and highly customizable tool to spot trends, gauge their strength, and make informed trading decisions.
Göstergeler ve stratejiler
Machine Learning Price Target Prediction Signals [AlgoAlpha]Introducing the Machine Learning Price Target Predictions, a cutting-edge trading tool that leverages kernel regression to provide accurate price targets and enhance your trading strategy. This indicator combines trend-based signals with advanced machine learning techniques, offering predictive insights into potential price movements. Perfect for traders looking to make data-driven decisions with confidence.
What is Kernel Regression and How It Works
Kernel regression is a non-parametric machine learning technique that estimates the relationship between variables by weighting data points based on their similarity to a given input. The similarity is determined using a kernel function, such as the Gaussian (RBF) kernel, which assigns higher weights to closer data points and progressively lower weights to farther ones. This allows the model to make smooth and adaptive predictions, balancing recent data and historical trends.
Key Features
🎯 Predictive Price Targets : Uses kernel regression to estimate the magnitude of price movements.
📈 Dynamic Trend Analysis : Multiple trend detection methods, including EMA crossovers, Hull Moving Average, and SuperTrend.
🔧 Customizable Settings : Adjust bandwidth for kernel regression and tweak trend indicator parameters to suit your strategy.
📊 Visual Trade Levels : Displays take-profit and stop-loss levels directly on the chart with customizable colors.
📋 Performance Metrics : Real-time win rate, recommended risk-reward ratio, and training data size displayed in an on-chart table.
🔔 Alerts : Get notified for new trends, take-profit hits, and stop-loss triggers.
How to Use
🛠 Add the Indicator : Add it to your favorites and apply it to your chart. Configure the trend detection method (SuperTrend, HMA, or EMA crossover) and other parameters based on your preferences.
📊 Analyze Predictions : Observe the predicted move size, recommended risk-reward ratio, and trend direction. Use the displayed levels for trade planning.
🔔 Set Alerts : Enable alerts for trend signals, take-profit hits, or stop-loss triggers to stay informed without constant monitoring.
How It Works
The indicator calculates features such as price volatility, relative strength, and trend signals, which are stored during training periods. When a trend change is detected, the kernel regression model predicts the likely price move based on these features. Predictions are smoothed using the specified bandwidth to avoid overfitting while ensuring timely responses to feature changes. Visualized take-profit and stop-loss levels help traders optimize risk management. Real-time metrics like win rate and recommended risk-reward ratios provide actionable insights for decision-making.
Signals from Pawel Signals from Pawel is a trend-following indicator that generates buy and sell signals aligned with the prevailing trend, highlighting the principle: "Trend is your friend." Signals are triggered after a trend change is confirmed, using EMA crossovers (100 and 200 periods) as key indicators. When EMAs are widely separated, it indicates stronger trends with higher profit potential. Conversely, as EMAs converge, the trend weakens, increasing the likelihood of smaller gains or stop-loss triggers. For best results, prioritize signals shortly after a trend reversal, when EMA separation is more pronounced.
This indicator is optimized for the 5-minute timeframe on XAU/USD but may also be effective for other currency pairs and timeframes.
Red Pill VWAP/RSI DivergenceI created this indicator to identify moments in time VWAP and RSI are diverging.
Ideally useful in strong trend, bullish or bearish, as a potential entry point on a pull back for continuation. Not to be used as a stand alone signal, but rather in conjunction with any possible trend/momentum strategy.
VWAP is identified as the blue line. Green label(blue pill) is your potential entry on a pull back when price is above, stacked EMAS & VWAP for a long position. Red label(red pill) is your potential entry on a pull back when price is below inversely stacked EMAS & VWAP for a short position. These are the 2 ideal scenarios I have found. Please back test for yourself
I have had great results but must emphasis this is not a stand alone buy/sell. I use it in confluence to add conviction to my current A+ setups.
***Pivot ribbon in chart created by Saty Mahajan set to 3/10 time warp works ideal in conjunction.
***please note false positive and false negative signals can occur, particularly in chop
I hope you find this helpful . TRADE SAFE!
[blackat] L2 Bull and Bear Heaven LineOVERVIEW
The L2 Bull and Bear Heaven Line script is a custom indicator designed to visualize trend directions using Exponential Moving Average (EMA)-based lines and generate trade signals based on crossovers between those lines. It also incorporates an RSI-like feature to provide additional insight into overbought and oversold conditions.
FEATURES
Utilizes two EMAs: a longer-term "Heaven Line" (default 60 bars) and a shorter-term "Trading Line" (default 30 bars).
Generates buy/sell signals based on crossovers between the "Trading Line" and "Heaven Line".
Identifies potential turning points in the market, indicating shifts from bullish to bearish or vice versa.
Includes an "Operation Line" similar to RSI, aiding in detecting overbought/oversold levels.
HOW TO USE
Add the script to your TradingView chart.
Observe the crossovers between the "Trading Line" and "Heaven Line":
Buy signal when the "Trading Line" crosses above the "Heaven Line".
Sell signal when the "Trading Line" crosses below the "Heaven Line".
Monitor the "Operation Line" for additional confirmation:
Secondary sell signal when the "Operation Line" drops below 90% and there is downward price action.
Complementary buy signal when the "Operation Line" rises above 10% and there is upward price action.
Consider the identified trend direction and potential turning points to make informed trading decisions.
LIMITATIONS
The effectiveness of the signals depends on the chosen time frame and specific market conditions.
False signals may occur due to volatile price movements or rapid changes in market sentiment.
NOTES
This script combines traditional technical analysis tools like EMAs with an RSI-like approach to enhance decision-making processes. Users should backtest the strategy under various market scenarios before implementing it in live trading.
THANKS
Special thanks to the contributors whose work inspired parts of this script.
XAUUSD FAMILY STRATEGYThe stoploss and profit visuals sometimes are not visible because profits are being hit right away so no time to display the visuals.
- Inverse Fisher Transform on Stochastic
- Added Buy/Sell Signals based on retracement on defined levels
- Added TP and SL Visuals
- Added customizable settings
For
XAUUSD
on 15m Timeframe
Default setings are already in place
my all in one INDICATORTake on the role of one Daimyo, the clan leader, and use military engagements, economics and diplomacy to achieve the ultimate goal: re-unite Japan under his supreme command and become the new Shogun – the undisputed ruler of a pacified nation.
KJS-- Gost Pivot MAKJS Ghost Pivot Moving Average
This indicator calculates a "Ghost Pivot" by estimating where the monthly pivot level would be if the current candle's close represented the end of the month. The calculation uses:
• The current month's high and low from regular trading hours (RTH).
• The current candle's close, which includes both premarket and after-hours data.
It also smooths the ghost pivot using a customizable simple moving average (SMA).
Features:
• Plots the current month's high (blue) and low (yellow) based on RTH data.
• Calculates and plots a dynamic pivot (purple line) as the average of the monthly high, low, and current close (HLC3).
• Includes a customizable SMA length for smoother pivot tracking (default: 3).
This indicator helps traders anticipate potential monthly pivot levels in real-time while visualizing key support and resistance areas.
Best of Option Indicator - Manoj WadekarPlot this indicator for both CALL and PUT options and buy only when color of candle is YELLOW and above BLACK line.
buy sel StrategyGöstergenin Amacı
Bu gösterge:
Alım ve satım sinyalleri üretmek için MACD ve Bollinger Bantları kombinasyonunu kullanır.
Sinyalleri grafik üzerinde göstermek için oklar (yukarı ve aşağı) çizer.
Önemli sinyal durumlarında kullanıcıyı uyarmak için uyarı mekanizması içerir.
2. Kullanılan Teknik Göstergeler
A) MACD (Moving Average Convergence Divergence)
MACD, iki üstel hareketli ortalama arasındaki farkı ölçer:
Hızlı MACD Periyodu: Kısa dönem EMA (varsayılan: 12).
Yavaş MACD Periyodu: Uzun dönem EMA (varsayılan: 26).
Sinyal MACD Periyodu: MACD hattının yumuşatılmış versiyonu (varsayılan: 9).
Koşullar:
Alım Sinyali: MACD hattı, sinyal hattını yukarı yönde keser (ta.crossover fonksiyonu).
Satım Sinyali: MACD hattı, sinyal hattını aşağı yönde keser (ta.crossunder fonksiyonu).
B) Bollinger Bantları
Bollinger Bantları, fiyatın oynaklığını (volatilite) ölçmek için kullanılır:
Orta Bant: Fiyatın hareketli ortalamasıdır (varsayılan: 20 periyotluk SMA).
Üst Bant: Orta banda, standart sapmanın belirli bir katı eklenir (varsayılan: 2.0).
Alt Bant: Orta bandan, standart sapmanın belirli bir katı çıkarılır (varsayılan: 2.0).
3. Göstergenin İşlevselliği
A) Alım Koşulu (buy_condition):
pinescript
Kopyala
Düzenle
buy_condition = ta.crossover(macd_line, signal_line) and close > bb_lower
Al sinyali, şu iki şart sağlandığında tetiklenir:
MACD hattı, sinyal hattını yukarı yönde keserse (pozitif momentum).
Fiyat, Bollinger Bantları'nın alt bandının üzerine çıkarsa (fiyatın potansiyel dipten yukarı dönüşü).
B) Satım Koşulu (sell_condition):
pinescript
Kopyala
Düzenle
sell_condition = ta.crossunder(macd_line, signal_line) and close < bb_upper
Sat sinyali, şu iki şart sağlandığında tetiklenir:
MACD hattı, sinyal hattını aşağı yönde keserse (negatif momentum).
Fiyat, Bollinger Bantları'nın üst bandının altına düşerse (fiyatın potansiyel zirveden dönüşü).
4. Grafik Üzerindeki Gösterim
A) Bollinger Bantları:
Üst Bant (kırmızı çizgi).
Alt Bant (yeşil çizgi).
Orta Bant (turuncu çizgi).
B) Alım ve Satım Sinyalleri:
Oklar:
Yeşil ok (yukarı): Alım sinyali.
Kırmızı ok (aşağı): Satım sinyali.
C) Plotlama:
plotarrow fonksiyonu, yukarı ve aşağı sinyalleri oklarla grafik üzerinde gösterir:
pinescript
Kopyala
Düzenle
plotarrow(buy_condition ? 1 : sell_condition ? -1 : na, colorup=color.green, colordown=color.red, offset=-1)
5. Uyarılar
Uyarılar, sinyallerle kullanıcıyı bilgilendirir:
Alım Sinyali Uyarısı:
Mesaj: "MACD ve fiyat, Bollinger Bandı'nın alt sınırının üzerine çıktı."
Satım Sinyali Uyarısı:
Mesaj: "MACD ve fiyat, Bollinger Bandı'nın üst sınırının altına indi."
6. Kodun Avantajları
Kombinasyon Stratejisi: MACD ve Bollinger Bantları’nın birleşimi daha doğruluklu sinyaller üretebilir.
Basit ve Görsel: Grafik üzerinde sinyaller net bir şekilde belirtilmiştir.
Uyarı Mekanizması: Otomatik olarak işlem yapmak veya uyarı almak isteyen kullanıcılar için uygundur.
7. Dezavantajlar
Lag (Gecikme): Hem MACD hem de Bollinger Bantları gecikmeli göstergelerdir, bu da sinyalin gecikmesine neden olabilir.
Trend Filtreleme Eksikliği: Yanlış sinyalleri azaltmak için trend yönünü doğrulayan ek bir filtre (ör. EMA 200) faydalı olabilir.
8. Geliştirme Önerileri
Trend Filtresi: Yanlış sinyalleri azaltmak için EMA (200) gibi bir trend filtresi eklenebilir.
Fazla Sinyallerin Azaltılması: RSI gibi bir gösterge ile daha fazla doğrulama katmanı eklenebilir.
Zaman Aralığı Testi: Bu strateji en iyi 15 dakika, 1 saat veya 1 günlük zaman aralıklarında test edilerek optimize edilebilir.
Bu kod, daha sofistike stratejiler oluşturmak için güçlü bir başlangıç noktasıdır. Doğru parametre ayarlarıyla etkili bir ticaret aracı haline gelebilir.
Cotuk Cumulative Volume IndicatorThis indicator is used for tracking cumulative volumes and useful for generating buy/sell signals
Macd with RSI TableThe "MACD + RSI" Indicator is a combined technical analysis tool that integrates the Moving Average Convergence Divergence (MACD) and the Relative Strength Index (RSI) for better market insights.
Key Features:
1. MACD Analysis:
• Computes MACD using customizable moving averages (SMA or EMA) for both the oscillator and signal line.
• Plots the MACD line, signal line, and histogram, which visually indicate market momentum and potential trend reversals.
• Includes alert conditions to notify users of key histogram changes (rising to falling or vice versa).
2. RSI Monitoring:
• Displays the RSI value to assess market strength (above 50 for bullish, below 50 for bearish).
• Highlights overbought and oversold conditions.
3. Integrated Table:
• A dynamic table shows the current MACD histogram state (positive or negative) and RSI value at a glance.
• Color-coded for quick interpretation (green for bullish, red for bearish).
This indicator provides a comprehensive view of trend direction, momentum, and market strength, making it suitable for identifying trading opportunities and managing risks.
Multi-Timeframe Trend and Market StructureThis indicator can be used to write on your graph the trend direction on 15m, 1h, 4h , daily timeframes
Buy/Sell StrategyElliott wave analysis is designed to simplify and increase the objectivity of graph analysis using the Elliott wave method. this indicator can be successfully used in trading without knowing the Elliott wave method.
The indicator is based on wave counting
SCE Price Action SuiteThis is an indicator designed to use past market data to mark key price action levels as well as provide a different kind of insight. There are 8 different features in the script that users can turn on and off. This description will go in depth on all 8 with chart examples.
#1 Absorption Zones
I defined Absorption Zones as follows.
//----------------------------------------------
//---------------Absorption---------------------
//----------------------------------------------
box absorptionBox = na
absorptionBar = ta.highest(bodySize, absorptionLkb)
bsab = ta.barssince(bool(ta.change(absorptionBar)))
if bsab == 0 and upBar and showAbsorption
absorptionBox := box.new(left = bar_index - 1, top = close, right = bar_index + az_strcuture, bottom = open, border_color = color.rgb(0, 80, 75), border_width = boxLineSize, bgcolor = color.rgb(0, 80, 75))
absorptionBox
else if bsab == 0 and downBar and showAbsorption
absorptionBox := box.new(left = bar_index - 1, top = close, right = bar_index + az_strcuture, bottom = open, border_color = color.rgb(105, 15, 15), border_width = boxLineSize, bgcolor = color.rgb(105, 15, 15))
absorptionBox
What this means is that absorption bars are defined as the bars with the largest bodies over a selected lookback period. Those large bodies represent areas where price may react. I was inspired by the concept of a Fair Value Gap for this concept. In that body price may enter to be a point of support or resistance, market participants get “absorbed” in the area so price can continue in whichever direction.
#2 Candle Wick Theory/Strategy
I defined Candle Wick Theory/Strategy as follows.
//----------------------------------------------
//---------------Candle Wick--------------------
//----------------------------------------------
highWick = upBar ? high - close : downBar ? high - open : na
lowWick = upBar ? open - low : downBar ? close - low : na
upWick = upBar ? close + highWick : downBar ? open + highWick : na
downWick = upBar ? open - lowWick : downBar ? close - lowWick : na
downDelivery = upBar and downBar and high > upWick and highWick > lowWick and totalSize > totalSize and barstate.isconfirmed and session.ismarket
upDelivery = downBar and upBar and low < downWick and highWick < lowWick and totalSize > totalSize and barstate.isconfirmed and session.ismarket
line lG = na
line lE = na
line lR = na
bodyMidpoint = math.abs(body) / 2
upWickMidpoint = math.abs(upWickSize) / 2
downWickkMidpoint = math.abs(downWickSize) / 2
if upDelivery and showCdTheory
cpE = chart.point.new(time, bar_index - 1, downWickkMidpoint)
cpE2 = chart.point.new(time, bar_index + bl, downWickkMidpoint)
cpG = chart.point.new(time, bar_index + bl, downWickkMidpoint * (1 + tp))
cpR = chart.point.new(time, bar_index + bl, downWickkMidpoint * (1 - sl))
cpG1 = chart.point.new(time, bar_index - 1, downWickkMidpoint * (1 + tp))
cpR1 = chart.point.new(time, bar_index - 1, downWickkMidpoint * (1 - sl))
lG := line.new(cpG1, cpG, xloc.bar_index, extend.none, color.green, line.style_solid, 1)
lE := line.new(cpE, cpE2, xloc.bar_index, extend.none, color.white, line.style_solid, 1)
lR := line.new(cpR1, cpR, xloc.bar_index, extend.none, color.red, line.style_solid, 1)
lR
else if downDelivery and showCdTheory
cpE = chart.point.new(time, bar_index - 1, upWickMidpoint)
cpE2 = chart.point.new(time, bar_index + bl, upWickMidpoint)
cpG = chart.point.new(time, bar_index + bl, upWickMidpoint * (1 - tp))
cpR = chart.point.new(time, bar_index + bl, upWickMidpoint * (1 + sl))
cpG1 = chart.point.new(time, bar_index - 1, upWickMidpoint * (1 - tp))
cpR1 = chart.point.new(time, bar_index - 1, upWickMidpoint * (1 + sl))
lG := line.new(cpG1, cpG, xloc.bar_index, extend.none, color.green, line.style_solid, 1)
lE := line.new(cpE, cpE2, xloc.bar_index, extend.none, color.white, line.style_solid, 1)
lR := line.new(cpR1, cpR, xloc.bar_index, extend.none, color.red, line.style_solid, 1)
lR
First I get the size of the wicks for the top and bottoms of the candles. This depends on if the bar is red or green. If the bar is green the wick is the high minus the close, if red the high minus the open, and so on. Next, the script defines the upper and lower bounds of the wicks for further comparison. If the candle is green, it's the open price minus the bottom wick. If the candle is red, it's the close price minus the bottom wick, and so on. Next we have the condition for when this strategy is present.
Down delivery:
Occurs when the previous candle is green, the current candle is red, and:
The high of the current candle is above the upper wick of the previous candle.
The size of the current candle's top wick is greater than its bottom wick.
The total size of the previous candle is greater than the total size of the current candle.
The current bar is confirmed (barstate.isconfirmed).
The session is during market hours (session.ismarket).
Up delivery:
Occurs when the previous candle is red, the current candle is green, and:
The low of the current candle is below the lower wick of the previous candle.
The size of the current candle's bottom wick is greater than its top wick.
The total size of the previous candle is greater than the total size of the current candle.
The current bar is confirmed.
The session is during market hours
Then risk is plotted from the percentage that users can input from an ideal entry spot.
#3 Candle Size Theory
I defined Candle Size Theory as follows.
//----------------------------------------------
//---------------Candle displacement------------
//----------------------------------------------
line lECD = na
notableDown = bodySize > bodySize * candle_size_sensitivity and downBar and session.ismarket and barstate.isconfirmed
notableUp = bodySize > bodySize * candle_size_sensitivity and upBar and session.ismarket and barstate.isconfirmed
if notableUp and showCdSizeTheory
cpE = chart.point.new(time, bar_index - 1, close)
cpE2 = chart.point.new(time, bar_index + bl_strcuture, close)
lECD := line.new(cpE, cpE2, xloc.bar_index, extend.none, color.rgb(0, 80, 75), line.style_solid, 3)
lECD
else if notableDown and showCdSizeTheory
cpE = chart.point.new(time, bar_index - 1, close)
cpE2 = chart.point.new(time, bar_index + bl_strcuture, close)
lECD := line.new(cpE, cpE2, xloc.bar_index, extend.none, color.rgb(105, 15, 15), line.style_solid, 3)
lECD
This plots candles that are “notable” or out of the ordinary. Candles that are larger than the last by a value users get to specify. These candles' highs or lows, if they are green or red, act as levels for support or resistance.
#4 Candle Structure Theory
I defined Candle Structure Theory as follows.
//----------------------------------------------
//---------------Structure----------------------
//----------------------------------------------
breakDownStructure = low < low and low < low and high > high and upBar and downBar and upBar and downBar and session.ismarket and barstate.isconfirmed
breakUpStructure = low > low and low > low and high < high and downBar and upBar and downBar and upBar and session.ismarket and barstate.isconfirmed
if breakUpStructure and showStructureTheory
cpE = chart.point.new(time, bar_index - 1, close)
cpE2 = chart.point.new(time, bar_index + bl_strcuture, close)
lE := line.new(cpE, cpE2, xloc.bar_index, extend.none, color.teal, line.style_solid, 3)
lE
else if breakDownStructure and showStructureTheory
cpE = chart.point.new(time, bar_index - 1, open)
cpE2 = chart.point.new(time, bar_index + bl_strcuture, open)
lE := line.new(cpE, cpE2, xloc.bar_index, extend.none, color.red, line.style_solid, 3)
lE
It is a series of candles to create a notable event. 2 lower lows in a row, a lower high, then green bar, red bar, green bar is a structure for a breakdown. 2 higher lows in a row, a higher high, red bar, green bar, red bar for a break up.
#5 Candle Swing Structure Theory
I defined Candle Swing Structure Theory as follows.
//----------------------------------------------
//---------------Swing Structure----------------
//----------------------------------------------
line htb = na
line ltb = na
if totalSize * swing_struct_sense < totalSize and upBar and downBar and high > high and showSwingSturcture and session.ismarket and barstate.isconfirmed
cpS = chart.point.new(time, bar_index - 1, high)
cpE = chart.point.new(time, bar_index + bl_strcuture, high)
htb := line.new(cpS, cpE, xloc.bar_index, color = color.red, style = line.style_dashed)
htb
else if totalSize * swing_struct_sense < totalSize and downBar and upBar and low > low and showSwingSturcture and session.ismarket and barstate.isconfirmed
cpS = chart.point.new(time, bar_index - 1, low)
cpE = chart.point.new(time, bar_index + bl_strcuture, low)
ltb := line.new(cpS, cpE, xloc.bar_index, color = color.teal, style = line.style_dashed)
ltb
A bearish swing structure is defined as the last candle’s total size, times a scalar that the user can input, is less than the current candles. Like a size imbalance. The last bar must be green and this one red. The last high should also be less than this high. For a bullish swing structure the same size imbalance must be present, but we need a red bar then a green bar, and the last low higher than the current low.
#6 Fractal Boxes
I define the Fractal Boxes as follows
//----------------------------------------------
//---------------Fractal Boxes------------------
//----------------------------------------------
box b = na
int indexx = na
if bar_index % (n * 2) == 0 and session.ismarket and showBoxes
b := box.new(left = bar_index, top = topBox, right = bar_index + n, bottom = bottomBox, border_color = color.rgb(105, 15, 15), border_width = boxLineSize, bgcolor = na)
indexx := bar_index + 1
indexx
The idea of this strategy is that the market is fractal. It is considered impossible to be able to tell apart two different time frames from just the chart. So inside the chart there are many many breakouts and breakdowns happening as price bounces around. The boxes are there to give you the view from your timeframe if the market is in a range from a time frame that would be higher than it. Like if we are inside what a larger time frame candle’s range. If we break out or down from this, we might be able to trade it. Users can specify a lookback period and the box is that period’s, as an interval, high and low. I say as an interval because it is plotted every n * 2 bars. So we get a box, price moves, then a new box.
#7 Potential Move Width
I define the Potential Move Width as follows
//----------------------------------------------
//---------------Move width---------------------
//----------------------------------------------
velocity = V(n)
line lC = na
line l = na
line l2 = na
line l3 = na
line l4 = na
line l5 = na
line l6 = na
line l7 = na
line l8 = na
line lGFractal = na
line lRFractal = na
cp2 = chart.point.new(time, bar_index + n, close + velocity)
cp3 = chart.point.new(time, bar_index + n, close - velocity)
cp4 = chart.point.new(time, bar_index + n, close + velocity * 5)
cp5 = chart.point.new(time, bar_index + n, close - velocity * 5)
cp6 = chart.point.new(time, bar_index + n, close + velocity * 10)
cp7 = chart.point.new(time, bar_index + n, close - velocity * 10)
cp8 = chart.point.new(time, bar_index + n, close + velocity * 15)
cp9 = chart.point.new(time, bar_index + n, close - velocity * 15)
cpG = chart.point.new(time, bar_index + n, close + R)
cpR = chart.point.new(time, bar_index + n, close - R)
if ((bar_index + n) * 2 - bar_index) % n == 0 and session.ismarket and barstate.isconfirmed and showPredictionWidtn
cp = chart.point.new(time, bar_index, close)
cpG1 = chart.point.new(time, bar_index, close + R)
cpR1 = chart.point.new(time, bar_index, close - R)
l := line.new(cp, cp2, xloc.bar_index, extend.none, color.aqua, line.style_solid, 1)
l2 := line.new(cp, cp3, xloc.bar_index, extend.none, color.aqua, line.style_solid, 1)
l3 := line.new(cp, cp4, xloc.bar_index, extend.none, color.red, line.style_solid, 1)
l4 := line.new(cp, cp5, xloc.bar_index, extend.none, color.red, line.style_solid, 1)
l5 := line.new(cp, cp6, xloc.bar_index, extend.none, color.teal, line.style_solid, 1)
l6 := line.new(cp, cp7, xloc.bar_index, extend.none, color.teal, line.style_solid, 1)
l7 := line.new(cp, cp8, xloc.bar_index, extend.none, color.blue, line.style_solid, 1)
l8 := line.new(cp, cp9, xloc.bar_index, extend.none, color.blue, line.style_solid, 1)
l8
By using the past n bar’s velocity, or directional speed, every n * 2 bars. I can use it to scale the close value and get an estimate for how wide the next moves might be.
#8 Linear regression
//----------------------------------------------
//---------------Linear Regression--------------
//----------------------------------------------
lr = showLR ? ta.linreg(close, n, 0) : na
plot(lr, 'Linear Regression', color.blue)
I used TradingView’s built in linear regression to not reinvent the wheel. This is present to see past market strength of weakness from a different perspective.
User input
Users can control a lot about this script. For the strategy based plots you can enter what you want the risk to be in percentages. So the default 0.01 is 1%. You can also control how far forward the line goes.
Look back at where it is needed as well as line width for the Fractal Boxes are controllable. Also users can check on and off what they would like to see on the charts.
No indicator is 100% reliable, do not follow this one blindly. I encourage traders to make their own decisions and not trade solely based on technical indicators. I encourage constructive criticism in the comments below. Thank you.
Trendilo ARTrendilo AR is a custom trading indicator designed to identify market trends using advanced techniques such as the Arnaud Legoux Moving Average (ALMA), volume confirmations, and dynamic volatility bands. This indicator provides a clear visualization of trends, including significant changes and custom alerts.
Review of Indicators Used
1. ALMA
Description:
ALMA is a moving average that applies an advanced filter to smooth price data, reducing noise and focusing on actual trends.
Usage in the Indicator:
Used to calculate the smoothed percentage price change and determine trend direction. Customizable parameters include:
- Length: Defines the number of bars to consider.
- Offset: Adjusts sensitivity toward recent prices.
- Sigma: Controls the degree of smoothing.
Advantages:
- Reduced lag in trend detection.
- Resistance to market noise.
2. ATR
Description:
ATR measures the market’s average volatility by considering the range between high and low prices over a given period.
Usage in the Indicator:
ATR is used to calculate "dynamic smoothing", adjusting the indicator’s sensitivity based on current market volatility.
Advantages:
- Adapts to high or low volatility conditions.
- Helps define dynamic support and resistance levels.
3. SMA
Description:
SMA calculates the average of prices or volume over a specific time period.
Usage in the Indicator:
Used to calculate the volume moving average (Volume SMA) to confirm whether the current volume supports the detected trend.
Advantages:
- Easy to understand and calculate.
- Provides volume-based trend confirmation.
4. RMS Bands
Description:
RMS Bands calculate the standard deviation of percentage price changes, creating upper and lower levels that act as overbought and oversold indicators.
Usage in the Indicator:
- Define the range within which the market is considered neutral.
- Crosses above or below the bands indicate trend changes.
Advantages:
- Visual identification of strong trends.
- Helps filter false signals.
Colors and Visuals Used in the Indicator
1. ALMA Line
Colors:
- Green: Indicates a confirmed uptrend (with sufficient volume).
- Red: Indicates a confirmed downtrend (with sufficient volume).
- Gray: Indicates a neutral phase or insufficient volume to confirm a trend.
2. RMS Bands
- Upper and Lower Lines:
- Purple (with transparency): These lines represent the RMS bands (upper and lower) and
adjust opacity based on trend strength.
- Stronger trends result in less transparency (more solid colors).
3. Highlighted Background (Strong Trends)
- Color:
- Light Green (transparent): Highlights a strong trend when the smoothed percentage change (ALMA) exceeds 1.5 times the RMS.
4. Horizontal Lines
- Baseline (0):
- Dark Gray: Serves as a central reference to identify the directionality of percentage changes.
- Additional Line (0.1):
- Blue: A customizable line to mark user-defined key levels.
5. Bar Colors
- Bar Colors:
- Green: When the price is in a confirmed uptrend.
- Red: When the price is in a confirmed downtrend.
- No color: When there is insufficient volume or no clear trend.
How to Use the Indicator
1. Initial Setup
1. Add the Indicator to Your Chart: Copy the code into the Pine Editor on TradingView and apply it to your chart.
2. Customize Parameters: Adjust values based on your trading strategy:
- Smoothing: Controls the level of smoothing for percentage changes.
- Lookback Length: Defines the observation period for calculations.
- Band Multiplier: Adjusts the width of RMS bands.
2. Signal Interpretation
1. Indicator Colors:
- Green: Confirmed uptrend.
- Red: Confirmed downtrend.
- Gray: No clear trend or insufficient volume.
2. RMS Bands:
- If the ALMA line (smoothed percentage change) crosses above the upper RMS band, it signals a potential uptrend.
- If it crosses below the lower RMS band, it signals a potential downtrend.
3. Volume Confirmation:
- The indicator's color activates only if the current volume exceeds the Volume SMA.
3. Alerts and Decisions
1. Trend Change Alerts:
- The indicator automatically triggers alerts when an uptrend or downtrend is detected.
- Configure these alerts to receive real-time notifications.
2. Strong Trend Signals:
- When the magnitude of the percentage change exceeds 1.5 times the RMS, the chart background highlights the strong trend.
4. Trading Strategies
1. Buy:
- Enter long positions when:
- The indicator turns green.
- Volume confirms the trend.
- Consider placing a stop-loss just below the lower RMS band.
2. Sell:
- Enter short positions when:
- The indicator turns red.
- Volume confirms the trend.
- Consider placing a stop-loss just above the upper RMS band.
3. Neutral:
- Avoid trading when the indicator is gray, as no clear trend or insufficient volume is present.
Disclaimer: As this is my first published indicator, please use it with caution. Feedback is highly appreciated to improve its performance.
Happy Trading!
Adaptive Fourier Transform Supertrend [QuantAlgo]Discover a brand new way to analyze trend with Adaptive Fourier Transform Supertrend by QuantAlgo , an innovative technical indicator that combines the power of Fourier analysis with dynamic Supertrend methodology. In essence, it utilizes the frequency domain mathematics and the adaptive volatility control technique to transform complex wave patterns into clear and high probability signals—ideal for both sophisticated traders seeking mathematical precision and investors who appreciate robust trend confirmation!
🟢 Core Architecture
At its core, this indicator employs an adaptive Fourier Transform framework with dynamic volatility-controlled Supertrend bands. It utilizes multiple harmonic components that let you fine-tune how market frequencies influence trend detection. By combining wave analysis with adaptive volatility bands, the indicator creates a sophisticated yet clear framework for trend identification that dynamically adjusts to changing market conditions.
🟢 Technical Foundation
The indicator builds on three innovative components:
Fourier Wave Analysis: Decomposes price action into primary and harmonic components for precise trend detection
Adaptive Volatility Control: Dynamically adjusts Supertrend bands using combined ATR and standard deviation
Harmonic Integration: Merges multiple frequency components with decreasing weights for comprehensive trend analysis
🟢 Key Features & Signals
The Adaptive Fourier Transform Supertrend transforms complex wave calculations into clear visual signals with:
Dynamic trend bands that adapt to market volatility
Sophisticated cloud-fill visualization system
Strategic L/S markers at key trend reversals
Customizable bar coloring based on trend direction
Comprehensive alert system for trend shifts
🟢 Practical Usage Tips
Here's how you can get the most out of the Adaptive Fourier Transform Supertrend :
1/ Setup:
Add the indicator to your favorites, then apply it to your chart ⭐️
Start with close price as your base source
Use standard Fourier period (14) for balanced wave detection
Begin with default harmonic weight (0.5) for balanced sensitivity
Start with standard Supertrend multiplier (2.0) for reliable band width
2/ Signal Interpretation:
Monitor trend band crossovers for potential signals
Watch for convergence of price with Fourier trend
Use L/S markers for trade entry points
Monitor bar colors for trend confirmation
Configure alerts for significant trend reversals
🟢 Pro Tips
Fine-tune Fourier parameters for optimal sensitivity:
→ Lower Base Period (8-12) for more reactive analysis
→ Higher Base Period (15-30) to filter out noise
→ Adjust Harmonic Weight (0.3-0.7) to control shorter trend influence
Customize Supertrend settings:
→ Lower multiplier (1.5-2.0) for tighter bands
→ Higher multiplier (2.0-3.0) for wider bands
→ Adjust ATR length based on market volatility
Strategy Enhancement:
→ Compare signals across multiple timeframes
→ Combine with volume analysis
→ Use with support/resistance levels
→ Integrate with other momentum indicators
Signals from Pawel 2A trend based on four exponential moving averages. Signals displayed when two EMAs start to converge may give weak results or even none, potentially triggering a stop loss. Try to open positions right after the trend changes and when the EMA lines are far apart. The indicator was tested on XAU/USD on a 5-minute timeframe, but it will work on all timeframes and other pairs. Good luck ;-)
Advanced Swing High/Low Trend Lines# Advanced Swing High/Low Trend Lines Indicator
## Features:
### Dynamic Trend Lines
This indicator dynamically identifies swing highs and swing lows based on the user-defined `Swing Length`. It then connects these points to create trend lines that visualize the market's direction and key support/resistance levels.
### Customizable Settings
- **Swing Length**: Define the sensitivity for detecting swing highs and lows.
- **Points Required to Draw Trend**: Specify the minimum number of swing highs or lows required to establish a valid trend line.
- **Show Old Trends**: Toggle the visibility of previous trend lines to focus on the current market structure.
- **Line Appearance**: Customize the color, style (`solid`, `dotted`, `dashed`), and width of both trend and support lines.
### Trend Break Detection
- Automatically detects and highlights when the price breaks above a high trend line or below a low trend line.
- The broken trend line changes its color to indicate a trend break, helping traders quickly identify significant market shifts.
### Continuous Updates
- As new swing highs or lows are detected, the indicator updates existing trend lines or creates new ones, ensuring relevance in dynamic market conditions.
- Trend lines extend into the future, projecting potential areas of interest for traders.
## Benefits:
1. **Enhanced Market Visualization**:
- Provides a clear view of market trends, swing points, and potential reversal zones.
2. **Trend Reversal Alerts**:
- Identifies and visually emphasizes trend breaks, enabling proactive trading decisions.
3. **Fully Customizable**:
- Adjust settings to suit your trading style and strategy, ensuring compatibility with various markets and timeframes.
4. **Real-Time Adaptation**:
- Automatically adapts to changing market conditions, maintaining accuracy and relevance.
## Use Cases:
- **Trend Following**: Identify and trade in the direction of established trends.
- **Breakout Trading**: Spot trend breaks and capitalize on momentum shifts.
- **Support and Resistance Analysis**: Use trend lines to identify key levels where price may react.
This indicator is an essential tool for traders seeking to combine technical precision with visual clarity in their analysis.
Phlixe_Horizontal_Round_Number_LevelsCreates horizontal lines at significant levels
Order of magnitude for line intervals is adjustable to make this indicator versatile across price ranges of all sizes in forex, futures, cfds.
MEMEQUANTMEMEQUANT
This script is a comprehensive and specialized tool designed for tracking trends and money flow within meme coins and DEX tokens. By combining various features such as trend lines, Fibonacci levels, and category-based indices, it helps traders make informed decisions in highly volatile markets.
Key Features:
1. Category-Based Indices:
• Tracks the performance of token categories like:
• AI Agent Tokens
• AI Tokens
• Animal Tokens
• Murad Picks
• Each category consists of leader tokens, which are selected based on their higher market cap and trading volume. These tokens act as benchmarks for their respective categories.
• Visualizes category indices in a line chart to identify trends and compare money flow between categories.
2. Fibonacci Correction Zones:
• Highlights key retracement levels (e.g., 60%, 70%, 80%).
• These levels are crucial for identifying potential reversal zones, commonly observed in meme coin trading patterns.
• Fully customizable to match individual trading strategies.
3. Trend Lines:
• Automatically detects major support and resistance levels.
• Separates long-term and short-term trend lines, allowing traders to focus on significant price movements.
4. Enhanced Info Table:
• Provides real-time insights, including:
• % Distance from All-Time High (ATH)
• Current Trading Volume
• 50-bar Average Volume
• Volume Change Percentage
• Displays information in an easy-to-read table on the chart.
5. Customizable Settings:
• Users can adjust transparency, colors, and ranges for Fibonacci zones, trend lines, and the table.
• Enables or disables individual features (e.g., Fibonacci, trend lines, table) based on preferences.
How It Works:
1. Tracking Money Flow Across Categories:
• The script calculates the market cap to volume ratio for each category of tokens to help identify the dominant trend.
• A higher ratio indicates greater liquidity and stability, while a lower ratio suggests higher volatility or price manipulation.
2. Identifying Retracement Patterns:
• Leverages common retracement behaviors (e.g., 70% correction levels) observed in meme coins to detect potential reversal zones.
• Combines this with trend line analysis for additional confirmation.
3. Leader Tokens as Indicators:
• Each category is represented by its leader tokens, which have historically higher liquidity and market cap. This allows the script to accurately reflect the overall trend in each category.
When to Use:
• Trend Analysis: To identify which category (e.g., AI Tokens or Animal Tokens) is leading the market.
• Reversal Zones: To spot potential support or resistance levels using Fibonacci zones.
• Money Flow: To understand how capital is moving across different token categories in real time.
Who Is This For?
This script is tailored for:
• Traders specializing in meme coins and DEX tokens.
• Those looking for an edge in trend-based trading by analyzing market cap, volume, and retracement levels.
• Anyone aiming to track money flow dynamics between different token categories.
Future Updates:
This is the initial version of the script. Future updates may include:
• Support for additional token categories and DEX data.
• More advanced pattern recognition and alerts for volume and price anomalies.
• Enhanced visualization for historical data trends.
With this tool, traders can combine money flow analysis with the 60-70% retracement strategy, turning it into a powerful assistant for navigating the fast-paced world of meme coins and DEX tokens.
This script is designed to provide meaningful insights and practical utility for traders, adhering to TradingView’s standards for originality, clarity, and user value.
XAUUSD trend strategyXAUUSD TREND STRATEGY is a powerful trend-following indicator designed to help traders identify potential buy and sell signals in the market.
It combines the Relative Strength Index (RSI) and the Money Flow Index (MFI) to comprehensively view market momentum and strength.
Highs & Lows RTH/OVN/IBs/D/W/M/YOverview
Plots the highs and lows of RTH, OVN/ETH, IBs of those sessions, previous Day, Week, Month, and Year.
Features
Allows the user to enable/disable plotting the high/low of each period.
Lines' length, offset, and colors can be customized
Labels' position, size, color, and style can be customized
Support
Questions, feedbacks, and requests are welcomed. Please feel free to use Comments or direct private message via TradingView.
Disclaimer
This stock chart indicator provided is for informational purposes only and should not be considered as financial or investment advice. The data and information presented in this indicator are obtained from sources believed to be reliable, but we do not warrant its completeness or accuracy.
Users should be aware that:
Any investment decisions made based on this indicator are at your own risk.
The creators and providers of this indicator disclaim all liability for any losses, damages, or other consequences resulting from its use. By using this stock chart indicator, you acknowledge and accept the inherent risks associated with trading and investing in financial markets.
Release Date: 2025-01-17
Release Version: v1 r1
Release Notes Date: 2025-01-17