PBT's Volume Indicator For TradingViewThis Pine Script indicator displays key volume metrics and market cap for an asset directly on the TradingView chart inspired by PlaybookTrades. It shows:
Current Bar Volume: Volume of the current bar.
1-Day Volume: Total volume over the last day.
30-Day Average Volume: Average volume over the last 30 days.
Indicadores e estratégias
WaridTR15 Dakika ve Üzeri Periyotlar İçin Önerilen Ayarlar:
EMA Uzunlukları:
Kısa EMA: 9 yerine 12 veya 14 kullanılabilir.
Uzun EMA: 21 yerine 26 veya 50 kullanılabilir.
Golden Cross için 50 EMA ve 200 EMA zaten uzun vadeli trendleri yakalar, bu nedenle değiştirmeye gerek yok.
RSI Uzunluğu:
RSI uzunluğu 14 yerine 21 veya 28 yapılabilir. Bu, daha uzun vadeli aşırı alım/aşırı satım bölgelerini daha doğru tespit eder.
Volume Filtresi:
Volume ortalaması için 20 periyot yerine 50 veya 100 periyot kullanılabilir. Bu, daha uzun vadeli hacim eğilimlerini yakalar.
Ichimoku Parametreleri:
Ichimoku, varsayılan olarak 9-26-52 periyotlarıyla çalışır. Bu, zaten uzun vadeli trendleri yakalamak için uygundur. Ancak, daha uzun periyotlar için:
Tenkan-Sen: 9 yerine 14.
Kijun-Sen: 26 yerine 52.
Senkou Span B: 52 yerine 104.
Power Trend with Tight Price ActionI've combined Mike Webster's Power Trend with a Tight Price Action detector. This script:
✅ Identifies Power Trends (green background when active)
✅ Marks Tight Price Action (blue bars when range is tight + volume dries up)
✅ Plots Buy Points on Breakouts (green triangles for breakouts on high volume)
Pine Script: Power Trend + Tight Price Action
pinescript
Copy
Edit
//@version=5
indicator("Power Trend with Tight Price Action", overlay=true)
// Moving Averages
ema21 = ta.ema(close, 21)
sma50 = ta.sma(close, 50)
// === Power Trend Conditions ===
// 1. Low above 21 EMA for 10 days
low_above_ema21 = ta.lowest(low, 10) >= ta.lowest(ema21, 10)
// 2. 21 EMA above 50 SMA for 5 days
ema21_above_sma50 = ta.barssince(ema21 < sma50) >= 5
// 3. 50 SMA is in an uptrend
sma50_uptrend = sma50 > sma50
// 4. Market closes higher than the previous day
close_up = close > close
// Start & End Power Trend
startPowerTrend = low_above_ema21 and ema21_above_sma50 and sma50_uptrend and close_up
endPowerTrend = close < ema21 or sma50 < sma50
// Track Power Trend Status
var bool inPowerTrend = false
if (startPowerTrend)
inPowerTrend := true
if (endPowerTrend)
inPowerTrend := false
// === Tight Price Action (Low Volatility + Volume Dry-Up) ===
range10 = ta.highest(high, 10) - ta.lowest(low, 10)
tightBase = (range10 / close) < 0.07 // Price range is less than 7% of closing price
volAvg50 = ta.sma(volume, 50)
lowVolume = volume < (volAvg50 * 0.75) // Volume is 25% below 50-day avg
tightPriceAction = inPowerTrend and tightBase and lowVolume // Tight price inside Power Trend
// === Breakout on High Volume ===
breakoutHigh = ta.highest(high, 10)
breakout = close > breakoutHigh and volume > (volAvg50 * 1.5) // Price breaks out with 50%+ volume surge
// === Plot Features ===
// Background for Power Trend
bgcolor(inPowerTrend ? color.green : na, transp=85)
// Highlight Tight Price Action
barcolor(tightPriceAction ? color.blue : na)
// Mark Breakouts
plotshape(series=breakout, location=location.belowbar, color=color.green, style=shape.triangleup, title="Buy Point on Breakout")
// Power Trend Start/End Markers
plotshape(series=startPowerTrend, location=location.belowbar, color=color.green, style=shape.labelup, title="Power Trend Start")
plotshape(series=endPowerTrend, location=location.abovebar, color=color.red, style=shape.triangledown, title="Power Trend End")
// Alerts
alertcondition(startPowerTrend, title="Power Trend Started", message="Power Trend has started!")
alertcondition(endPowerTrend, title="Power Trend Ended", message="Power Trend has ended!")
alertcondition(breakout, title="Breakout on High Volume", message="Stock has broken out on high volume!")
How This Works:
🔹 Green Background = Power Trend is active
🔹 Blue Bars = Tight Price Action inside Power Trend (low volatility + volume dry-up)
🔹 Green Triangles = Breakout on High Volume
Power of MovingThe Power of Moving indicator is a multi-moving average indicator designed to help traders identify strong trending conditions by analyzing the alignment and separation of multiple moving averages.
This indicator allows users to select between different types of moving averages (SMA, EMA, SMMA, WMA, VWMA) and plots four configurable moving averages on the chart. The background color dynamically changes when the moving averages are correctly stacked in a bullish (green) or bearish (yellow) formation, with sufficient distance between them. This ensures that trends are not only aligned but also have strong momentum. The indicator also includes alert conditions, notifying traders when the trend direction changes, allowing them to stay ahead of market moves.
This indicator works well in trending markets and should be combined with price action analysis or other confirmation indicators like RSI or volume for optimal results.
Volume BarsThis TradingView indicator, written in Pine Script version 5, enhances volume analysis by coloring volume bars and marking specific conditions on the chart. Here's a concise overview of its functionality:
Volume Bar Coloring:
Cyan Bars: Indicate bullish candles (closing price higher than opening) where the volume is at least two standard deviations above the average, suggesting strong buying interest.
Magenta Bars: Represent bearish candles (closing price lower than opening) with volume at least two standard deviations above the average, indicating significant selling pressure.
Yellow Bars: Highlight scenarios such as doji candles (where opening and closing prices are equal), narrow-range bars, or candles with substantial wicks relative to their range, often interpreted as indecision or potential reversal points.
White Bars: Denote candles with volume around the average, reflecting typical market activity.
Gray Bars: Signify candles with below-average volume, indicating lower trading activity.
Special Markers:
Orange Dots: Placed above candles where the volume exceeds five standard deviations above the average, highlighting extreme volume spikes that may precede significant price movements.
The indicator calculates average volume and standard deviations over a user-defined period (default is 975 bars) and allows customization of parameters such as wick thresholds, bar range thresholds, and doji thresholds to fine-tune the sensitivity of the analysis.
By visually distinguishing these conditions, the indicator aids traders in quickly assessing market sentiment, identifying potential reversal points, and recognizing periods of heightened or diminished trading activity.
AKG2001_23 bollinger bands with customisable moving average type,1 dema, 8emas and a ichimoku cloud all in this indicator
Micha Stocks Custom Watermark [LGariv]Added an indicator for market cap bigger(✅) or smaller(⚠️) then 1B. Also made the ticker symbol and timeframe on top and slightly bigger text size then the rest of the lines.
RSI Candle Chart Indicator🔥 RSI Candle Chart 🔥
✅ Key Features
✔ RSI Candlestick Visualization → RSI values are displayed as candlesticks instead of a line, making it easier to interpret momentum shifts.
✔ Multi-Timeframe RSI → Allows RSI calculations from different timeframes for a broader market view.
✔ Overbought & Oversold Alerts → Get notified when RSI crosses key levels (default: 75 overbought, 25 oversold).
✔ Custom RSI Length & Source → Adjustable RSI period and source (close, open, high, etc.).
✔ Color-Coded RSI Candles →
🔵 Blue = RSI bullish candle (momentum increasing)
🔴 Red = RSI bearish candle (momentum decreasing)
✔ Clear Overbought & Oversold Zones → Helps spot potential reversals.
✔ Works on All Assets → Stocks, forex, crypto, and indices.
📊 How to Use in TradingView
📍 Adding the Indicator:
1️⃣ Open TradingView
2️⃣ Click on Indicators
3️⃣ Search for RSI Candle Chart
4️⃣ Click to add it to your chart
📍 Understanding RSI Candles:
Bullish RSI Candle (Blue) → RSI closed higher than it opened → Upward momentum.
Bearish RSI Candle (Red) → RSI closed lower than it opened → Downward momentum.
Long wicks → Indicate RSI volatility, potential reversals.
📍 Using Overbought & Oversold Levels:
RSI Above 75 (Overbought) → Market may be overextended → Potential reversal down.
RSI Below 25 (Oversold) → Market may be oversold → Potential reversal up.
Alerts will notify you when these levels are crossed.
📈 Best Usage Methods
1️⃣ Trend Confirmation
If price is rising and RSI Candles are blue (bullish) → Uptrend is strong.
If price is falling and RSI Candles are red (bearish) → Downtrend is strong.
2️⃣ Spot Reversals with RSI Divergence
Bearish Divergence: Price makes a new high, but RSI does not → Weak momentum → Possible downtrend.
Bullish Divergence: Price makes a new low, but RSI does not → Weak selling pressure → Possible uptrend.
3️⃣ Breakout Confirmation
Use RSI Candle Chart to confirm trend breakouts at support & resistance levels.
If RSI Candles flip color during a breakout, it signals momentum shift.
4️⃣ Multi-Timeframe RSI Strategy
Use higher timeframe RSI (4H, Daily) to confirm strong trends.
Then use lower timeframe RSI (15m, 1H) to find precise entry points.
🎯 Why Use RSI Candle Chart?
✅ More Visual than Traditional RSI Line → Candlesticks make RSI movements clearer.
✅ Better Trend Recognition → Quickly see RSI momentum shifts.
✅ Stronger Reversal Signals → RSI candles with wicks show volatility zones.
✅ Multi-Timeframe Support → Allows deeper analysis.
✅ Easy to Use for Any Market → Works for crypto, forex, stocks, and indices.
📌 Use RSI Candle Chart today & enhance your trading decisions! 🚀
Consolidation Breakout//@version=5
indicator("Consolidation Breakout", overlay=true)
// Parameters
length = input(20, title="Consolidation Length")
mult = input(2.0, title="Multiplier for Breakout")
atr = ta.atr(length)
// Calculate Consolidation Range
consolidation_high = ta.highest(high, length)
consolidation_low = ta.lowest(low, length)
consolidation_range = consolidation_high - consolidation_low
// Breakout Levels
upper_breakout = consolidation_high + (mult * atr)
lower_breakout = consolidation_low - (mult * atr)
// Plot Consolidation Range
plot(consolidation_high, title="Consolidation High", color=color.red)
plot(consolidation_low, title="Consolidation Low", color=color.green)
plot(upper_breakout, title="Upper Breakout", color=color.blue)
plot(lower_breakout, title="Lower Breakout", color=color.orange)
// Highlight Breakouts
bgcolor((close > upper_breakout) ? color.new(color.blue, 90) : na)
bgcolor((close < lower_breakout) ? color.new(color.orange, 90) : na)
9 EMA Crossover Strategy📝 Explanation
🔹 9 EMA Calculation → ema9 = ta.ema(close, 9)
🔹 Buy Signal → When Close crosses above 9 EMA (ta.crossover(close, ema9))
🔹 Sell Signal → When Close crosses below 9 EMA (ta.crossunder(close, ema9))
🔹 Stop-Loss Calculation →
Buy Trade SL = Previous Swing Low (swingLow)
Sell Trade SL = Previous Swing High (swingHigh)
🔹 Trade Execution →
Enter Long on Buy Signal
Exit Long when price hits SL
Enter Short on Sell Signal
Exit Short when price hits SL
Armin_ICT_Trade_Bot_LibraryLibrary "Armin_ICT_Trade_Bot_Library"
TODO: add library description here
GetDateTime(unixTime)
Parameters:
unixTime (float)
ma_function(source, atrlength)
Parameters:
source (float)
atrlength (simple int)
ATR(length)
Parameters:
length (simple int)
Volume Spike FilterAn indicator that will reveal volume spikes based on a 20 periods rolling average.
Projected Relative VolumeProjects Volume intraday to see how it will close at market close. Shows as multiplier of the 20 day average.
Open to any ideas to make it better or more robust.
Abid Elite Manual PivotsThis indicator is designed to help traders visualize key manually defined price levels—namely resistance, pivot, and support levels—on their charts during a specified trading session. Here’s an overview of what it does and how it’s used:
**Key Features**
1. **Manual Input of Pivot Levels**
- **Resistance Levels:** You can input up to five resistance levels (R1 through R5).
- **Pivot Level:** A single pivot level (P) is defined as a central point.
- **Support Levels:** You can also input up to five support levels (S1 through S5).
These levels are manually set by the trader based on areas of interest or historical price action.
2. **Session-Based Display**
- The indicator uses a session input (for example, 0400–2000) so that it only displays and tracks the levels during the active trading session.
- At the start of each new session, the indicator resets certain persistent states, ensuring that levels are evaluated freshly each day.
3. **Drawing Horizontal Lines and Labels**
- For each level that you’ve set and enabled (via visibility toggles), the indicator draws a horizontal line across the chart starting from the session’s beginning and extending a few bars ahead.
- Next to each line, a label displays the level’s name (e.g., “R1”) and its price value.
4. **Persistent “Crossed” Marker (🎯)**
- The script checks whether the current bar’s price range (its high and low) “crosses” any of the defined levels.
- If a level is crossed at any point during the session, the indicator sets a persistent flag for that level.
- In the label for that level, a “🎯” emoji is appended—this marker remains visible for the rest of the session even if subsequent bars no longer cross the level.
- Importantly, while the marker is persistent once set, the line and label’s appearance (such as transparency or color intensity) continues to update based on the price’s behavior on the current bar.
5. **Customization Options**
- **Appearance:** Users can choose line colors, line style (solid, dashed, or dotted), and line width for each group of levels.
- **Label Colors:** Separate color settings for the text on the labels ensure clear readability.
- **Visibility Toggles:** You can individually enable or disable the display of each level (R1–R5, P, S1–S5) depending on your analysis needs.
---
**Usage and Benefits**
- **Support and Resistance Analysis:**
The indicator serves as a visual tool for tracking critical price levels. Traders use these levels to anticipate potential areas of price reversal or consolidation.
- **Session-Based Insights:**
By confining the analysis to a specific session, you can better understand intraday price behavior. The persistent “🎯” marker shows which levels have been tested during the session, helping you gauge the strength of support or resistance.
- **Manual Flexibility:**
Unlike automatic pivot point calculators that derive levels from previous price action, this indicator lets you input your own significant levels based on your strategy, technical analysis, or market experience.
- **Visual Clarity:**
The combination of lines, labels, and the persistent marker makes it easy to quickly identify which key levels have been breached. This can inform decisions about entries, exits, or stop-loss placements.
---
**In Summary**
The **Abid Elite Manual Pivot Points** indicator is a customizable, session-based tool for plotting and monitoring user-defined support, resistance, and pivot levels. It not only draws these levels on the chart but also visually flags (with a “🎯”) any level that gets crossed during the session. This helps traders to quickly recognize important price interactions and make more informed trading decisions based on technical analysis.
If you have any further questions about its functionality or how to integrate it into your trading strategy, feel free to ask!
RSI+StRSI+RVI+MFI+DMI+CCI+MACDH+OBV+Ichimoku Milky Way**Detailed Indicator Description: RSI+StRSI+RVI+MFI+DMI+CCI+MACDH+OBV+Ichimoku Milky Way**
### **General Information:**
The **RSI+StRSI+RVI+MFI+DMI+CCI+MACDH+OBV+Ichimoku Milky Way** indicator is an advanced technical analysis tool integrating multiple indicators for comprehensive market analysis.
### **Key Components:**
- **RSI (Relative Strength Index):** Measures trend strength and overbought/oversold conditions.
- **Stochastic RSI:** Identifies potential trend reversals.
- **RVI (Relative Volatility Index):** Assesses market volatility.
- **MFI (Money Flow Index):** Tracks buying and selling pressure.
- **DMI and ADX (Directional Movement Index):** Measure trend direction and strength.
- **CCI (Commodity Channel Index):** Highlights price deviations from averages.
- **MACD Histogram:** Displays momentum shifts.
- **OBV (On-Balance Volume):** Confirms trends through volume analysis.
- **Ichimoku:** Provides a comprehensive trend and support-resistance view.
### **Strategies and Signals:**
- **Ichimoku (2 types):** Cross-based trend strategies.
- **Entry/Exit Algorithms:** Generate signals using RSI, StRSI, CCI, DMI/ADX, MACD, OBV.
- **RSI Divergences:** Detects potential reversals through divergence analysis.
########################################
#RUS####################################
########################################
**Подробное описание индикатора: RSI+StRSI+RVI+MFI+DMI+CCI+MACDH+OBV+Ichimoku Milky Way**
### **Общая информация:**
Индикатор **RSI+StRSI+RVI+MFI+DMI+CCI+MACDH+OBV+Ichimoku Milky Way** — это комплексный инструмент технического анализа, объединяющий ведущие осцилляторы, трендовые индикаторы и алгоритмы поиска точек входа и выхода.
### **Основные компоненты:**
- **RSI (Индекс относительной силы):** Оценивает силу тренда и зоны перекупленности/перепроданности.
- **Stochastic RSI (Стохастический RSI):** Определяет вероятные развороты тренда.
- **RVI (Индекс относительной волатильности):** Измеряет волатильность рынка.
- **MFI (Индекс денежного потока):** Анализирует объемы и давление покупателей.
- **DMI и ADX (Индексы направленного движения):** Оценивают силу и направление тренда.
- **CCI (Индекс товарного канала):** Показывает отклонение цены от средней.
- **MACD Histogram:** Подчеркивает изменения импульса.
- **OBV (Балансовый объем):** Подтверждает тренды через объемы.
- **Ichimoku:** Комплексно отображает тренд, уровни поддержки и сопротивления.
### **Стратегии и сигналы:**
- **Ichimoku (2 типа):** Стратегии на основе пересечений линий.
- **Алгоритмы открытия и закрытия позиций:** Используют сигналы от RSI, StRSI, CCI, DMI/ADX, MACD, OBV.
- **Дивергенции RSI:** Поддержка поиска расхождений.
SIOVERSE Signals With TP/SLFractal Support/Resistance with EMA 100, Buy/Sell Signals, and TP/SL
This indicator identifies fractal-based support and resistance levels while incorporating EMA 100 as a trend filter. It generates buy and sell signals based on price crossing EMA 20 high/low, ensuring alignment with the overall trend.
Key Features:
Fractal Support & Resistance: Plots dashed lines at key levels.
EMA 100 Filter: Helps identify the primary trend.
Buy/Sell Signals: Based on price breaking EMA 20 with trend confirmation.
Take Profit & Stop Loss Levels: Automatically calculates TP1 (1:1.5), TP2 (1:3), and TP3 (1:5) based on risk-reward ratios.
Break Detection: Removes signals if price hits SL and marks "Break" on the chart.
Ideal for traders looking to combine trend-following strategies with fractal-based support/resistance levels for better trade management.
[GOG] Banana Split MABanana Split MA uses the MA100, EMA200 and MA300 to predict incoming high volatility moves. Look for opportunities when the three lines start converging and bending a certain direction to form a banana shape to enter a directional trade. The area between the lines fill with an opaque color when the three lines start to get close. Popularized by Krillin @lsdinmycoffee
Squeeze Volatility Scanner con ADXThis indicator works with the Bollinger bands and Kepler in addition on the ADX. The red band indicates the start of the Squeeze.
Tractor-Trend V5Description of the indicator and the principle of its operation
This indicator is a multifunctional tool for analyzing trends and determining entry and exit points in the market. It uses a combination of moving averages, linear regression, volatility levels, and Fibonacci levels to build channels, identify trends, and generate signals. The indicator also includes visualization of overbought and oversold zones, as well as target levels for long and short positions.
The main components of the indicator
The Base Line:
The baseline is calculated based on a moving average (SMA or EMA) or linear regression.
The user can select the data source (for example, hl2 is the average value between high and low), the length of the moving average, and the length of the linear regression.
The baseline is used as a reference level to determine the trend.
Trend Channel:
The channel is built around a baseline using volatility (the difference between high and low).
The user can set the distance between the channel boundaries and the baseline.
The channel includes upper and lower bounds, as well as extended levels (extreme levels).
Golden Pocket:
This is the zone between the baseline and the 0.618 Fibonacci level.
The zone is used to identify potential reversal points or trend continuation.
Input signals (Long/Short):
Entry signals are generated when the price closes above or below the baseline and channel boundaries.
The indicator tracks the beginning and end of trends to avoid false signals.
Target Levels:
For long and short positions, target levels are calculated based on Fibonacci extensions.
The user can set up a multiplier for the target levels.
Overbought and Oversold zones (Overbought/Oversold):
The indicator determines the overbought and oversold zones based on the price crossing the channel boundaries.
There are also extreme zones that show stronger overbought/oversold levels.
Alerts:
The indicator generates alerts when the price breaks through the upper or lower boundary of the channel.
Advantages of the indicator
Flexibility of settings: the user can adapt the indicator to his preferences.
Multifunctional: the indicator combines elements of trend analysis, Fibonacci levels and volatility.
Visualization: clear representation of key levels and zones.
Recommendations
Use the indicator in combination with other technical analysis tools to confirm the signals.
Test the settings on historical data before using them in real trading.
Take into account market conditions (volatility, trend, sideways movement) when interpreting signals.
This indicator is suitable for traders who prefer to work with trend strategies and use Fibonacci levels to identify targets and pivot points.
// Base Line Inputs
Base_Show = input(defval = true, title = "Show Base line?", group = "Base line Settings")
Base_src = input(hl2, title = "Source", group = "Base line Settings")
Base_length = input.int(title = 'Length', minval = 1, maxval = 1000, defval = 50, group = "Base line Settings")
Base_linreg_length = input.int(title = 'Linear Regression Length', minval = 1, maxval = 1000, defval = 50, group = "Base line Settings")
Base_sma_or_ema = input(title = 'Use Simple MA?', defval = false, group = "Base line Settings")
Base_lin_reg = input(title = 'Use Linear Regression?', defval = false, group = "Base line Settings")
// Calculation Base Line
Base_bclose = Base_lin_reg ? ta.linreg(Base_src, Base_linreg_length, 0) : Base_src
Base_signal = Base_sma_or_ema ? ta.sma(Base_bclose, Base_length) : ta.ema(Base_bclose, Base_length)
//Trend Channel
float distance = input.float (2, "Bands Distance", step = 0.1, minval = 0.3, group = "Trend Channel Settings") // Distance for channel bands
Ex_Show = input(defval = false, title = "Show Extension?", group = "Trend Channel Settings")
series float volatility = ta.sma(high - low, Base_length) // Calculate volatility using the average true range
var bool is_long_trend_started = false
var bool is_short_trend_started = false
var bool is_trend_change = false
var bool is_long_trend = false
var bool is_short_trend = false
var bool can_long = false
var bool can_short = false
// Trend Channel Inputs
up_can = Base_signal + volatility * distance
up_can_Tar = up_can + volatility * distance * 2.5
up_can_Ex = up_can_Tar + volatility * distance
lo_can = Base_signal - volatility * distance
lo_can_Tar = lo_can - volatility * distance * 1.5
lo_can_Ex = lo_can_Tar - volatility * distance
// Golden Pocket Inputs
channel_range = up_can - lo_can
fib_618 = up_can - channel_range * 0.618
// CAN LONG/SHORT
//if time >= start_date_input
can_long := close >= Base_signal and close >= up_can and not is_long_trend
can_short := close <= Base_signal and close <= lo_can and not is_short_trend
if can_long
is_long_trend := true
is_short_trend := false
is_long_trend_started := is_long_trend_started ? false : true
else if can_short
is_short_trend := true
is_long_trend := false
is_short_trend_started := is_short_trend_started ? false : true
else
is_trend_change := false
can_long := false
can_short := false
is_short_trend_started := false
is_long_trend_started := false
is_trend_change := is_short_trend_started or is_long_trend_started
// Plot Base Line
GP_05 = plot(Base_Show ? Base_signal : na, color = is_long_trend ? color.rgb(6, 247, 14) : color.rgb(225, 190, 231), linewidth = 1, title = "Base line")
GP_0_618 = plot(fib_618, title = "Lower Border Golden Pocket (Fib 0.618)", color = is_long_trend ? color.rgb(6, 247, 14) : color.rgb(247, 9, 9), display = display.none)
fill(GP_05, GP_0_618, title = "Golden Pocket Background", color = is_long_trend ? color.rgb(245, 123, 0, 60) : color.rgb(255, 167, 38, 60))
// Plot Trend Channel
plotshape(is_long_trend and is_long_trend_started ? Base_signal : na, title="Long Label", style=shape.triangleup, location=location.belowbar, color=color.rgb(8, 153, 129), size=size.small)
plotshape(is_short_trend and is_short_trend_started ? Base_signal : na, title="Short Label", style=shape.triangledown, location=location.abovebar, color=color.rgb(233, 30, 99), size=size.small)
// Plot Channel Boundary
Range_Zone1 = plot(up_can, color = is_long_trend ? color.rgb(38, 198, 218) : color.rgb(156, 39, 176), title = "Channel Upper Boundary")
Range_Zone2 = plot(lo_can, color = is_long_trend ? color.rgb(38, 198, 218) : color.rgb(156, 39, 176), title = "Channel Lower Boundary")
fill(Range_Zone1, Range_Zone2, color = is_long_trend ? color.rgb(38, 197, 218, 80) : color.rgb(155, 39, 176, 80), title = "Channel Background")
// Plot Extension
plot(Ex_Show ? up_can_Ex : na, title = "Extreme Level Extension Upper Boundary Channel", color = color.rgb(95, 250, 224, 30))
plot(Ex_Show ? up_can_Tar : na, title = "First Level Extension Upper Boundary Channel", color = color.rgb(95, 250, 224, 50))
plot(Ex_Show ? lo_can_Tar : na, title = "First Level Extension Lower Boundary Channel", color = color.rgb(247, 116, 120, 50))
plot(Ex_Show ? lo_can_Ex : na, title = "Extreme Level Extension Lower Boundary Channel", color = color.rgb(247, 116, 120, 0))
// Overbought and Oversold Zones
show_OBOS_zones = input.bool(defval = true, title = "Show Overbought and Oversold Zones?", group = "Trend Channel Settings")
show_Ex_zones = input.bool(defval = true, title = "Show Extreme Overbought and Oversold Zones?", group = "Trend Channel Settings")
is_overbought = ta.crossunder(close, up_can_Tar)
is_oversold = ta.crossover(close, lo_can_Tar)
is_overboughtEx = ta.crossunder(close, up_can_Ex)
is_oversoldEx = ta.crossover(close, lo_can_Ex)
// Plot Overbought and Oversold
plotshape(is_overbought and show_OBOS_zones ? high : na, title = "Overbought", color = color.rgb(255, 245, 157), style = shape.circle, size = size.tiny, location = location.abovebar)
plotshape(is_oversold and show_OBOS_zones ? low : na, title = "Oversold", color = color.rgb(3, 249, 208), style = shape.circle, size = size.tiny, location = location.belowbar)
// Plot Extreme Overbought and Oversold
plotshape(is_overboughtEx and show_Ex_zones ? high : na, title = "Extreme Overbought", color = color.rgb(255, 152, 0), style = shape.diamond, size = size.tiny, location = location.abovebar)
plotshape(is_oversoldEx and show_Ex_zones ? low : na, title = "Extreme Oversold", color = color.rgb(3, 249, 3), style = shape.diamond, size = size.tiny, location = location.belowbar)
// Target Levels
mult_tar_input = input.float(title = "Multiplier for Target Levels", step = 0.1, defval = 1.5, minval = 0.1, group = "Target Levels Settings")
// Цвета для целевых уровней
color_long = input.color(color.rgb(8, 153, 129), title = "Color Targets for Long Positions", group = "Colors for Target Levels Setting")
color_short = input.color(color.rgb(233, 30, 99), title = "Color Targets for Short Positions", group = "Colors for Target Levels Setting")
// DC Calculation Extension (Targets Lines for Long)
long_1 = up_can - channel_range * -0.382 * mult_tar_input
long_2 = up_can - channel_range * -1 * mult_tar_input
long_3 = up_can - channel_range * -1.618 * mult_tar_input
long_4 = up_can - channel_range * -2.236 * mult_tar_input
long_5 = up_can - channel_range * -3 * mult_tar_input
// DC Calculation Extension (Targets Lines for Short)
short_1 = lo_can - channel_range * 0.382 * mult_tar_input
short_2 = lo_can - channel_range * 1 * mult_tar_input
short_3 = lo_can - channel_range * 1.618 * mult_tar_input
short_4 = lo_can - channel_range * 2.236 * mult_tar_input
short_5 = lo_can - channel_range * 3 * mult_tar_input
// Draw lines from triangles
var line long_line = na
var line short_line = na
var line long_line_reverse = na
var line short_line_reverse = na
if is_long_trend and is_long_trend_started
long_line := line.new(bar_index, Base_signal, bar_index, long_5, color = color_long, style = line.style_dotted, width = 2)
long_line_reverse := line.new(bar_index, Base_signal, bar_index, short_5, color = color.rgb(8, 153, 129, 100), style = line.style_dotted, width = 2)
if is_short_trend and is_short_trend_started
short_line := line.new(bar_index, Base_signal, bar_index, short_5, color = color_short, style = line.style_dotted, width = 2)
short_line_reverse := line.new(bar_index, Base_signal, bar_index, long_5, color = color.rgb(233, 30, 99, 100), style = line.style_dotted, width = 2)
//
// Функция для поиска точки пересечения линии тренда и горизонтального уровня
f_find_intersection(line_start, line_end, level) =>
if (line_start <= level and line_end >= level) or (line_start >= level and line_end <= level)
true
else
false
// Объявление массивов для хранения лучей-целей для длинных позиций
var line target_rays_long_1 = array.new_line(0)
var line target_rays_long_2 = array.new_line(0)
var line target_rays_long_3 = array.new_line(0)
var line target_rays_long_4 = array.new_line(0)
var line target_rays_long_5 = array.new_line(0)
// Отрисовка лучей-целей для long_1
if is_long_trend and is_long_trend_started
if f_find_intersection(Base_signal, long_5, long_1)
var line target_ray = na
target_ray := line.new(bar_index, long_1, bar_index + 1, long_1, color = color_long, style = line.style_dotted, width = 2, extend = extend.right)
array.push(target_rays_long_1, target_ray)
// Отрисовка лучей-целей для long_2
if is_long_trend and is_long_trend_started
if f_find_intersection(Base_signal, long_5, long_2)
var line target_ray = na
target_ray := line.new(bar_index, long_2, bar_index + 1, long_2, color = color_long, style = line.style_dotted, width = 2, extend = extend.right)
array.push(target_rays_long_2, target_ray)
// Отрисовка лучей-целей для long_3
if is_long_trend and is_long_trend_started
if f_find_intersection(Base_signal, long_5, long_3)
var line target_ray = na
target_ray := line.new(bar_index, long_3, bar_index + 1, long_3, color = color_long, style = line.style_dotted, width = 2, extend = extend.right)
array.push(target_rays_long_3, target_ray)
// Отрисовка лучей-целей для long_4
if is_long_trend and is_long_trend_started
if f_find_intersection(Base_signal, long_5, long_4)
var line target_ray = na
target_ray := line.new(bar_index, long_4, bar_index + 1, long_4, color = color_long, style = line.style_dotted, width = 2, extend = extend.right)
array.push(target_rays_long_4, target_ray)
// Отрисовка лучей-целей для long_5
if is_long_trend and is_long_trend_started
if f_find_intersection(Base_signal, long_5, long_5)
var line target_ray = na
target_ray := line.new(bar_index, long_5, bar_index + 1, long_5, color = color_long, style = line.style_dotted, width = 2, extend = extend.right)
array.push(target_rays_long_5, target_ray)
// Удаление лучей при изменении тренда
if is_short_trend and is_short_trend_started
if array.size(target_rays_long_1) > 0
for i = 0 to array.size(target_rays_long_1) - 1
line.delete(array.get(target_rays_long_1, i))
array.clear(target_rays_long_1)
if array.size(target_rays_long_2) > 0
for i = 0 to array.size(target_rays_long_2) - 1
line.delete(array.get(target_rays_long_2, i))
array.clear(target_rays_long_2)
if array.size(target_rays_long_3) > 0
for i = 0 to array.size(target_rays_long_3) - 1
line.delete(array.get(target_rays_long_3, i))
array.clear(target_rays_long_3)
if array.size(target_rays_long_4) > 0
for i = 0 to array.size(target_rays_long_4) - 1
line.delete(array.get(target_rays_long_4, i))
array.clear(target_rays_long_4)
if array.size(target_rays_long_5) > 0
for i = 0 to array.size(target_rays_long_5) - 1
line.delete(array.get(target_rays_long_5, i))
array.clear(target_rays_long_5)
// Объявление массивов для хранения лучей-целей для коротких позиций
var line target_rays_short_1 = array.new_line(0)
var line target_rays_short_2 = array.new_line(0)
var line target_rays_short_3 = array.new_line(0)
var line target_rays_short_4 = array.new_line(0)
var line target_rays_short_5 = array.new_line(0)
// Отрисовка лучей-целей для short_1
if is_short_trend and is_short_trend_started
if f_find_intersection(Base_signal, short_5, short_1)
var line target_ray = na
target_ray := line.new(bar_index, short_1, bar_index + 1, short_1, color = color_short, style = line.style_dotted, width = 2, extend = extend.right)
array.push(target_rays_short_1, target_ray)
// Отрисовка лучей-целей для short_2
if is_short_trend and is_short_trend_started
if f_find_intersection(Base_signal, short_5, short_2)
var line target_ray = na
target_ray := line.new(bar_index, short_2, bar_index + 1, short_2, color = color_short, style = line.style_dotted, width = 2, extend = extend.right)
array.push(target_rays_short_2, target_ray)
// Отрисовка лучей-целей для short_3
if is_short_trend and is_short_trend_started
if f_find_intersection(Base_signal, short_5, short_3)
var line target_ray = na
target_ray := line.new(bar_index, short_3, bar_index + 1, short_3, color = color_short, style = line.style_dotted, width = 2, extend = extend.right)
array.push(target_rays_short_3, target_ray)
// Отрисовка лучей-целей для short_4
if is_short_trend and is_short_trend_started
if f_find_intersection(Base_signal, short_5, short_4)
var line target_ray = na
target_ray := line.new(bar_index, short_4, bar_index + 1, short_4, color = color_short, style = line.style_dotted, width = 2, extend = extend.right)
array.push(target_rays_short_4, target_ray)
// Отрисовка лучей-целей для short_5
if is_short_trend and is_short_trend_started
if f_find_intersection(Base_signal, short_5, short_5)
var line target_ray = na
target_ray := line.new(bar_index, short_5, bar_index + 1, short_5, color = color_short, style = line.style_dotted, width = 2, extend = extend.right)
array.push(target_rays_short_5, target_ray)
// Удаление лучей при изменении тренда
if is_long_trend and is_long_trend_started
if array.size(target_rays_short_1) > 0
for i = 0 to array.size(target_rays_short_1) - 1
line.delete(array.get(target_rays_short_1, i))
array.clear(target_rays_short_1)
if array.size(target_rays_short_2) > 0
for i = 0 to array.size(target_rays_short_2) - 1
line.delete(array.get(target_rays_short_2, i))
array.clear(target_rays_short_2)
if array.size(target_rays_short_3) > 0
for i = 0 to array.size(target_rays_short_3) - 1
line.delete(array.get(target_rays_short_3, i))
array.clear(target_rays_short_3)
if array.size(target_rays_short_4) > 0
for i = 0 to array.size(target_rays_short_4) - 1
line.delete(array.get(target_rays_short_4, i))
array.clear(target_rays_short_4)
if array.size(target_rays_short_5) > 0
for i = 0 to array.size(target_rays_short_5) - 1
line.delete(array.get(target_rays_short_5, i))
array.clear(target_rays_short_5)
//
// Alerts
buy_alert_disp = input.bool(title = "TT Show Long", defval = true, tooltip = "Appears, if the price breaks through the upper limit channel", group = "Alerts")
sell_alert_disp = input.bool(title = "TT Show Short", defval = true, tooltip = "Appears, if the price breaks through the lower limit channel", group = "Alerts")
buy_alert = is_long_trend and is_long_trend_started
sell_alert = is_short_trend and is_short_trend_started
if buy_alert_disp and buy_alert
alert("TT Show Long", alert.freq_once_per_bar_close)
if sell_alert_disp and sell_alert
alert("TT Show Short", alert.freq_once_per_bar_close)
yassine startégieyassine startégie yassine startégie yassine startégie yassine startégie yassine startégieyassine startégie yassine startégie yassine startégie yassine startégieyassine startégievyassine startégieyassine startégieyassine startégieyassine startégieyassine startégieyassine startégievyassine startégievyassine startégieyassine startégiev
G-FRAMA | QuantEdgeBIntroducing G-FRAMA by QuantEdgeB
Overview
The Gaussian FRAMA (G-FRAMA) is an adaptive trend-following indicator that leverages the power of Fractal Adaptive Moving Averages (FRAMA), enhanced with a Gaussian filter for noise reduction and an ATR-based dynamic band for trade signal confirmation. This combination results in a highly responsive moving average that adapts to market volatility while filtering out insignificant price movements.
_____
1. Key Features
- 📈 Gaussian Smoothing – Utilizes a Gaussian filter to refine price input, reducing short-term noise while maintaining responsiveness.
- 📊 Fractal Adaptive Moving Average (FRAMA) – A self-adjusting moving average that adapts its sensitivity to market trends.
- 📉 ATR-Based Volatility Bands – Dynamic upper and lower bands based on the Average True Range (ATR), improving signal reliability.
- ⚡ Adaptive Trend Signals – Automatically detects shifts in market structure by evaluating price in relation to FRAMA and its ATR bands.
_____
2. How It Works
- Gaussian Filtering
The Gaussian function preprocesses the price data, giving more weight to recent values and smoothing fluctuations. This reduces whipsaws and allows the FRAMA calculation to focus on meaningful trend developments.
- Fractal Adaptive Moving Average (FRAMA)
Unlike traditional moving averages, FRAMA uses fractal dimension calculations to adjust its smoothing factor dynamically. In trending markets, it reacts faster, while in sideways conditions, it reduces sensitivity, filtering out noise.
- ATR-Based Volatility Bands
ATR is applied to determine upper and lower thresholds around FRAMA:
- 🔹 Long Condition: Price closes above FRAMA + ATR*Multiplier
- 🔻 Short Condition: Price closes below FRAMA - ATR
This setup ensures entries are volatility-adjusted, preventing premature exits or false signals in choppy conditions.
_____
3. Use Cases
✔ Adaptive Trend Trading – Automatically adjusts to different market conditions, making it ideal for both short-term and long-term traders.
✔ Noise-Filtered Entries – Gaussian smoothing prevents false breakouts, allowing for cleaner entries.
✔ Breakout & Volatility Strategies – The ATR bands confirm valid price movements, reducing false signals.
✔ Smooth but Aggressive Shorts – While the indicator is smooth in overall trend detection, it reacts aggressively to downside moves, making it well-suited for traders focusing on short opportunities.
_____
4. Customization Options
- Gaussian Filter Settings – Adjust length & sigma to fine-tune the smoothness of the input price. (Default: Gaussian length = 4, Gaussian sigma = 2.0, Gaussian source = close)
- FRAMA Length & Limits – Modify how quickly FRAMA reacts to price changes.(Default: Base FRAMA = 20, Upper FRAMA Limit = 8, Lower FRAMA Limit = 40)
- ATR Multiplier – Control how wide the volatility bands are for long/short entries.(Default: ATR Length = 14, ATR Multiplier = 1.9)
- Color Themes – Multiple visual styles to match different trading environments.
_____
Conclusion
The G-FRAMA is an intelligent trend-following tool that combines the adaptability of FRAMA with the precision of Gaussian filtering and volatility-based confirmation. It is versatile across different timeframes and asset classes, offering traders an edge in trend detection and trade execution.
____
🔹 Disclaimer: Past performance is not indicative of future results. No trading strategy can guarantee success in financial markets.
🔹 Strategic Advice: Always backtest, optimize, and align parameters with your trading objectives and risk tolerance before live trading.