MVWAP 5/21/50 + LWMA 400Moving vwap de 5,21,50 y media movil ponderada de 400
se puede utilizar con cruces
Medie mobili
[TH] กลยุทธ์ SMC หลายกรอบเวลา (V5.2 - M15 Lead)English Explanation
This Pine Script code implements a multi-timeframe trading strategy based on Smart Money Concepts (SMC). It's designed to identify high-probability trading setups by aligning signals across three different timeframes.
The core logic is as follows:
High Timeframe (HTF) - M15: Determines the overall market direction or bias.
Medium Timeframe (MTF) - M5: Identifies potential Points of Interest (POI), such as Order Blocks or Fair Value Gaps, in alignment with the M15 bias.
Low Timeframe (LTF) - Current Chart: Looks for a specific entry trigger within the M5 POI to execute the trade.
Detailed Breakdown
## Part 1: Inputs & Settings
This section allows you to customize the indicator's parameters:
General Settings:
i_pivotLookback: Sets the lookback period for identifying pivot highs and lows on the LTF, which is crucial for finding the Change of Character (CHoCH).
M15 Bias Settings:
i_m15EmaFast / i_m15EmaSlow: These two EMA (Exponential Moving Average) values on the 15-minute chart determine the main trend. A bullish trend is confirmed when the fast EMA is above the slow EMA, and vice-versa for a bearish trend.
M5 Point of Interest (POI) Settings:
i_showM5Fvg / i_showM5Ob: Toggles the visibility of Fair Value Gaps (FVG) and Order Blocks (OB) on the 5-minute chart. These are the zones where the script will look for trading opportunities.
i_maxPois: Limits the number of POI zones drawn on the chart to keep it clean.
LTF Entry Settings:
i_entryMode:
Confirmation: The script waits for a Change of Character (CHoCH) on the LTF (your current chart) after the price enters an M5 POI. A CHoCH is a break of a recent pivot high (for buys) or pivot low (for sells), suggesting a potential reversal. This is the safer entry method.
Aggressive: The script triggers an entry as soon as the price touches the 50% level of the M5 POI, without waiting for a CHoCH. This is higher risk but can provide a better entry price.
i_showChoch: Toggles the visibility of the CHoCH confirmation lines.
Trade Management Settings:
i_tpRatio: Sets the Risk-to-Reward Ratio (RRR) for the Take Profit target. For example, a value of 2.0 means the Take Profit distance will be twice the Stop Loss distance.
i_slMode: (New in V5.2) Provides four different methods to calculate the Stop Loss:
POI Zone (Default): Places the SL at the outer edge of the M5 POI zone.
Last Swing: Places the SL at the most recent LTF swing high/low before the entry.
ATR: Uses the Average True Range (ATR) indicator to set a volatility-based SL.
Previous Candle: Places the SL at the high or low of the candle immediately preceding the entry. This is the tightest and riskiest option.
i_maxHistory: Sets the number of past trades to display on the chart.
## Part 2: Data Types & Variables
This section defines custom data structures (type) to organize information:
Poi: A structure to hold all information related to a single Point of Interest, including its price boundaries, direction (bullish/bearish), and whether it has been mitigated (touched by price).
Trade: A structure to store details for each trade, such as its entry price, SL, TP, result (Win/Loss/Active), and chart objects for drawing.
## Part 3: Core Logic & Calculations
This is the engine of the indicator:
Data Fetching: It uses request.security to pull EMA data from the M15 timeframe and candle data (high, low, open, close) from the M5 timeframe.
POI Identification: The script constantly scans the M5 data for FVG and OB patterns. When a valid pattern is found that aligns with the M15 bias (e.g., a bullish OB during an M15 uptrend), it's stored as a Poi and drawn on the chart.
Entry Trigger:
It checks if the price on the LTF enters a valid (unmitigated) POI zone.
Based on the selected i_entryMode, it either waits for a CHoCH or enters aggressively.
Once an entry condition is met, it calculates the SL based on the i_slMode, calculates the TP using the i_tpRatio, and creates a new Trade.
Trade Monitoring: For every active trade, the script checks on each new bar if the price has hit the SL or TP level. When it does, the trade's result is updated, and the visual boxes are finalized.
## Part 5: On-Screen Display
This part creates the Performance Dashboard table shown on the top-right of the chart. It provides a real-time summary of:
M15 Bias: Current market direction.
Total Trades: The total number of completed trades from the history.
Win Rate: The percentage of winning trades.
Total R-Multiple: The cumulative Risk-to-Reward multiple (sum of RRR from wins minus losses). A positive value indicates overall profitability.
🇹🇭 คำอธิบายและข้อแนะนำภาษาไทย
สคริปต์นี้เป็น Indicator สำหรับกลยุทธ์การเทรดแบบ Smart Money Concepts (SMC) ที่ใช้การวิเคราะห์จากหลายกรอบเวลา (Multi-Timeframe) เพื่อหาจุดเข้าเทรดที่มีความเป็นไปได้สูง
หลักการทำงานของ Indicator มีดังนี้:
Timeframe ใหญ่ (HTF) - M15: ใช้กำหนดทิศทางหลักของตลาด หรือ "Bias"
Timeframe กลาง (MTF) - M5: ใช้หาโซนสำคัญ หรือ "Point of Interest (POI)" เช่น Order Blocks หรือ Fair Value Gaps ที่สอดคล้องกับทิศทางจาก M15
Timeframe เล็ก (LTF) - กราฟปัจจุบัน: ใช้หาสัญญาณยืนยันเพื่อเข้าเทรดในโซน POI ที่กำหนดไว้
รายละเอียดของโค้ด
## ส่วนที่ 1: การตั้งค่า (Inputs & Settings)
ส่วนนี้ให้คุณปรับแต่งค่าต่างๆ ของ Indicator ได้:
การตั้งค่าทั่วไป:
i_pivotLookback: กำหนดระยะเวลาที่ใช้มองหาจุดกลับตัว (Pivot) ใน Timeframe เล็ก (LTF) เพื่อใช้ยืนยันสัญญาณ Change of Character (CHoCH)
การตั้งค่า M15 (ทิศทางหลัก):
i_m15EmaFast / i_m15EmaSlow: ใช้เส้น EMA 2 เส้นบน Timeframe 15 นาที เพื่อกำหนดเทรนด์หลัก หาก EMA เร็วอยู่เหนือ EMA ช้า จะเป็นเทรนด์ขาขึ้น และในทางกลับกัน
การตั้งค่า M5 (จุดสนใจ - POI):
i_showM5Fvg / i_showM5Ob: เปิด/ปิด การแสดงโซน Fair Value Gaps (FVG) และ Order Blocks (OB) บน Timeframe 5 นาที ซึ่งเป็นโซนที่สคริปต์จะใช้หาโอกาสเข้าเทรด
i_maxPois: จำกัดจำนวนโซน POI ที่จะแสดงผลบนหน้าจอ เพื่อไม่ให้กราฟดูรกเกินไป
การตั้งค่า LTF (การเข้าเทรด):
i_entryMode:
ยืนยัน (Confirmation): เป็นโหมดที่ปลอดภัยกว่า โดยสคริปต์จะรอให้เกิดสัญญาณ Change of Character (CHoCH) ใน Timeframe เล็กก่อน หลังจากที่ราคาเข้ามาในโซน POI แล้ว
เชิงรุก (Aggressive): เป็นโหมดที่เสี่ยงกว่า โดยสคริปต์จะเข้าเทรดทันทีที่ราคาแตะระดับ 50% ของโซน POI โดยไม่รอสัญญาณยืนยัน CHoCH
i_showChoch: เปิด/ปิด การแสดงเส้น CHoCH บนกราฟ
การตั้งค่าการจัดการเทรด:
i_tpRatio: กำหนด อัตราส่วนกำไรต่อความเสี่ยง (Risk-to-Reward Ratio) เพื่อตั้งเป้าหมายทำกำไร (Take Profit) เช่น 2.0 หมายถึงระยะทำกำไรจะเป็น 2 เท่าของระยะตัดขาดทุน
i_slMode: (ฟีเจอร์ใหม่ V5.2) มี 4 รูปแบบในการคำนวณ Stop Loss:
โซน POI (ค่าเริ่มต้น): วาง SL ไว้ที่ขอบนอกสุดของโซน POI
Swing ล่าสุด: วาง SL ไว้ที่จุด Swing High/Low ล่าสุดของ Timeframe เล็ก (LTF) ก่อนเข้าเทรด
ATR: ใช้ค่า ATR (Average True Range) เพื่อกำหนด SL ตามระดับความผันผวนของราคา
แท่งเทียนก่อนหน้า: วาง SL ไว้ที่ราคา High/Low ของแท่งเทียนก่อนหน้าที่จะเข้าเทรด เป็นวิธีที่ SL แคบและเสี่ยงที่สุด
i_maxHistory: กำหนดจำนวนประวัติการเทรดที่จะแสดงย้อนหลังบนกราฟ
## ส่วนที่ 2: ประเภทข้อมูลและตัวแปร
ส่วนนี้เป็นการสร้างโครงสร้างข้อมูล (type) เพื่อจัดเก็บข้อมูลให้เป็นระบบ:
Poi: เก็บข้อมูลของโซน POI แต่ละโซน เช่น กรอบราคาบน-ล่าง, ทิศทาง (ขึ้น/ลง) และสถานะว่าถูกใช้งานไปแล้วหรือยัง (Mitigated)
Trade: เก็บรายละเอียดของแต่ละการเทรด เช่น ราคาเข้า, SL, TP, ผลลัพธ์ (Win/Loss/Active) และอ็อบเจกต์สำหรับวาดกล่องบนกราฟ
## ส่วนที่ 3: ตรรกะหลักและการคำนวณ
เป็นหัวใจสำคัญของ Indicator:
ดึงข้อมูลข้าม Timeframe: ใช้ฟังก์ชัน request.security เพื่อดึงข้อมูล EMA จาก M15 และข้อมูลแท่งเทียนจาก M5 มาใช้งาน
ระบุ POI: สคริปต์จะค้นหา FVG และ OB บน M5 ตลอดเวลา หากเจ้ารูปแบบที่สอดคล้องกับทิศทางหลักจาก M15 (เช่น เจอ Bullish OB ในขณะที่ M15 เป็นขาขึ้น) ก็จะวาดโซนนั้นไว้บนกราฟ
เงื่อนไขการเข้าเทรด:
เมื่อราคาใน Timeframe เล็ก (LTF) วิ่งเข้ามาในโซน POI ที่ยังไม่เคยถูกใช้งาน
สคริปต์จะรอสัญญาณตาม i_entryMode ที่เลือกไว้ (รอ CHoCH หรือเข้าแบบ Aggressive)
เมื่อเงื่อนไขครบ จะคำนวณ SL และ TP จากนั้นจึงบันทึกการเทรดใหม่
ติดตามการเทรด: สำหรับเทรดที่ยัง "Active" อยู่ สคริปต์จะคอยตรวจสอบทุกแท่งเทียนว่าราคาไปถึง SL หรือ TP แล้วหรือยัง เมื่อถึงจุดใดจุดหนึ่ง จะบันทึกผลและสิ้นสุดการวาดกล่องบนกราฟ
## ส่วนที่ 5: การแสดงผลบนหน้าจอ
ส่วนนี้จะสร้างตาราง "Performance Dashboard" ที่มุมขวาบนของกราฟ เพื่อสรุปผลการทำงานแบบ Real-time:
M15 Bias: แสดงทิศทางของตลาดในปัจจุบัน
Total Trades: จำนวนเทรดทั้งหมดที่เกิดขึ้นในประวัติ
Win Rate: อัตราชนะ คิดเป็นเปอร์เซ็นต์
Total R-Multiple: ผลตอบแทนรวมจากความเสี่ยง (R) ทั้งหมด (ผลรวม RRR ของเทรดที่ชนะ ลบด้วยจำนวนเทรดที่แพ้) หากเป็นบวกแสดงว่ามีกำไรโดยรวม
📋 ข้อแนะนำในการใช้งาน
Timeframe ที่เหมาะสม: Indicator นี้ถูกออกแบบมาให้ใช้กับ Timeframe เล็ก (LTF) เช่น M1, M3 หรือ M5 เนื่องจากมันดึงข้อมูลจาก M15 และ M5 มาเป็นหลักการอยู่แล้ว
สไตล์การเทรด:
Confirmation: เหมาะสำหรับผู้ที่ต้องการความปลอดภัยสูง รอการยืนยันก่อนเข้าเทรด อาจจะตกรถบ้าง แต่ลดความเสี่ยงจากการเข้าเทรดเร็วเกินไป
Aggressive: เหมาะสำหรับผู้ที่ยอมรับความเสี่ยงได้สูงขึ้น เพื่อให้ได้ราคาเข้าที่ดีที่สุด
การเลือก Stop Loss:
"Swing ล่าสุด" และ "โซน POI" เป็นวิธีมาตรฐานตามหลัก SMC
"ATR" เหมาะกับตลาดที่มีความผันผวนสูง เพราะ SL จะปรับตามสภาพตลาด
"แท่งเทียนก่อนหน้า" เป็นวิธีที่เสี่ยงที่สุด เหมาะกับการเทรดเร็วและต้องการ RRR สูงๆ แต่ก็มีโอกาสโดน SL ง่ายขึ้น
การบริหารความเสี่ยง: Indicator นี้เป็นเพียง เครื่องมือช่วยวิเคราะห์ ไม่ใช่สัญญาณซื้อขายอัตโนมัติ 100% ผู้ใช้ควรมีความเข้าใจในหลักการของ SMC และทำการบริหารความเสี่ยง (Risk Management) อย่างเคร่งครัดเสมอ
การทดสอบย้อนหลัง (Backtesting): ควรทำการทดสอบ Indicator กับสินทรัพย์และตั้งค่าต่างๆ เพื่อให้เข้าใจลักษณะการทำงานและประสิทธิภาพของมันก่อนนำไปใช้เทรดจริง
HEMA Trend by Rostek (Filters + ATR + RR) For testing by anyone. Enjoy! :)
HEMA Trend Levels with Gradient, ATR-based SL & TP, HTF Filter, and R/R Statistics
This advanced indicator is designed to help you detect high-quality trend crossovers using HEMA (Hull Exponential Moving Average) smoothing logic. It integrates dynamic visualization, strong multi-layer filters, and risk management levels — all in one package.
✅ Core Concept
The indicator plots two HEMAs (fast and slow), with a gradient fill between them that dynamically changes color based on the trend direction. Crossovers between these HEMAs generate potential trade signals (long or short).
🎨 Key Visual Features
Smooth gradient fill area between fast and slow HEMA.
Dynamic arrows marking crossover points (precisely above/below HEMA cross).
Optional ATR-based Stop Loss (SL) and Take Profit (TP) levels shown as dashed lines with labels.
Automatic display of calculated Risk/Reward (R/R) ratio next to TP level.
⚙️ Powerful Filters
You can enable/disable each of these filters individually:
✅ EMA Filter — Confirm signals only when the price is above/below a selected EMA (default: 100).
✅ ADX Filter — Confirms signals only if ADX value exceeds a set threshold (default: 20).
✅ RSI Filter — Filter signals based on RSI value (e.g., >50 for longs, <50 for shorts).
✅ Higher Time Frame (HTF) EMA Filter — Only take signals aligned with a higher timeframe EMA trend (e.g., daily EMA 100).
📏 Risk Management Features
ATR-based Stop Loss (SL): Dynamic stop level calculated using ATR, configurable multiplier (e.g., 1.5 × ATR).
ATR-based Take Profit (TP): Dynamic take profit level based on ATR, configurable multiplier (e.g., 3 × ATR).
Risk/Reward Statistics: Calculates and displays R/R ratio on the chart to help visually evaluate trade setups.
🔔 Alerts
A single unified alert condition for both long and short filtered signals, making it easy to set up TradingView alerts.
⚡ Usage Tips
Adjust HEMA lengths (default: 20 & 40) to tune responsiveness.
Enable/disable filters depending on your strategy and market conditions.
Fine-tune ATR multipliers for SL/TP based on your risk tolerance.
Use HTF filter to trade only in the direction of the main higher timeframe trend.
✅ Ideal for
Trend-following traders who want smoothed entries.
Traders looking for integrated visual risk management levels.
Users who want precise, customizable signals with strong filtering logic.
SPX Optimized EMA+VWAP+RSI IndicatorOptimized SPX EMA+VWAP+RSI indicators.
EMA9 = Orange
EMA21 =Blue
EMA50=Purple
EMA200=Red
VWAP=Teal
RSI-BBGun-v6.1RSI BB Gun – Operator's Guide
“Eyes on target. Wait for the right moment. Then strike.”
________________________________________
🎯 Mission Objective
RSI BB Gun identifies extreme market conditions using RSI and Bollinger Bands, then overlays trend and volatility intelligence so you know when the setup is real.
The ❌ is your target acquisition signal—price just moved from an extreme zone back into play. Now you’ve got a clean radar lock.
________________________________________
📡 How to Operate
🟣 Step 1: Watch for the ❌'s (Black X = RSI & Bollinger Band Extremes Encountered)
• The Purple X means price and RSI are both stretched—and just snapped back into range.
• The target is now in the cross hairs and potentially ready for engagement.
🟥 Step 2: Confirm the Trend
• The thick ribbon tells you if the trend is with you:
o 🟢 Green = Uptrend. Focus on long setups.
o 🔴 Red = Downtrend. Focus on puts or short plays.
• Align with trend. Only engage when the field favors your position.
🔺 Step 3: Evaluate Signal Context
• Green Triangles = price just crossed below lower Bollinger Band (oversold).
• Red Triangles = price crossed above upper Band (overbought).
• Horizontal Lines Disappeared = The bar after the green or red horizontal line disappears means its time. We patiently wait for this as it means the momentum may be changing.
• These are your early indicators—they scout the setup on the GO / NO GO DECISION.
• ❌ + triangle + trend = clean shot.
________________________________________
☁️ Avoid These Situations
• ❌ in a choppy/no-trend zone = false alarm. Don’t engage.
• Repeated black ❌s without a purple ❌confirmation = low conviction. Let it go.
________________________________________
________________________________________
🪖 Operator's Mindset
“You don’t chase trades. You stalk them. When the ❌ flashes, the system has found a target. What you do next is up to your discipline, your tools, and your plan.”
________________________________________
Note: This is a free version. Upcoming paid version includes multi-timeframes working together. Multiple strategies. Volatility meter. Make money and master the BB Gun so that you can elevate to the Snipers weapon.
🔒 Want More Firepower?
Upgraded version coming soon. Unlocks next-gen targeting tools:
• Multi-timeframe RSI intelligence in a live dashboard
• Precision-timed combo signals based on layered volatility + RSI logic
• Advanced trend filters, trade zone overlays, and sniper-level entry indicators
• Ideal for swing traders and options strategists who want clarity under pressure
💥 Budget-friendly. No subscription. Upgrade when you're ready to go Pro.
Tip: Make 4+ trades mastering this setup. Then use a small portion of the trades to gain more features. Always be in a position you cannot lose.
🆚 Why This Beats Standard RSI/BB Tools
Mission Feature Basic Indicators RSI Ribbon Lite
Trend Confirmation ❌ ✅ Ribbon Overlay
Multi-Timeframe Awareness ❌ ✅ 5-Timeframe RSI Grid
Volatility Confirmation ❌ ✅ Weighted ATR Scoring
Combo Signal Alerts ❌ ✅ ❌ Reentry Combo Alerts
TradingView Alerts ❌ ✅ Built-In Radar Ping
#rsi #bb #bollingerbands #hull ma #trend
Rolling Log Returns [BackQuant]Rolling Log Returns
The Rolling Log Returns indicator is a versatile tool designed to help traders, quants, and data-driven analysts evaluate the dynamics of price changes using logarithmic return analysis. Widely adopted in quantitative finance, log returns offer several mathematical and statistical advantages over simple returns, making them ideal for backtesting, portfolio optimization, volatility modeling, and risk management.
What Are Log Returns?
In quantitative finance, logarithmic returns are defined as:
ln(Pₜ / Pₜ₋₁)
or for rolling periods:
ln(Pₜ / Pₜ₋ₙ)
where P represents price and n is the rolling lookback window.
Log returns are preferred because:
They are time additive : returns over multiple periods can be summed.
They allow for easier statistical modeling , especially when assuming normally distributed returns.
They behave symmetrically for gains and losses, unlike arithmetic returns.
They normalize percentage changes, making cross-asset or cross-timeframe comparisons more consistent.
Indicator Overview
The Rolling Log Returns indicator computes log returns either on a standard (1-period) basis or using a rolling lookback period , allowing users to adapt it to short-term trading or long-term trend analysis.
It also supports a comparison series , enabling traders to compare the return structure of the main charted asset to another instrument (e.g., SPY, BTC, etc.).
Core Features
✅ Return Modes :
Normal Log Returns : Measures ln(price / price ), ideal for day-to-day return analysis.
Rolling Log Returns : Measures ln(price / price ), highlighting price drift over longer horizons.
✅ Comparison Support :
Compare log returns of the primary instrument to another symbol (like an index or ETF).
Useful for relative performance and market regime analysis .
✅ Moving Averages of Returns :
Smooth noisy return series with customizable MA types: SMA, EMA, WMA, RMA, and Linear Regression.
Applicable to both primary and comparison series.
✅ Conditional Coloring :
Returns > 0 are colored green ; returns < 0 are red .
Comparison series gets its own unique color scheme.
✅ Extreme Return Detection :
Highlight unusually large price moves using upper/lower thresholds.
Visually flags abnormal volatility events such as earnings surprises or macroeconomic shocks.
Quantitative Use Cases
🔍 Return Distribution Analysis :
Gain insight into the statistical properties of asset returns (e.g., skewness, kurtosis, tail behavior).
📉 Risk Management :
Use historical return outliers to define drawdown expectations, stress tests, or VaR simulations.
🔁 Strategy Backtesting :
Apply rolling log returns to momentum or mean-reversion models where compounding and consistent scaling matter.
📊 Market Regime Detection :
Identify periods of consistent overperformance/underperformance relative to a benchmark asset.
📈 Signal Engineering :
Incorporate return deltas, moving average crossover of returns, or threshold-based triggers into machine learning pipelines or rule-based systems.
Recommended Settings
Use Normal mode for high-frequency trading signals.
Use Rolling mode for swing or trend-following strategies.
Compare vs. a broad market index (e.g., SPY or QQQ ) to extract relative strength insights.
Set upper and lower thresholds around ±5% for spotting major volatility days.
Conclusion
The Rolling Log Returns indicator transforms raw price action into a statistically sound return series—equipping traders with a professional-grade lens into market behavior. Whether you're conducting exploratory data analysis, building factor models, or visually scanning for outliers, this indicator integrates seamlessly into a modern quant's toolbox.
The SignalThe Signal — 9/21 EMA Cloud Indicator
“The Signal” is a clean, no-nonsense trend-following tool designed for traders who value clarity and precision.
This indicator plots a cloud between the 9-period and 21-period Exponential Moving Averages (EMAs), giving you immediate visual cues on trend direction and momentum. When the 9 EMA crosses above the 21 EMA, the cloud turns green — signaling bullish momentum. When the 9 EMA crosses below the 21 EMA, the cloud turns red — indicating potential bearish pressure.
🔍 Features:
- Minimalist design focused on the two most critical EMAs used by professional traders.
- Dynamic color-coded cloud: green for bullish, red for bearish.
- Optional EMA lines to fine-tune entries/exits.
- Offset control to project the EMAs forward and visualize leading momentum.
🧠 Strategy Recommendations
Basic Strategy:
- Buy Entry: When 9 EMA crosses above 21 EMA and the cloud turns green.
- Sell Entry: When 9 EMA crosses below 21 EMA and the cloud turns red.
- Use a trailing stop-loss or recent swing low/high for exits.
- CME_MINI:NQ1! Combine with volume confirmation or RSI divergence for higher confidence setups.
ema/dema_cum_stdThis indicator measures distance between moving averages by first calculating the variance of a group of moving averages the converting to standard deviation by taking the square root of the variance and then normalized by dividing by price (close) and multiplying by 100 ( percent). Here are the groups
Group 1 :11,13, 18, 21
Group 2: 11, 13, 18, 21, 29, 34
Group 3: 11, 13, 18, 21, 29, 34, 47, 55
Group 4: 11, 13, 18, 21, 29, 34, 47, 55, 76, 89
Group 5: 11, 13, 18, 21, 29, 34, 47, 55, 76, 89, 123, 144
Group 6: 11, 13, 18, 21, 29, 34, 47, 55, 76, 89, 123, 144, 199, 233
Group 7: 11, 13, 18, 21, 29, 34, 47, 55, 76, 89, 123, 144, 199, 233, 322, 377
Group 8: 11, 13, 18, 21, 29, 34, 47, 55, 76, 89, 123, 144, 199, 233, 322, 377, 521, 610
Great for showing compression and expansion levels and showing divergences. I try to only use Groups 1-4 or Groups 1-5
Shows when moving average groups squeeze below the set level you set using plot shape function. Shape colors are color coordinated to match moving average dispersion plots
Uses DEMA and EMA
Previous Day High/Low with Labelsprevious day range, moving averages editable and with notes to add to the screen
Volume bar range# Volume Bar Range (VBR) Indicator
## Overview
The Volume Bar Range indicator identifies key support and resistance levels based on high-volume price bars. It creates a visual range that represents significant price levels where the market has shown strong interest through volume confirmation.
## Features
### Visual Range Display
- **Blue/Aqua Area**: Shows the price range of the highest volume bar within the lookback period
- **Dynamic Color**: The fill color changes to indicate whether the range is stable (aqua) or newly updated (white)
- **Boundary Lines**: Invisible white lines mark the upper and lower boundaries of the range
### Trading Signals
- **BUY Signal**: Blue upward arrow appears when price breaks above the resistance level with volume confirmation
- **SELL Signal**: Black downward arrow appears when price breaks below the support level with volume confirmation
## How to Use
### Setup
1. Apply the indicator to any chart
2. The indicator automatically identifies the highest volume bar in the last 55 periods
3. The price range of this high-volume bar becomes your support/resistance zone
### Trading Strategy
- **Range Trading**: Trade within the identified support/resistance range
- **Breakout Trading**: Enter positions when price breaks above resistance (BUY) or below support (SELL)
- **Volume Confirmation**: Only take signals when current volume exceeds the 21-period average
### Signal Interpretation
- **BUY Signal**: Price closes above the resistance level with above-average volume
- **SELL Signal**: Price closes below the support level with above-average volume
- **No Signal**: Price remains within the range or volume is insufficient
## Key Parameters
- **Lookback Period**: 55 bars (automatically identifies the highest volume bar)
- **Volume MA**: 21-period simple moving average for volume confirmation
- **Signal Size**: Tiny markers to avoid chart clutter
## Best Practices
- Use on multiple timeframes for confirmation
- Combine with other technical indicators for stronger signals
- Pay attention to the color changes in the range area
- Consider market context and overall trend direction
## Ideal Markets
- Works well on liquid markets with consistent volume patterns
- Effective on stocks, forex, and crypto markets
- Best suited for swing trading and medium-term analysis
This indicator is particularly useful for traders who rely on volume analysis and want to identify key price levels where the market has shown significant interest.
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.
EMA/DEMA_group_stdThis indicator is like its sister indicator in that it measures dispersion but instead of being cumulative it measures distance between moving averages in each group.
Group 1:11, 13, 18, 21
Group 2:18, 21, 29, 34
Group 3: 29, 34, 47, 55
Group 4: 47, 55, 76, 89
Group 5: 76, 89 123, 144
Group 6: 123, 144, 199, 233
Group 7: 199, 233, 322, 377
How to use
1. Divergences
2. Moving average crosses
3. Momentum
Plotshape colors show when moving averages are nearing a crossover and level can be manually set in menu.
ZLMA Keltner ChannelThe ZLMA Keltner Channel uses a Zero-Lag Moving Average (ZLMA) as the centerline with ATR-based bands to track trends and volatility.
The ZLMA’s reduced lag enhances responsiveness for breakouts and reversals, i.e. it's more sensitive to pivots and trend reversals.
Unlike Bollinger Bands, which use standard deviation and are more sensitive to price spikes, this uses ATR for smoother volatility measurement.
Background:
Built on John Ehlers’ lag-reduction techniques, this indicator adapts the classic Keltner Channel for dynamic markets. It excels in trending (low-entropy) markets for breakouts and range-bound (high-entropy) markets for reversals.
How to Read:
ZLMA (Blue): Tracks price trends. Above = bullish, below = bearish.
Upper Band (Green): ZLMA + (Multiplier × ATR). Cross above signals breakout or overbought.
Lower Band (Red): ZLMA - (Multiplier × ATR). Cross below signals breakout or oversold.
Channel Fill (Gray): Shows volatility. Narrow = low volatility, wide = high volatility.
Signals (Optional): Enable to show “Buy” (green) on upper band crossovers, “Sell” (red) on lower band crossunders.
Strategies: Trade breakouts in trending markets, reversals in ranges, or use bands as trailing stops.
Settings:
ZLMA Period (20): Adjusts centerline responsiveness.
ATR Period (20): Sets volatility period.
Multiplier (2.0): Controls band width.
If you are still confused between the ZLMA Keltner Channels and Bollinger Bands:
Keltner Channel (ZLMA): Uses ATR for bands, which smooths volatility and is less reactive to sudden price spikes. The ZLMA centerline reduces lag for faster trend detection.
Bollinger Bands: Uses standard deviation for bands, making them more sensitive to price volatility and prone to wider swings in high-entropy markets. Typically uses an SMA centerline, which lags more than ZLMA.
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.
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).
Omega Market Mood Meter [OmegaTools]The Omega Market Mood Meter is a precision-built sentiment oscillator that captures the market’s emotional intensity through a multi-layered RSI system. Designed for traders who seek to align with the market's true behavioral state, it blends momentum readings with a brand-new, rarely-seen innovation: the Sentiment-Weighted Moving Average (WMA-Ω)—a trend filter that dynamically adjusts to the market’s psychological tone.
🧠 Market Mood Oscillator
At its core, the Ω 3M oscillator aggregates three RSI-based components:
RSI(9) on close — captures short-term tension;
RSI(21) on HLC3 — balances medium-term positioning;
RSI(50) on HL2 — reflects long-term directional weight.
Each input is scaled and weighted to contribute to a final oscillator centered around zero, with ±50 and ±100 acting as key sentiment boundaries. When values exceed ±100, the market is likely reaching emotional extremes—zones that often precede reversals or require caution.
Visual features include:
Dynamic Background Highlighting: automatically emphasizes extreme sentiment zones.
Reference Lines: plotted at ±100, ±50, and 0 for fast sentiment interpretation.
🔥 WMA-Ω: Sentiment-Weighted Moving Average
The standout innovation of this tool is the Weighted Market Mood Moving Average, or WMA-Ω—a proprietary calculation that averages price using the absolute value of sentiment as its weighting force. This approach gives greater importance to price during periods of strong emotional conviction (either bullish or bearish), resulting in a context-aware trend filter that reacts only when sentiment truly matters.
This technique:
Filters noise during low-volatility or indecisive conditions;
Enhances reliability by reacting to meaningful sentiment surges;
Offers a more psychologically-adjusted trend baseline compared to traditional MAs.
Visually:
When price is above WMA-Ω, a semi-transparent bullish fill highlights underlying strength;
When below, a bearish fill reveals dominant downward sentiment.
This feature is unique among public TradingView tools and provides an edge in identifying trend quality with psychological context.
✅ How to Use
Extreme Sentiment Zones (±100): Use as contrarian warning zones or signal dampeners.
Crosses of WMA-Ω: Treat these as psychological trend confirmations; price above indicates structurally bullish sentiment and vice versa.
Range-bound Bias: Between ±50, sentiment may be indecisive; watch for breakout or alignment with WMA-Ω.
Advanced Confluence: Combine with other Omega tools (e.g., Ω Bias Forecaster, Ω IV Walls) for powerful regime-based strategies.
Omega Market Mood Meter is ideal for discretionary and systematic traders who want a clean, multi-timeframe sentiment readout and a cutting-edge weighted trend engine grounded in market psychology.
Adjustable EMA Crossover with Signals3 Adjustable Ema's with crossover. These are used for identifying a trend and help with entry and exit signals.
All SMAs Bullish/Bearish ScreenerTitle: All SMAs Bullish/Bearish Screener: Uncover Powerful Trend Alignment
Description:
Are you tired of sifting through countless charts, desperately trying to find stocks that are truly trending? Do you seek clear, unequivocal signals that scream "Buy!" or "Sell!" based on robust price action? Look no further. Introducing the "All SMAs Bullish/Bearish Screener," a powerful yet elegantly simple Pine Script indicator designed to pinpoint stocks where the current price is in absolute harmony (or discord) with a comprehensive suite of Simple Moving Averages.
The Power of Confluence: Why This Indicator Matters
In the dynamic world of trading, strong trends are often characterized by significant alignment across multiple timeframes. This indicator is built on the profound principle of Moving Average Confluence. Instead of just looking at one or two moving averages, this screener meticulously analyzes the relationship between the current closing price and six critical Simple Moving Averages (SMAs): the 5, 10, 20, 50, 100, and 200-period SMAs.
When the price is trading above ALL these moving averages – from the shortest-term (5-period) to the longest-term (200-period) – it's a powerful declaration of unwavering bullish momentum. This often signifies strong institutional buying, a clear accumulation phase, and a robust uptrend across all market horizons. Imagine easily identifying stocks like the one pictured (SAIL), where price confidently rides above every key average, signaling a prime opportunity.
Conversely, when the price is trading below ALL these moving averages, it indicates a severe and widespread bearish bias. This is a warning sign, often preceding further declines, suggesting strong distribution, and a downtrend that impacts every time horizon.
What This Script Delivers:
Unambiguous Trend Identification: Quickly identify stocks exhibiting exceptionally strong bullish or bearish trends. No more guessing – the alignment of all SMAs provides undeniable clarity.
Customizable SMA Lengths: Tailor the moving average periods to your specific trading style and preferred timeframes. Whether you prefer slightly different short, medium, or long-term averages, you have full control via user-friendly input settings.
Instant Visual Cues: The indicator visually highlights these rare and significant conditions directly on your chart:
A green triangle-up signal appears below the bar when all SMAs are bullish.
A red triangle-down signal appears above the bar when all SMAs are bearish.
The chart background color will subtly shift to lime green for bullish alignment and red for bearish alignment, providing immediate visual feedback at a glance.
Real-time Screener Capability (via TradingView Alerts): This is where the true power of this script shines for efficient trading. Set up custom alerts on TradingView for "All SMAs Bullish" or "All SMAs Bearish" conditions. Receive instant notifications (email, mobile, webhook) on any stock in your watchlist that meets these stringent criteria, allowing you to react swiftly to high-probability setups without constant chart monitoring. The alert message even tells you the ticker!
On-Chart Status Display: A clear, concise status message is displayed directly on your chart, indicating "Current Price is ABOVE ALL SMAs (Bullish)", "Current Price is BELOW ALL SMAs (Bearish)", or "SMAs are Mixed," ensuring you're always aware of the prevailing condition.
Who is This For?
This indicator is invaluable for:
Trend Followers: Identify robust trends early and ride them for significant gains.
Swing Traders: Spot strong directional momentum for intermediate-term trades.
Long-Term Investors: Confirm the health and direction of fundamental trends.
Screener Enthusiasts: Automate your market scanning to find the cleanest setups.
Stop wasting time on ambiguous charts. Leverage the "All SMAs Bullish/Bearish Screener" to gain an edge, simplify your analysis, and focus only on the highest conviction trend opportunities. Add it to your favorites today and transform your trading workflow!
#PineScript #TradingView #SMA #MovingAverage #TrendFollowing #StockScreener #TechnicalAnalysis #Bullish #Bearish #MarketScanner
Adjustable EMA Crossover with Signals2 adjustable ema's with a crossover signal. This is to be used for trend identification along with entry and exit signals.
Gabriel's MPT Moving Average RibbonGabriel's MPT Moving Average Ribbon is a cutting-edge, risk-adjusted technical analysis tool that fuses Modern Portfolio Theory (MPT) with adaptive moving average logic to dynamically guide market participants through bullish and bearish conditions.
This ribbon is not a simple MA crossover — it leverages Sharpe Ratio, Sortino Ratio, Omega Ratio, and Value at Risk (VaR) to scale and smooth each moving average using real-time probabilistic efficiency metrics. Combined, these elements create a volatility-weighted, risk-optimized visualization of market structure.
🔍 Core Features:
Multi-Ratio Adaptive Scaling: Moving averages are dynamically weighted by Omega Ratio, Sortino Stdev, Sharpe Winrate, and VaR conditions for smarter price tracking.
Volatility Engine: Supports multiple return models:
Close-to-Close
Parkinson
Garman-Klass
Rogers–Satchell
Yang–Zhang (default for highest accuracy)
Smart Ribbon Construction:
Blends 3 different MA types per ribbon (e.g., SMA, EMA, WMA) for each of the 4 ribbons
Supports WMA-style dynamic weighting using MPT-derived ratios
Sharpe Winrate Estimation: Uses CDF logic to project the probability of success given current Sharpe ratio.
Dynamic Risk Phase Detection (VaR):
Identifies Risk On, Risk Off, or Neutral states using a triple-model composite VaR framework.
🛎️ Alerts Included:
📈 Bullish Crossover Alert: MA #1 crossing above MA #2 with all ribbons aligned upward.
📉 Bearish Crossunder Alert: MA #1 crossing below MA #2 with all ribbons aligned downward.
📊 Omega Ratio Alert: Triggered when Omega exceeds 1 (profitable risk-adjusted reward).
⚠️ Omega Caution Alert: Triggered when Omega drops below 1.
🟢 Risk On Alert: Market enters a favorable, low-risk zone. Deep Value Zone for Long-Term Investing.
🔴 Risk Off Alert: Market enters a cautionary, high-risk phase.
🎯 Use Cases:
Trend Identification: MA ribbon alignment indicates momentum phases.
Risk-Tuned Entries/Exits: Combine ribbon crossovers with VaR/Ratio signals for confirmation.
Institutional Strategy Overlay: Ideal for portfolio managers integrating risk-adjusted technical overlays.
🧠 Pro Tips:
Use "Complete" mode for the most robust risk signal, as it blends Historical, EWMA, and Variance-Covariance ratios.
Customize each MA’s type and length to match your trading horizon (e.g., intraday, swing).
Toggle Ratios Weighted MA for adaptive weighting when market risk fluctuates.
It's set to the settings I use to trade, from MA settings to MPT table. It goes in order: Sharpe Est. Winrate, Deviation of Sortino, Omega Ratio (1 Year), and the Ideal position size according to VaR.
All SMAs Bullish/Bearish Screener (Enhanced)All SMAs Bullish/Bearish Screener Enhanced: Uncover High-Conviction Trend Alignments with Confidence
Description:
Are you ready to elevate your trading from mere guesswork to precise, data-driven decisions? The "All SMAs Bullish/Bearish Screener Enhanced" is not just another indicator; it's a sophisticated, yet user-friendly, trend-following powerhouse designed to cut through market noise and pinpoint high-probability trading opportunities. Built on the foundational strength of comprehensive Moving Average confluence and fortified with critical confirmation signals from Momentum, Volume, and Relative Strength, this script empowers you to identify truly robust trends and manage your trades with unparalleled clarity.
The Power of Multi-Factor Confluence: Beyond Simple Averages
In the unpredictable world of financial markets, true strength or weakness is rarely an isolated event. It's the harmonious alignment of multiple technical factors that signals a high-conviction move. While our original "All SMAs Bullish/Bearish Screener" intelligently identified stocks where price was consistently above or below a full spectrum of Simple Moving Averages (5, 10, 20, 50, 100, 200), this Enhanced version takes it a crucial step further.
We've integrated a powerful three-pronged confirmation system to filter out weaker signals and highlight only the most compelling setups:
Momentum (Rate of Change - ROC): A strong trend isn't just about price direction; it's about the speed and intensity of that movement. Positive momentum confirms that buyers are still aggressively pushing price higher (for bullish signals), while negative momentum validates selling pressure (for bearish signals).
Volume: No trend is truly trustworthy without the backing of smart money. Above-average volume accompanying an "All SMAs" alignment signifies strong institutional participation and conviction behind the move. It separates genuine trend starts from speculative whims.
Relative Strength Index (RSI): This versatile oscillator ensures the trend isn't just "there," but that it's developing healthily. We use RSI to confirm a bullish bias (above 50) or a bearish bias (below 50), adding another layer of confidence to the direction.
When the price aligns above ALL six critical SMAs, and is simultaneously confirmed by robust positive momentum, healthy volume, and a bullish RSI bias, you have an exceptionally strong "STRONGLY BULLISH" signal. This confluence often precedes sustained upward moves, signaling prime accumulation phases. Conversely, a "STRONGLY BEARISH" signal, where price is below ALL SMAs with negative momentum, confirming volume, and a bearish RSI bias, indicates powerful distribution and potential for significant downside.
How to Use This Enhanced Screener:
Add to Chart: Go to TradingView's Pine Editor, paste the script, and click "Add to Chart."
Customize Parameters: Fine-tune the lengths of your SMAs, RSI, Momentum, and Volume averages via the indicator's settings. Experiment to find what best suits your trading style and the assets you trade.
Choose Your Timeframe Wisely:
Daily (1D) and 4-Hour (240 min) are highly recommended. These timeframes cut through intraday noise and provide more reliable, actionable signals for swing and position trading.
Shorter timeframes (e.g., 15min, 60min) can be used by advanced day traders for very short-term entries, but be aware of increased volatility and noise.
Visual Confirmation:
Green/Red Triangles: Appear on your chart, indicating confirmed bullish or bearish signals.
Background Color: The chart background will subtly turn lime green for "STRONGLY BULLISH" and red for "STRONGLY BEARISH" conditions.
On-Chart Status Table: A clear table displays the current signal status ("STRONGLY BULLISH/BEARISH," or "SMAs Mixed") for immediate feedback.
Set Up Alerts (Your Primary Screener Tool): This is the game-changer! Create custom alerts on TradingView based on the "Confirmed Bullish Trade" and "Confirmed Bearish Trade" conditions. Receive instant notifications (email, pop-up, mobile) for any stock in your watchlist that meets these stringent criteria. This allows you to scan the entire market effortlessly and act decisively.
Strategic Stop-Loss Placement: The Trader's Lifeline
Even the most robust signals can fail. Protecting your capital is paramount. For this trend-following strategy, your stop-loss should be placed where the underlying trend structure is broken.
For a "STRONGLY BULLISH" Trade: Place your stop-loss just below the most recent significant swing low (higher low). This is the last point where buyers stepped in to support the price. If price breaks below this, your bullish thesis is invalidated.
For a "STRONGLY BEARISH" Trade: Place your stop-loss just above the most recent significant swing high (lower high). If price breaks above this, your bearish thesis is invalidated.
Alternatively, consider placing your stop-loss just below the 20-period SMA (for bullish trades) or above the 20-period SMA (for bearish trades). A significant close beyond this intermediate-term average often indicates a critical shift in momentum. Always ensure your chosen stop-loss adheres to your pre-defined risk per trade (e.g., 1-2% of capital).
Disciplined Profit Booking: Maximizing Gains
Just as important as knowing when you're wrong is knowing when to take profits.
Trailing Stop-Loss: As your trade moves into profit, trail your stop-loss upwards (for longs) or downwards (for shorts). You can trail it using:
Previous Swing Lows/Highs: Move your stop to just below each new higher low (for longs) or just above each new lower high (for shorts).
A Moving Average (e.g., 10-period or 20-period SMA): If price closes below your chosen trailing SMA, exit. This allows you to ride the trend while protecting accumulated profits.
Target Levels: Identify potential resistance levels (for longs) or support levels (for shorts) using pivot points, previous highs/lows, or Fibonacci extensions. Consider taking partial profits at these levels and letting the rest run with a trailing stop.
Loss of Confluence: If the "STRONGLY BULLISH/BEARISH" condition ceases to be met (e.g., RSI crosses below 50, or volume drops significantly), this can be a signal to reduce or exit your position, even if your stop-loss hasn't been hit.
The "All SMAs Bullish/Bearish Screener Enhanced" is your comprehensive partner in navigating the markets. By combining robust trend identification with critical confirmation signals and disciplined risk management, you're equipped to make smarter, more confident trading decisions. Add it to your favorites and unlock a new level of precision in your trading journey!
#PineScript #TradingView #SMA #MovingAverage #TrendFollowing #StockScreener #TechnicalAnalysis #Bullish #Bearish #QQQ #Momentum #Volume #RSI #SPY #TradingStrategy #Enhanced #Signals #Analysis #DayTrading #SwingTrading
EMA Cross IndicatorHow to Use the Indicator
Interpreting Signals:
Bullish Crosses: Look for green triangles below the bars, indicating a shorter EMA crossing above a longer EMA (e.g., EMA 10 > EMA 20).
Bearish Crosses: Look for red triangles above the bars, indicating a shorter EMA crossing below a longer EMA (e.g., EMA 10 < EMA 20).
Setting Alerts: In TradingView, click the "Alerts" icon, select the condition (e.g., "Bullish Cross: EMA50 > EMA100"), and configure your notification preferences (e.g., email, popup).
Customization: Adjust the EMA lengths in the indicator settings to experiment with different periods if desired.
This indicator is designed to work on any timeframe and asset, including BTC/USDT, which you use to gauge trends for other coins. Let me know if you'd like to tweak it further or add more features!