Your trading time period background fillThis script allows you to add background highlights to charts during any regional trading session, customize your own trading time, and is precise and customizable yet simple and easy to use, making it more convenient to review transactions.
Support global mainstream time zones: The drop-down list includes 30 commonly used IANA time zones (default is Asia/Shanghai) (such as Asia/Shanghai, America/New_York, Europe/London, etc.), one-click switching, no need to manually calculate the time difference.
Fully localized time input: "Start hour/minute" and "End hour/minute" are filled in with the local time of the selected time zone. The end hour defaults to 23:00 and can be adjusted to 0-23 at will.
Accurate time difference splitting: The script internally splits the time zone offset into whole hours and remainder minutes (supports half-hour zones, such as UTC+5:30), and ensures that all parameters are integers when calling timestamp to avoid errors.
Dynamic background rendering: Each K-line is judged according to the UTC timestamp whether it falls within the set range. If it meets the time period, it will be marked with a semi-transparent green background, and it will return to its original state after crossing the time period, helping you to identify the opening, closing or active period of any market at a glance.
Wide range of scenarios: It can be used for time-sharing highlighting of all-weather varieties of foreign exchange and cryptocurrency, and can also be used in conjunction with backtesting and timing strategies to only send signals during the active period of the target market, greatly improving trading efficiency and strategy accuracy.
Just select the region and set the time, and the script will automatically complete all complex time zone conversions and drawing, allowing you to focus on the transaction itself.
Indicatori e strategie
Avg High/Low Lines with TP & SL아래 코드는 TradingView Pine Script v6으로 작성된 스크립트로, 주어진 캔들 수 동안의 평균 고가와 저가를 계산해서 그 위에 수평선을 그리며, 해당 수평선 돌파 시 진입 가격을 기록하고, 손절가(SL)와 목표가(TP)를 자동으로 계산하여 표시하는 전략입니다. 알림(alert) 기능도 포함되어 있습니다.
코드 주요 기능 요약
length 기간 동안 평균 고가, 저가를 단순 이동평균(SMA)으로 계산
평균 고가선, 저가선 수평선을 일정 바 개수만큼 좌우 연장하여 차트에 표시
평균 고가 돌파 시 매수 진입, 평균 저가 돌파 시 매도 진입 처리
진입 가격 저장 및 상태 관리 (inLong, inShort 플래그)
손절가(SL): 롱이면 평균 저가, 숏이면 평균 고가
목표가(TP): 진입가에서 손절 거리의 1.5배만큼 설정
진입가 기준으로 TP, SL 라인과 라벨 표시
상단 돌파 후 종가 마감 시 매수 알림, 하단 돌파 후 종가 마감 시 매도 알림
Sure! Here’s the English explanation of your TradingView Pine Script v6 code:
Summary of Key Features
Calculates the simple moving average (SMA) of the high and low prices over a user-defined number of candles (length).
Draws horizontal lines for the average high and average low, extending them a specified number of bars to the left and right on the chart.
Detects breakouts above the average high to trigger a long entry, and breakouts below the average low to trigger a short entry.
Records the entry price and manages trade states using flags (inLong, inShort).
Sets the stop loss (SL) at the average low for long positions, and at the average high for short positions.
Calculates the take profit (TP) level based on the entry price plus 1.5 times the stop loss distance.
Draws lines and labels for the TP and SL levels starting from the entry bar, extended to the right.
Sends alerts when the price closes above the average high after a breakout (long signal), or closes below the average low after a breakout (short signal).
-onestar-
AI Score Indicator//@version=5
indicator("AI Score Indicator", overlay=true)
// Eingaben
length = input.int(14, title="RSI Length")
smaLength = input.int(50, title="SMA Length")
bbLength = input.int(20, title="Bollinger Band Length")
stdDev = input.float(2.0, title="Standard Deviation")
// Indikatoren
rsi = ta.rsi(close, length)
sma = ta.sma(close, smaLength)
= ta.bb(close, bbLength, stdDev)
// Scoring (simuliert ein KI-System mit gewichteten Bedingungen)
score = 0
score := rsi < 30 ? score + 1 : score
score := close < sma ? score + 1 : score
score := close < bb_lower ? score + 1 : score
score := ta.crossover(close, sma) ? score + 1 : score
// Buy-/Sell-Signale auf Basis des Scores
buySignal = score >= 3
sellSignal = rsi > 70 and close > sma
// Signale anzeigen
plotshape(buySignal, title="Buy", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY")
plotshape(sellSignal, title="Sell", location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL")
// Score visualisieren (debugging)
plot(score, title="AI Score", color=color.orange)
Multi-Tool Indicator v6This is a versatile technical analysis tool designed to help traders quickly assess market trends and momentum. It combines a customizable Moving Average (MA) with Relative Strength Index (RSI) signals to highlight key market conditions directly on the chart.
🔧 Key Features:
Configurable Moving Average (MA):
Supports SMA (Simple Moving Average) and EMA (Exponential Moving Average).
User-defined length to match your strategy.
Plotted directly on the price chart for trend tracking.
RSI-Based Signal Detection:
Uses RSI to detect overbought (above 70) and oversold (below 30) conditions.
Plots red/green triangle shapes above/below bars when these conditions occur.
Background Highlighting:
Changes chart background to red when overbought and green when oversold to improve visual clarity.
Alerts for Key RSI Events:
Alerts can be triggered when RSI enters overbought or oversold zones.
Useful for automated strategy notifications.
MA Value Labels:
A label shows the current value of the MA near the most recent bar.
Post-Market Session AnalyzerThis script visually analyzes U.S. post-market trading hours (4:00 PM to 8:00 PM EST) by:
a) Highlighting post-market session background
b) Coloring candles based on price direction
c) Marking the final post-market candle with a trend label
Great for:
1) Traders who monitor after-hours price movement
2) Spotting late-day reversals or sentiment shifts
3) Understanding extended trading activity
Wave 2 Flat Detection - B Breaks A High, C Breaks A Low//@version=5
indicator("Wave 2 Flat Detection - B Breaks A High, C Breaks A Low", overlay=true)
// === Parameters ===
wave1_len = 10 // length of wave 1
a_len = 5 // candles to look for Wave A
b_len = 3 // candles to look for Wave B
c_len = 3 // candles to look for Wave C
// === Detect Wave 1 (upward impulse) ===
wave1_start = low
wave1_end = high
wave1_valid = wave1_end > wave1_start * 1.05 // 5% move up
// === Wave A ===
a_start = high // assumed wave 1 top
a_end = low // correction low (Wave A end)
wave_a_valid = a_end < a_start
// === Wave B ===
b_high = high
wave_b_valid = b_high > a_start // B breaks above A's high
// === Wave C ===
c_low = low
wave_c_break = c_low < a_end // C breaks below A's low
// === Final Condition ===
flat_pattern_confirmed = wave1_valid and wave_a_valid and wave_b_valid and wave_c_break
// === Plot + Alert ===
plotshape(flat_pattern_confirmed, title="Flat Wave 2 Detected", location=location.belowbar, color=color.red, style=shape.labelup, text="C↓")
alertcondition(flat_pattern_confirmed, title="Wave C Breaks Below A", message="Wave C broke below Wave A low — Flat correction confirmed, watch for Wave 3")
Zonas de Soporte EURUSD Multi-Timeframe//@version=5
indicator("Zonas de Soporte EURUSD Multi-Timeframe", overlay=true)
// Configuraciones
lookback = input.int(200, "Velas a analizar", minval=50)
tolerance = input.float(0.5, "Tolerancia %", minval=0.1)
touchesMin = input.int(3, "Toques mínimos para validar soporte", minval=2)
// Función para encontrar zonas de soporte
f_findSupportZones(_low, _label) =>
var float zones = na
var int found = 0
for i = 0 to lookback - 1
float base = _low
int touches = 0
for j = i + 1 to lookback - 1
if math.abs(_low - base) <= base * (tolerance / 100)
touches := touches + 1
if touches >= touchesMin
label.new(bar_index , base, text="Zona " + _label + " " + str.tostring(base, format.mintick),
style=label.style_label_up, color=color.green, textcolor=color.white, size=size.small)
found := found + 1
found
// Múltiples temporalidades
low_h1 = request.security("EURUSD", "60", low)
low_h4 = request.security("EURUSD", "240", low)
low_d1 = request.security("EURUSD", "D", low)
low_w1 = request.security("EURUSD", "W", low)
low_mn1 = request.security("EURUSD", "M", low)
// Llamadas a la función
zonesH1 = f_findSupportZones(low_h1, "H1")
zonesH4 = f_findSupportZones(low_h4, "H4")
zonesD1 = f_findSupportZones(low_d1, "D1")
zonesW1 = f_findSupportZones(low_w1, "W1")
zonesMN1 = f_findSupportZones(low_mn1, "MN1")
// Reporte
if bar_index % 50 == 0
label.new(bar_index, high, text="Reporte Zonas Soporte H1: "+str.tostring(zonesH1)+" H4: "+str.tostring(zonesH4)+" D1: "+str.tostring(zonesD1)+" W1: "+str.tostring(zonesW1)+" MN1: "+str.tostring(zonesMN1),
style=label.style_label_down, yloc=yloc.abovebar, size=size.normal,
textcolor=color.black, color=color.new(color.white, 80))
Heiken Ashi Candles - CustomizableHeiken Ashi Candles – Customizable Overlay
This TradingView indicator displays accurate Heiken Ashi candles directly on your price chart, perfectly synced with TradingView’s built-in Heiken Ashi source. It’s ideal for traders who want to backtest or analyze Heiken Ashi structure without switching chart types. The indicator also includes full customization of candle body and wick colors for both bullish and bearish candles—perfect for tailoring your chart visuals to your preferences.
EMAREVEX: Adaptive Multi-Timeframe Mean Reversion
📘 Strategy Overview: EMAREVEX
EMAREVEX (EMA Reversion Expert) is a professionally engineered mean-reversion strategy tailored for BTC/USDT, optimized specifically for the 15-minute and 30-minute timeframes.
It combines:
- Multi-timeframe EMA200 trend filtering (15m & 30m)
- Bollinger Band lower/upper breaches as reversion anchors
- RSI-based confirmation for oversold/overbought conditions
- A trailing stop-loss mechanism that activates only after volatility surpasses a configurable ATR threshold, then dynamically tracks price
This setup targets short-term pullback opportunities in volatile intraday environments.
🔬 Designed for quant-informed traders who seek precision entries and dynamic exit control.
⚠️ Warning:
This strategy is optimized on historical data. It should not be used without discretionary confirmation, appropriate risk management, and forward-testing under live market conditions.
Spot Nachkauf-Zonen High TF (RSI + BB)**Spot Buy/Sell Zones High TF Indicator (RSI + Bollinger Bands + Trend & Volume Filters)**
This is an overlay indicator for TradingView that highlights optimal buy and sell areas on a higher timeframe (e.g. Daily, Weekly) while you view a lower timeframe chart. It combines volatility, momentum, trend and volume checks to reduce false signals.
---
### Key Features
* **Higher-Timeframe Calculations**
All indicators (Bollinger Bands, RSI, moving averages, volume) use data from a user-selected timeframe (for example “D” for daily or “W” for weekly).
* **Bollinger Bands**
* Middle line: Simple Moving Average (SMA) over N periods
* Upper/Lower bands: ±M × standard deviation
* Semi-transparent fill between the bands for quick visual reference
* **RSI Momentum**
* Classic 14-period RSI with adjustable overbought (e.g. 70) and oversold (e.g. 30) levels
* **Buy** when RSI crosses up out of oversold and price touches or goes below the lower Bollinger Band
* **Sell** when RSI crosses down out of overbought and price touches or goes above the upper Bollinger Band
* **Trend Filter (Optional)**
* Higher-TF SMA (default 200 periods) plotted in orange
* Signals only fire when price is above the SMA (for buys) or below (for sells) to align with the main trend
* **Volume Filter (Optional)**
* Compares current higher-TF volume against its SMA
* Signals require volume to exceed a user-set multiplier of average volume, ensuring real market participation
* **Visual Signals**
* Green triangles below bars mark buy zones; red triangles above bars mark sell zones
* Light green background highlights active buy areas
* **Built-In Alerts**
* Two alert conditions (“Buy Signal” and “Sell Signal”) ready to be used in TradingView’s Alert dialog
* Customizable alert messages include ticker and timeframe
---
### Inputs
| Setting | Default | Purpose |
| ------------------------- | ------- | ------------------------------------------------ |
| **Calculation Timeframe** | D | Higher timeframe for all calculations |
| **BB Periods** | 20 | Length of SMA for Bollinger middle line |
| **BB Std-Dev Multiplier** | 2.0 | Number of standard deviations for the bands |
| **RSI Periods** | 14 | Length of the RSI calculation |
| **Overbought / Oversold** | 70 / 30 | RSI thresholds for signal generation |
| **Enable Trend Filter** | true | Use higher-TF SMA to confirm trend direction |
| **Trend MA Periods** | 200 | SMA length for the trend filter |
| **Enable Volume Filter** | true | Require above-average volume to validate signals |
| **Volume MA Periods** | 20 | SMA length for volume filter |
| **Volume Multiplier** | 1.2 | How many times above average volume is needed |
---
### How to Use
1. **Add the Script**: Paste the Pine code into TradingView’s Pine Editor and save.
2. **Adjust Settings**: Choose your higher timeframe (“D”, “W”, etc.) and tweak BB, RSI, trend, and volume parameters.
3. **Activate Alerts**: In the Alerts panel, select the “Buy Signal” or “Sell Signal” alert condition.
4. **Interpret Signals**:
* A green triangle + green background = suggested buy zone
* A red triangle = suggested sell zone
This setup gives you clear, rule-based entry and exit areas by filtering noise and confirming market strength on a higher timeframe.
Dynamic ATR Label//@version=5
indicator("Dynamic ATR Label", overlay=true)
// User definable ATR parameters
atrLength = input.int(14, "ATR Length", minval=1)
priceSource = input.source(close, "Price Source")
// Calculate ATR
atrValue = ta.atr(atrLength)
// Calculate ATR in percentage
atrPercent = (atrValue / priceSource) * 100
// Format the ATR percentage for display
atrText = "ATR: " + str.tostring(atrPercent, "#.##") + "%"
// Create or update the label
var label atrLabel = na
if na(atrLabel)
// Create the label on the first bar
atrLabel := label.new(x=bar_index, y=high, text=atrText,
xloc=xloc.bar_index, yloc=yloc.price, // Define how x and y are interpreted
style=label.style_label_down, color=color.blue,
textcolor=color.white, size=size.normal)
else
// Update the label's position and text on subsequent bars
label.set_xy(atrLabel, x=bar_index, y=high) // Only update x and y coordinates
label.set_text(atrLabel, atrText)
Volatility Flow X – MACD + Ichimoku Hybrid Trail🌥️ Volatility Flow X – Hybrid Ichimoku Cloud Explained
This strategy combines Ichimoku’s cloud structure with real-time price position.
Unlike standard Ichimoku coloring, the cloud here reflects both trend direction and price behavior.
🔍 What the Cloud Colors Mean
🟢 Green Cloud
Senkou A > Senkou B
Price is above the cloud
→ Indicates strong uptrend; suitable for long entries
🔴 Red Cloud
Senkou A < Senkou B
Price is below the cloud
→ Indicates strong downtrend; suitable for short entries
⚪ Gray Cloud
Price contradicts trend, or price is inside the cloud
→ Represents indecision, low momentum; best to avoid entries
⚙️ Technical Features
Ichimoku Components: Tenkan-sen, Kijun-sen, Senkou Span A & B, Chikou Span
Cloud Transparency: 30%
MACD Filter: Optional momentum confirmation (customizable)
Trailing Stop: Optional dynamic trailing stop after trigger level
Directional Control: Long and short trailing rules can be set independently
📚 References
Ichimoku Charts – Nicole Elliott
Algorithmic Trading – Ernie Chan
TradingView Pine Script and hybrid trend models
⚠️ Disclaimer
This strategy is for educational and backtesting purposes only.
It is not financial advice. Always test thoroughly before applying to real trades.
MACD Histogram v6This script plots the MACD histogram, a popular momentum indicator used to identify bullish/bearish momentum shifts, convergence/divergence between moving averages, and potential entry/exit signals.
Core Components:
Inputs:
fast – Period for the fast EMA (default: 12).
slow – Period for the slow EMA (default: 26).
signal – Period for the signal line EMA (default: 9).
Pivot Swings w Table Pivot Swings w Table — Intraday Structure & Range Analyzer
This indicator identifies key pivot highs and lows on the chart and highlights market structure shifts using a real-time table display. It helps traders visually confirm potential trade setups by tracking unbroken swing points and measuring the range between the most recent pivots.
🔍 Features:
🔹 Automatic Pivot Detection using configurable left/right bar logic.
🔹 Unbroken Pivot Filtering — only pivots that haven't been invalidated by price are displayed.
🔹 Dynamic Range Table with:
Latest valid Pivot High and Pivot Low
Total Range Width
Upper & Lower 25% range thresholds (useful for value/imbalance analysis)
🔹 Trend-Based Color Coding — the table background changes based on which pivot (high or low) occurred more recently:
🟥 Red: Downward bias (last pivot was a lower high)
🟩 Green: Upward bias (last pivot was a higher low)
🔹 Optional extension of pivot levels to the right of the chart for support/resistance confluence.
⚙️ How to Use:
Adjust the Left Bars and Right Bars inputs to fine-tune how swings are defined.
Look for price reacting near the Upper or Lower 25% zones to anticipate mean reversion or breakout setups.
Use the trend color of the table to confirm directional bias, especially useful during consolidation or retracement periods.
💡 Best For:
Intraday or short-term swing traders
Traders who use market structure, support/resistance, or trend-based strategies
Those looking to avoid low-quality trades in tight ranges
✅ Built for overlay use on price charts
📈 Works on all symbols and timeframes
🧠 No repainting — pivots are confirmed with completed bars
RSI Cảnh Báo Vùng 20/80 by TTVRSI 8 tín hiệu B khi đạt 20 và Sell khi đạt 80, có thể cài đặt khi đạt đến ngưỡng này
MA Deviationインジケーター名: MA乖離率インジケーター / MA Deviation Indicator
📖 説明(日本語)
このインジケーターは、3本の移動平均線(MA)の乖離率を視覚化し、相場の過熱感やトレンドの強さを判定するためのツールです。
✅ 主な機能
複数の移動平均タイプに対応:SMA, EMA, WMA, RMA, VWMA, HMAから選択可能。
最大3本の移動平均を自由に設定可能。
それぞれのMA間の乖離率(%)をチャートにプロット。
指定した閾値を超えた時に背景色を表示(緑=乖離が正方向に大きい、赤=負方向に大きい)。
データウィンドウ上で「背景表示フラグ」も確認可能(サインが出ているかどうかが数値で確認できます)。
⚠️ 注意事項
乖離率は過去の価格と比較したものであり、将来の価格を保証するものではありません。
短期トレードよりも、トレンドの強弱や過熱感の把握に適しています。
複数のMAを使用しない場合でも、背景色は他の設定されたMAペアで判定されることにご注意ください。
📖 Description (English)
This indicator visualizes the percentage deviation between up to 3 configurable moving averages (MA), helping traders assess trend momentum and potential overextension.
✅ Key Features
Supports multiple MA types: Choose from SMA, EMA, WMA, RMA, VWMA, and HMA.
Set up to 3 custom MAs with different periods.
Plots the deviation (%) between each pair of selected MAs.
Background color highlights extreme deviations (green = strong positive deviation, red = strong negative deviation).
Data Window flag (1 or 0) shows whether background highlight is active.
⚠️ Notes
Deviation percentages are not predictive, but useful for identifying trend strength or market overheating.
Especially useful for trend analysis, not for exact entry signals.
Even if not all lines are shown, the background color may still appear based on the enabled MA comparisons.
Price Extension from 8 EMAOverview
This indicator can be used to see how far away the price is from the 8 EMA. It compares this to the Average Daily Range % to see if the stock may be overextended. The "Extension Multiplier" represents how far the stock is extended away from the 8 EMA.
Core Concept
This indicator is best used for breakout trades that are trying to make sure they are not chasing the stock.
How to Use This Indicator
This tool is primarily intended for analyzing daily charts of individual stocks and is often used by breakout traders to evaluate potential entry areas.
If the stock is far away from the 8 EMA, it is likely not ready to break out. If it is close to the 8ema, it could be ready to move higher.
This indicator can also be used in the opposite way. For example, shorting or puts.
Understanding the colors
Green (Not Extended): Indicates the price is close to the 8 EMA. This often corresponds to periods of consolidation.
Yellow (Slightly Extended): The price is beginning to move away from the 8 EMA.
Orange (Extended): The price has moved a considerable distance from the 8 EMA.
Red (Very Extended): The price is at an extreme distance from the 8 EMA, historically increasing the likelihood of a pullback or consolidation.
Settings
Info Row Position: Adjusts the vertical position of the display table on the chart. Useful when using other indicators.
ADR Length: Sets the lookback period for calculating the Average Daily Range. Or the average range % for different timeframes.
Timeframe: Determines the timeframe for the EMA and ADR calculation (the default is Daily).
BTCs RSI Dip & EMA Crossover AlertThis indicator helps you catch potential reversal opportunities after a stock or crypto asset becomes oversold.
🛠 How it works:
Watches RSI (Relative Strength Index)
First, it waits for RSI to dip below a level you choose (default is 30), which often signals the asset is oversold and due for a bounce.
Waits for Price Confirmation
After the RSI dip, the indicator watches for the first time price closes above both the 55 EMA and 200 EMA — a strong sign that momentum may be shifting upward.
Sends a “Buy” Signal
When that happens, the script:
Plots a green “Buy” label on the chart
Triggers an alert (labeled "Buy Indicator") so you’re notified immediately
⚙️ Customizable Inputs:
RSI threshold (e.g. 30 or 25)
RSI period (e.g. 14)
EMA lengths (default: 55 and 200)
✅ Designed to:
Avoid false signals by requiring both RSI weakness and price strength
Only trigger once per RSI dip, so you’re not spammed with repeat alerts
Use it to stay patient during downtrends and get alerted when the technicals show a possible turnaround. Great for swing traders and longer-term entries.
Previous Day High/Low with Labelsprevious day range, moving averages editable and with notes to add to the screen