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.
专业级交易系统Belonging to the oscillation trading strategy.abcdefg,aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
Price Near MA 150//@version=5
indicator("Price Near MA 150", overlay=true)
ma150 = ta.sma(close, 150) // מחשב ממוצע נע 150
upper_band = ma150 * 1.05 // 5% מעל
lower_band = ma150 * 0.95 // 5% מתחת
// תנאי לחצייה שורית
bullish_cross = ta.crossover(close, ma150)
// תנאי שהמחיר קרוב ל-MA 150
near_ma150 = close > lower_band and close < upper_band
// צובע נרות כאשר המחיר קרוב לממוצע נע 150
barcolor(near_ma150 ? color.blue : na)
// סימון על הגרף אם יש חצייה שורית
plotshape(series=bullish_cross, location=location.belowbar, color=color.green, style=shape.labelup, size=size.small, title="Bullish Cross")
DXY Monthly Peaks and Bottoms for BTCtrying to spot BTC macro tops and bottoms based on peak bottom tops of DXY
Fibonacci - DolphinTradeBot
OVERVIEW
The 'Fibonacci - DolphinTradeBot' indicator is a Pine Script-based tool for TradingView that dynamically identifies key Fibonacci retracement levels using ZigZag price movements. It aims to replicate the Fibonacci Retracement tool available in TradingView’s drawing tools. The indicator calculates Fibonacci levels based on directional price changes, marking critical retracement zones such as 0, 0.236, 0.382, 0.5, 0.618, 0.786, and 1.0 on the chart. These levels are visualized with lines and labels, providing traders with precise areas of potential price reversals or trend continuation.
HOW IT WORKS ?
The indicator follows a zigzag structure. After a large swing movement, when new swings are formed without breaking the upper and lower levels, it places Fibonacci levels at the beginning and end points of the major swing movement."
▪️(Bullish) Structure :High → HigherLow → LowerHigh
▪️(Bearish) Structure :Low → LowerHigh → HigherLow
▪️When Fibonacci retracement levels are determined, a "📌" mark appears on the chart.
▪️If the price closes outside of these levels, a "❌" mark will appear.
USAGE
This indicator is designed to plot Fibonacci levels within an accumulation zone following significant price movements, helping you identify potential support and resistance. You can adjust the pivot periods to customize the zigzag settings to your preference. While classic Fibonacci levels are used by default, you also have the option to input custom levels and assign your preferred colors.
"To view past levels, simply enable the ' Show Previous Levels ' option, and to display the zigzag lines, activate the ' Show Zigzag ' setting."
ALERTS
The indicator, by default, triggers an alarm when both a level is formed and when a level is broken. However, if you'd like, you can select the desired level from the " Select Level " section in the indicator settings and set the alarm based on one of the conditions below.
▪️ cross-up → If the price breaks the Fibonacci level to the upside.
▪️ cross-down → If the price breaks the Fibonacci level to the downside.
▪️ cross-any → If the price breaks the Fibonacci level in any direction.
Multi-Timeframe Trading Strategyindicator for multiTF by dragonfire
This will look at higher Tf then only low TF
RSI with Overbought/Oversold Alerts//@version=6
indicator("RSI with Overbought/Oversold Alerts", overlay=false)
// 輸入參數
rsiLength = input(14, title="RSI Length")
overboughtLevel = input(70, title="Overbought Level")
oversoldLevel = input(30, title="Oversold Level")
// 計算 RSI
rsiValue = ta.rsi(close, rsiLength)
// 條件判斷
isOverbought = rsiValue >= overboughtLevel
isOversold = rsiValue <= oversoldLevel
// 繪製 RSI 線,並用顏色標示超買和超賣區域
rsiColor = isOverbought ? color.red : isOversold ? color.green : color.blue
plot(rsiValue, title="RSI", color=rsiColor, linewidth=2)
// 繪製超買和超賣水平線
hline(overboughtLevel, "Overbought", color=color.red, linestyle=hline.style_dotted)
hline(oversoldLevel, "Oversold", color=color.green, linestyle=hline.style_dotted)
// 填充超買和超賣區域
fill(plot(rsiValue, color=na), plot(overboughtLevel, color=color.new(color.red, 90)), title="Overbought Fill")
fill(plot(rsiValue, color=na), plot(oversoldLevel, color=color.new(color.green, 90)), title="Oversold Fill")
// 觸發提示音
if (isOverbought)
label.new(x=bar_index, y=high, text="Overbought!", style=label.style_label_down, color=color.red, textcolor=color.white)
alert("RSI is Overbought!", alert.freq_once_per_bar_close)
if (isOversold)
label.new(x=bar_index, y=low, text="Oversold!", style=label.style_label_up, color=color.green, textcolor=color.white)
alert("RSI is Oversold!", alert.freq_once_per_bar_close)
"Multi-MA Trend Ribbon" 20,21+36,50,100,200,300 EMA
Name: Multi-MA Trend Ribbon
Description:
The "Multi-MA Trend Ribbon" is a versatile technical analysis indicator designed for use on trading platforms like TradingView. It primarily serves to visualize market trends through multiple moving averages (MAs), offering traders a comprehensive view of price movement over various time frames. Here's a detailed breakdown of its features and functionality:
Key Features:
Multiple Moving Averages:
Supports up to 7 different MAs, with default lengths at 20, 50, 100, 200, 300, 21, and 36 periods.
Each MA can be individually turned on or off, providing flexibility in analysis.
Types of MAs include EMA (Exponential Moving Average), SMA (Simple Moving Average), HMA (Hull Moving Average), WMA (Weighted Moving Average), DEMA (Double Exponential Moving Average), VWMA (Volume Weighted Moving Average), and VWAP (Volume Weighted Average Price).
Ribbon Display:
Offers an option to transform the display into a "Ribbon" where all MAs are colored uniformly based on the trend direction.
The color changes based on whether the shortest MA (typically MA1) is above or below the longest MA (typically MA5), indicating bullish or bearish trends respectively.
Customization:
Users can customize colors for bullish and bearish trends.
The indicator allows setting all MAs to a uniform type or mixing different types.
Adjustable length for each MA.
Trend Identification:
Identifies trends based on the crossover between the first and fifth MA:
Bullish Trend: When the shortest MA crosses above the longest MA.
Bearish Trend: When the longest MA crosses above the shortest MA.
Visualization Enhancements:
MAs can be plotted with different colors when not in ribbon mode for easy distinction.
The space between MAs can be filled with color when in ribbon mode, enhancing the visual trend signal.
Alerts:
Generates alerts when a bullish or bearish trend change is detected based on MA crossovers.
Data Table:
Optionally displays a table on the chart showing:
Current trend (Bullish or Bearish)
Values of all enabled MAs at the current price bar
Average True Range (ATR) for volatility context
The table's location is user-selectable (top-right, top-left, bottom-left, bottom-right).
Cross Plotting:
Option to plot crosses on the chart where trend changes occur, serving as visual markers for entry or exit signals.
Use Cases:
Trend Confirmation: Traders can use the ribbon to confirm trend directions over multiple time frames.
Trading Signals: Crossovers between MAs can be used to generate buy or sell signals.
Support/Resistance: The MAs can act as dynamic support or resistance levels.
Advantages:
Highly customizable to fit various trading strategies.
Provides both a clear visual trend indication and detailed numerical data.
Considerations:
In volatile markets, frequent crossovers might lead to false signals, so it's beneficial to combine with other indicators or analysis methods for confirmation.
Futures Volume on Nasdaq
Good morning
This indicator that I developed and that I willingly share with you is used to add the volume of the Nasdaq Futures on the Nasdaq Forex chart. You will just need to pay the data in real time on TradingView Nasdaq Futures to be able to add this indicator to your US100 or USTEC chart, etc.
MA 10/20 Ribbon ĐH3. Ứng dụng trong giao dịch
Xác định xu hướng:
Khi MA 10 nằm trên MA 20 → thị trường có xu hướng tăng.
Khi MA 10 nằm dưới MA 20 → thị trường có xu hướng giảm.
EMA + Supertrend + ATR2 EMA bands + SUPERTREND + SCALED ATR
This combined allow to not have to much indicator at one but only one.
The ATR shows grey '°' when the value is above 50 on a scale.
EMA Pancake StackThis indicator stacks EMAs like a tower of pancakes, helping you spot trends layer by layer. If price stays on top, it’s a golden uptrend 🥞🔥— if it sinks below, well… your trade might be burnt toast. 🍳💀 Watch for flips, or risk getting syrup-stuck! 🚀
Inside BarsInside Bars Indicator
Description:
This indicator identifies and highlights price action patterns where a bar's high and low
are completely contained within the previous bar's range. Inside bars are significant
technical patterns that often signal a period of price consolidation or uncertainty,
potentially leading to a breakout in either direction.
Trading Literature & Theory:
Inside bars are well-documented in technical analysis literature:
- Steve Nison discusses them in "Japanese Candlestick Charting Techniques" as a form
of harami pattern, indicating potential trend reversals
- Thomas Bulkowski's "Encyclopedia of Chart Patterns" categorizes inside bars as
a consolidation pattern with statistical significance for breakout trading
- Alexander Elder references them in "Trading for a Living" as indicators of
decreasing volatility and potential energy build-up
- John Murphy's "Technical Analysis of the Financial Markets" includes inside bars
as part of price action analysis for market psychology understanding
The pattern is particularly significant because it represents:
1. Volatility Contraction: A narrowing of price range indicating potential energy build-up
2. Institutional Activity: Often shows large players absorbing or distributing positions
3. Decision Point: Market participants evaluating the previous bar's significance
Trading Applications:
1. Breakout Trading
- Watch for breaks above the parent bar's high (bullish signal)
- Monitor breaks below the parent bar's low (bearish signal)
- Multiple consecutive inside bars can indicate stronger breakout potential
2. Market Psychology
- Inside bars represent a period of equilibrium between buyers and sellers
- Shows market uncertainty and potential energy building up
- Often precedes significant price movements
Best Market Conditions:
- Trending markets approaching potential reversal points
- After strong momentum moves where the market needs to digest gains
- Near key support/resistance levels
- During pre-breakout consolidation phases
Complementary Indicators:
- Volume indicators to confirm breakout strength
- Trend indicators (Moving Averages, ADX) for context
- Momentum indicators (RSI, MACD) for additional confirmation
Risk Management:
- Use parent bar's range for stop loss placement
- Wait for breakout confirmation before entry
- Consider time-based exits if breakout doesn't occur
- More reliable on higher timeframes
Note: The indicator works best when combined with proper risk management
and overall market context analysis. Avoid trading every inside bar pattern
and always confirm with volume and other technical indicators.
My scriptjdkJDJ;ldmMDL;
D;Lmd;lMDL;Md
D,;ldk;lD;Ldl;DJl
DMjdlJDLjdlDLK
LDLKflkFLKhkfl
fLFLKlkKLFlkfhlKF
Pullback Indicator with Trend and SMC Logic By NileshGThe error occurs because in Pine Script version 6, when you define a variable without specifying a type, you cannot assign `na` to it directly. You need to specify the type of the variable explicitly.
In Pine Script v6, you should define the type of the variable when declaring it, especially when initializing it with `na`. For this case, you need to declare the variables as `float` or another appropriate type.
Let's fix that issue by properly defining the types of the variables for `entryLevel`, `stopLoss`, `tp1`, `tp2`, and `tp3`.
### Updated Code with Proper Variable Types in Pine Script v6:
```pinescript
//@version=6
indicator("Pullback Indicator with Trend and SMC Logic", overlay=true)
// Trend Identification
length = input.int(14, title="Trend Length")
maType = input.string("SMA", title="Moving Average Type", options= )
ma = maType == "SMA" ? ta.sma(close, length) : ta.ema(close, length)
upTrend = close > ma
downTrend = close < ma
bgcolor(upTrend ? color.new(color.green, 90) : na, title="Uptrend")
bgcolor(downTrend ? color.new(color.red, 90) : na, title="Downtrend")
// Pullback Detection
pullbackThreshold = input.float(0.382, title="Pullback Threshold (Fibonacci)")
upTrendHigh = ta.highest(high, length) // Using ta.highest for highest value
downTrendLow = ta.lowest(low, length) // Using ta.lowest for lowest value
pullbackUp = high < upTrendHigh * (1 - pullbackThreshold)
pullbackDown = low > downTrendLow * (1 + pullbackThreshold)
bgcolor(pullbackUp ? color.new(color.yellow, 90) : na, title="Pullback Up")
bgcolor(pullbackDown ? color.new(color.yellow, 90) : na, title="Pullback Down")
// Entry, Stop Loss (SL), Trailing SL, and Take Profits (TP)
var float entryLevel = na
var float stopLoss = na
var float tp1 = na
var float tp2 = na
var float tp3 = na
if pullbackUp
entryLevel := high
stopLoss := low - (high - low) * 0.1 // 10% below the pullback high
tp1 := entryLevel + (high - low) * 0.5 // 50% of the risk distance for TP1
tp2 := entryLevel + (high - low) * 1 // 1x risk for TP2
tp3 := entryLevel + (high - low) * 1.5 // 1.5x risk for TP3
plot(entryLevel, color=color.blue, title="Entry Level", linewidth=2)
plot(stopLoss, color=color.red, title="Stop Loss", linewidth=2)
plot(tp1, color=color.green, title="TP1", linewidth=2)
plot(tp2, color=color.green, title="TP2", linewidth=2)
plot(tp3, color=color.green, title="TP3", linewidth=2)
// Smart Money Concept (SMC) Liquidity Zones (for simplicity)
liquidityZoneHigh = ta.highest(high, 50)
liquidityZoneLow = ta.lowest(low, 50)
plotshape(close > liquidityZoneHigh, color=color.purple, style=shape.labelup, title="Liquidity Zone Breakout", location=location.belowbar)
plotshape(close < liquidityZoneLow, color=color.purple, style=shape.labeldown, title="Liquidity Zone Breakdown", location=location.abovebar)
```
### Key Changes:
1. **Variable Types Defined Explicitly**:
- `var float entryLevel = na`
- `var float stopLoss = na`
- `var float tp1 = na`
- `var float tp2 = na`
- `var float tp3 = na`
These variables are now explicitly defined as `float` types, which is required for handling numerical values, including `na`.
2. **No More Implicit Type Assignment**: By defining the types explicitly, we avoid errors related to assigning `na` to a variable that doesn't have a specified type.
### What this Code Does:
- **Trend Identification**: Highlights the background green for an uptrend and red for a downtrend.
- **Pullback Detection**: Highlights yellow when a pullback is detected based on Fibonacci levels.
- **Entry, Stop Loss, and Take Profits**: Calculates entry levels, stop losses, and multiple take-profit levels when a pullback is detected.
- **Liquidity Zones**: Marks liquidity zone breakouts and breakdowns using horizontal levels based on recent highs and lows.
This should now work properly in Pine Script v6. Let me know if you encounter any other issues!
TrinityBar with Trailing StopThe TrinityBar strategy is a simple trading system that combines classic Bill Williams bar‐thirds analysis with a dynamic trailing stop loss function. It generates clear bullish and bearish signals based on current and previous bar structure, enabling automated market entries and exits. In addition, it incorporates a trailing stop mechanism configurable by bar lookback and timeframe, ensuring adaptive risk management in real time. This solution delivers precise entry/exit points and robust position protection while being scalable and practical for contemporary market conditions.
SIOVERSE buy & sell Signal With Support & ResistanceIndicator: EMA Crossover with Support & Resistance
This indicator is designed for TradingView and combines:
EMA Crossover Strategy (for Buy/Sell signals).
Support and Resistance Levels (dynamic, based on recent price action).
Long-Term Trend Identification (using EMA 50).
Key Features
EMA Crossover Signals:
Uses EMA 9 and EMA 21 to generate Buy and Sell signals.
Buy Signal: When EMA 9 crosses above EMA 21.
Sell Signal: When EMA 9 crosses below EMA 21.
Signals are displayed as triangle icons on the chart:
Green triangle (▲) for Buy signals (below the candle).
Red triangle (▼) for Sell signals (above the candle).
Support and Resistance Levels:
Calculated dynamically based on the lowest low and highest high over a user-defined lookback period.
Support: Lowest price in the lookback period.
Resistance: Highest price in the lookback period.
Plotted as dotted lines:
Green dotted line for Support.
Red dotted line for Resistance.
Long-Term Trend Identification:
Uses EMA 50 to identify the long-term trend.
Plotted as an orange line on the chart.
Helps traders determine the overall market direction:
Price above EMA 50: Bullish Trend.
Price below EMA 50: Bearish Trend.
Customizable Inputs:
Lookback period for Support and Resistance (default: 20 candles).
EMA lengths for short-term (9), medium-term (21), and long-term (50) trends.
How It Works
EMA Calculation:
EMA 9, EMA 21, and EMA 50 are calculated using the closing price.
EMA 9 and EMA 21 are used for generating Buy/Sell signals but are hidden from the chart.
EMA 50 is displayed on the chart to visualize the long-term trend.
Buy/Sell Signals:
Buy Signal: When EMA 9 crosses above EMA 21.
Sell Signal: When EMA 9 crosses below EMA 21.
Signals are displayed as triangle icons on the chart for easy visualization.
Support and Resistance:
Support: The lowest price in the last N candles (default: 20).
Resistance: The highest price in the last N candles (default: 20).
These levels are updated dynamically as new candles form.
Trend Identification:
EMA 50 is plotted to help traders identify the long-term trend.
Traders can use this to filter signals (e.g., only take Buy signals in an uptrend).
Input Parameters
EMA Lengths:
EMA Short (9): Hidden, used for crossover signals.
EMA Medium (21): Hidden, used for crossover signals.
EMA Long (50): Visible, used for trend identification.
Support & Resistance Lookback Period:
Default: 20 candles.
Adjustable by the user.
Chart Visualization
EMA 50:
Plotted as a thick orange line.
Helps identify the long-term trend.
Support and Resistance:
Plotted as dotted lines:
Green dotted line: Support level.
Red dotted line: Resistance level.
Buy/Sell Signals:
Green triangle (▲): Buy signal (below the candle).
Red triangle (▼): Sell signal (above the candle).
Alert Conditions
Alerts can be set for:
Buy Signal: When EMA 9 crosses above EMA 21.
Sell Signal: When EMA 9 crosses below EMA 21.
Example Use Case
Uptrend Scenario:
Price is above EMA 50 (bullish trend).
EMA 9 crosses above EMA 21: Buy signal (green triangle).
Traders can look for buying opportunities near the Support level.
Downtrend Scenario:
Price is below EMA 50 (bearish trend).
EMA 9 crosses below EMA 21: Sell signal (red triangle).
Traders can look for selling opportunities near the Resistance level.