XAUUSD Volume BreakoutShows where volume is in xauusd asset in particular with buy and sell signals.
Indicatori di ampiezza
L3 Magic-9/13 Strategy输入参数 :沿用原指标中的长度和回溯长度参数。
函数定义 :保留原指标中的辅助函数,用于获取非 NA 值、计数连续条件出现次数、检查条件是否出现以及过滤出现次数。
Magic-9/13 逻辑 :沿用原指标中的 Magic-9/13 逻辑,用于识别连续收盘价条件。
方向反转点计算 :计算上涨和下跌计数,判断方向反转点。
交易信号定义 :在下跌反转点(满足特定条件)时生成买入信号,在上涨反转点(满足特定条件)时生成卖出信号。
交易执行 :使用 strategy.entry 函数执行买入和卖出操作,并设置止损点为 10 个点,使用 strategy.exit 函数实现止损和止盈功能。止盈点设置为与开仓相反方向的 10 个点。
标签绘制 :在图表上绘制买入和卖出信号的标签,帮助用户直观地识别交易机会。
蜡烛图颜色绘制 :根据交易信号改变蜡烛图的颜色,上涨信号时为绿色,下跌信号时为红色。
使用说明
调整参数 :可以根据个人需求调整长度和回溯长度参数。
观察信号 :在图表上观察策略生成的买入和卖出信号。
注意事项
参数优化 :在实际使用前,建议在历史数据上进行充分的回测和优化,以评估策略的有效性和适应性。
风险管理 :任何交易策略都存在风险,使用前请确保您了解其逻辑和潜在风险,并根据自己的风险承受能力进行调整。
Input Parameters:
Carry over the length and lookback length parameters from the original indicator.
Function Definitions:
Retain the auxiliary functions from the original indicator, which are used to obtain non-NA values, count consecutive occurrences of conditions, check for condition occurrences, and filter occurrences.
Magic-9/13 Logic:
Use the Magic-9/13 logic from the original indicator to identify consecutive closing price conditions.
Directional Reversal Point Calculation:
Calculate up and down counts to determine directional reversal points.
Trading Signal Definition:
Generate a buy signal at a downtrend reversal point (when specific conditions are met) and a sell signal at an uptrend reversal point.
Trade Execution:
Use the strategy.entry function to execute buy and sell orders. Set a stop loss at 10 ticks using the strategy.exit function. The take profit point is set at 10 ticks in the opposite direction of the entry.
Label Plotting:
Plot buy and sell signals on the chart to help users visually identify trading opportunities.
Candlestick Color Plotting:
Change the color of candlesticks based on the trading signal: green for an uptrend signal and red for a downtrend signal.
Usage Instructions
Adjust Parameters:
You can modify the length and lookback length parameters according to your personal needs.
Observe Signals:
Monitor the buy and sell signals generated by the strategy on the chart.
Notes
Optimize Parameters:
It is recommended to thoroughly backtest and optimize the strategy on historical data before actual use to evaluate its effectiveness and adaptability.
Risk Management:
All trading strategies carry inherent risks. Before using this strategy, ensure you fully understand its logic and potential risks, and make adjustments according to your own risk tolerance.
Arnaud Legoux Moving Average Bands MTF V3 Strategy参数设置
时间框架(picktf):默认设置为 4 小时("240"),用于从更高时间框架获取数据。
窗口大小(windowsize):用于 ALMA 计算的周期数,默认为 100。
偏移(offset):用于 ALMA 计算的偏移量,默认为 0.85。
Sigma(sigma):用于 ALMA 计算的平滑参数,默认为 6。
ATR 参数:用于计算平均真实波动幅度(ATR),并根据 ATR 值扩展带的宽度。
指标计算
ALMA 计算:
使用 alma() 函数计算当前时间框架的 Arnaud Legoux 移动平均线。
ATR 计算:
使用 rma(tr(true), ATRlength) 计算平均真实波动幅度(ATR)。
扩展带计算:
根据 ATR 值和不同的乘数(ATRMult、ATRMult2、ATRMult3),计算多个扩展带(emaup、emadw、emahigh、emalow 等)。
多时间框架数据获取:
使用 security() 函数从指定的更高时间框架(picktf)获取 ALMA 和扩展带的值。
绘制图表
绘制 ALMA 线:
使用 plot() 函数绘制当前时间框架的 ALMA 线(almamed)。
绘制扩展带:
绘制多个扩展带,包括 emaup、emadw、emahigh、emalow 等。
绘制多时间框架线:
绘制从更高时间框架获取的 ALMA 和扩展带的值(almatfpv、almatfup、almatfdw 等)。
整体逻辑
这个指标结合了 Arnaud Legoux 移动平均线(ALMA)和平均真实波动幅度(ATR)来生成多个扩展带。
通过 security() 函数,它可以从更高时间框架获取数据,从而在当前时间框架的图表上显示多时间框架的指标。
不同颜色的线条表示不同的扩展带,帮助识别潜在的支撑和阻力区域。
优缺点分析
优点:
结合了 ALMA 和 ATR,提供动态的支撑和阻力区域。
支持多时间框架分析,提供更全面的市场视角。
缺点:
参数较多,可能需要根据具体市场和资产进行优化。
在某些市场条件下可能产生较多伪信号。
这个指标适合用于识别趋势和潜在的交易区域,可以通过调整参数来适应不同的市场条件和交易策略。
### Parameter Settings
- **Timeframe (picktf)**: Default set to 4 hours ("240") for fetching higher timeframe data.
- **Window Size (windowsize)**: Periods used in ALMA calculation, defaulting to 100.
- **Offset (offset)**: Used in ALMA calculation, defaulting to 0.85.
- **Sigma (sigma)**: A smoothing parameter for ALMA, defaulting to 6.
- **ATR Parameters**: Used to calculate the Average True Range (ATR) and determine the width of the bands.
### Indicator Calculations
- **ALMA Calculation**:
- The Arnaud Legoux Moving Average is calculated using the `alma()` function.
- **ATR Calculation**:
- The Average True Range (ATR) is calculated using `rma(tr(true), ATRlength)`.
- **Band Calculations**:
- Multiple bands (emaup, emadw, emahigh, emalow, etc.) are calculated based on ATR values and multipliers.
- **Multi-Timeframe Data**:
- The `security()` function fetches ALMA and band values from the higher timeframe (picktf).
### Chart Plotting
- **ALMA Line**:
- The current timeframe's ALMA line (almamed) is plotted using `plot()`.
- **Bands**:
- Multiple bands, including emaup, emadw, emahigh, and emalow, are plotted.
- **Multi-Timeframe Lines**:
- ALMA and band values from the higher timeframe (almatfpv, almatfup, almatfdw, etc.) are plotted.
### Overall Logic
- This indicator combines the Arnaud Legoux Moving Average (ALMA) and Average True Range (ATR) to create dynamic support and resistance bands.
- It uses the `security()` function to display multi-timeframe data on the current chart.
- Different colored lines indicate various bands, aiding in the identification of potential support and resistance areas.
### Strengths and Weaknesses
- **Strengths**:
- Combines ALMA and ATR for dynamic support/resistance zones.
- Offers a multi-timeframe perspective for comprehensive analysis.
- **Weaknesses**:
- Numerous parameters may require optimization for specific markets/assets.
- May generate false signals in certain market conditions.
This indicator is effective for identifying trends and potential trading zones and can be tailored to different market conditions through parameter adjustments.
Risk Trading Strategy策略定义 :使用 strategy 函数定义一个名为 "Risk Trading Strategy" 的交易策略。
输入参数 :沿用原指标中的风险价格显示参数。
指标计算 :保留原指标中的风险值计算逻辑,包括计算 374 周期简单移动平均线、平均值、归一化风险值等。
交易信号定义 :根据归一化风险值定义交易信号:
买入开多 :当风险值低于 0.3 时,触发买入信号。
平多仓 :当风险值高于 0.6 或 0.7 时,触发平多信号。
卖出开空 :当风险值高于 0.7 时,触发卖出信号。
平空仓 :当风险值低于 0.4 时,触发平空信号。
交易执行 :使用 strategy.entry 函数执行买入和卖出操作,并设置止损点为 5 个点,使用 strategy.exit 函数实现止损和平仓功能。
标签绘制 :在图表上绘制买入、卖出和平仓信号的标签,帮助用户直观地识别交易机会。
使用说明
将代码复制到 TradingView :将上述代码复制并粘贴到 TradingView 的 Pine 编辑器中,点击 “添加到图表” 按钮将其加载到图表上。
调整参数 :可以根据个人需求调整相关参数。
观察信号 :在图表上观察策略生成的买入、卖出和平仓信号。
注意事项
参数优化 :在实际使用前,建议在历史数据上进行充分的回测和优化,以评估策略的有效性和适应性。
风险管理 :任何交易策略都存在风险,使用前请确保您了解其逻辑和潜在风险,并根据自己的风险承受能力进行调整。
Strategy Definition:
The strategy is defined using the strategy function and is named "Risk Trading Strategy".
Input Parameters:
The input parameter from the original indicator is carried over, which is the risk price display parameter.
Indicator Calculation:
The original indicator's logic for calculating risk values is retained. This includes computing the 374-period simple moving average, average values, and normalizing the risk value.
Trading Signal Definition:
Trading signals are defined based on the normalized risk value:
Buy Signal: Triggered when the risk value is below 0.3.
Exit Long Signal: Triggered when the risk value exceeds 0.6 or 0.7.
Sell Signal: Triggered when the risk value exceeds 0.7.
Exit Short Signal: Triggered when the risk value drops below 0.4.
Trade Execution:
The strategy.entry function is used to execute buy and sell operations, with a stop loss set at 5 points. The strategy.exit function is used to implement stop losses and exit trades.
Label Plotting:
Labels for buy, sell, and exit signals are plotted on the chart to help users visually identify trading opportunities.
Usage Instructions:
Add to TradingView: Copy and paste the code into TradingView's Pine Editor and load it onto the chart.
Parameter Adjustment: Parameters can be adjusted according to personal needs.
Signal Observation: Monitor the chart for buy, sell, and exit signals generated by the strategy.
Notes:
Parameter Optimization: Backtest and optimize the strategy on historical data before actual use to evaluate its effectiveness.
Risk Management: Understand the strategy's logic and risks, and adjust according to your risk tolerance.
Fixed Trading - JeremyZanXMaps out the range on the 23rd hour of each day for the past 100 days. It then provides some tradable price points based upon the range derived. Meant to be used on the H1 ONLY. Hasn't been programmed to work on any other timeframe.
A-B-C-D Levels with Customizable Pct & Price LineIt's one of the less popular plain technique for trading with fundamentally strong stocks. please do select stocks properly. this may or may not work for all stocks.
Large cap ratios maybe different from small cap ratios, do back test properly before taking any decision. all the best. happy investing.
EMA Momentum + OBV + Volume Signals with DivergenceHere’s a detailed description of the script "EMA Momentum + OBV + Volume Signals with Divergence" you've created in Pine Script v6:
🔍 Overview
This script is a technical analysis tool for TradingView that combines 7-day Exponential Moving Averages (EMA) of:
Momentum
On-Balance Volume (OBV)
Volume
It generates:
Buy/Sell signals based on EMA direction
Regular divergence detection (price up, OBV/volume down)
Hidden/reverse divergence detection
A dynamic table displaying 3-day comparative stats for each indicator
📊 Key Indicators Used
Momentum
momentum = close - close
EMA applied to smooth out noise
Rising momentum indicates price acceleration
OBV (On-Balance Volume)
A cumulative total that adds/subtracts volume based on price movement
EMA helps identify smoothed volume trend
Volume
Raw volume and its 7-day EMA used to track market participation
✅ Signal Logic
Buy Signal:
Triggered when EMA of momentum, OBV, and volume are all rising
Sell Signal:
Triggered when any one of the EMAs starts falling — indicating weakening trend
🔀 Divergence Detection
Regular Divergence:
Price makes a higher high
EMA OBV and EMA volume make lower highs
This suggests a potential reversal
Hidden (Reverse) Divergence:
Bullish Hidden: Price makes higher lows, OBV falls
Bearish Hidden: Price makes lower highs, OBV rises
These can signal continuation of trend after pullbacks
📋 Table Structure (Bottom-Right Corner)
Shows values for:
EMA Momentum
EMA OBV
Raw OBV
EMA Volume
Raw Volume
Each row includes:
Value from D-2 (two bars ago)
D-1
Now
Difference
% Change
This provides a quick multi-day trend snapshot.
🎨 Visuals
Triangle Buy (Green) below bar
Triangle Sell (Red) above bar
Orange background for regular divergence
Navy background for bullish hidden divergence
Maroon background for bearish hidden divergence
EMA-based MoM + OBV + Volume + Alerts"EMA-based Momentum + OBV + Volume Signals with Table, Alerts, and Background Highlighting"
📌 Purpose:
This script helps traders identify trend strength and reversals using:
Momentum,
On-Balance Volume (OBV),
Volume itself.
All of these are smoothed using a 7-day Exponential Moving Average (EMA) for more reliable signals, and displayed via:
Buy/Sell triangles
A live data table
Background color changes
Visual plots
TradingView alerts
🧠 Core Concepts Used:
1. Momentum (EMA-based):
Measures the strength of price movement over a 10-bar window (configurable). The raw value is smoothed with a 7-day EMA to reduce noise.
2. OBV (EMA-based):
OBV tracks whether volume is flowing into or out of a security based on price changes. The cumulative OBV is smoothed using a 7-day EMA.
3. Volume (EMA-based):
Raw volume is also smoothed using a 7-day EMA to highlight sustained increases or decreases.
🟢 Buy Signal Logic:
A Buy signal is generated when:
EMA of Momentum is rising (i.e., emaMomentumDiff > 0)
EMA of OBV is rising
EMA of Volume is rising
This means all three trend indicators are improving, signaling a potentially strong bullish move.
🔴 Sell Signal Logic:
A Sell signal is generated when any one of the three EMA indicators starts falling (i.e., has a negative difference).
This indicates reversal or weakness, signaling potential exit or short opportunity.
📊 On-Screen Table (Bottom-Right):
Displays current and past data for each metric:
D-2, D-1, and Now values
Difference
% Change
Metrics:
EMA-Momentum (blue)
EMA-OBV (orange)
EMA-Volume (fuchsia)
🎨 Background Color:
Light green background during Buy signal
Light red background during Sell signal
Helps visually identify the zone you're trading in.
📈 Plot Lines:
Blue line = EMA of Momentum
Orange line = EMA of OBV
These help visually confirm trends directly on the price chart.
PWL PWH PDL PDH refined)NEw Script which shows PWH, PWL, PDH., PDL, to be used with key levels to scalp intraday moves. Clean and easy.
VWAP + RSI + ADX Buy SignalThis is combination of RSI VWAP and ADX for generating buy signals.All are required to backtest it and post the result thereof in comments section.
10 MA > 21 MA HighlightWhen the 10 day is above the 21 MA , this script will show a light green color on the screen
MohdTZ - XO Trend Scanner/EMA/ATR/Supertrend/WatermarkApply the Script:
Copy the code into TradingView’s Pine Script editor.
Save and add the indicator to your chart.
Verify Supertrend:
Look for a line that switches between green (uptrend) and red (downtrend) based on price movement relative to the Supertrend level.
It should appear alongside the 200 EMA, Slow EMA, ATR band fill, and trend scanner EMAs.
Customize Settings:
Adjust supertrend_length and supertrend_multiplier in the indicator settings to fine-tune sensitivity.
Change supertrend_color_up, supertrend_color_down, or supertrend_linewidth for visual preferences.
Modify atr_band_color if you want a different fill color for the ATR bands.
Check for Clutter:
The chart now includes multiple overlays (200 EMA, Slow EMA, ATR bands, Supertrend, Fast/Slow EMAs). If it’s too crowded, toggle i_bothEMAs to false to show only the Consolidated EMA, or adjust line widths/transparency.
Why Supertrend Wasn’t Visible Before
The original scripts didn’t include Supertrend calculations or plotting.
If you were expecting Supertrend from another indicator or script, it’s possible another indicator was disabled or not applied. This script now explicitly includes Supertrend.
Additional Notes
Chart Appearance: The Supertrend line will plot above or below the price, changing color based on trend direction. Ensure it’s visible by checking the chart’s scale and that no other indicators are overlapping.
Conflicts: If you don’t see the Supertrend, verify that no other indicators are hiding it (e.g., due to overlapping colors or chart scaling). You can disable other indicators temporarily to confirm.
Further Customization: If you want Supertrend to interact with other components (e.g., combine with EMA signals, adjust bar coloring based on Supertrend), let me know, and I can add that logic.
Debugging: If the Supertrend doesn’t appear, check the TradingView console for errors, or share a screenshot/description of your chart setup.
If you meant a specific Supertrend implementation (e.g., with unique parameters or additional features) or if you’re referring to a different issue (e.g., a specific Supertrend script you expected), please provide more details, and I’ll refine the solution. Let me know if you need help applying this or visualizing the result!
learn Supertrend parameters
Bollinger Bands
ULTRA RSI 2025//@version=6
indicator(title="ULTRA RSI 2025", shorttitle="ULTRA RSI 2025", format=format.price, precision=2)
// ==================== CONFIGURAÇÃO VISUAL FUTURISTA ====================
cyberTheme = input.string("IC", title="🎨 Tema Visual", options= , group="🎨 Visual Settings")
showGradients = input.bool(true, title="🎨 Exibir Preenchimentos em Gradiente", group="🎨 Visual Settings")
glowIntensity = input.float(0.3, title="🎨 Intensidade do Brilho", minval=0.0, maxval=1.0, step=0.1, group="🎨 Visual Settings")
// Cores para hline (usando input.color)
overboughtColor = input.color(color.new(#ff0000, 20), title="📈 Cor Sobrevendido", group="🎨 Visual Settings")
oversoldColor = input.color(color.new(#31fc09, 20), title="📉 Cor Sobrecomprado", group="🎨 Visual Settings")
midlineColor = input.color(color.new(#ffffff, 81), title="⚡ Cor da Linha Média", group="🎨 Visual Settings")
// ==================== CORES FUTURISTAS ====================
getThemeColors() =>
switch cyberTheme
"IC" =>
"Matrix Green" =>
"Tron Orange" =>
"Blade Runner Pink" =>
=>
= getThemeColors()
// Colores adicionales cyber
cyberGreen = color.new(#39FF14, 0)
cyberRed = color.new(#FF073A, 0)
darkCyber = color.new(#0D1117, 0)
neonWhite = color.new(#FFFFFF, 0)
// ==================== CÓDIGO RSI ORIGINAL (SIN MODIFICAR) ====================
rsiLengthInput = input.int(14, minval=1, title=" RSI Length", group=" RSI Settings")
rsiSourceInput = input.source(close, " Source", group=" RSI Settings")
calculateDivergence = input.bool(false, title=" Calculate Divergence", group=" RSI Settings", display = display.data_window, tooltip = "Calculating divergences is needed in order for divergence alerts to fire.")
change = ta.change(rsiSourceInput)
up = ta.rma(math.max(change, 0), rsiLengthInput)
down = ta.rma(-math.min(change, 0), rsiLengthInput)
rsi = down == 0 ? 100 : up == 0 ? 0 : 100 - (100 / (1 + up / down))
// ==================== VISUAL FUTURISTA ====================
// Color dinámico para el RSI
getRsiColor(rsiValue) =>
if rsiValue >= 80
neonPrimary // Azul neón para sobrecomprado
else if rsiValue >= 70
color.new(neonPrimary, 30)
else if rsiValue <= 20
cyberRed // Rojo cyber para sobrevendido
else if rsiValue <= 30
color.new(cyberRed, 30)
else if rsiValue > 50
color.new(cyberGreen, 40)
else
color.new(neonSecondary, 50)
rsiColor = getRsiColor(rsi)
glowColor = color.new(rsiColor, math.round(100 - glowIntensity * 100))
// Plot RSI con efecto glow futurista
rsiPlot = plot(rsi, "🔮 Cyber RSI", color=rsiColor, linewidth=3)
plot(rsi, "✨ RSI Glow 1", color=glowColor, linewidth=5)
plot(rsi, "✨ RSI Glow 2", color=color.new(rsiColor, 90), linewidth=7)
// Líneas de banda con estilo cyber
rsiUpperBand = hline(70, "🔥 Cyber Overbought", color=overboughtColor, linestyle=hline.style_dashed, linewidth=2)
midline = hline(50, " Cyber Midline", color=midlineColor, linestyle=hline.style_dotted)
rsiLowerBand = hline(30, "❄️ Cyber Oversold", color=oversoldColor, linestyle=hline.style_dashed, linewidth=2)
// Background fills futuristas
midLinePlot = plot(50, color = na, editable = false, display = display.none)
// Fill condicional usando operador ternario
backgroundFillColor = showGradients ? color.new(darkCyber, 90) : na
overboughtFillColor = showGradients ? color.new(neonPrimary, 0) : na
overboughtFillColorBottom = showGradients ? color.new(neonPrimary, 100) : na
oversoldFillColorTop = showGradients ? color.new(neonSecondary, 100) : na
oversoldFillColorBottom = showGradients ? color.new(neonSecondary, 0) : na
fill(rsiUpperBand, rsiLowerBand, color=backgroundFillColor, title="🌃 Cyber Background")
fill(rsiPlot, midLinePlot, 100, 70, top_color = overboughtFillColor, bottom_color = overboughtFillColorBottom, title = "🌌 Cyber Overbought Zone")
fill(rsiPlot, midLinePlot, 30, 0, top_color = oversoldFillColorTop, bottom_color = oversoldFillColorBottom, title = "🌌 Cyber Oversold Zone")
// ==================== SMOOTHING MA (CÓDIGO ORIGINAL) ====================
GRP = "🌊 Smoothing"
TT_BB = "Only applies when 'SMA + Bollinger Bands' is selected. Determines the distance between the SMA and the bands."
maTypeInput = input.string("SMA", "Type", options = , group = GRP, display = display.data_window)
maLengthInput = input.int(14, "Length", group = GRP, display = display.data_window)
bbMultInput = input.float(2.0, "BB StdDev", minval = 0.001, maxval = 50, step = 0.5, tooltip = TT_BB, group = GRP, display = display.data_window)
var enableMA = maTypeInput != "None"
var isBB = maTypeInput == "SMA + Bollinger Bands"
// Smoothing MA Calculation (CÓDIGO ORIGINAL)
ma(source, length, MAtype) =>
switch MAtype
"SMA" => ta.sma(source, length)
"SMA + Bollinger Bands" => ta.sma(source, length)
"EMA" => ta.ema(source, length)
"SMMA (RMA)" => ta.rma(source, length)
"WMA" => ta.wma(source, length)
"VWMA" => ta.vwma(source, length)
// Smoothing MA plots con colores cyber
smoothingMA = enableMA ? ma(rsi, maLengthInput, maTypeInput) : na
smoothingStDev = isBB ? ta.stdev(rsi, maLengthInput) * bbMultInput : na
plot(smoothingMA, "🌊 Cyber MA", color=color.new(color.yellow, 0), linewidth=2, display = enableMA ? display.all : display.none, editable = enableMA)
bbUpperBand = plot(smoothingMA + smoothingStDev, title = "🔺 Upper Cyber Band", color=neonPrimary, linewidth=2, display = isBB ? display.all : display.none, editable = isBB)
bbLowerBand = plot(smoothingMA - smoothingStDev, title = "🔻 Lower Cyber Band", color=neonSecondary, linewidth=2, display = isBB ? display.all : display.none, editable = isBB)
// Fill para Bollinger Bands
bbFillColor = isBB ? color.new(neonPrimary, 90) : na
fill(bbUpperBand, bbLowerBand, color=bbFillColor, title="🌌 Cyber Bollinger Fill", display = isBB ? display.all : display.none, editable = isBB)
// ==================== DIVERGENCE (CÓDIGO ORIGINAL CORREGIDO) ====================
lookbackRight = 5
lookbackLeft = 5
rangeUpper = 60
rangeLower = 5
bearColor = cyberRed
bullColor = cyberGreen
textColor = neonWhite
noneColor = color.new(color.white, 100)
// Función _inRange calculada en cada barra
_inRange(bool cond) =>
bars = ta.barssince(cond)
rangeLower <= bars and bars <= rangeUpper
plFound = false
phFound = false
bullCond = false
bearCond = false
rsiLBR = rsi
// Calcular _inRange en cada barra para evitar inconsistencias
plFoundPrev = not na(ta.pivotlow(rsi, lookbackLeft, lookbackRight) )
phFoundPrev = not na(ta.pivothigh(rsi, lookbackLeft, lookbackRight) )
inRangeBull = _inRange(plFoundPrev)
inRangeBear = _inRange(phFoundPrev)
if calculateDivergence
//------------------------------------------------------------------------------
// Regular Bullish
// rsi: Higher Low
plFound := not na(ta.pivotlow(rsi, lookbackLeft, lookbackRight))
rsiHL = rsiLBR > ta.valuewhen(plFound, rsiLBR, 1) and inRangeBull
// Price: Lower Low
lowLBR = low
priceLL = lowLBR < ta.valuewhen(plFound, lowLBR, 1)
bullCond := priceLL and rsiHL and plFound
//------------------------------------------------------------------------------
// Regular Bearish
// rsi: Lower High
phFound := not na(ta.pivothigh(rsi, lookbackLeft, lookbackRight))
rsiLH = rsiLBR < ta.valuewhen(phFound, rsiLBR, 1) and inRangeBear
// Price: Higher High
highLBR = high
priceHH = highLBR > ta.valuewhen(phFound, highLBR, 1)
bearCond := priceHH and rsiLH and phFound
// Divergence plots con estilo cyber
plot(
plFound ? rsiLBR : na,
offset = -lookbackRight,
title = "🚀 Cyber Bull Divergence",
linewidth = 3,
color = (bullCond ? bullColor : noneColor),
display = display.pane,
editable = calculateDivergence)
plotshape(
bullCond ? rsiLBR : na,
offset = -lookbackRight,
title = "🚀 Cyber Bull Signal",
text = "🚀 BULL",
style = shape.labelup,
location = location.absolute,
color = bullColor,
textcolor = textColor,
size = size.normal,
display = display.pane,
editable = calculateDivergence)
plot(
phFound ? rsiLBR : na,
offset = -lookbackRight,
title = "🔻 Cyber Bear Divergence",
linewidth = 3,
color = (bearCond ? bearColor : noneColor),
display = display.pane,
editable = calculateDivergence)
plotshape(
bearCond ? rsiLBR : na,
offset = -lookbackRight,
title = "🔻 Cyber Bear Signal",
text = "🔻 BEAR",
style = shape.labeldown,
location = location.absolute,
color = bearColor,
textcolor = textColor,
size = size.normal,
display = display.pane,
editable = calculateDivergence)
// ==================== TABLA DE INFORMACIÓN CYBER ====================
// Calcular ta.change en cada barra para consistencia
rsiChange3 = ta.change(rsi, 3)
if barstate.islast
var table infoTable = table.new(position.top_right, 2, 5,
bgcolor=color.new(darkCyber, 10),
border_width=2,
border_color=neonPrimary,
frame_width=3,
frame_color=neonSecondary)
table.clear(infoTable, 0, 0, 1, 4)
table.cell(infoTable, 0, 0, " ULTRA RSI", bgcolor=neonPrimary, text_color=neonWhite, text_size=size.small)
table.cell(infoTable, 1, 0, " INFO", bgcolor=neonSecondary, text_color=neonWhite, text_size=size.small)
table.cell(infoTable, 0, 1, " VALOR RSI", bgcolor=color.new(darkCyber, 30), text_color=neonPrimary, text_size=size.small)
table.cell(infoTable, 1, 1, str.tostring(math.round(rsi, 2)), bgcolor=color.new(darkCyber, 30), text_color=neonWhite, text_size=size.small)
rsiStatus = rsi >= 70 ? " SOBRENDIDO" : rsi <= 30 ? " SOBRECOMPRADO" : " NEUTRO"
statusColor = rsi >= 70 ? cyberRed : rsi <= 30 ? cyberGreen : neonWhite
table.cell(infoTable, 0, 2, " MOMENTO", bgcolor=color.new(darkCyber, 30), text_color=neonSecondary, text_size=size.small)
table.cell(infoTable, 1, 2, rsiStatus, bgcolor=color.new(darkCyber, 30), text_color=statusColor, text_size=size.small)
if enableMA
table.cell(infoTable, 0, 3, " EMA RSI", bgcolor=color.new(darkCyber, 30), text_color=neonPrimary, text_size=size.small)
table.cell(infoTable, 1, 3, str.tostring(math.round(smoothingMA, 2)), bgcolor=color.new(darkCyber, 30), text_color=neonWhite, text_size=size.small)
momentum = rsiChange3 > 0 ? " SUBINDO" : " CAINDO"
momentumColor = rsiChange3 > 0 ? cyberGreen : cyberRed
table.cell(infoTable, 0, 4, " TENDÊNCIA", bgcolor=color.new(darkCyber, 30), text_color=neonPrimary, text_size=size.small)
table.cell(infoTable, 1, 4, momentum, bgcolor=color.new(darkCyber, 30), text_color=momentumColor, text_size=size.small)
// ==================== ALERTS (CÓDIGO ORIGINAL) ====================
alertcondition(bullCond, title='🚀 Cyber Bullish Divergence', message="🎯 Found a new Cyber Bullish Divergence!")
alertcondition(bearCond, title='🔻 Cyber Bearish Divergence', message='🎯 Found a new Cyber Bearish Divergence!')
Pivot Points StandardThis Pivot Points indicator calculates and plots pivot levels on your chart according to several popular methods (such as Traditional, Fibonacci, Woodie, Classic, Camarilla, etc.), helping traders identify key support and resistance levels. Pivot points are essential tools for predicting market reversal points, and this indicator does so efficiently in real-time.
Features:
Pivot Calculation Methods: Traditional, Fibonacci, Woodie, Classic, Camarilla, and more.
Customization Options: Adjust the pivot type, number of visible pivots, and other parameters like line color and thickness.
Custom Alerts: Receive automatic alerts when the price crosses any pivot level (S1, S2, R1, R2, etc.), helping you react quickly to potential market reversals.
Multiple Timeframe Support: Set the timeframe for the pivot calculations and view corresponding pivot levels for that period.
Visible Pivot Levels: Choose to show or hide the pivot levels directly on the chart, with the option to display the exact price of each level.
Flexible Label Positioning: Select whether pivot labels should appear on the left or right side of the pivot line.
Benefits:
Facilitates Decision-Making: Pivot levels help identify key zones where price is likely to reverse or stay within a range.
Real-Time Alerts: Alerts notify you as soon as the price crosses any key pivot level, enabling you to make quick and precise decisions without constantly monitoring the chart.
Customization: Easily adjust the indicator to suit your trading style and visual preferences.
Ideal For:
Traders looking for technical analysis tools to identify key market levels.
Those who want to receive automatic alerts about pivot level crossovers to streamline decision-making.
Investors using pivot analysis in their trading strategy to determine entry or exit points.
BSL & SSL - Liquidity Zones
BSL & SSL - Liquidity Zones
Indicator Description (for TradingView)
Concept
The BSL & SSL - Liquidity Zones indicator is a simple yet powerful visual tool that helps traders identify key liquidity zones in the market by tracking prominent highs and lows on the chart.
It is based on the concept that the Highest High (Buy Side Liquidity - BSL) and Lowest Low (Sell Side Liquidity - SSL) represent zones where stop-loss orders and pending orders accumulate — often attracting future price movements.
Purpose
This indicator helps traders spot hidden liquidity levels which may act as targets or potential reversal points. It is especially useful for traders who apply Smart Money Concepts (SMC) or institutional trading models.
Great for detecting potential stop hunts and understanding market structure shifts.
How It Works
The indicator calculates the Highest High and Lowest Low over a user-defined period (default: 20 candles).
When a new Higher High forms, it marks a new BSL.
When a new Lower Low forms, it marks a new SSL.
These zones are likely to attract price in the future — either as targets or traps.
Visualization
The indicator draws static horizontal lines (Stepline style) at BSL and SSL levels.
These lines remain in place until broken or a new level is formed.
Visual Labels enhance clarity:
🟢 Green Label → BSL
🔴 Red Label → SSL
Trading Insights / Practical Use
When price approaches a BSL or SSL zone, ask yourself:
✅ Will price break the level to grab liquidity?
✅ Will there be a reversal after liquidity is taken?
The indicator does not provide signals by itself — it serves as a valuable confirmation tool when combined with:
Price Action
Support & Resistance
Momentum Indicators
SMC Tools
Key Benefits
✅ Easy to use
✅ Enhances liquidity analysis
✅ Highlights zones targeted by institutional players
✅ Simple calculation — no complex formulas
Limitations
🚫 Does NOT generate buy/sell signals
🚫 Should be used as part of a complete trading framework
Conclusion
BSL & SSL - Liquidity Zones is a versatile and intuitive tool for any trader looking to better understand where liquidity is positioned on the chart.
It works across all timeframes and complements any trading strategy, especially Smart Money-based approaches.
KABOOM FVGFair value gaps (FVG) highlight imbalances areas between market participants and have become popular amongst technical analysts. The following script aims to display fair value gaps alongside the percentage of filled gaps and the average duration (in bars) before gaps are filled.
Users can be alerted when an FVG is filled using the alerts built into this script.
In practice, FVG's highlight areas of support (bullish FVG) and resistances (bearish FVG). Once a gap is filled, suggesting the end of the imbalance, we can expect the price to reverse.
🔶 USAGE
This approach is more contrarian in nature, users wishing to use a more trend-following approach can use the identification of FVG as direct signals, going long with the identification of a bullish FVG, and short with a bearish FVG.
Bullish FVG
low > high(t-2)
close(t-1) > high(t-2)
(low - high(t-2)) / high(t-2) > threshold
Upper Bullish FVG = low
Lower Bullish FVG = high(t-2)
Bearish FVG
high < low(t-2)
close(t-1) < low(t-2)
(low(t-2) - high) / high < -threshold
Upper Bearish FVG = low(t-2)
Lower Bearish FVG = high
🔶 SETTINGS
Threshold %: Threshold percentage used to filter our FVG's based on their height.
Auto Threshold: Use the cumulative mean of relative FVG heights as threshold.
Unmitigatted Levels: Extent the mitigation level of the number of unmitigated FVG's set by the user.
Mitigation Levels: Show the mitigation levels of mitigated FVG's.
Timeframe : Timeframe of the price data used to detect FVG's.
TSLA + NQ1! MTF StrategyGreat! Here's an upgraded automated TradingView Pine Script (v5) strategy template with:
✅ Entry signals based on TSLA & NQ1! key levels
✅ RSI filter (momentum confirmation)
✅ Stop Loss / Take Profit
✅ Configurable Multi-Timeframe EMA filter (e.g., 1H)
Improved Stoch RSI + Supertrend Filter + ATR SL/TPThis custom indicator, "Improved Stoch RSI + Supertrend Filter + ATR SL/TP," is a powerful tool designed to generate high-probability trading signals in trending markets. It combines three technical indicators:
1. **Stochastic RSI** – Provides overbought and oversold signals by calculating the stochastic of the RSI, which helps identify momentum reversals.
2. **Supertrend Filter** – A trend-following indicator that filters signals to only trade in the direction of the current trend, reducing false signals and improving overall accuracy.
3. **ATR-based Stop-Loss and Take-Profit** – Uses the Average True Range (ATR) multiplied by a 1.5 factor to set dynamic stop-loss levels, and calculates take-profit levels based on a configurable Risk-Reward Ratio (default: 1.5).
**How it works:**
* When the %K line of the Stochastic RSI crosses above the %D line below the oversold level (default: 20), and the Supertrend indicates an uptrend, a **long trade signal** is generated.
* When the %K line of the Stochastic RSI crosses below the %D line above the overbought level (default: 80), and the Supertrend indicates a downtrend, a **short trade signal** is generated.
* Each trade signal comes with a plotted stop-loss and take-profit level based on the ATR, giving you predefined risk management points.
This indicator helps traders:
* Trade only with the prevailing trend
* Identify reversal points with high accuracy
* Manage risk consistently with ATR-based stop-loss and take-profit
It's suitable for all timeframes and can be used as a standalone system or to complement other trading strategies.