PROTECTED SOURCE SCRIPT
SAPMA_BANDLARI_MÜCAHİD_ATAOGLU

This “Advanced Deviation Bands” indicator is designed as an all-in-one trading toolkit that:
Calculates a Flexible Base Average
User-selectable type (HMA, EMA, WMA, VWMA, LWMA) and length.
Optionally uses the price source itself as the “average” input.
Builds ±1σ to ±5σ Deviation Bands
Measures deviation of price vs. the base average, cleans out extreme outliers, and applies a weighted moving average to smooth.
Computes standard deviation on that cleaned series and multiplies by the base average to get dynamic σ values.
Plots five upper and five lower bands around the adjusted average.
Rich Visual & Layout Controls
Neon-style colors for each band, configurable thickness and label size.
Optional gradient fills between bands.
Background shading for “Normal,” “Oversold” (price < –3σ) and “Overbought” (price > +3σ) regions.
Dynamic labels at chart edge marking each σ level and zone names (e.g. “NORMAL,” “DİKKAT,” “TEHLİKE,” etc.).
Smart Signal Generation with Risk Management
Buy when price dips below –3σ and momentum (RSI 14, MACD) & trend (50 EMA vs. 200 EMA) filters pass.
Sell when price exceeds +3σ with analogous momentum/trend checks.
Automatically records entry price and draws corresponding Stop Loss and Take Profit levels based on user-set percentages (e.g. 2 % SL, 4 % TP).
Clears the entry when SL or TP is hit.
Momentum & Trend Analysis
RSI and MACD measure momentum strength/weakness.
EMA50 vs. EMA200 define overall uptrend or downtrend.
On-Chart Info Table & Alerts
Shows current price, RSI, trend direction, distance to ±3σ in %, a “Risk Level” (Low/Medium/High), and composite “Signal Strength” score.
Alert conditions for buy/sell triggers and critical ±4σ breaks.
Purpose
To combine statistical price dispersion (σ-bands), momentum, trend direction, and built-in trade management—delivering visually striking, rule-based entry/exit signals with stop loss, take profit, and clear risk assessment, all in one indicator.
Calculates a Flexible Base Average
User-selectable type (HMA, EMA, WMA, VWMA, LWMA) and length.
Optionally uses the price source itself as the “average” input.
Builds ±1σ to ±5σ Deviation Bands
Measures deviation of price vs. the base average, cleans out extreme outliers, and applies a weighted moving average to smooth.
Computes standard deviation on that cleaned series and multiplies by the base average to get dynamic σ values.
Plots five upper and five lower bands around the adjusted average.
Rich Visual & Layout Controls
Neon-style colors for each band, configurable thickness and label size.
Optional gradient fills between bands.
Background shading for “Normal,” “Oversold” (price < –3σ) and “Overbought” (price > +3σ) regions.
Dynamic labels at chart edge marking each σ level and zone names (e.g. “NORMAL,” “DİKKAT,” “TEHLİKE,” etc.).
Smart Signal Generation with Risk Management
Buy when price dips below –3σ and momentum (RSI 14, MACD) & trend (50 EMA vs. 200 EMA) filters pass.
Sell when price exceeds +3σ with analogous momentum/trend checks.
Automatically records entry price and draws corresponding Stop Loss and Take Profit levels based on user-set percentages (e.g. 2 % SL, 4 % TP).
Clears the entry when SL or TP is hit.
Momentum & Trend Analysis
RSI and MACD measure momentum strength/weakness.
EMA50 vs. EMA200 define overall uptrend or downtrend.
On-Chart Info Table & Alerts
Shows current price, RSI, trend direction, distance to ±3σ in %, a “Risk Level” (Low/Medium/High), and composite “Signal Strength” score.
Alert conditions for buy/sell triggers and critical ±4σ breaks.
Purpose
To combine statistical price dispersion (σ-bands), momentum, trend direction, and built-in trade management—delivering visually striking, rule-based entry/exit signals with stop loss, take profit, and clear risk assessment, all in one indicator.
Korumalı komut dosyası
Bu komut dosyası kapalı kaynak olarak yayınlanmaktadır. Ancak, özgürce ve herhangi bir sınırlama olmaksızın kullanabilirsiniz – daha fazla bilgi burada.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.
Korumalı komut dosyası
Bu komut dosyası kapalı kaynak olarak yayınlanmaktadır. Ancak, özgürce ve herhangi bir sınırlama olmaksızın kullanabilirsiniz – daha fazla bilgi burada.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.