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.
Wstęgi i Kanały
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.
Mean Reversion Pro Strategy [tradeviZion]Mean Reversion Pro Strategy : User Guide
A mean reversion trading strategy for daily timeframe trading.
Introduction
Mean Reversion Pro Strategy is a technical trading system that operates on the daily timeframe. The strategy uses a dual Simple Moving Average (SMA) system combined with price range analysis to identify potential trading opportunities. It can be used on major indices and other markets with sufficient liquidity.
The strategy includes:
Trading System
Fast SMA for entry/exit points (5, 10, 15, 20 periods)
Slow SMA for trend reference (100, 200 periods)
Price range analysis (20% threshold)
Position management rules
Visual Elements
Gradient color indicators
Three themes (Dark/Light/Custom)
ATR-based visuals
Signal zones
Status Table
Current position information
Basic performance metrics
Strategy parameters
Optional messages
📊 Strategy Settings
Main Settings
Trading Mode
Options: Long Only, Short Only, Both
Default: Long Only
Position Size: 10% of equity
Starting Capital: $20,000
Moving Averages
Fast SMA: 5, 10, 15, or 20 periods
Slow SMA: 100 or 200 periods
Default: Fast=5, Slow=100
🎯 Entry and Exit Rules
Long Entry Conditions
All conditions must be met:
Price below Fast SMA
Price below 20% of current bar's range
Price above Slow SMA
No existing position
Short Entry Conditions
All conditions must be met:
Price above Fast SMA
Price above 80% of current bar's range
Price below Slow SMA
No existing position
Exit Rules
Long Positions
Exit when price crosses above Fast SMA
No fixed take-profit levels
No stop-loss (mean reversion approach)
Short Positions
Exit when price crosses below Fast SMA
No fixed take-profit levels
No stop-loss (mean reversion approach)
💼 Risk Management
Position Sizing
Default: 10% of equity per trade
Initial capital: $20,000
Commission: 0.01%
Slippage: 2 points
Maximum one position at a time
Risk Control
Use daily timeframe only
Avoid trading during major news events
Consider market conditions
Monitor overall exposure
📊 Performance Dashboard
The strategy includes a comprehensive status table displaying:
Strategy Parameters
Current SMA settings
Trading direction
Fast/Slow SMA ratio
Current Status
Active position (Flat/Long/Short)
Current price with color coding
Position status indicators
Performance Metrics
Net Profit (USD and %)
Win Rate with color grading
Profit Factor with thresholds
Maximum Drawdown percentage
Average Trade value
📱 Alert Settings
Entry Alerts
Long Entry (Buy Signal)
Short Entry (Sell Signal)
Exit Alerts
Long Exit (Take Profit)
Short Exit (Take Profit)
Alert Message Format
Strategy name
Signal type and direction
Current price
Fast SMA value
Slow SMA value
💡 Usage Tips
Consider starting with Long Only mode
Begin with default settings
Keep track of your trades
Review results regularly
Adjust settings as needed
Follow your trading plan
⚠️ Disclaimer
This strategy is for educational and informational purposes only. It is not financial advice. Always:
Conduct your own research
Test thoroughly before live trading
Use proper risk management
Consider your trading goals
Monitor market conditions
Never risk more than you can afford to lose
📋 Release Notes
14 January 2025
Added New Fast & Slow SMA Options:
Fibonacci-based periods: 8, 13, 21, 144, 233, 377
Additional period: 50
Complete Fast SMA options now: 5, 8, 10, 13, 15, 20, 21, 34, 50
Complete Slow SMA options now: 100, 144, 200, 233, 377
Bug Fixes:
Fixed Maximum Drawdown calculation in the performance table
Now using strategy.max_drawdown_percent for accurate DD reporting
Previous version showed incorrect DD values
Performance metrics now accurately reflect trading results
Performance Note:
Strategy tested with Fast/Slow SMA 13/377
Test conducted with 10% equity risk allocation
Daily Timeframe
For Beginners - How to Modify SMA Levels:
Find this line in the code:
fastLength = input.int(title="Fast SMA Length", defval=5, options= )
To add a new Fast SMA period: Add the number to the options list, e.g.,
To remove a Fast SMA period: Remove the number from the options list
For Slow SMA, find:
slowLength = input.int(title="Slow SMA Length", defval=100, options= )
Modify the options list the same way
⚠️ Note: Keep the periods that make sense for your trading timeframe
💡 Tip: Test any new combinations thoroughly before live trading
"Trade with Discipline, Manage Risk, Stay Consistent" - tradeviZion
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!
[LeonidasCrypto]Volume Force IndexVolume Force Index (VFI)
Overview
The Volume Force Index (VFI) is a technical indicator that measures the balance between buying and selling pressure in the market by analyzing volume patterns. It helps traders identify potential trend reversals and confirm trend strength.
What It Measures
Buying vs. selling volume pressure
Market momentum
Potential overbought/oversold conditions
Volume trend strength
How to Read the Indicator
Main Components:
Main Line (Green/Red)
Green: Buying pressure is dominant
Red: Selling pressure is dominant
The steeper the slope, the stronger the pressure
Signal Line (Yellow)
Fast EMA that helps identify trend changes
Acts as an early warning system for potential reversals
Dynamic Bands (Red/Green lines)
Adapt to market volatility
Help identify extreme conditions
Based on actual market volatility rather than fixed levels
Signals to Watch
Trend Direction:
Rising oscillator = Increasing buying pressure
Falling oscillator = Increasing selling pressure
Signal Line Crossovers:
Main line crosses above signal line = Potential bullish signal
Main line crosses below signal line = Potential bearish signal
Band Touches:
Touching upper band = Possible buying exhaustion
Touching lower band = Possible selling exhaustion
Color Changes:
Green to Red = Shift to selling pressure
Red to Green = Shift to buying pressure
Best Practices
When to Use:
Trend confirmation
Identifying potential reversals
Volume analysis
Market strength assessment
Tips:
Use in conjunction with price action
Look for divergences with price
More reliable on higher timeframes
Consider market context
Default Settings:
MA Period: 14 (volume calculation)
Smooth Length: 3 (noise reduction)
EMA Period: 4 (signal line)
Volatility Period: 20 (band calculation)
Volatility Multiplier: 1.5 (band width)
Best Markets to Apply
Any market with reliable volume data
Summary
The VFI is a powerful tool that combines volume analysis with trend identification. Its adaptive nature makes it suitable for various market conditions, but it should be used as part of a complete trading strategy, not in isolation.
Static Gann High and Low Across All TimeframesStatic Gann High and Low Across All Timeframes
Static Gann High and Low Across All Timeframes
Static Gann High and Low Across All Timeframes
Static Gann High and Low Across All Timeframes
Static Gann High and Low Across All Timeframes
Static Gann High and Low Across All Timeframes
Static Gann High and Low Across All Timeframes
Mean Reversion Fib-S_D-This strategy is upgrade to Mean Reversion VIB-F
-More Fib bans are added and the user can switch from dynamic to static bands
-If static bans are selected ones in the position the dynamic bans will plot and will not change
until exit of the position
-It workings on high volatile stock or crypto assets in this case DOGE 2h time frame
-It using 7 dynamic Fibonacci band's to get in the long position.
-In same time depends on the band increases the units of the asset to get in the next position.
-The unit's of the asset can be adjusted in cash
-The bands are determined of main Smoothed SMA.
-There is no stop loss.
-Take profit is trialing - HMA or % or average price + take profit - note if you use % trailing back
test is not realistic but is working on real time.
If it is on first position will take profit on the third top Fibonacci's band or the above options
Width of the bands and the Fibonacci # can be adjust depends on the asset volatility.
Going long is determined by close < first band or crossover SMA
Can be use with webhook to send signals to exchanges
BBMA Signal and setupSetup :
1. Entry Agresif
a. RRE (Reentry - Reentry - Extreme)
b. REE (Reentry - Extreme - Extreme)
c. REM (Reenty – Extreme – MHV)
2. Entry Progresif
a. TF Major = Reentry
b. TF Secondary = Rejection EMA 50
c. TF Execution = MHV
3. Diamond Setup
a. TF Major = ZZL
b. TF Secondary = Rejection EMA 50
c. TF Execution = MHV
TF1 TF2 TF 3 (timeframe)
Monthly-Weekly-Daily
Weekly-Daily-H4
Daily-H4-H1
H4-H1-M15
H1-M15-M5
Pure Shadow Check with Rangeyou can set the trading range and set shadow percentage if the candle back and close in the trading range you can buy or sell in momentum trend
BMG-5 BY BMGBUY SIGNAL:
EMA cross up and candle closure below both EMA's
SELL SIGNAL :
EMA cross down and candle closure below both EMS's
ALERT:
Select and alert that for any of the functions
GANN DATE HIGH N LOWGann Date High n Low depends on New and Full Moon Dates
Gann Date High n Low depends on New and Full Moon Dates
Gann Date High n Low depends on New and Full Moon Dates
Gann Date High n Low depends on New and Full Moon Dates
Gann Date High n Low depends on New and Full Moon Dates
Moving Average with Percentage Bands"Moving Average with Percentage Bands"
This indicator features a moving average, defaulted to 55 periods exponential (EMA), along with its respective bands:
• Upper band: the result of 50% above the moving average.
• Lower band: the result of 50% below the moving average.
This indicator can be useful for cryptocurrencies with a certain track record to identify overbought zones or dips. Both the moving average (type and length) and the percentage bands can be edited according to the user's preferences.
The source code is open for customization and modification.
----------------------------------------------------------------------------------------------
"Media Móvil con Bandas Porcentuales"
Este indicador presenta una media móvil, predeterminada de 55 períodos exponencial (EMA), y sus respectivas bandas:
• Banda superior: resultado del 50% por encima de la media móvil.
• Banda inferior: resultado del 50% por debajo de la media móvil.
Este indicador puede ser útil en criptomonedas con cierta trayectoria para encontrar zonas de sobrecompra o dips. Tanto la media móvil (tipo y longitud) como las bandas porcentuales pueden ser editadas según las necesidades del usuario.
El código fuente está abierto para su personalización y modificación.
GOLDEN BOY - REVERSÃO Desenvolvido por Alex Reis
- Indicador de Reversão.
- Confluência com a tendência
- Bandas TMA
Tipo de Grafico : Range
Tempo do Gráfico: 10R/ 30R / 50R / 100R
Ativo : Mercado Futuros , GOLD , Forex
OBS: Configurar de acordo com sua estratégia.
straddleA Straddle is a popular options trading strategy used by traders to profit from significant price movements in an asset, regardless of direction. The Bollinger Bands (BB) are a technical indicator designed to measure price volatility and identify potential overbought or oversold conditions. When combined, a Straddle with Bollinger Bands provides a unique way to assess and execute trades based on volatility expectations.
BB SIGNALSThe Bollinger Bands with Signals indicator enhances your trading by combining Bollinger Bands with clear buy and sell signals.
Customizable Bands: Adjust moving average type, period, and standard deviation multiplier.
Buy (B) signals appear when price crosses above the lower band.
Sell (S) signals appear when price crosses below the upper band.
Bands are shaded for better trend visualization.
A simple yet powerful tool for spotting overbought and oversold conditions and identifying potential trade entries and exits.
Vwap and Super Trend by Trade Partners//@version=5
indicator(title='Vwap and Super Trend by Trade Partners', shorttitle='Suresh', overlay=true)
ha_t = syminfo.ticker
// Credits goes to Options scalping
// === VWAP ===
_isVWAP = input(true, '─────── Enable VWAP ─────')
src = input(title='Source', defval=hlc3)
t = time('D')
start = na(t ) or t > t
sumSrc = src * volume
sumVol = volume
sumSrc := start ? sumSrc : sumSrc + sumSrc
sumVol := start ? sumVol : sumVol + sumVol
// You can use built-in vwap() function instead.
plot(_isVWAP ? sumSrc / sumVol : na, title='VWAP', color=color.new(color.red, 0), linewidth=2)
// === SuperTrend ===
_isSuperTrend = input(true, '─────── Enable SuperTrend ─────')
Factor = input.int(2, minval=1, maxval=100)
Pd = input.int(10, minval=1, maxval=100)
Up = hl2 - Factor * ta.atr(Pd)
Dn = hl2 + Factor * ta.atr(Pd)
Trend = 0.0
TrendUp = 0.0
TrendDown = 0.0
TrendUp := close > TrendUp ? math.max(Up, TrendUp ) : Up
TrendDown := close < TrendDown ? math.min(Dn, TrendDown ) : Dn
Trend := close > TrendDown ? 1 : close < TrendUp ? -1 : nz(Trend , 1)
Tsl = Trend == 1 ? TrendUp : TrendDown
linecolor = Trend == 1 ? color.green : color.red
plot(_isSuperTrend ? Tsl : na, color=linecolor, style=plot.style_line, linewidth=2, title='SuperTrend', transp=1)
// === Parabolic SAR ===
_isPSAR = input(true, '──── Enable Parabolic SAR ─────')
start1 = input(0.02)
increment = input(0.02)
maximum = input(0.2)
out = ta.sar(start1, increment, maximum)
plot(_isPSAR ? out : na, title='PSAR', style=plot.style_cross, color=color.new(color.black, 0))
// === 20 VWMA ===
_isVWMA = input(true, '──── Enable 20 VWMA ─────')
plot(_isVWMA ? ta.vwma(close, 20) : na, title='VWMA', style=plot.style_line, color=color.new(color.blue, 0))
// === Strong Volume ===
ShowHighVolume = input(true, '──── Enable High Volume Indicator ─────')
Averageval = input.int(title='Average Volume: (in K)', defval=50, minval=1)
Averageval *= 1000
varstrong = ShowHighVolume ? volume > Averageval : false
plotshape(varstrong, style=shape.square, location=location.bottom, color=color.new(color.blue, 0))
EMA CROSSOVER SIGNALSThe EMA CROSSOVERS indicator helps identify trend changes using fast and slow EMA crossovers.
Fast EMA (default: 10) and Slow EMA (default: 35) are plotted.
Green and red shading highlights bullish and bearish trends.
Buy (B) and Sell (S) signals are shown at crossover points.
Bars are colored green (bullish) or red (bearish) based on EMA alignment.
Perfect for spotting trends and entry/exit points. Simple, clear, and effective!
mohammadreza alimohammadi//@version=6
indicator(title="Parabolic SAR, Ichimoku Cloud, Fibonacci Bands, Donchian Channels, and MA200", shorttitle="SAR & Ichimoku & Fibonacci & DC & MA200", overlay=true, timeframe="", timeframe_gaps=true)
// Inputs for Parabolic SAR
start = input(0.02, title="SAR Start")
increment = input(0.02, title="SAR Increment")
maximum = input(0.2, title="SAR Max Value")
sar = ta.sar(start, increment, maximum)
plot(sar, title="Parabolic SAR", style=plot.style_cross, color=color.blue)
// Inputs for Ichimoku Cloud
conversionPeriods = input.int(9, minval=1, title="Conversion Line Length")
basePeriods = input.int(26, minval=1, title="Base Line Length")
laggingSpan2Periods = input.int(52, minval=1, title="Leading Span B Length")
displacement = input.int(26, minval=1, title="Lagging Span")
donchian(len) => math.avg(ta.lowest(len), ta.highest(len))
conversionLine = donchian(conversionPeriods)
baseLine = donchian(basePeriods)
leadLine1 = math.avg(conversionLine, baseLine)
leadLine2 = donchian(laggingSpan2Periods)
plot(conversionLine, color=#2962FF, title="Conversion Line")
plot(baseLine, color=#B71C1C, title="Base Line")
plot(close, offset = -displacement + 1, color=#43A047, title="Lagging Span")
p1 = plot(leadLine1, offset = displacement - 1, color=#A5D6A7, title="Leading Span A")
p2 = plot(leadLine2, offset = displacement - 1, color=#EF9A9A, title="Leading Span B")
plot(leadLine1 > leadLine2 ? leadLine1 : leadLine2, offset = displacement - 1, title="Kumo Cloud Upper Line", display=display.none)
plot(leadLine1 < leadLine2 ? leadLine1 : leadLine2, offset = displacement - 1, title="Kumo Cloud Lower Line", display=display.none)
fill(p1, p2, color=leadLine1 > leadLine2 ? color.rgb(67, 160, 71, 90) : color.rgb(244, 67, 54, 90))
// Inputs for Fibonacci Bands
lenSMA = input.int(title="#bars back SMA", defval=50)
lenATR = input.int(title="#bars back ATR", defval=14)
firstFactor = input.float(title="factor fib. band 1", defval=1.618)
secondFactor = input.float(title="factor fib. band 2", defval=2.618)
thirdFactor = input.float(title="factor fib. band 3", defval=4.236)
vAtr = ta.atr(lenATR)
vSma = ta.sma(close, lenSMA)
fib1u = vSma + vAtr * firstFactor
fib1l = vSma - vAtr * firstFactor
fib2u = vSma + vAtr * secondFactor
fib2l = vSma - vAtr * secondFactor
fib3u = vSma + vAtr * thirdFactor
fib3l = vSma - vAtr * thirdFactor
plot(fib1u, color=color.white, title="Fib Band 1 Upper")
plot(fib1l, color=color.white, title="Fib Band 1 Lower")
plot(fib2u, color=color.green, title="Fib Band 2 Upper")
plot(fib2l, color=color.red, title="Fib Band 2 Lower")
plot(fib3u, color=color.green, title="Fib Band 3 Upper")
plot(fib3l, color=color.red, title="Fib Band 3 Lower")
// Inputs for Donchian Channels with new settings
length = input.int(280, minval=1, title="DC Length")
offset = input.int(25, title="DC Offset")
lower = ta.lowest(length)
upper = ta.highest(length)
basis = math.avg(upper, lower)
plot(basis, "Basis", color=color.orange, offset=offset)
u = plot(upper, "Upper", color=color.blue, offset=offset)
l = plot(lower, "Lower", color=color.blue, offset=offset)
fill(u, l, color=color.rgb(33, 150, 243, 95), title="Background")
// Inputs for MA200
ma200 = ta.sma(close, 200)
plot(ma200, color=color.purple, title="MA200")
Supertrend + RSI Strategy update//@version=5
strategy("Supertrend + RSI Strategy", overlay=true)
// Input Parameters
atrLength = input.int(10, title="ATR Length", minval=1)
factor = input.float(3.0, title="Supertrend Factor", step=0.1)
rsiLength = input.int(14, title="RSI Length", minval=1)
rsiOverbought = input.int(70, title="RSI Overbought Level")
rsiOversold = input.int(30, title="RSI Oversold Level")
// Supertrend Calculation
atr = ta.atr(atrLength)
upperBand = ta.sma(close, atrLength) + (factor * atr)
lowerBand = ta.sma(close, atrLength) - (factor * atr)
supertrend = 0.0
supertrend := close > nz(supertrend , close) ? lowerBand : upperBand
supertrendSignal = close > supertrend ? "Buy" : "Sell"
// RSI Calculation
rsi = ta.rsi(close, rsiLength)
// Trading Logic
longCondition = (supertrendSignal == "Buy") and (rsi > rsiOversold) and ta.crossover(rsi, rsiOversold)
shortCondition = (supertrendSignal == "Sell") and (rsi < rsiOverbought) and ta.crossunder(rsi, rsiOverbought)
// Entry and Exit Conditions
if longCondition
strategy.entry("Long", strategy.long)
if shortCondition
strategy.entry("Short", strategy.short)
// Exit Strategy with Stop Loss and Take Profit
strategy.exit("Exit Long", from_entry="Long", stop=supertrend, limit=close + 2 * atr)
strategy.exit("Exit Short", from_entry="Short", stop=supertrend, limit=close - 2 * atr)
// Plot Supertrend
plot(supertrend, title="Supertrend", color=color.new(color.blue, 0), linewidth=2, style=plot.style_line)
// Plot RSI Levels
hline(rsiOverbought, "Overbought", color=color.red)
hline(rsiOversold, "Oversold", color=color.green)
plot(rsi, title="RSI", color=color.orange, style=plot.style_stepline)
// Alerts
alertcondition(longCondition, title="Buy Alert", message="Supertrend + RSI Buy Signal")
alertcondition(shortCondition, title="Sell Alert", message="Supertrend + RSI Sell Signal")
EMA Crossover Strategy//@version=5
strategy("EMA Crossover Strategy", overlay=true)
// Define the length of EMAs
ema50Length = 50
ema200Length = 200
// Calculate the EMAs
ema50 = ta.ema(close, ema50Length)
ema200 = ta.ema(close, ema200Length)
// Plot the EMAs on the chart
plot(ema50, title="50 EMA", color=color.green, linewidth=2)
plot(ema200, title="200 EMA", color=color.red, linewidth=2)
// Define the crossover condition
longCondition = ta.crossover(ema50, ema200)
shortCondition = ta.crossunder(ema50, ema200)
// Generate alerts
alertcondition(longCondition, title="Buy Signal", message="50 EMA is above 200 EMA - Buy")
alertcondition(shortCondition, title="Sell Signal", message="50 EMA is below 200 EMA - Sell")
// Execute trades based on the conditions
if (longCondition)
strategy.entry("Buy", strategy.long)
if (shortCondition)
strategy.close("Buy")
BALA IndicatorThe BALA Indicator is a custom trading tool designed to simplify decision-making by combining multiple technical analysis strategies into one cohesive system. It provides buy and sell signals based on a combination of trend-following and momentum indicators, ensuring traders can identify optimal entry and exit points in the market.