Uptrick: Volatility Weighted CloudIntroduction
The Volatility Weighted Cloud (VWC) is a trend-tracking overlay that combines adaptive volatility-based bands with a multi-source smoothed price cloud to visualize market bias. It provides users with a dynamic structure that adapts to volatility conditions while maintaining a persistent visual record of trend direction. By incorporating configurable smoothing techniques, percentile-ranked volatility, and multi-line cloud construction, the indicator allows traders to interpret price context more effectively without relying on raw price movement alone.
Overview
The script builds a smoothed price basis using the open, and close prices independently, and uses these to construct a layered visual cloud. This cloud serves both as a reference for price structure and a potential area of dynamic support and resistance. Alongside this cloud, adaptive upper and lower bands are plotted using volatility that scales with percentile rank. When price closes above or below these bands, the script interprets that as a breakout and updates the trend bias accordingly.
Candle coloring is persistent and reflects the most recent confirmed signal. Labels can optionally be placed on the chart when the trend bias flips, giving traders additional visual reference points. The indicator is designed to be both flexible and visually compact, supporting different strategies and timeframes through its detailed configuration options.
Originality
This script introduces originality through its combined use of percentile-ranked volatility, adaptive envelope sizing, and multi-source cloud construction. Unlike static-band indicators, the Volatility Weighted Cloud adjusts its band width based on where current volatility ranks within a defined lookback range. This dynamic scaling allows for smoother signal behavior during low-volatility environments and more responsive behavior during high-volatility phases.
Additionally, instead of using a single basis line, the indicator computes two separate smoothed lines for open and close. These are rendered into a shaded visual cloud that reflects price structure more completely than traditional moving average overlays. The use of ALMA and MAD, both less commonly applied in volatility-band overlays, adds further control over smoothing behavior and volatility measurement, enhancing its adaptability across different market types.
Inputs
Group: Core
Basis Length (short-term): The number of bars used for calculating the primary basis line. Affects how quickly the basis responds to price changes.
Basis Type: Option to choose between EMA and ALMA. EMA provides a standard exponential average; ALMA offers a centered, Gaussian-weighted average with reduced lag.
ALMA Offset: Determines the balance point of the ALMA window. Only applies when ALMA is selected.
Sigma: Sets the width of the ALMA smoothing window, influencing how much smoothing is applied.
Basis Smoothing EMA: Adds additional EMA-based smoothing to the computed basis line for noise reduction.
Group: Volatility & Bands
Volatility: Choose between StDev (standard deviation) and MAD (median absolute deviation) for measuring price volatility.
Vol Length (short-term): Length of the window used for calculating volatility.
Vol Smoothing EMA: Smooths the raw volatility value to stabilize band behavior.
Min Multiplier: Minimum multiplier applied to volatility when forming the adaptive bands.
Max Multiplier: Maximum multiplier applied at high volatility percentile.
Volatility Rank Lookback: Number of bars used to calculate the percentile rank of current volatility.
Show Adaptive Bands: Enables or disables the display of upper and lower volatility bands on the chart.
Group: Trend Switch Labels
Show Trend Switch Labels: Toggles the appearance of labels when the trend direction changes.
Label Anchor: Defines whether the labels are anchored to recent highs/lows or to the main basis line.
ATR Length (offset): Length used for calculating ATR, which determines label offset distance.
ATR Offset (multiplier): Multiplies the ATR value to place labels away from price bars for better visibility.
Label Size: Allows selection of label size (tiny to huge) to suit different chart setups.
Features
Adaptive Volatility Bands: The indicator calculates volatility using either standard deviation or MAD. It then applies an EMA smoothing layer and scales the band width dynamically based on the percentile rank of volatility over a user-defined lookback window. This avoids fixed-width bands and allows the indicator to adapt to changing volatility regimes in real time.
Volatility Method Options: Users can switch between two volatility measurement methods:
➤ Standard Deviation (StDev): Captures overall price dispersion, but may be sensitive to spikes.
➤ Median Absolute Deviation (MAD): A more robust measure that reduces the effect of outliers, making the bands less jumpy during erratic price behavior.
Basis Type Options: The core price basis used for cloud and bands can be built from:
➤ Exponential Moving Average (EMA): Fast-reacting and widely used in trend systems.
➤ Arnaud Legoux Moving Average (ALMA): A smoother, more centered alternative that offers greater control through offset and sigma parameters.
Multi-Line Basis Cloud: The cloud is formed by plotting two individually smoothed basis lines from open and close prices. A filled area is created between the open and close basis lines. This cloud serves as a dynamic support or resistance zone, allowing users to identify possible reversal areas. Price moving through or rejecting from the cloud can be interpreted contextually, especially when combined with band-based signals.
Persistent Trend Bias Coloring: The indicator uses the last confirmed breakout (above upper band or below lower band) to determine bias. This bias is reflected in the color of every subsequent candle, offering a persistent visual cue until a new signal is triggered. It helps simplify trend recognition, especially in choppy or sideways markets.
Trend Switch Labels: When enabled, the script places labeled markers at the exact bar where the bias direction switches. Labels are anchored either to recent highs/lows or to the main basis line, and spaced vertically using an ATR-based offset. This allows the trader to quickly locate historical trend transitions.
Alert Conditions: Two built-in alert conditions are available:
➤ Long Signal: Triggered when the close crosses above the upper adaptive band.
➤ Short Signal: Triggered when the close crosses below the lower adaptive band.
These conditions can be used for custom alerts, automation, or external signaling tools.
Display Control and Flexibility: Users can disable the adaptive bands for a cleaner layout while keeping the basis cloud and candle coloring active. The indicator can be tuned for fast or slow response depending on the strategy in use, and is suitable for intraday, swing, or position trading.
Summary
The Volatility Weighted Cloud is a configurable trend-following overlay that uses adaptive volatility bands and a structured cloud system to help visualize market bias. By combining EMA or ALMA smoothing with percentile-ranked volatility and a four-line price structure, it provides a flexible and informative charting layer. Its key strengths lie in the use of dynamic envelopes, visually persistent trend indication, and clearly defined breakout zones that adapt to current volatility conditions.
Disclaimer
This indicator is for informational and educational purposes only. Trading involves risk and may not be suitable for all investors. Past performance does not guarantee future results.
移动平均线
Alpha - Multi-Asset Adaptive Trading Strategy# Alpha - Multi-Asset Adaptive Trading Strategy
Overview
Alpha is a comprehensive trading strategy that combines multiple technical analysis components with pre-optimized settings for over 70 different trading instruments across cryptocurrencies, forex, and stocks. The strategy employs an adaptive approach using modified trend detection algorithms, dynamic support/resistance zones, and multi-timeframe confirmation.
Key Features & Originality
1. Adaptive Trend Detection System
- Modified trend-following algorithm with amplitude-based channel deviation
- Dynamic channel width adjustment based on ATR (Average True Range)
- Dual-layer trend confirmation using both price action and momentum indicators
2. Pre-Configured Asset Optimization
The strategy includes carefully backtested parameter sets for:
- **Cryptocurrencies**: BTC, ETH, and 40+ altcoin pairs
- **Forex Pairs**: Major and minor currency pairs
- **Stocks**: TSLA, AAPL, GOOG
- **Commodities**: Gold, Silver, Platinum
- Each configuration is optimized for specific timeframes (5m, 15m, 30m, 45m, 1h)
3. Advanced Risk Management
- Multiple take profit levels (4 targets with customizable position sizing)
- Dynamic stop-loss options (ATR-based or percentage-based)
- Position size allocation across profit targets (default: 30%, 30%, 30%, 10%)
4. Multi-Timeframe Analysis Dashboard
- Real-time analysis across 4 configurable timeframes
- Comprehensive performance metrics display
- Visual representation of current market conditions
5. Market Condition Filtering
- RSI-based trend strength filtering
- ATR-based volatility filtering
- Sideways market detection to avoid choppy conditions
- Customizable filter combinations (ATR only, RSI only, both, or disabled)
How to Use
Initial Setup
1. **Select Asset Configuration**: Choose your trading pair from the "Strategies" dropdown menu
2. **Enable Strategy**: Enter "Alpha" in the code confirmation field
3. **Adjust Timeframe**: Match your chart timeframe to the selected strategy configuration
Parameter Customization
- **Trendline Settings**: Adjust amplitude and channel deviation for sensitivity
- **TP/SL Method**: Choose between ATR-based or percentage-based targets
- **Filtering Options**: Select appropriate market filters for your trading style
- **Backtest Period**: Set the number of days for strategy testing (max 60)
Signal Interpretation
- **BUY/SELL Labels**: Primary entry signals based on trend changes
- **Support/Resistance Zones**: Visual zones showing key price levels
- **Dashboard**: Real-time display of position status, targets, and performance metrics
Important Considerations
Limitations and Warnings
- **Backtesting Period**: Results shown are based on historical data from the specified backtest period
- **No Guarantee**: Past performance does not guarantee future results
- **Market Conditions**: Strategy performance varies with market volatility and trending conditions
- **Repainting**: Some signals may repaint if "Wait For Confirmed Bar" is disabled
Risk Warnings
- The pre-configured settings are starting points and may require adjustment for current market conditions
- Always use appropriate position sizing and risk management
- Test thoroughly on demo accounts before live trading
- Monitor and adjust parameters regularly as market dynamics change
Technical Components
Core Indicators Used
- Modified trend detection with amplitude-based channels
- RSI (Relative Strength Index) for momentum confirmation
- ATR (Average True Range) for volatility measurement
- Support/Resistance detection using pivot points
- Bollinger Band variant for trend confirmation
Alert Functionality
The strategy includes comprehensive alert options for:
- Entry signals (long and short)
- Take profit levels (TP1, TP2, TP3, TP4)
- Stop loss triggers
- Integration with trading bots via webhook messages
Recommended Usage
Best Practices
1. Start with the pre-configured settings for your chosen asset
2. Run backtests over different time periods to verify performance
3. Use the dashboard to monitor real-time strategy performance
4. Adjust filters based on current market conditions
5. Always use stop losses and proper risk management
Timeframe Recommendations
- **Short-Term**: Use 5m, 15m configurations for scalping
- **Mid-Term**: Use 30m, 45m configurations for day trading
- **Long-Term**: Use 1h configurations for swing trading
Updates and Support
The strategy parameters are regularly reviewed and optimized. Users should periodically check for updates to ensure they have the latest configurations.
Disclaimer
This strategy is for educational and informational purposes only. Trading involves substantial risk of loss. Users should conduct their own research and consider their financial situation before trading. The author is not responsible for any trading losses incurred using this strategy.
Delta Volume Signals by Claudio [hapharmonic]Modifications:
Percentages without decimals.
I replaced the 'Current Volume' row with two boxes: "Δ Vol" and its value, which changes color depending on the direction of the bearish/bullish candle.
Signals can change color in the settings.
Box spacing so the table doesn't constantly change size.
To be modified:
The Net Volume sign shouldn't change to negative when the candle is red.
If anyone does this, let me know...
claudio.ventola@hotmail.com
Best regards!
ERL & IRL (Swing Levels) Sunnat//@version=5
indicator("ERL & IRL (Swing Levels)", overlay=true)
// Inputs
left_bars = input.int(5, "Left bars (swing strength)", minval=1)
right_bars = input.int(5, "Right bars (swing strength)", minval=1)
line_len = input.int(10, "Line length (bars)", minval=1) // short line
// Detect swing high (ERL) and swing low (IRL)
swingHigh = ta.pivothigh(high, left_bars, right_bars)
swingLow = ta.pivotlow(low, left_bars, right_bars)
// Draw ERL when swing high is found
if not na(swingHigh)
line.new(bar_index - right_bars, swingHigh,
bar_index - right_bars + line_len, swingHigh,
xloc=xloc.bar_index, extend=extend.none,
color=color.aqua, width=2)
label.new(bar_index - right_bars + line_len, swingHigh, "ERL",
xloc=xloc.bar_index, yloc=yloc.price,
color=color.new(color.aqua, 0), textcolor=color.black)
// Draw IRL when swing low is found
if not na(swingLow)
line.new(bar_index - right_bars, swingLow,
bar_index - right_bars + line_len, swingLow,
xloc=xloc.bar_index, extend=extend.none,
color=color.orange, width=2)
label.new(bar_index - right_bars + line_len, swingLow, "IRL",
xloc=xloc.bar_index, yloc=yloc.price,
color=color.new(color.orange, 0), textcolor=color.black)
PSAR+EMA+Hull+BBDescription
This all-in-one indicator combines four proven tools:
Parabolic SAR (Everget) — trend direction and potential reversals.
Exponential Moving Averages (20/50/100/200) — customizable lengths, colors, and offsets.
Hull Suite (InSilico) — smooth trend detection with multiple variations (HMA, THMA, EHMA).
Bollinger Bands — volatility and dynamic support/resistance.
Features
Toggle each module on/off in settings.
Fully configurable inputs (lengths, colors, offsets, multipliers).
Optional PSAR labels, highlights, and state fill.
Hull can color candles, draw band fills, and pull from higher timeframes.
Bollinger Bands include multiple basis types, stdev multipliers, and fill transparency.
Built-in alerts: PSAR direction change, Hull trending up/down.
Category
Trend Analysis (with Volatility as secondary).
🐬TSI_ShadowAdded the following features to the original TSI Shadow indicator by Daveatt
- Candle color on/off
=> Displays the current trend status by coloring the chart candles.
- Background color on/off
=> Displays the current trend status by coloring the chart background.
- Conservative signal processing based on the zero line on/off
=> When calculating the trend with the TSI, a bullish trend is only confirmed above the zero line, and a bearish trend is only confirmed below the zero line.
- Conservative signal processing based on full signal alignment on/off
=> This enhances the original trend calculation (bullish when TSI and Fast MA are above Slow MA). With this option, the trend is determined by the specific alignment of all three lines: TSI, Fast MA, and Slow MA.
기존 Daveatt 유저가 개발한 TSI Shadow 에서 아래 기능을 추가 하였습니다.
- 캔들 색상 on/off
=> 캔들에 추세의 상태를 색상으로 나타냅니다.
- 배경 색상 on/off
=> 배경에 추세의 상태를 색상으로 나타냅니다.
- 0선 기준으로 신호 발생 보수적 처리 on/off
=> TSI로 추세를 계산할 때 0선 위에서는 매수추세, 0선 아래서는 매도추세를 계산합니다.
- 전체 배열 신호 발생 보수적 처리 on/off
=> TSI선과, FastMA 선이 SlowMA 위에 있을때 상승추세, 반대면 하락추세를 나타내 주던 계산식에서 TSI-FastMA-SlowMA 세가지 선의 배열 상태로 추세를 나타냅니다.
Volume Delta Volume Signals by Claudio [hapharmonic]// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org
// © hapharmonic
//@version=6
FV = format.volume
FP = format.percent
indicator('Volume Delta Volume Signals by Claudio ', format = FV, max_bars_back = 4999, max_labels_count = 500)
//------------------------------------------
// Settings |
//------------------------------------------
bool usecandle = input.bool(true, title = 'Volume on Candles',display=display.none)
color C_Up = input.color(#12cef8, title = 'Volume Buy', inline = ' ', group = 'Style')
color C_Down = input.color(#fe3f00, title = 'Volume Sell', inline = ' ', group = 'Style')
// ✅ Nueva entrada para colores de señales
color buySignalColor = input.color(color.new(color.green, 0), "Buy Signal Color", group = "Signals")
color sellSignalColor = input.color(color.new(color.red, 0), "Sell Signal Color", group = "Signals")
string P_ = input.string(position.top_right,"Position",options = ,
group = "Style",display=display.none)
string sL = input.string(size.small , 'Size Label', options = , group = 'Style',display=display.none)
string sT = input.string(size.normal, 'Size Table', options = , group = 'Style',display=display.none)
bool Label = input.bool(false, inline = 'l')
History = input.bool(true, inline = 'l')
// Inputs for EMA lengths and volume confirmation
bool MAV = input.bool(true, title = 'EMA', group = 'EMA')
string volumeOption = input.string('Use Volume Confirmation', title = 'Volume Option', options = , group = 'EMA',display=display.none)
bool useVolumeConfirmation = volumeOption == 'none' ? false : true
int emaFastLength = input(12, title = 'Fast EMA Length', group = 'EMA',display=display.none)
int emaSlowLength = input(26, title = 'Slow EMA Length', group = 'EMA',display=display.none)
int volumeConfirmationLength = input(6, title = 'Volume Confirmation Length', group = 'EMA',display=display.none)
string alert_freq = input.string(alert.freq_once_per_bar_close, title="Alert Frequency",
options= ,group = "EMA",
tooltip="If you choose once_per_bar, you will receive immediate notifications (but this may cause interference or indicator repainting).
However, if you choose once_per_bar_close, it will wait for the candle to confirm the signal before notifying.",display=display.none)
//------------------------------------------
// UDT_identifier |
//------------------------------------------
type OHLCV
float O = open
float H = high
float L = low
float C = close
float V = volume
type VolumeData
float buyVol
float sellVol
float pcBuy
float pcSell
bool isBuyGreater
float higherVol
float lowerVol
color higherCol
color lowerCol
//------------------------------------------
// Calculate volumes and percentages |
//------------------------------------------
calcVolumes(OHLCV ohlcv) =>
var VolumeData data = VolumeData.new()
data.buyVol := ohlcv.V * (ohlcv.C - ohlcv.L) / (ohlcv.H - ohlcv.L)
data.sellVol := ohlcv.V - data.buyVol
data.pcBuy := data.buyVol / ohlcv.V * 100
data.pcSell := 100 - data.pcBuy
data.isBuyGreater := data.buyVol > data.sellVol
data.higherVol := data.isBuyGreater ? data.buyVol : data.sellVol
data.lowerVol := data.isBuyGreater ? data.sellVol : data.buyVol
data.higherCol := data.isBuyGreater ? C_Up : C_Down
data.lowerCol := data.isBuyGreater ? C_Down : C_Up
data
//------------------------------------------
// Get volume data |
//------------------------------------------
ohlcv = OHLCV.new()
volData = calcVolumes(ohlcv)
// Plot volumes and create labels
plot(ohlcv.V, color=color.new(volData.higherCol, 90), style=plot.style_columns, title='Total',display = display.all - display.status_line)
plot(ohlcv.V, color=volData.higherCol, style=plot.style_stepline_diamond, title='Total2', linewidth = 2,display = display.pane)
plot(volData.higherVol, color=volData.higherCol, style=plot.style_columns, title='Higher Volume', display = display.all - display.status_line)
plot(volData.lowerVol , color=volData.lowerCol , style=plot.style_columns, title='Lower Volume',display = display.all - display.status_line)
S(D,F)=>str.tostring(D,F)
volStr = S(math.sign(ta.change(ohlcv.C)) * ohlcv.V, FV)
buyVolStr = S(volData.buyVol , FV )
sellVolStr = S(volData.sellVol , FV )
// ✅ MODIFICACIÓN: Porcentaje sin decimales
buyPercentStr = str.tostring(math.round(volData.pcBuy)) + " %"
sellPercentStr = str.tostring(math.round(volData.pcSell)) + " %"
totalbuyPercentC_ = volData.buyVol / (volData.buyVol + volData.sellVol) * 100
sup = not na(ohlcv.V)
if sup
TC = text.align_center
CW = color.white
var table tb = table.new(P_, 6, 6, bgcolor = na, frame_width = 2, frame_color = chart.fg_color, border_width = 1, border_color = CW)
tb.cell(0, 0, text = 'Volume Candles', text_color = #FFBF00, bgcolor = #0E2841, text_halign = TC, text_valign = TC, text_size = sT)
tb.merge_cells(0, 0, 5, 0)
tb.cell(0, 1, text = 'Current Volume', text_color = CW, bgcolor = #0B3040, text_halign = TC, text_valign = TC, text_size = sT)
tb.merge_cells(0, 1, 1, 1)
tb.cell(0, 2, text = 'Buy', text_color = #000000, bgcolor = #92D050, text_halign = TC, text_valign = TC, text_size = sT)
tb.cell(1, 2, text = 'Sell', text_color = #000000, bgcolor = #FF0000, text_halign = TC, text_valign = TC, text_size = sT)
tb.cell(0, 3, text = buyVolStr, text_color = CW, bgcolor = #074F69, text_halign = TC, text_valign = TC, text_size = sT)
tb.cell(1, 3, text = sellVolStr, text_color = CW, bgcolor = #074F69, text_halign = TC, text_valign = TC, text_size = sT)
tb.cell(0, 5, text = 'Net: ' + volStr, text_color = CW, bgcolor = #074F69, text_halign = TC, text_valign = TC, text_size = sT)
tb.merge_cells(0, 5, 1, 5)
tb.cell(0, 4, text = buyPercentStr, text_color = CW, bgcolor = #074F69, text_halign = TC, text_valign = TC, text_size = sT)
tb.cell(1, 4, text = sellPercentStr, text_color = CW, bgcolor = #074F69, text_halign = TC, text_valign = TC, text_size = sT)
cellCount = 20
filledCells = 0
for r = 5 to 1 by 1
for c = 2 to 5 by 1
if filledCells < cellCount * (totalbuyPercentC_ / 100)
tb.cell(c, r, text = '', bgcolor = C_Up)
else
tb.cell(c, r, text = '', bgcolor = C_Down)
filledCells := filledCells + 1
filledCells
if Label
sp = ' '
l = label.new(bar_index, ohlcv.V,
text=str.format('Net: {0} Buy: {1} ({2}) Sell: {3} ({4}) {5}/\ {5}l {5}l',
volStr, buyVolStr, buyPercentStr, sellVolStr, sellPercentStr, sp),
style=label.style_none, textcolor=volData.higherCol, size=sL, textalign=text.align_left)
if not History
(l ).delete()
//------------------------------------------
// Draw volume levels on the candlesticks |
//------------------------------------------
float base = na,float value = na
bool uc = usecandle and sup
if volData.isBuyGreater
base := math.min(ohlcv.O, ohlcv.C)
value := base + math.abs(ohlcv.O - ohlcv.C) * (volData.pcBuy / 100)
else
base := math.max(ohlcv.O, ohlcv.C)
value := base - math.abs(ohlcv.O - ohlcv.C) * (volData.pcSell / 100)
barcolor(sup ? color.new(na, na) : ohlcv.C < ohlcv.O ? color.red : color.green,display = usecandle? display.all:display.none)
UseC = uc ? volData.higherCol:color.new(na, na)
plotcandle(uc?base:na, uc?base:na, uc?value:na, uc?value:na,
title='Body', color=UseC, bordercolor=na, wickcolor=UseC,
display = usecandle ? display.all - display.status_line : display.none, force_overlay=true,editable=false)
plotcandle(uc?ohlcv.O:na, uc?ohlcv.H:na, uc?ohlcv.L:na, uc?ohlcv.C:na,
title='Fill', color=color.new(UseC,80), bordercolor=UseC, wickcolor=UseC,
display = usecandle ? display.all - display.status_line : display.none, force_overlay=true,editable=false)
//------------------------------------------------------------
// Plot the EMA and filter out the noise with volume control. |
//------------------------------------------------------------
float emaFast = ta.ema(ohlcv.C, emaFastLength)
float emaSlow = ta.ema(ohlcv.C, emaSlowLength)
bool signal = emaFast > emaSlow
color c_signal = signal ? C_Up : C_Down
float volumeMA = ta.sma(ohlcv.V, volumeConfirmationLength)
bool crossover = ta.crossover(emaFast, emaSlow)
bool crossunder = ta.crossunder(emaFast, emaSlow)
isVolumeConfirmed(source, length, ma) =>
math.sum(source > ma ? source : 0, length) >= math.sum(source < ma ? source : 0, length)
bool ISV = isVolumeConfirmed(ohlcv.V, volumeConfirmationLength, volumeMA)
bool crossoverConfirmed = crossover and (not useVolumeConfirmation or ISV)
bool crossunderConfirmed = crossunder and (not useVolumeConfirmation or ISV)
PF = MAV ? emaFast : na
PS = MAV ? emaSlow : na
p1 = plot(PF, color = c_signal, editable = false, force_overlay = true, display = display.pane)
plot(PF, color = color.new(c_signal, 80), linewidth = 10, editable = false, force_overlay = true, display = display.pane)
plot(PF, color = color.new(c_signal, 90), linewidth = 20, editable = false, force_overlay = true, display = display.pane)
plot(PF, color = color.new(c_signal, 95), linewidth = 30, editable = false, force_overlay = true, display = display.pane)
plot(PF, color = color.new(c_signal, 98), linewidth = 45, editable = false, force_overlay = true, display = display.pane)
p2 = plot(PS, color = c_signal, editable = false, force_overlay = true, display = display.pane)
plot(PS, color = color.new(c_signal, 80), linewidth = 10, editable = false, force_overlay = true, display = display.pane)
plot(PS, color = color.new(c_signal, 90), linewidth = 20, editable = false, force_overlay = true, display = display.pane)
plot(PS, color = color.new(c_signal, 95), linewidth = 30, editable = false, force_overlay = true, display = display.pane)
plot(PS, color = color.new(c_signal, 98), linewidth = 45, editable = false, force_overlay = true, display = display.pane)
fill(p1, p2, top_value=crossover ? emaFast : emaSlow,
bottom_value =crossover ? emaSlow : emaFast,
top_color =color.new(c_signal, 80),
bottom_color =color.new(c_signal, 95)
)
// ✅ Usar colores configurables para señales
plotshape(crossoverConfirmed and MAV, style=shape.triangleup , location=location.belowbar, color=buySignalColor , size=size.small, force_overlay=true,display =display.pane)
plotshape(crossunderConfirmed and MAV, style=shape.triangledown, location=location.abovebar, color=sellSignalColor, size=size.small, force_overlay=true,display =display.pane)
string msg = '--------- '+"Buy volume ="+buyVolStr+" Buy Percent = "+buyPercentStr+" Sell volume = "+sellVolStr+" Sell Percent = "+sellPercentStr+" Net = "+volStr+' ---------'
if crossoverConfirmed
alert("Price (" + str.tostring(close) + ") Crossed over MA " + msg, alert_freq)
if crossunderConfirmed
alert("Price (" + str.tostring(close) + ") Crossed under MA " + msg, alert_freq)
顺序三连穿越:2/3先入 + 3/3加仓(仅低波动过滤)策略描述(中文)
本策略基于 顺序三连穿越 原则:当 MA5 依次上穿 MA10、MA30、MA60 时,触发趋势做多信号;反之依次下穿时触发做空信号。
在完成 2/3 穿越时即可先行入场,完成 3/3 穿越时可选择加仓确认。
为减少震荡磨损,策略引入了布林带带宽过滤:当市场波动率过低时禁止入场。同时设有 冷静期,避免刚出场后立即反复进场。
该系统适用于趋势性较强或弱趋势行情,能够较好地捕捉单边走势,但在长时间震荡行情中仍可能遭遇利润侵蚀。
Strategy Description (English)
This strategy is built on the Sequential Triple Crossover principle:
When the 5-period moving average (MA5) sequentially crosses above MA10, MA30, and MA60, a bullish entry is triggered.
Conversely, when MA5 sequentially crosses below MA10, MA30, and MA60, a bearish entry is triggered.
An early entry is allowed once 2 out of 3 crossovers are completed, while the final crossover (3/3) can optionally serve as a confirmation add-on position.
To mitigate losses in choppy conditions, the system uses a Bollinger Bandwidth filter that blocks entries when volatility is too low. A cooldown period is also implemented to avoid immediate re-entries after closing a trade.
This setup performs well in trending or weak-trend environments, capturing directional moves effectively, but may still suffer from profit erosion during prolonged sideways markets.
EMA50 Flux LT (Daily/Weekly)// This Pine Script® code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org
// © pizzalolodudu
//@version=6
indicator("EMA50 Flux LT (Daily/Weekly)", overlay=true)
// === Inputs ===
lenEMA = input.int(50, "Longueur EMA prix")
obvLen = input.int(20, "OBV MA length")
htf = input.timeframe("W", "Timeframe Flux (HTF)") // Par défaut : Weekly
lineWidth = input.int(6, "Épaisseur EMA", minval=1, maxval=12)
// === EMA50 sur la TF active (ex: Daily chart) ===
ema50 = ta.ema(close, lenEMA)
// === Flux HTF (Weekly ou Monthly) ===
obv_htf = request.security(syminfo.tickerid, htf, ta.cum(math.sign(ta.change(close)) * volume))
obv_ma_htf = request.security(syminfo.tickerid, htf, ta.sma(ta.cum(math.sign(ta.change(close)) * volume), obvLen))
imb_htf = request.security(syminfo.tickerid, htf, (close > open ? 1 : -1))
// === Signaux binaires ===
obv_signal = obv_htf > obv_ma_htf ? 1 : -1
imb_signal = imb_htf > 0 ? 1 : -1
// === Score total revisité ===
score = obv_signal + imb_signal
flux = score > 0 ? 1 : score < 0 ? -1 : 0
// === Couleurs ===
colFlux = flux > 0 ? color.lime : flux < 0 ? color.red : color.orange
colOutline = color.new(color.white, 70)
// === Tracé double couche ===
plot(ema50, color=colOutline, linewidth=lineWidth + 2, title="Contour EMA")
plot(ema50, color=colFlux, linewidth=lineWidth, title="EMA Flux LT")
❄️ Lin Kuei Elite SuperTrend ⚔️Lin Kuei Elite SuperTrend - Technical Analysis Indicator
Overview
The Lin Kuei Elite SuperTrend is an advanced trend-following indicator that enhances the traditional SuperTrend algorithm with multiple layers of analysis and sophisticated visual effects. Built on Pine Script v6, it provides traders with dynamic trend identification, signal generation, and comprehensive market intelligence.
Core Algorithm
The indicator calculates SuperTrend using an enhanced ATR (Average True Range) methodology with adaptive smoothing and rank-based multipliers. The core logic determines trend direction by comparing price action to dynamically adjusted upper and lower bands, creating clear trend reversals and continuation signals.
Key Components:
Enhanced ATR calculation with EMA smoothing
Rank-based sensitivity scaling (0.8x to 1.6x multipliers)
Volume and momentum filtering options
Multi-timeframe shadow clone analysis
Assassin Rank System
The indicator features four distinct operational modes that adjust sensitivity and visual complexity:
Shadow Ninja (Conservative): 80% sensitivity with stable, low-noise signals ideal for risk-averse traders seeking high-confidence entries.
Ice Warrior (Balanced): Standard 100% sensitivity providing optimal balance between responsiveness and stability for most trading scenarios.
Frost Master (Aggressive): 130% sensitivity with enhanced trend detection for experienced traders in volatile markets.
Grandmaster Sub-Zero (Ultimate): 160% sensitivity with maximum responsiveness and exclusive visual effects for professional-level analysis.
Visual Features
Frost Aura Effects: Multi-layered glow effects around the main trend line with dynamic transparency based on trend velocity, creating visual depth and trend strength indication.
Shadow Clone Technique: Displays fast and slow SuperTrend variants using different ATR periods (0.7x and 1.5x) to provide confirmation and early warning signals.
Future Sight Projections: Three predictive projection lines showing potential trend continuation based on current velocity and acceleration calculations.
Quantum Particles: Animated particle effects positioned above and below the main trend line, appearing at regular intervals to enhance visual appeal.
Protection Zones: Shaded areas around the main trend line representing dynamic support/resistance zones calculated at 30% of the adjusted ATR.
Signal Generation
The indicator generates two primary signal types:
Trend Change Signals: Triangle markers appear when the trend direction shifts from bullish to bearish or vice versa, with confirmation based on price position relative to the calculated bands.
Rank-Specific Signals: Higher ranks display additional character-based signals (snowflake, fire, ice cube, lightning) with corresponding size scaling based on the selected assassin rank.
Technical Specifications
Input Parameters:
ATR Period: 10 (adjustable 1-50)
Ice Multiplier: 3.0 (adjustable 0.5-10.0)
Crystallization Period: 2 (adjustable 1-10)
Line Thickness: 4 (adjustable 1-8)
Optional Filters:
Volume confirmation with threshold settings
Momentum filtering based on 5-period price changes
Noise reduction capabilities
Intelligence Dashboard
A compact real-time dashboard displays:
Current assassin rank and associated color coding
Trend direction with visual indicators
Power level classification (LOW/MODERATE/HIGH/EXTREME)
Protection zone status
Signal system status
Battle readiness assessment
Alert System
Comprehensive alert functionality includes:
Basic trend change notifications
Rank-specific ultimate technique alerts
Customizable message content for different signal types
Use Cases
The indicator suits multiple trading styles:
Trend Following: Primary trend identification with clear entry/exit points
Swing Trading: Medium-term trend changes with protection zones for position management
Scalping: Fast rank settings for quick trend reversals (use with caution due to increased noise)
Risk Management: Protection zones help determine stop-loss placement and position sizing
Limitations
This indicator is a trend-following tool and may generate false signals in ranging or choppy markets. The multiple visual effects, while aesthetically appealing, may cause information overload for some users. Higher sensitivity ranks increase signal frequency but also false signal probability. The indicator works best in trending market conditions and should be combined with other forms of analysis for optimal results.
The thematic elements (assassin ranks, frost/fire imagery) are purely cosmetic and do not affect the underlying mathematical calculations, which remain based on established technical analysis principles.
Trend TraderThe Trend Trader indicator is a trend-following tool based on a triple EMA (Exponential Moving Average) setup designed to help traders identify market direction and potential reversal zones. It plots three customizable EMAs on the chart to highlight bullish and bearish momentum, then generates trade signals when price shows a strong likelihood of continuing in the direction of the prevailing trend.
EMA Alignment: The indicator checks for bullish stacking (fast EMA above medium, medium above slow) and bearish stacking (fast EMA below medium, medium below slow). This alignment defines the prevailing market trend.
Trend Validation: A user-defined lookback period ensures signals are only taken if the market recently displayed a stacked trend, thus filtering false entries during consolidations.
Signal Generation: Buy signals appear when price dips into the zone between the fast and medium EMAs during a bullish trend. Sell signals appear when price rallies into the zone between the fast and medium EMAs during a bearish trend.
Alerts: Built-in alerts notify traders of new trade opportunities without having to constantly watch the chart.
This indicator is suitable for swing trading and intraday strategies across multiple markets, including forex, stocks, indices, and crypto.
Suggested Strategy for Profitability
This tool is best used as part of a structured trend-trading plan. Below is a suggested framework:
Entry Rules
Long (Buy Trade):
Confirm that EMA alignment is bullish (EMA1 > EMA2 > EMA3).
Wait for a Buy Signal (triangle up below price).
Ensure the higher timeframe (e.g., 4H if trading 1H) trend is also bullish to filter trades.
Short (Sell Trade):
Confirm EMA alignment is bearish (EMA1 < EMA2 < EMA3).
Wait for a Sell Signal (triangle down above price).
Higher timeframe should also be bearish to increase probability.
Stop Loss
For long positions, place the stop loss just below EMA3 or the most recent swing low.
For short positions, place the stop loss just above EMA3 or the most recent swing high.
Take Profit
Conservative: Set TP at 1.5x to 2x the stop loss distance.
Aggressive: Trail stop loss below EMA2 (for longs) or above EMA2 (for shorts) to capture larger trends.
Risk Management
Use no more than 1–2% of account risk per trade.
Trade only when the signal aligns with overall market context (higher timeframe, support/resistance, or volume confirmation).
This indicator is very similar to the indicator "Trend Scalper" by the same developer, the difference is this indicator is used to just find the trade and hold the trade or to find the reversal of a trend instead of triggering alerts every time price enters between EMA1 and EMA2.
Parabolic SAR BY CARLOZ🔹 What is the Parabolic SAR?
The Parabolic SAR (developed by Welles Wilder) is a trend-following indicator used to identify potential entry and exit points in the market.
🔹 What does “SAR” mean?
SAR = Stop And Reverse.
It suggests where to place a stop loss and also indicates when to reverse a position (from long to short or short to long).
🔹 How does it look on the chart?
It appears as a series of dots above or below the price:
Dots below price → bullish signal (uptrend).
Dots above price → bearish signal (downtrend).
Scalper - Pattern Recognition & Price Action with Divergence Scalper - Pattern Recognition & Price Action with Divergence
Overview
An educational indicator designed to demonstrate comprehensive technical analysis concepts through integrated pattern recognition, price action analysis, and divergence detection. This tool combines traditional candlestick patterns with modern institutional concepts and advanced divergence analysis for educational market study.
Educational Purpose & Originality
Core Educational Concepts
This indicator serves as a learning platform for understanding:
- **Pattern Recognition Methodology**: Systematic identification of candlestick formations
- **Price Action Theory**: Modern institutional footprint analysis
- **Divergence Analysis**: Momentum divergence detection across multiple oscillators
- **Confluence Systems**: Multi-signal integration and validation techniques
Original Implementation Features
1. Enhanced Pattern Detection Library
- **Volatility-Filtered Patterns**: ATR-based validation for pattern significance
- **Volume-Confirmed Formations**: Integration of volume analysis with pattern detection
- **Multi-Candle Pattern Recognition**: Three-candle formations and complex patterns
- **Context-Aware Detection**: Patterns validated against market structure
2. Advanced Divergence System
- **Multi-Oscillator Analysis**: RSI, CCI, and MACD divergence detection
- **Four Divergence Types**: Regular bullish/bearish and hidden bullish/bearish
- **Pivot-Based Detection**: Systematic swing high/low identification
- **Weighted Signal Integration**: Divergences integrated into confluence scoring
3. Modern Price Action Concepts
- **Fair Value Gaps (FVG)**: Identification of institutional inefficiencies
- **Order Block Detection**: Volume-validated accumulation/distribution zones
- **Dynamic Support/Resistance**: Touch-count validated levels with ATR tolerance
- **Breakout Analysis**: Volume-confirmed price breakouts
4. Intelligent Confluence System
- **Multi-Signal Aggregation**: Combines patterns, oscillators, divergences, and breakouts
- **Weighted Scoring Algorithm**: Different signal types receive appropriate weighting
- **Visual Confluence Display**: Clear indication of high-probability setups
- **Reason Tracking**: Shows which signals contribute to confluence
How to Use
Initial Configuration
1. **Enable Desired Components**: Toggle individual analysis modules based on learning focus
2. **Adjust Sensitivity Settings**: Configure pattern detection parameters for your market
3. **Select Divergence Options**: Choose oscillators and divergence types to monitor
4. **Set Confluence Requirements**: Define minimum signals needed for confirmation
Component Settings
Moving Average Configuration
- Four customizable MA lines for multi-timeframe trend analysis
- Selectable MA types (SMA, EMA, WMA, VWMA, HMA)
- Independent timeframe settings for each MA
Pattern Recognition Settings
- **Engulfing Patterns**: Strong engulfing with ATR validation
- **Doji Variations**: Standard, gravestone, and dragonfly detection
- **Hammer/Hanging Man**: Context-validated reversal patterns
- **Star Formations**: Morning and evening star patterns
- **Three Soldiers/Crows**: Momentum continuation patterns
Divergence Detection Parameters
- **Lookback Period**: Adjustable swing detection range
- **Minimum Pivot Strength**: Percentage threshold for valid pivots
- **Oscillator Selection**: RSI, CCI, MACD, or combination
- **Divergence Types**: Regular and hidden divergences
Signal Interpretation
Visual Indicators
- **Pattern Labels**: Clear marking of detected formations
- **Divergence Lines**: Visual connection between price and oscillator pivots
- **Support/Resistance Levels**: Dynamic horizontal levels with validation
- **Confluence Signals**: Large "BULL" or "BEAR" labels for high-probability setups
Dashboard Information
- Real-time oscillator values (RSI, CCI, MACD)
- Current signal count for bulls and bears
- Active divergence status
- Confluence confirmation status
Important Educational Considerations
Learning Focus
- **Pattern Study**: Understand how traditional patterns form and their limitations
- **Divergence Concepts**: Learn to identify momentum shifts before price reversals
- **Confluence Theory**: Practice combining multiple analysis techniques
- **Risk Awareness**: No pattern or signal guarantees future price movement
Limitations for Learning
- **Historical Analysis**: Patterns are identified after formation
- **No Predictive Guarantee**: Educational tool for understanding concepts, not predictions
- **Market Context Required**: Patterns should be considered within broader market context
- **Practice Required**: Effective use requires study and practice
Educational Best Practices
1. **Start Simple**: Enable one component at a time to understand each concept
2. **Paper Trade**: Practice identifying signals without real money risk
3. **Study Failed Signals**: Learn why patterns fail to improve understanding
4. **Combine with Other Analysis**: Use alongside fundamental and sentiment analysis
5. **Document Observations**: Keep a journal of pattern occurrences and outcomes
Technical Components
Indicator Architecture
- **Modular Design**: Independent modules for different analysis types
- **Performance Optimization**: Efficient calculation methods for smooth operation
- **Visual Management**: Controlled use of Pine Script drawing objects
- **Array-Based Storage**: Efficient data management for historical analysis
Calculation Methods
- **ATR-Based Validation**: Volatility-adjusted pattern filtering
- **Volume Analysis**: Comparative volume assessment for confirmation
- **Pivot Detection**: Mathematical identification of swing points
- **Statistical Validation**: Touch-count and tolerance-based S/R levels
Divergence Detection Methodology
Regular Divergences (Reversal Signals)
- **Bullish**: Price lower low + Oscillator higher low
- **Bearish**: Price higher high + Oscillator lower high
Hidden Divergences (Continuation Signals)
- **Hidden Bullish**: Price higher low + Oscillator lower low
- **Hidden Bearish**: Price lower high + Oscillator higher high
Validation Criteria
- Minimum pivot strength requirement (percentage-based)
- Lookback period for swing detection
- Multiple oscillator confirmation option
Confluence Scoring System
Signal Categories
1. **Pattern Signals** (Weight: 1): Candlestick formations
2. **Oscillator Signals** (Weight: 1): RSI/CCI extremes
3. **Breakout Signals** (Weight: 1): Volume-confirmed breaks
4. **Regular Divergences** (Weight: 2): Higher probability reversals
5. **Hidden Divergences** (Weight: 1): Trend continuation signals
Confluence Thresholds
- Adjustable minimum signal requirement (2-6 signals)
- Visual indication when threshold is met
- Detailed reason display for educational understanding
Educational Dashboard
Real-Time Metrics
- Oscillator readings (RSI, CCI, MACD)
- ATR volatility measurement
- Bull/Bear signal counts
- Divergence status
- Confluence confirmation
Customization Options
- Position selection (6 screen locations)
- Color customization for all elements
- Enable/disable individual components
Version Information
- **Version 1.1**: Added comprehensive divergence detection system
- **Educational Focus**: Designed for learning technical analysis concepts
- **Integration**: All components work together in confluence system
Disclaimer
This indicator is designed exclusively for educational purposes to demonstrate technical analysis concepts. It is not financial advice and should not be used as the sole basis for trading decisions. Past patterns and signals do not guarantee future results. Trading involves substantial risk of loss. Users should conduct their own research, practice with demo accounts, and consider seeking advice from qualified professionals before making investment decisions.
Learning Resources
The indicator includes extensive inline comments explaining each calculation and concept. Users are encouraged to study the source code to understand the methodology behind each component. This transparency aids in learning how technical indicators work and their limitations.
---
**Note**: This is an educational tool meant to help traders learn pattern recognition and technical analysis concepts. Success requires practice, additional analysis, and proper risk management.
Intraday Rising & Reversal ScannerPine Script Description: Intraday Rising & Reversal ScannerThis Pine Script is a TradingView indicator designed to identify stocks with intraday (1-hour timeframe) potential for bullish (rising) or bearish (reversal) movements. It scans for stocks based on user-defined technical criteria, including price change, relative volume, RSI, EMA, ATR, and VWAP. The script plots signals on the chart, displays a summary table, and triggers alerts when conditions are met.FeaturesBullish Signal (Rising Stocks):1H Price Change: > 1% (configurable, e.g., >2% for volatile markets).
Relative Volume: > 2.0 (volume is at least twice the 20-period average).
RSI (14): Between 50 and 70 (strong but not overbought momentum).
Price vs EMA 13: Price above the 13-period EMA (confirms short-term uptrend).
ATR (14): Current ATR above its 20-period average (indicates volatility).
VWAP: Price above VWAP (optional, shown on chart for manual confirmation).
Bearish Signal (Reversal Stocks):1H Price Change: < -1% (configurable, e.g., <-2% for stronger reversals).
Relative Volume: > 2.0 (high volume confirms selling pressure).
RSI (14): > 70 (overbought, increasing reversal likelihood).
Price vs EMA 13: Price below the 13-period EMA (confirms short-term downtrend).
ATR (14): Current ATR above its 20-period average (indicates volatility).
VWAP: Price below VWAP (optional, shown on chart for manual confirmation).
Visualization:Bullish Signal: Green triangle below the bar.
Bearish Signal: Red triangle above the bar.
VWAP: Plotted as a blue line for manual verification.
Table: Displays real-time metrics (Change %, Relative Volume, RSI, Price vs EMA, ATR, VWAP) in the top-right corner, color-coded (green for bullish, red for bearish).
Alerts:Separate alerts for bullish ("Intraday Bullish Signal") and bearish ("Intraday Bearish Signal") conditions.
Customizable alert messages include parameter values for easy tracking.
How It WorksThe script runs on the 1-hour (1H) timeframe, ensuring all calculations are based on hourly data.
Indicators are computed:Change %: Percentage price change over the last hour.
Relative Volume: Current volume divided by the 20-period SMA of volume.
RSI: 14-period Relative Strength Index.
EMA 13: 13-period Exponential Moving Average.
ATR: 14-period Average True Range, compared to its 20-period SMA.
VWAP: Volume Weighted Average Price, plotted for visual confirmation.
Signals are generated when all conditions for either bullish or bearish criteria are met.
A table summarizes key metrics, and alerts can be set up for real-time notifications.
Usage InstructionsApply the Script:Open TradingView’s Pine Editor.
Copy and paste the script.
Click "Add to Chart" and set the chart to the 1-hour (1H) timeframe.
Set Up Alerts:Right-click on the chart > "Add Alert".
Select "Intraday Bullish Signal" or "Intraday Bearish Signal" as the condition.
Configure notifications (e.g., SMS, email, or TradingView alerts).
Manual VWAP Check:VWAP is plotted as a blue line. Verify that the price is above VWAP for bullish signals or below for bearish signals using the table or chart.
To make VWAP a mandatory filter, uncomment the VWAP conditions in the bull_signal and bear_signal definitions.
Best MA Finder: Sharpe/Sortino ScannerThis script, Best MA Finder: Sharpe/Sortino Scanner, is a tool designed to identify the moving average (SMA or EMA) that best acts as a dynamic trend threshold on a chart, based on risk-adjusted historical performance. It scans a wide range of MA lengths (SMA or EMA) and selects the one whose simple price vs MA crossover delivered the strongest results using either the Sharpe ratio or the Sortino ratio. Reading it is intuitive: when price spent time above the selected MA, conditions were on average more favorable in the backtest; below, less favorable. It is a trend and risk gauge, not an overbought or oversold signal.
What it does:
- Runs individual long-only crossover backtests for many MA lengths across short to very long horizons.
- For each length, measures the total number of trades, the annualized Sharpe ratio, and the annualized Sortino ratio.
- Uses the chosen metric value (Sharpe or Sortino) as the score to rank candidates.
- Applies a minimum trade filter to discard statistically weak results.
- Optionally applies a local stability filter to prefer a length that also outperforms its close neighbors by at least a small margin.
- Selects the optimal MA and displays it on the chart with a concise summary table.
How to use it:
- Choose MA type: SMA or EMA.
- Choose the metric: Sharpe or Sortino.
- Set the minimum trade count to filter out weak samples.
- Select the risk-free mode:
Auto: uses a short-term risk-free rate for USD-priced symbols when available.
Manual: you provide a risk-free ticker.
None: no risk-free rate.
- Optionally enable stability controls: neighbor radius and epsilon.
- Toggle the on-chart summary table as needed.
On-chart output:
- The selected optimal MA is plotted.
- The optional table shows MA length, number of trades, chosen metric value annualized, and the annual risk-free rate used.
Key features:
- Risk-adjusted optimization via Sharpe or Sortino for fair, comparable assessment.
- Broad MA scan with SMA and EMA support.
- Optional stability filter to avoid one-off spikes.
- Clear and auditable presentation directly on the chart.
Use cases:
- Traders who want a defensible, data-driven trend threshold without manual trial and error.
- Swing and trend-following workflows across timeframes and asset classes.
- Quick SMA vs EMA comparisons using risk-adjusted results.
Limitations:
- Not a full trading strategy with position sizing, costs, funding, slippage, or stops.
- Long-only, one position at a time.
- Discrete set of MA lengths, not a continuous optimizer.
- Requires sufficient price history and, if used, a reliable risk-free series.
This script is open-source and built from original logic. It does not replicate closed-source scripts or reuse significant external components.
Adaptive HMA SignalsAdaptive HMA Signals
This indicator pairs nicely with the Contrarian 100 MA and can be located here:
Overview
The "Adaptive HMA Signals" indicator is a sophisticated technical analysis tool designed for traders aiming to capture trend changes with precision. By leveraging Hull Moving Averages (HMAs) that adapt dynamically to market conditions (volatility or volume), this indicator generates actionable buy and sell signals based on price interactions with adaptive HMAs and slope analysis. Optimized for daily charts, it is highly customizable and suitable for trading forex, stocks, cryptocurrencies, or other assets. The indicator is ideal for swing traders and trend followers seeking to time entries and exits effectively.
How It Works
The indicator uses two adaptive HMAs—a primary HMA and a minor HMA—whose periods adjust dynamically based on user-selected market conditions (volatility via ATR or volume via RSI). It calculates the slope of the primary HMA to identify trend strength and generates exit signals when the price crosses the minor HMA under specific slope conditions. Signals are plotted as circles above or below the price, with inverted colors (white for buy, blue for sell) to enhance visibility on any chart background.
Key Components
Adaptive HMAs: Two HMAs (primary and minor) with dynamic periods that adjust based on volatility (ATR-based) or volume (RSI-based) conditions. Periods range between user-defined minimum and maximum values, adapting by a fixed percentage (3.141%).
Slope Analysis: Calculates the slope of the primary HMA over a 34-bar period to gauge trend direction and strength, normalized using market range data.
Signal Logic: Generates buy signals (white circles) when the price falls below the minor HMA with a flat or declining slope (indicating a potential trend reversal) and sell signals (blue circles) when the price rises above the minor HMA with a flat or rising slope.
Signal Visualization: Plots signals at an offset based on ATR for clarity, using semi-transparent colors to avoid chart clutter.
Mathematical Concepts
Dynamic Period Adjustment:
Primary HMA period adjusts between minLength (default: 144) and maxLength (default: 200).
Minor HMA period adjusts between minorMin (default: 55) and minorMax (default: 89).
Periods decrease by 3.141% under high volatility/volume and increase otherwise.
HMA Calculation:
Uses the Hull Moving Average formula: WMA(2 * WMA(src, length/2) - WMA(src, length), sqrt(length)).
Provides a smoother, faster-responding moving average compared to traditional MAs.
Slope Calculation:
Computes the slope of the primary HMA using a 34-bar period, normalized by the market range (highest high - lowest low over 34 bars).
Slope angle is converted to degrees using arccosine for intuitive trend strength interpretation.
Signal Conditions:
Buy: Slope ≥ 17° (flat or rising), price < minor HMA, low volatility/volume.
Sell: Slope ≤ -17° (flat or declining), price > minor HMA, low volatility/volume.
Signals are triggered only on confirmed bars to avoid repainting.
Entry and Exit Rules
Buy Signal (White Circle): Triggered when the price crosses below the minor HMA, the slope of the primary HMA is flat or rising (≥17°), and volatility/volume is low. The signal appears as a white circle above the price bar, offset by 0.72 * ATR(5).
Sell Signal (Blue Circle): Triggered when the price crosses above the minor HMA, the slope of the primary HMA is flat or declining (≤-17°), and volatility/volume is low. The signal appears as a blue circle below the price bar, offset by 0.72 * ATR(5).
Exit Rules: Exit a buy position on a sell signal and vice versa. Combine with other tools (e.g., support/resistance, RSI) for additional confirmation. Always apply proper risk management.
Recommended Usage
The "Adaptive HMA Signals" indicator is optimized for daily charts but can be adapted to other timeframes (e.g., 1H, 4H) with adjustments to period lengths. It performs best in trending or range-bound markets with clear reversal points. Traders should:
Backtest the indicator on their chosen asset and timeframe to validate signal reliability.
Combine with other technical tools (e.g., trendlines, Fibonacci retracements) for stronger trade setups.
Adjust minLength, maxLength, minorMin, and minorMax based on market volatility and timeframe.
Use the Charger input to toggle between volatility (ATR) and volume (RSI) adaptation for optimal performance in specific market conditions.
Customization Options
Source: Choose the price source (default: close).
Show Signals: Toggle visibility of buy/sell signals (default: true).
Charger: Select adaptation trigger—Volatility (ATR-based) or Volume (RSI-based) (default: Volatility).
Main HMA Periods: Set minimum (default: 144) and maximum (default: 200) periods for the primary HMA.
Minor HMA Periods: Set minimum (default: 55) and maximum (default: 89) periods for the minor HMA.
Slope Period: Fixed at 34 bars for slope calculation, adjustable via code if needed.
Why Use This Indicator?
The "Adaptive HMA Signals" indicator combines the responsiveness of HMAs with dynamic adaptation to market conditions, offering a robust tool for identifying trend reversals. Its clear visual signals, customizable periods, and adaptive logic make it versatile for various markets and trading styles. Whether you’re a beginner or an experienced trader, this indicator enhances your ability to time entries and exits with precision.
Tips for Users
Test the indicator thoroughly on your chosen market and timeframe to optimize settings (e.g., adjust period lengths for non-daily charts).
Use in conjunction with price action or other indicators (e.g., RSI, MACD) for stronger trade confirmation.
Monitor volatility/volume conditions to ensure the Charger setting aligns with market dynamics.
Ensure your chart timeframe aligns with the selected period lengths for accurate signal generation.
Apply strict risk management to protect against false signals in choppy markets.
Happy trading with the Adaptive HMA Signals indicator! Share your feedback and strategies in the TradingView community!
MAs+Engulfing O caminho das Criptos
This indicator overlays multiple moving averages (EMAs 20/50/100/200 and SMA 200) and highlights bullish/bearish engulfing candles by dynamically coloring the candle body. When a bullish engulfing is detected, the candle appears as a strong dark green; for bearish engulfing, a more vivid red. Normal candles keep classic lime/red colors. Visual alerts and bar coloring make price-action patterns instantly visible.
Includes built-in alert conditions for both patterns, supporting both trading automation and education. The tool upgrades trend-following setups by combining structure with automatic price action insights.
Este indicador combina médias móveis (EMAs de 20/50/100/200 e SMA 200) com detecção de engolfo de alta/baixa, colorindo o candle automaticamente: engolfo de alta com verde escuro, engolfo de baixa com vermelho destacado. Inclui alertas automáticos para ambos os padrões, perfeito para análise visual, estratégia, ou ensino.
EMA & BarCountNothing. EMA & Bar Count
Nothing. EMA & Bar Count
Nothing. EMA & Bar Count
Nothing. EMA & Bar Count
Nothing. EMA & Bar Count
Thanks .
MAMA [DCAUT]█ MAMA (MESA Adaptive Moving Average)
📊 OVERVIEW
The MESA Adaptive Moving Average (MAMA) represents an advanced implementation of John F. Ehlers' adaptive moving average system using the Hilbert Transform Discriminator. This indicator automatically adjusts to market cycles, providing superior responsiveness compared to traditional fixed-period moving averages while maintaining smoothness.
MAMA dynamically calculates two lines: the fast-adapting MAMA line and the following FAMA (Following Adaptive Moving Average) line. The system's core strength lies in its ability to automatically detect and adapt to the dominant market cycle, reducing lag during trending periods while providing stability during consolidation phases.
🎯 CORE CONCEPTS
Signal Interpretation:
• MAMA above FAMA: Indicates bullish trend momentum with the fast line leading upward movement
• MAMA below FAMA: Suggests bearish trend momentum with the fast line leading downward movement
• Golden Cross: MAMA crossing above FAMA signals potential upward momentum shift
• Death Cross: MAMA crossing below FAMA indicates potential downward momentum shift
• Line Convergence: MAMA and FAMA approaching each other suggests trend consolidation or potential reversal
Primary Applications:
• Trend Following: Enhanced responsiveness to trend changes compared to traditional moving averages
• Crossover Signals: MAMA/FAMA crossovers for identifying potential entry and exit points
• Cycle Analysis: Automatic adaptation to market's dominant cycle characteristics
• Reduced Lag: Minimized delay in trend detection while maintaining signal smoothness
📐 MATHEMATICAL FOUNDATION
Hilbert Transform Discriminator Technology:
The MAMA system employs John F. Ehlers' Hilbert Transform Discriminator, a sophisticated signal processing technique borrowed from telecommunications engineering. The Hilbert Transform creates a complex representation of the price series by generating a 90-degree phase-shifted version of the original signal, enabling precise cycle measurement.
The discriminator analyzes the instantaneous phase relationships between the original price series and its Hilbert Transform counterpart. This mathematical relationship reveals the dominant cycle period present in the market data at each point in time, forming the foundation for adaptive smoothing.
Instantaneous Period Calculation:
The algorithm computes the instantaneous period using the arctangent of the ratio between the Hilbert Transform and the original price series. This calculation produces a real-time measurement of the market's dominant cycle, typically ranging from short-term noise cycles to longer-term trend cycles.
The instantaneous period measurement undergoes additional smoothing to prevent erratic behavior from single-bar anomalies. This smoothed period value becomes the basis for calculating the adaptive alpha coefficient that controls the moving average's responsiveness.
Dynamic Alpha Coefficient System:
The adaptive alpha calculation represents the core mathematical innovation of MAMA. The alpha coefficient is derived from the instantaneous period measurement and constrained within the user-defined fast and slow limits.
The mathematical relationship converts the measured cycle period into an appropriate smoothing factor: shorter detected cycles result in higher alpha values (increased responsiveness), while longer cycles produce lower alpha values (increased stability). This creates an automatic adaptation mechanism that responds to changing market conditions.
MAMA/FAMA Calculation Process:
The MAMA line applies the dynamically calculated alpha coefficient to an exponential moving average formula: MAMA = alpha × Price + (1 - alpha) × MAMA . The FAMA line then applies a secondary smoothing operation to the MAMA line, creating a following average that provides confirmation signals.
This dual-line approach ensures that the fast-adapting MAMA line captures trend changes quickly, while the FAMA line offers a smoother confirmation signal, reducing the likelihood of acting on temporary price fluctuations.
Cycle Detection Mechanism:
The underlying cycle detection employs quadrature components derived from the Hilbert Transform to measure both amplitude and phase characteristics of price movements. This allows the system to distinguish between genuine trend changes and temporary price noise, automatically adjusting the smoothing intensity accordingly.
The mathematical framework ensures that during strong trending periods with clear directional movement, the algorithm reduces smoothing to minimize lag. Conversely, during consolidation phases with mixed signals, increased smoothing helps filter out false breakouts and whipsaws.
📋 PARAMETER CONFIGURATION
Source Selection Strategy:
• HL2 (High+Low)/2 (Default): Recommended for cycle analysis as it represents the midpoint of each period's trading range, reducing impact of opening gaps and closing spikes
• Close Price: Traditional choice reflecting final market sentiment, suitable for end-of-day analysis
• HLC3 (High+Low+Close)/3: Balanced approach incorporating range information with closing emphasis
• OHLC4 (Open+High+Low+Close)/4: Most comprehensive price representation for complete market view
Fast Limit Configuration (Default 0.5):
Controls the maximum responsiveness of the adaptive system. Higher values increase sensitivity to recent price changes but may introduce more noise. This parameter sets the upper bound for the dynamic alpha calculation.
Slow Limit Configuration (Default 0.05):
Determines the minimum responsiveness, providing stability during uncertain market conditions. Lower values increase smoothing but may cause delayed signals. This parameter sets the lower bound for the dynamic alpha calculation.
Parameter Relationship Considerations:
The fast and slow limits work together to define the adaptive range. The wider the range between these limits, the more dramatic the adaptation between trending and consolidating market conditions. Different market characteristics may benefit from different parameter configurations, requiring individual testing and validation.
📊 COLOR CODING SYSTEM
Line Visualization:
• Green Line (MAMA): The fast-adapting moving average that responds quickly to price changes
• Red Line (FAMA): The following adaptive moving average that provides confirmation signals
The fixed color scheme provides consistent visual identification of each line, enabling clear differentiation between the fast-adapting MAMA and the following FAMA throughout all market conditions.
💡 CORE VALUE PROPOSITION
Advantages Over Traditional Moving Averages:
• Cycle Adaptation: Automatically adjusts to market's dominant cycle rather than using fixed periods
• Reduced Lag: Faster response to genuine trend changes while filtering market noise
• Mathematical Foundation: Based on advanced signal processing techniques from telecommunications engineering
• Dual-Line System: Provides both fast adaptation (MAMA) and confirmation (FAMA) in one indicator
Comparative Performance Characteristics:
Unlike fixed-period moving averages that apply the same smoothing regardless of market conditions, MAMA adapts its behavior based on current market cycle characteristics. This may help reduce whipsaws during consolidation periods while maintaining responsiveness during trending phases.
Usage Considerations:
This indicator is designed for technical analysis purposes. The adaptive nature means that parameter optimization should consider the specific characteristics of the asset and timeframe being analyzed. Like all technical indicators, MAMA should be used as part of a comprehensive analysis approach rather than as a standalone signal generator.
Alert Functionality:
The indicator includes alert conditions for MAMA/FAMA crossovers, enabling automated notification of potential momentum shifts. These alerts can assist in timing analysis but should be combined with other forms of market analysis for decision-making purposes.
34 EMA Cross Alert (Once per sequence)This script is used when 5-12 EMA is above 34-50 EMA and if price corrects to 34-50 cloud and bounces i.e. price crosses below 34 EMA and then cross above 34 EMA, it will trigger alert.
3MA/EMA Alerts指标名称(中文/英文)
中文名:多均线趋势指标(带上穿与金叉提醒)
英文名:Multi MA/EMA Trend Indicator (with Price & Golden Cross Alerts)
指标功能介绍(中文)
多均线趋势指标(带上穿与金叉提醒) 是一个可自定义的均线工具,适用于趋势分析和交易信号提醒。
核心功能:
多均线显示
默认显示 EMA20,EMA80/200 可选择显示
每条均线可独立选择 EMA 或 SMA
自定义颜色和线宽
价格上穿均线提醒
当价格向上突破任意开启的均线时触发提醒
可用于捕捉短线趋势启动点
金叉提醒
当短期均线向上穿过中长期均线时触发提醒
可用于捕捉潜在的趋势反转或加速
中文 UI
参数和提醒信息均为中文,便于快速理解和使用
适用场景
趋势确认
趋势反转捕捉
短线入场和长期持仓参考
Indicator Description (English)
Multi MA/EMA Trend Indicator (with Price & Golden Cross Alerts) is a customizable moving average tool for trend analysis and trading alerts.
Key Features:
Multiple Moving Averages
Default display: EMA20; EMA80/200 optional
Each MA can be set as EMA or SMA individually
Customizable colors and line widths
Price Cross Alerts
Alerts when price crosses above any active MA
Helps identify short-term trend initiation points
Golden Cross Alerts
Alerts when a short-term MA crosses above a mid/long-term MA
Useful for detecting trend acceleration or reversal signals
User-Friendly Interface
Parameters and alerts are labeled in Chinese (can be translated)
Applications
Trend confirmation
Trend reversal detection
Short-term entries and long-term position guidance
EMA KitEMA Kit delivers multiple 1D EMA's wrapped into a single indicator.
I was annoyed with having a bunch of EMA indicators on the left side of my chart for each individual EMA I rely on, so I created a single indicator with all of them.
This EMA kit allows you to select any combination of the following EMA's: 3D, 5D, 8D, 21D, 34D, 50D, 100D, 200D, and 200W. They are all based on the 1D timeframe regardless of the timeframe you're currently viewing on your chart - for example, if you toggle from a Daily chart to a 15 minute chart, the EMA's won't change to reflect the 15 minute timeframe. EMA Kit smoothes the lines to prevent staggering on lower timeframes. You can change the color scheme and line thickness and even toggle between different line types like area, histogram, etc. You also have the option to turn end-of-line price labels on/off. Current price level for each EMA is highlighted on the price scale.
Bollinger Bands with 4 Moving AveragesCombines Bollinger Bands (BB) with up to four optional Moving Averages (MA) to read volatility, trend direction, and dynamic support–resistance in one overlay.
How It Works
BB: basis = MA(length, type) with standard deviation mult. upper = basis + dev, lower = basis − dev.
MA1–MA4: additional averages you can toggle (default only MA4/200 enabled).
Key Features
Flexible basis MA type for BB: SMA / EMA / RMA (Wilder) / WMA / VWMA.
Four optional MAs with independent length, color, and width (defaults: 7, 25, 99, 200; only 200 on by default).
Offset to shift BB for visual testing.
Overlay on price with shaded band between Upper–Lower.
Inputs & Defaults
BB Length = 20, StdDev = 2.0, Source = close.
Basis MA Type = SMA.
MA4 active (200), MA1–MA3 off (7/25/99 ready).
Offset = 0.
Practical Use
Use BB for volatility context: squeeze → potential breakout; expansion → strong trend.
Treat Basis / Upper / Lower as dynamic levels:
Pullbacks to Basis often become decision zones in trends.
Upper/Lower touches = relative extremes.
Add MA4(200) for primary bias; enable MA1–MA3 for finer timing.
Typical behavior:
Price > MA200 and rising basis → bullish bias; watch pullbacks to basis/MA25-like zones.
Price < MA200 and falling basis → bearish bias; watch rejections at basis/MAs.
Common Signals (not financial advice)
Breakout + BB expansion confirms momentum.
Squeeze + basis break can preface volatility expansion.
Confluence: Lower touch + fast MA in uptrends → mean-reversion setups; inverse for downtrends.
Notes
MA1–MA4 are SMA in the code; BB basis follows the selected MA type.
Test across timeframes; tune length and mult to the asset.
Disclaimer
Visual tool only. Combine with risk management, multi-timeframe confirmation, and a tested plan.