Price Difference Between Two Correlated Symbols//@version=5
indicator("Price Difference Between Two Symbols", overlay=true)
// === User Inputs ===
symbol1 = input.symbol("Pepperstone:US500", "Symbol 1")
symbol2 = input.symbol("CME_MINI:ES1!", "Symbol 2")
tf = input.timeframe("", "Resolution (leave blank to use chart TF)")
// === Price Feeds ===
price1 = request.security(symbol1, tf == "" ? timeframe.period : tf, close)
price2 = request.security(symbol2, tf == "" ? timeframe.period : tf, close)
// === Difference Calculation ===
difference = price1 - price2
// === Plotting ===
plot(difference, title="Price Difference", color=color.new(color.teal, 0), linewidth=2)
hline(0, "Zero Line", color=color.gray, linestyle=hline.style_dotted)
// === Debug Info (Optional) ===
// label.new(bar_index, na, text="Price1: " + str.tostring(price1) + " Price2: " + str.tostring(price2), style=label.style_label_left, yloc=yloc.abovebar)
Chỉ báo và chiến lược
Luxy trend & Momentum Indicators Suit V2Luxy Trend & Momentum Indicator Suite V2
The Luxy Trend & Momentum Suite V2 is a multi-purpose technical analysis tool designed to help traders quickly identify high-probability trend-following and momentum-based entries across timeframes.
Built by Oren Luxy, this tool combines the most battle-tested market filters (EMAs, VWAP, MACD, ZLSMA, Supertrend, UT Bot, Volume/ADX/RSI filters) into a unified signal framework — backed by an optional Bias Table that displays alignment across methods and timeframes.
---
BACKGROUND — ABOUT THIS METHOD
This Indicators Suite is based on momentum-trend alignment , a trading methodology that:
* Confirms trend structure using moving averages (EMA crossovers & price vs EMA-200),
* Validates trend strength using MACD separation, volume pressure, and ADX confirmation,
* Confirms timing using momentum oscillators (RSI pullbacks), VWAP positioning, and trend filters,
* Optionally delays entries using the UT Bot trailing confirmation or Supertrend .
It's a multi-layered filtering helps reduce false signals, especially in choppy conditions.
USAGE
This indicator is best suited for:
Intraday trend trading (scalping or day trading),
Swing trading based on HTF confirmation (1D/1W),
Combining bias + technical signal + volume + price context for cleaner entries.
It is especially powerful on assets with well-defined structure (e.g., crypto, indices, high-volume stocks).
Signal Labels
The script plots `LONG` (green) or `SHORT` (red) labels when all your configured filters align.
✅ To use these labels effectively:
Only take LONG signals when the bias table shows green (`BULLISH`),
Only take SHORT when the bias table shows red (`BEARISH`),
Avoid signals on NEUTRAL bias (gray), or consider smaller positions.
Bias Table Panel
The indicator features a compact Bias summary table , showing the current directional bias from:
Timeframe trends** (1H, 4H, 1D)
Indicator states (EMA cross, EMA200, VWAP, MACD, ZLSMA, UT Bot, Supertrend
)
Each cell is color-coded:
🟢 Green = Bullish
🔴 Red = Bearish
⚪ Gray = Neutral
Trend Filters
These are the primary trend components:
EMA Short vs Long : Fast/Slow structure
EMA-200 : Long-term bias
ZLSMA : Zero-lag regression slope
Supertrend : Dynamic trendline with noise-filtering
UT Bot : ATR-based trailing signal with optional filters (swing, %change, delay)
Momentum & Entry Filters
The indicator offers several modular filters to refine entry signals:
✅ MACD Separation : Requires a minimum spread between MACD and Signal line (adjustable in ATR units).
✅ VWAP Filter : Confirms that price is above/below anchored VWAP.
✅ RSI Pullback Zone : Only triggers signals when RSI is between configured pullback ranges.
✅ Volume Strength : Only confirms signals when current volume is above SMA × factor (e.g. 1.2×).
✅ ADX/DI Filter : Enforces trend strength requirements based on ADX, DI+ and DI-.
RECOMMENDED WORKFLOWS
🔹 Intraday Trend Trading
Primary TF: `1H`
Confirmation: `4H`
Bias method: EMA(20/50) or ZLSMA
Lookback: 5 bars
VWAP: Session anchor
UT Bot: Enabled with 1.3 sensitivity, ATR=10
🔹 Swing Trading
Primary TF: `1D`
Confirmation: `1W`
Bias method: EMA(20/50) or MACD
Lookback: 10–20
VWAP: Weekly or Monthly
UT Bot: Disabled or conservative (1.7 key, ATR=14)
🔹 Position Trading
Primary: `1W`
Confirmation: `1M`
Bias method: EMA(50/200)
Filters: Strong MACD + Volume + ADX
UT: Disabled
SETTINGS
You can customize:
All EMA lengths (short, long, very long)
MACD periods and buffer thresholds
VWAP anchor and bands mode (Std Dev or %)
ZLSMA length and offset
UT Bot sensitivity, ATR, and filters
Supertrend ATR logic and neutral bars
Volume, ADX, RSI, and Donchian breakouts
Table text size, position, and visibility
Each input includes tooltips with suggested ranges and explanations.
🔶 LIMITATIONS
This is an **indicator**, not a strategy. It does **not place orders**.
UT Bot and Bias alignment work better on assets with structure and volume.
Repainting is avoided by using bar close logic where possible.
Corporate-event VWAPs (Earnings, Dividends) depend on data availability.
Always backtest , adjust filters per asset, and confirm entries with price action and context.
📧 Feedback & improvement requests:
ZLEMA Trend Index 2.0ZTI — ZLEMA Trend Index 2.0 (0–1000)
Overview
Price Mapped ZTI v2.0 - Enhanced Zero-Lag Trend Index.
This indicator is a significant upgrade to the original ZTI v1.0, featuring enhanced resolution from 0-100 to 0-1000 levels for dramatically improved price action accuracy. The Price Mapped ZTI uses direct price-to-level mapping to eliminate statistical noise and provide true proportional representation of market movements.
Key Innovation: Instead of statistical normalization, this version maps current price position within a user-defined lookback period directly to the ZTI scale, ensuring perfect correlation with actual price movements. I believe this is the best way to capture trends instead of directly on the charts using a plethora of indicators which introduces bad signals resulting in drawdowns. The RSI-like ZTI overbought and oversold lines filter valid trends by slicing through the current trading zone. Unlike RSI that can introduce false signals, the ZTI levels 1 to 1000 is faithfully mapped to the lowest to highest price in the current trading zone (lookback period in days) which can be changed in the settings. The ZTI line will never go off the beyond the ZTI levels in case of extreme trend continuation as the trading zone is constantly updated to reflect only the most recent bars based on lookback days.
Core Features
✅ 10x Higher Resolution - 0-1000 scale provides granular movement detection
✅ Adjustable Trading Zone - Customizable lookback period from 1-50 days
✅ Price-Proportional Mapping - Direct correlation between price position and ZTI level
✅ Zero Statistical Lag - No rolling averages or standard deviation calculations
✅ Multi-Strategy Adaptability - Single parameter adjustment for different trading styles
Trading Zone Optimization
📊 Lookback Period Strategies
Short-term (1-3 days):
Ultra-responsive to recent price action
Perfect for scalping and day trading
Tight range produces more sensitive signals
Medium-term (7-14 days):
Balanced view of recent trading range
Ideal for swing trading
Captures meaningful support/resistance levels
Long-term (21-30 days):
Broader market context
Excellent for position trading
Smooths out short-term market noise
⚡ Market Condition Adaptation
Volatile Markets: Use shorter lookback (3-5 days) for tighter ranges
Trending Markets: Use longer lookback (14-21 days) for broader context
Ranging Markets: Use medium lookback (7-10 days) for clear boundaries
🎯 Timeframe Optimization
1-minute charts: 1-2 day lookback
5-minute charts: 2-5 day lookback
Hourly charts: 7-14 day lookback
Daily charts: 21-50 day lookback
Trading Applications
Scalping Setup (2-day lookback):
Super tight range for quick reversals
ZTI 800+ = immediate short opportunity
ZTI 200- = immediate long opportunity
Swing Trading Setup (10-day lookback):
Meaningful swing levels captured
ZTI extremes = high-probability reversal zones
More stable signals, reduced whipsaws
Advanced Usage
🔧 Real-Time Adaptability
Trending days: Increase to 14+ days for broader perspective
Range-bound days: Decrease to 3 days for tighter signals
High volatility: Shorter lookback for responsiveness
Low volatility: Longer lookback to avoid false signals
💡 Multi-Timeframe Approach
Entry signals: Use 7-day ZTI on main timeframe
Trend confirmation: Use 21-day ZTI on higher timeframe
Exit timing: Use 3-day ZTI for precise exits
🌐 Session Optimization
Asian session: Shorter lookback (3-5 days) for range-bound conditions
London/NY session: Longer lookback (7-14 days) for trending conditions
How It Works
The indicator maps the current price position within the specified lookback period directly to a 0-1000 scale and plots it using ZLEMA (Zero Lag Exponential Moving Average) which has the least lag of the available popular moving averages:
Price at recent high = ZTI at 1000
Price at recent low = ZTI at 1
Price at mid-range = ZTI at 500
This creates perfect proportional representation where every price movement translates directly to corresponding ZTI movement, eliminating the false signals common in traditional oscillators.
This single, versatile indicator adapts to any market condition, timeframe, or trading style through one simple parameter adjustment, making it an essential tool for traders at every level.
Credits
ZLEMA techniques widely attributed to John Ehlers.
Disclaimer
This tool is for educational purposes only and is not financial advice. Backtest and forward‑test before live use, and always manage risk.
Please note that I set this as closed source to prevent source code cloning by others, repackaging and republishing which results in multiple confusing choices of the same indicator.
Reversal with Buy/Sell Signal from QuantVuemodification script from QuantVue with target TP/SL.
additional filter EMA 9 & wick.
Day Label-WeeklyProfile-AdrianFx94This indicator is designed for Daily charts.
It writes a small label (like “L, M, G, V”) inside each candle’s body, exactly in the middle between the open and close.
Each label tells you which weekday closed that candle:
L → Monday
M → Tuesday
M/ME → Wednesday
G → Thursday
V → Friday
(Saturday and Sunday aren’t marked.)
Why it’s useful
It gives you a quick visual map of the week’s progression, day by day.
You immediately see the sequence of daily closes inside a week.
You can spot when the market trended cleanly through the week (labels step up or down neatly).
You notice when there’s choppy or balanced behavior (labels are mixed, up and down).
You can identify which day was the turning point or initiative day (a single label much higher or lower than the rest).
It’s a simple way to read the weekly profile of price action without having to remember which candle is which day.
Controls you have
You can change the letters (for example, instead of “L” you could write “Mo”).
You can change the text size, color, and add a background.
You can choose to show:
All weeks
Only this week
Only last week
That helps when you want to focus on a single week’s structure.
Important notes
It only works on Daily charts. On smaller timeframes it will just warn you.
The label sticks to the candle’s body, so even if you zoom or pan, it stays anchored where that day closed.
It’s not a volume profile or TPO — it’s purely about the closing position of each day.
👉 In short: this indicator is like a weekly diary on your chart — each candle is marked with the day of the week, so you can quickly analyze how the market behaved across past weeks, which days carried strength, and where momentum shifted.
This indicator shows a short label for each weekday directly inside the daily candle.
The nice part is: you can choose the letters yourself.
For example, if you are Italian, you might want:
Monday → L (Lunedì)
Tuesday → M (Martedì)
Wednesday → ME (Mercoledì)
Thursday → G (Giovedì)
Friday → V (Venerdì)
If you prefer English, you could set:
Monday → M
Tuesday → T
Wednesday → W
Thursday → Th
Friday → F
If you want very short codes, you could just write 1, 2, 3, 4, 5.
So the indicator is language-neutral — you adapt it to your country, your style, or even your personal system of marks.
Majoak - Multi-Timeframe SMA Viewer V2.0This Indicator will allow you to see different time frame SMA on the time frame you are on in order to help you spot support and resistance levels. Enjoy!!!
支撑带User Guide
Trend Filter:
When price stays above both lines ⇒ primary trend is bullish;
when price stays below both lines ⇒ primary trend is bearish.
Buy-the-pullback to the band (strong trend):
During an uptrend, if price pulls back into the “support band” (between the two lines or slightly below) and shows a stabilization candle/volume confirmation, consider a probing long.
Sell-the-rebound to the band (weak trend):
During a downtrend, if price rebounds into the “support band” and fails to break through, with weakening candles, consider a trend-following short.
In-band consolidation:
If price oscillates between the two lines, treat it as a consolidation/rotation zone. Reduce chase trades and wait for a clean exit above/below the band.
Strength/Weakness Transition Watchpoints:
A first close breaking above/below the “support band” and holding for ≥ 3 bars increases reliability.
When the two lines expand in the same direction (widening distance), trends tend to be cleaner; when they converge, a reversal or choppier action may be near.
使用说明:
趋势过滤:价格整体在两线之上 ⇒ 大趋势偏强;整体在两线之下 ⇒ 大趋势偏弱。
回踩带买(强势行情):上涨途中回落至“支撑带”区域(两线之间或略下探)出现止跌K/量能配合,可考虑试探性做多。
反抽带空(弱势行情):下跌途中反弹触“支撑带”不破、转弱K线出现,可考虑顺势做空。
带内震荡:价格在两线间来回切换,视作整理/换手区,减少追单冲动,等待带上/下的有效离开。
强弱切换关注点:
首次收盘突破/跌破“支撑带”并能维持 ≥3根K,可信度提升。
两线“同向发散”(距离拉大)时,趋势更干脆;“收敛”时,可能接近转折或震荡加剧。
交易节奏建议
入场:等价格触带后出现确认信号(例如:形态反转、关键K线、震荡指标),而不是盲目摸带。
止损:放在“支撑带”另一侧或最近 swing 点外侧(别卡点,一点点空间给波动)。
止盈:分批落袋 + 移动止损。沿带奔跑的趋势,别一次吃干抹净,留点给行情发挥。
错峰加仓:顺势时允许在带附近“阶梯加仓”,但每次加仓都要收紧总体风险。
多周期联动(强烈推荐):
上位周期(W/M)判定方向;
交易周期(H4/D)执行;
只有当交易周期与上位周期的“支撑带”方向一致时,信号才加分。反向就降级看待。
适配品种与周期:
黄金/XAU、期金/期权标的均可用;
趋势型周期H4以上级别体验最佳;超短周期噪音多,带内来回“抽耳光”的几率上升。
与其它工具的“配套打法:
价量/结构:在带附近结合关键高低点、缺口、成交密集区做确认。
风控仪表:配合ATR等指标决定止损距离与仓位。
节奏日:非农、CPI 等高波动日,宁肯等确认,也别在带上“硬扛”。以上翻译成英文。
BX动能概述
BX动能是一个多维度技术分析指标,它通过结合RSI(相对强弱指数)和EMA(指数移动平均线)的双重计算,创造出独特的动量振荡器,帮助交易者识别市场趋势强度和潜在转折点。
核心组件
1. 短期振荡器 (Short-Term Oscillator)
计算方式:使用两个不同周期的EMA差值作为RSI的输入源
参数设置:
短期EMA1:默认5周期
短期EMA2:默认20周期
RSI周期:默认15周期
功能:捕捉短期市场动量变化,提供及时的交易信号
2. 长期趋势指标 (Long-Term Trend Indicator)
计算方式:直接对EMA应用RSI计算
参数设置:
EMA周期:默认20周期
RSI周期:默认15周期
功能:识别市场中长期趋势方向
3. T3平滑线
计算方式:使用六重EMA和特殊系数计算的T3平均线
功能:对短期振荡器进行平滑处理,减少虚假信号
视觉显示
柱状图部分
绿色柱体:正向动量,市场看涨
深绿色柱体:正向但减弱的动量
红色柱体:负向动量,市场看跌
深红色柱体:负向但减弱的动量
信号点
绿色圆圈:短期平滑线由降转升,潜在买入信号
红色圆圈:短期平滑线由升转降,潜在卖出信号
趋势线
半透明柱状图:长期趋势强度可视化
双色线条:黑色外框与内部彩色线条结合,清晰显示趋势方向
应用场景
趋势识别:通过长期趋势指标判断市场主要方向
入场时机:结合短期振荡器和信号点寻找最佳入场点
动量确认:通过柱状图颜色变化确认动量强度
过滤虚假信号:使用T3平滑线减少市场噪音干扰
使用建议
趋势跟踪:当长期趋势指标持续向上且短期振荡器显示绿色柱体时,考虑做多
反转预警:当长期趋势线与短期振荡器出现背离时,警惕可能的方向转变
结合其他指标:建议与成交量指标或支撑阻力位结合使用,提高信号可靠性
注意事项
该指标适用于各种时间框架,但参数可能需要根据不同市场环境调整
在震荡市中可能会出现较多虚假信号,建议结合波动率指标使用
如同所有技术指标,B-Xtrender不应作为唯一决策依据,需结合整体市场分析
B-Xtrender指标通过多层次的市场动量分析,为交易者提供了全面的趋势视角,特别适合喜欢结合动量和趋势分析的交易策略。
Overview
BX is a multi-dimensional momentum oscillator that combines RSI and EMA calculations to identify trend strength and potential reversal points.
Key Components
Short-Term Oscillator
Calculates RSI of the difference between two EMAs (5 & 20 periods)
Shows immediate momentum shifts with color-coded columns
Long-Term Trend Indicator
Applies RSI directly to EMA (20 periods)
Identifies overall market trend direction
T3 Smoothing Line
Uses triple-smoothed EMA to filter noise
Provides cleaner signals with circle markers for reversals
Visual Features
Green/Red Columns: Bullish/Bearish momentum strength
Colored Lines: Trend direction with transparency
Circle Markers: Potential reversal signals
Best For
Trend identification and confirmation
Momentum-based entry/exit timing
Multi-timeframe analysis
Usage Tip
Combine with volume indicators for enhanced signal reliability across all market conditions.
Advanced Liquidation [DR 966]The Advanced Liquidation HeatMap is a next-generation indicator designed to visualize liquidity zones and liquidation areas directly on the chart. It combines multiple layers of market intelligence to help traders spot hidden risks and opportunities.
🔹 Key Features:
Dynamic detection of high / medium / low liquidity zones
Hidden liquidity detection using volume and price-range anomalies
Stop Hunt analysis to uncover false breakouts and liquidity grabs
Smart Money tracking to highlight accumulation vs. distribution phases
Simplified machine-learning based pattern analysis to forecast directional bias
Fully adaptive Dark / Light theme for seamless integration with any chart style
Interactive analysis table summarizing real-time signals and strength levels
Auto-extending support/resistance zones that react to price action
🔹 Practical Use:
This indicator helps traders identify liquidity pools, anticipate potential stop hunts, and monitor institutional flows, providing a sharper edge in market decision-making.
📌 Follow me for more updates:
Twitter: @HZBR_AL
Telegram: @dr_basl
Elite Pivot Points - 3 time frameElite Pivot Points — Multi-timeframe pivots (A/B/C)
Overview
Elite Pivot Points plots up to three pivot frameworks at once on the same chart. Choose the calculation type (Traditional, Fibonacci, Woodie, Classic, Camarilla), pick an independent timeframe for each set (Auto, Daily → Decennially), and set separate colors/visibility for P, S1–S5, and R1–R5. Labels can include prices and the resolved timeframe name (e.g., “Weekly”, “Quarterly”, or “Auto Monthly”).
What’s new in this edition
Adds the ability to display three selectable pivot timeframes simultaneously.
Each timeframe has its own color controls for all levels.
Labels show the chosen timeframe name for clarity.
The original pivot logic/structure remains unchanged.
How it works
Levels are computed using standard formulas for the selected type.
While a higher-timeframe period is open, the current period’s levels can update until that candle closes; historical periods are fixed after close.
Auto picks a source timeframe based on your chart (intraday → Daily/Weekly; weekly/monthly → Yearly by design).
Use Daily-based Values (optional) calculates from the exchange’s daily OHLC on intraday charts (if extended hours are shown, they’re included). Turning it off uses intraday data directly—results can differ by instrument.
Key inputs
Type: Traditional, Fibonacci, Woodie, Classic, Camarilla.
Timeframe A/B/C: Auto, Daily, Weekly, Biweekly, Monthly, Bimonthly, Quarterly, Biquarterly, Yearly, Biyearly, Triyearly, Quinquennially, Decennially.
Show Timeframe A/B/C: Toggle each set on/off.
Number of Pivots Back (per set): How many historical pivot periods to draw.
Use Daily-based Values (per set): Daily OHLC vs. intraday source.
Labels: Show/hide labels and/or prices; choose left/right placement.
Colors & Widths: Independent colors for P, S1–S5, R1–R5 per set; shared line width.
What it draws
Central pivot (P) plus up to five support (S1–S5) and five resistance (R1–R5) levels per selected timeframe.
Label text shows the level and the timeframe name (e.g., R2 (Quarterly)).
Notes & limitations
This is a charting tool, not a signal service; it does not generate trade recommendations.
Current-period levels on higher timeframes may shift until the source period closes.
On symbols where intraday vs. daily OHLC differ (common for stocks), enabling/disabling Use Daily-based Values will intentionally produce different levels.
Best practices
Combine three distinct horizons (e.g., Weekly + Monthly + Quarterly) for multi-frame confluence.
If the chart gets crowded, hide S4/S5 and R4/R5 or reduce Pivots Back.
Align your chart’s session/extended-hours settings with how you compute pivots.
Credits & permission
Original indicator by @TboneKrypto (closed-source). This edition is published with the author’s permission. It expands display options to three independent pivot timeframes with per-set colors while keeping the original logic intact. No affiliation or endorsement implied.
Disclaimer
For educational purposes only. This is not financial advice or a solicitation to buy or sell any asset. Trading involves risk. Always do your own research and manage risk appropriately.
3Signal Strategy+// This source code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org
// Script combining Support Resistance Strategy and Buy/Sell Filter with 3 Moving Averages 3Signal Strategy+ by InteliCryptos
//@version=6
indicator("3Signal Strategy+", overlay=true, max_lines_count=500)
// ====== Inputs Section ======
// HHLL Strategy Inputs
lb = input.int(3, title="Support HL", minval=1)
rb = input.int(4, title="Resistance LH", minval=1)
showsupres = input.bool(true, title="Support/Resistance", inline="srcol")
supcol = input.color(color.red, title="", inline="srcol")
rescol = input.color(color.lime, title="", inline="srcol")
srlinestyle = input.string("solid", title="Line Style", options= , inline="style")
srlinewidth = input.int(1, title="Line Width", minval=1, maxval=5, inline="style")
changebarcol = input.bool(true, title="Change Bar Color", inline="bcol")
bcolup = input.color(color.yellow, title="", inline="bcol")
bcoldn = input.color(color.black, title="", inline="bcol")
// Twin Range Filter Inputs
source = input(close, title="Source")
per1 = input.int(27, minval=1, title="Fast Period")
mult1 = input.float(1.6, minval=0.1, title="Fast Range")
per2 = input.int(55, minval=1, title="Slow Period")
mult2 = input.float(2, minval=0.1, title="Slow Range")
// Moving Average Inputs
ma_type1 = input.string("EMA", "MA 1 Type (Fast)", options= , group="Moving Averages")
ma_length1 = input.int(12, "MA 1 Length", minval=1, group="Moving Averages")
ma_color1 = input.color(color.blue, "MA 1 Color", group="Moving Averages")
ma_type2 = input.string("EMA", "MA 2 Type (Medium)", options= , group="Moving Averages")
ma_length2 = input.int(50, "MA 2 Length", minval=1, group="Moving Averages")
ma_color2 = input.color(color.yellow, "MA 2 Color", group="Moving Averages")
ma_type3 = input.string("EMA", "MA 3 Type (Slow)", options= , group="Moving Averages")
ma_length3 = input.int(200, "MA 3 Length", minval=1, group="Moving Averages")
ma_color3 = input.color(color.purple, "MA 3 Color", group="Moving Averages")
ma_timeframe = input.string("", "MA Timeframe (e.g., 1m, 5m, 1H, D)", group="Moving Averages")
// ====== HHLL Strategy Logic ======
ph = ta.pivothigh(lb, rb)
pl = ta.pivotlow(lb, rb)
hl = not na(ph) ? 1 : not na(pl) ? -1 : na
zz = not na(ph) ? ph : not na(pl) ? pl : na
// Boolean conditions for ta.valuewhen
is_hl_minus1 = hl == -1
is_hl_plus1 = hl == 1
is_zz_valid = not na(zz)
prev_hl = ta.valuewhen(is_hl_minus1 or is_hl_plus1, hl, 1)
prev_zz = ta.valuewhen(is_zz_valid, zz, 1)
zz := not na(pl) and hl == -1 and prev_hl == -1 and pl > prev_zz ? na : zz
zz := not na(ph) and hl == 1 and prev_hl == 1 and ph < prev_zz ? na : zz
hl := hl == -1 and prev_hl == 1 and zz > prev_zz ? na : hl
hl := hl == 1 and prev_hl == -1 and zz < prev_zz ? na : hl
zz := na(hl) ? na : zz
findprevious() =>
ehl = hl == 1 ? -1 : 1
loc1 = 0.0, loc2 = 0.0, loc3 = 0.0, loc4 = 0.0
xx = 0
for x = 1 to 1000
if hl == ehl and not na(zz )
loc1 := zz
xx := x + 1
break
ehl := hl
for x = xx to 1000
if hl == ehl and not na(zz )
loc2 := zz
xx := x + 1
break
ehl := hl == 1 ? -1 : 1
for x = xx to 1000
if hl == ehl and not na(zz )
loc3 := zz
xx := x + 1
break
ehl := hl
for x = xx to 1000
if hl == ehl and not na(zz )
loc4 := zz
break
// Calling findprevious on each bar
= findprevious()
var float a = na
var float b = na
var float c = na
var float d = na
var float e = na
if not na(hl)
a := zz
b := loc1
c := loc2
d := loc3
e := loc4
// ====== Twin Range Filter Logic ======
smoothrng(x, t, m) =>
wper = t * 2 - 1
avrng = ta.ema(math.abs(x - x ), t)
smoothrng = ta.ema(avrng, wper) * m
smoothrng
smrng1 = smoothrng(source, per1, mult1)
smrng2 = smoothrng(source, per2, mult2)
smrng = (smrng1 + smrng2) / 2
rngfilt(x, r) =>
var float rngfilt = x
rngfilt := x > nz(rngfilt ) ? (x - r < nz(rngfilt ) ? nz(rngfilt ) : x - r) :
(x + r > nz(rngfilt ) ? nz(rngfilt ) : x + r)
rngfilt
filt = rngfilt(source, smrng)
var float upward = 0.0
var float downward = 0.0
upward := filt > filt ? nz(upward ) + 1 : filt < filt ? 0 : nz(upward )
downward := filt < filt ? nz(downward ) + 1 : filt > filt ? 0 : nz(downward )
// ====== Moving Average Logic ======
ma_source = ma_timeframe == "" ? close : request.security(syminfo.tickerid, ma_timeframe, close, lookahead=barmerge.lookahead_on)
ma1 = ma_type1 == "EMA" ? ta.ema(ma_source, ma_length1) :
ma_type1 == "SMA" ? ta.sma(ma_source, ma_length1) :
ta.wma(ma_source, ma_length1)
ma2 = ma_type2 == "EMA" ? ta.ema(ma_source, ma_length2) :
ma_type2 == "SMA" ? ta.sma(ma_source, ma_length2) :
ta.wma(ma_source, ma_length2)
ma3 = ma_type3 == "EMA" ? ta.ema(ma_source, ma_length3) :
ma_type3 == "SMA" ? ta.sma(ma_source, ma_length3) :
ta.wma(ma_source, ma_length3)
// ====== Combined Strategy Conditions ======
_hh = not na(zz) and (a > b and a > c and c > b and c > d)
_ll = not na(zz) and (a < b and a < c and c < b and c < d)
_hl = not na(zz) and ((a >= c and (b > c and b > d and d > c and d > e)) or (a < b and a > c and b < d))
_lh = not na(zz) and ((a <= c and (b < c and b < d and d < c and d < e)) or (a > b and a < c and b > d))
hband = filt + smrng
lband = filt - smrng
longCond = source > filt and source > source and upward > 0 or source > filt and source < source and upward > 0
shortCond = source < filt and source < source and downward > 0 or source < filt and source > source and downward > 0
var int CondIni = 0
CondIni := longCond ? 1 : shortCond ? -1 : nz(CondIni )
long = longCond and CondIni == -1
short = shortCond and CondIni == 1
// ====== Plotting Section ======
var float res = na
var float sup = na
res := _lh ? zz : res
sup := _hl ? zz : sup
var int trend = na
trend := close > res ? 1 : close < sup ? -1 : nz(trend )
res := (trend == 1 and _hh) or (trend == -1 and _lh) ? zz : res
sup := (trend == 1 and _hl) or (trend == -1 and _ll) ? zz : sup
rechange = res != res
suchange = sup != sup
var line resline = na
var line supline = na
if showsupres
if rechange
line.set_x2(resline, bar_index)
line.set_extend(id=resline, extend=extend.none)
resline := line.new(bar_index - rb, res, bar_index, res, color=rescol, extend=extend.right, style=srlinestyle == "solid" ? line.style_solid : srlinestyle == "dashed" ? line.style_dashed : line.style_dotted, width=srlinewidth)
if suchange
line.set_x2(supline, bar_index)
line.set_extend(id=supline, extend=extend.none)
supline := line.new(bar_index - rb, sup, bar_index, sup, color=supcol, extend=extend.right, style=srlinestyle == "solid" ? line.style_solid : srlinestyle == "dashed" ? line.style_dashed : line.style_dotted, width=srlinewidth)
// Plot HHLL signals
plotshape(_hl, text="HL", title="Higher Low", style=shape.labelup, color=color.lime, textcolor=color.black, location=location.belowbar, offset=-rb)
plotshape(_hh, text="HH", title="Higher High", style=shape.labeldown, color=color.lime, textcolor=color.black, location=location.abovebar, offset=-rb)
plotshape(_ll, text="LL", title="Lower Low", style=shape.labelup, color=color.red, textcolor=color.white, location=location.belowbar, offset=-rb)
plotshape(_lh, text="LH", title="Lower High", style=shape.labeldown, color=color.red, textcolor=color.white, location=location.abovebar, offset=-rb)
// Plot Range Filter signals
plotshape(long, title="Long", text="Long", style=shape.labelup, textcolor=color.black, size=size.tiny, location=location.belowbar, color=color.new(color.lime, 0))
plotshape(short, title="Short", text="Short", style=shape.labeldown, textcolor=color.white, size=size.tiny, location=location.abovebar, color=color.new(color.red, 0))
// Plot Moving Averages
plot(ma1, title="MA Fast (12)", color=ma_color1, linewidth=2)
plot(ma2, title="MA Medium (50)", color=ma_color2, linewidth=2)
plot(ma3, title="MA Slow (200)", color=ma_color3, linewidth=2)
barcolor(changebarcol ? (trend == 1 ? bcolup : bcoldn) : na)
// ====== Alerts Section ======
alertcondition(long, title="Long", message="Long")
alertcondition(short, title="Short", message="Short")
RVM LLS Indicator and Low cheat Set upLow cheat set up. The indicator helps for a low stop loss entry. Risk reward should be well managed. Use it at your own risk. Enjoy.
EMA TrendThis indicator plots a customizable Exponential Moving Average (EMA) and colors the candles based on its trend direction.
Green candles = EMA is rising (bullish trend)
Red candles = EMA is falling (bearish trend)
Gray candles = EMA is flat/neutral
This helps traders quickly visualize market momentum and trend shifts without clutter. Works well on all timeframes and instruments.
K線虛擬幣// This source code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org
// © dear.simpson
//@version=5
indicator("月季線視覺操盤", "", true)
// Getting inputs
length = input(5, "操盤線週期")
// Calculating
ma = ta.sma(close, length)
spread = close-ma
// Plotcandle
plotcandle(open, high, low, close, title='操盤K線', editable = false , display =display.pane+display.price_scale , color = (spread>=0 ? #ef5350 : #26a69a) , bordercolor= (spread>=0 ? #ef5350 : #26a69a) , wickcolor = #5d606b)
// Getting inputs
maPeriods1 = input( 5 , "MA 1" , group="移動平均線")
maPeriods2 = input(20 , "MA 2" , group="移動平均線")
maPeriods3 = input(60 , "MA 3" , group="移動平均線")
line0 = ta.sma(close, 2)
line1 = ta.sma(close, maPeriods1)
line2 = ta.sma(close, maPeriods2)
line3 = ta.sma(close, maPeriods3)
// Plot Moving Average Line
p0PlotID = plot(line0 ,"MA 0" , color.new(color.black ,100), display = display.none , editable = false)
p1PlotID = plot(line1 ,"MA 1" , color.new(#787b86, 50), display = display.pane+display.price_scale )
p2PlotID = plot(line2 ,"MA 2" , color.new(#787b86, 0), display = display.pane+display.price_scale )
p3PlotID = plot(line3 ,"MA 3" , color.new(color.blue , 30), display = display.pane+display.price_scale )
// Plot Zone Color
fill(p0PlotID, p2PlotID, close > line2 ? color.new(#ef5350, 70) : color.new(#26a69a, 90), '高/低於月線區域顏色')
fill(p0PlotID, p3PlotID, close > line3 ? color.new(#ef5350, 70) : color.new(#26a69a, 90), '高/低於季線區域顏色' , display = display.none )