Multi-Pair MTF Crypto Strategy (Backtest Version)Multi-Pair MTF Crypto Scanner (Smart Long/Short Indicator)
This advanced TradingView indicator is designed for crypto traders seeking precise, risk-filtered signals across multiple pairs and timeframes. It combines institutional-grade signal logic with customizable risk management and clean visual labeling.
🔍 Core Features:
✅ Multi-Pair & Multi-Timeframe Scanning
Scans assets like BTC, ETH, SOL across timeframes (15m, 1H, 4H)
✅ Buy/Sell Signal Engine
Based on EMA 50/200 crossover, RSI, and volume spikes
✅ Dynamic Risk Management
Calculates Stop Loss (SL), Take Profit (TP), and Risk-Reward Ratio (RRR) using ATR
✅ RRR Filter
Signals only shown if RRR meets your defined minimum (default 1.5)
✅ Confirmation Mode
Optional setting to avoid premature signals by requiring bar-close confirmation
✅ Visual Trade Zones
Entry, SL, and TP levels plotted directly on chart
✅ Debug Mode
Shows labels when trades are rejected due to RRR filters
🧠 Ideal For:
Crypto scalpers, swing traders, and algorithmic signal testers
Traders focused on high probability entries with defined risk
📣 Alerts:
Real-time alerts for qualified BUY and SHORT signals
Configurable for automated webhook systems or mobile push
Candlestick analysis
EMA 5 con fondo tipo cintaEMMA 5 FLEX Estrategia canal youtube: tradingconflex operando diariamente.
Custom Green Candle Signalbuying candle indicates...................................................................................................
NIFTY Option Chain Table with Custom CE/PE Price FiltersThis Pine Script creates a powerful and visually organized option chain dashboard for NIFTY Index Options, showing 10 Call Options (CE) and 10 Put Options (PE), with real-time prices updated on a 5-minute chart.
You can filter and view only the most relevant option contracts based on your preferred price ranges, helping you make quick decisions for scalping, intraday, or positional trades.
🔍 How It Works:
You manually select up to 10 Call Option symbols and 10 Put Option symbols from NSE (e.g., NIFTY240530C18000, NIFTY240530P18000, etc.).
Keep that time options this are old options in defalt so there will be a error
The script fetches the real-time close price of each option using the request.security() function.
You define the minimum and maximum price range separately for Calls and Puts.
The script filters out any options that fall outside of your desired price range.
Only a limited number of matching options (as set by you) are displayed in the table for both Calls and Puts.
The table is shown at your preferred location on the chart (Bottom Right, Top Left, etc.).
✅ Features:
🔟 Supports exactly 10 CE and 10 PE options for tracking.
📈 Live price updates pulled directly from the chart timeframe (5-min).
🎯 Custom price filters for CE and PE (separate inputs).
📊 Show only the top X number of contracts that meet your filter criteria.
🧱 Vertical layout with clear headers and color-coded sections (green for Calls, red for Puts).
🎛️ Position the table wherever it's most convenient on your chart.
⚡ Helps you quickly spot low premium or range-bound options during the day.
📌 Use Case:
Ideal for:
Option scalpers and day traders who want to focus only on options within a specific price zone.
Traders who want to monitor multiple strikes simultaneously without clutter.
Users building custom NIFTY strategies based on option premiums.
Multi-Pair MTF Crypto Scanner (Advanced Dashboard)This advanced TradingView indicator is designed for crypto traders seeking precise, risk-filtered signals across multiple pairs and timeframes. It combines institutional-grade signal logic with customizable risk management and clean visual labeling.
🔍 Core Features:
✅ Multi-Pair & Multi-Timeframe Scanning
Scans assets like BTC, ETH, SOL across timeframes (15m, 1H, 4H)
✅ Buy/Sell Signal Engine
Based on EMA 50/200 crossover, RSI, and volume spikes
✅ Dynamic Risk Management
Calculates Stop Loss (SL), Take Profit (TP), and Risk-Reward Ratio (RRR) using ATR
✅ RRR Filter
Signals only shown if RRR meets your defined minimum (default 1.5)
✅ Confirmation Mode
Optional setting to avoid premature signals by requiring bar-close confirmation
✅ Visual Trade Zones
Entry, SL, and TP levels plotted directly on chart
✅ Debug Mode
Shows labels when trades are rejected due to RRR filters
🧠 Ideal For:
Crypto scalpers, swing traders, and algorithmic signal testers
Traders focused on high probability entries with defined risk
📣 Alerts:
Real-time alerts for qualified BUY and SHORT signals
Configurable for automated webhook systems or mobile push
Would you like me to embed this as a comment block at the top of your Pine Script?
Full Rejection Alerts (Bullish & Bearish)- Bearish Engulfing
- Bearish Pin Bar
- Bullish Engulfing
- Bullish Pin Bar
DUP V12B (tích hợp nến động lượng)DUP V12B - Dynamic Universal Points (Momentum Candles & 3-Tier Menu)
Authors: Đinh Ngọc Thạch
Version: 12B (DUP V12B)
Date: May 15, 2025 (Conceptual publication date based on script header)
Introduction
Welcome to DUP V12B, an advanced TradingView strategy meticulously crafted by Đinh Ngọc Thạch with AI assistance from Gemini. This version builds upon the robust foundation of DUP V11, introducing significant refinements to its core signal logic for bottoming/topping detection, adaptive thresholds, and a highly intuitive 3-Tier Menu System for unparalleled user customization.
A key innovation in V12B is the integration of Dynamic Momentum Candles, offering a unique visual perspective on price action relative to volatility channels. This, combined with a streamlined approach that removes the previous complex "Tier 2" system, focuses on delivering clearer, more actionable insights.
The DUP (Dynamic Universal Points) philosophy centers around identifying potential market turning points by analyzing market context, applying adaptive thresholds, and confirming signals through a consensus of technical indicators. Whether you're a novice trader or an experienced quantitative researcher, DUP V12B provides a flexible and powerful toolkit to explore market dynamics.
Disclaimer
Trading involves substantial risk of loss and is not suitable for every investor. The DUP V12B strategy is provided for educational and informational purposes only. It does not constitute financial advice or a recommendation to buy or sell any 1 financial instrument. All trading decisions are your sole responsibility. Past performance is not indicative of future results. Backtest thoroughly and use at your own risk.
1.
github.com
github.com
User Guide
Core Concepts
DUP Philosophy: DUP stands for Dynamic Universal Points. The strategy aims to identify potential market bottoms for buying opportunities (and tops for selling, primarily through "Peak Detection") by adapting its parameters and signal thresholds to the prevailing market conditions.
Market Regimes: The script categorizes the market (based on a reference Index like VNINDEX) into three regimes:
REGIME_DOWNTREND: The reference index is in a downtrend.
REGIME_BOTTOMING_RANGE: The reference index is in a consolidation/bottoming phase or not in a clear trend.
REGIME_UPTREND: The reference index is in an uptrend.
LBU (Laddered Buy-in Units): This system allows for scaling into positions. Instead of entering with the full intended capital at once, LBU enables multiple entries (up to 5, configurable) as the price potentially moves into more favorable zones, based on pre-defined or adaptive ratios of your total allocated capital for that specific symbol.
Peak Detection Sell: This is a prioritized selling logic. If enabled, the strategy will actively look for signs of a market top (e.g., RSI falling from overbought, bearish divergences) to exit positions, potentially overriding standard exit methods like Trailing Stops or Take Profits.
Adaptive Layer: The strategy can adjust its internal sensitivity and signal thresholds (e.g., minimum score required for a buy signal) based on the broader market context (trend and volatility). This helps the script to be more or less aggressive depending on market conditions.
Momentum Candles: A new visualization feature in V12B. When enabled, the script plots its own candles, colored based on their position within a chosen volatility channel (Bollinger Bands %B or Keltner Channels). To use this effectively, you MUST HIDE THE ORIGINAL CHART CANDLES via TradingView's main chart settings.
Operating Modes (Key Feature)
DUP V12B introduces a 3-Tier menu system to cater to different user needs. It's crucial to only adjust settings relevant to your selected Operation Mode.
MODE_BASIC (1. Basic - Đơn giản):
The simplest mode, designed for quick setup and ease of use.
Allows toggling main features on/off (e.g., enable simple adaptive mode, show buy/sell signals, choose basic buy signal types, select primary sell methods).
Ideal for beginners or users who prefer a less granular approach.
MODE_ADVANCED (2. Advanced - Nâng cao):
Offers more detailed control over the strategy's parameters.
Fine-tune buy signal components (RSI, Stoch, Volume, Candle, etc.), LBU settings (ratios, max entries), standard exit parameters (Stop Loss, Trailing Stop, Take Profit types and values), Peak Detection Sell logic, and the overall sensitivity of the Adaptive Layer.
Suitable for traders who want to tailor the strategy more closely to specific instruments or their trading style.
MODE_PREMIUM (3. Premium - Developer):
Provides complete control over all aspects of the strategy, including its core "brain."
Market Context Engine: Configure how the script analyzes the reference market index.
Adaptive Layer Deep Dive: Manually input market/volatility scores, blend scores, and fine-tune impact factors.
Scoring Logic (Buy/Sell): Adjust the base thresholds and weights for each individual buy/sell confirmation signal.
V17 Legacy Params (Research): Access to older dynamic parameter settings for research purposes.
Debug Options: Display detailed internal states for in-depth analysis.
This mode is intended for advanced users, quantitative researchers, or those who wish to deeply understand and experiment with the script's internal mechanics.
Key Input Sections Walkthrough
0. CHẾ ĐỘ HOẠT ĐỘNG (QUAN TRỌNG) (Operation Mode - IMPORTANT):
This is the first and most critical setting. Choose Basic, Advanced, or Premium. Your choice here determines which subsequent settings are active and relevant.
1. BASIC MODE SETTINGS: (Only active if MODE_BASIC is selected)
🧠 Bật Chế độ Bám theo Thị trường (Thích ứng Đơn giản)?: Enables/disables a simplified adaptive behavior.
📈 Hiện Tín hiệu Mua? / 📉 Hiện Tín hiệu Bán?: Toggles visibility of buy/sell signal shapes on the chart.
Buy Signal Sources:
Sử dụng Phân kỳ làm Tín hiệu Mua?: Use bullish divergence as a buy condition.
Sử dụng RSI/Stoch Quá bán?: Use oscillator (RSI/Stoch) crossover from oversold as a buy condition.
Sử dụng Nến & Volume?: Use strong bullish candles and volume spikes as buy conditions.
Sell Methods:
🔥 Ưu tiên Bán Dò Đỉnh?: If enabled, prioritizes peak detection signals for exits.
💧 Sử dụng Dừng lỗ Động (Trailing Stop)?: Enables trailing stop (effective if Peak Sell is off or not triggered).
🛡️ Sử dụng Dừng lỗ Cố định (Stop Loss)?: Enables a fixed initial stop loss.
2. ADVANCED MODE SETTINGS: (Active if MODE_ADVANCED or MODE_PREMIUM is selected. Basic mode uses defaults from these.)
2.1. Advanced - Buy Signals & Base Params:
EMA Dài hạn (Base): Length for the long-term Exponential Moving Average.
Loại Kênh Trigger: Choose "Keltner Channel" or "Bollinger Bands" as the primary trigger for buy zones.
KC/BB Parameters: Lengths, Multipliers/Standard Deviations (these are "Base" values, potentially adjusted by the adaptive layer if active in Premium).
Detailed Buy Confirmation Toggles: Enable/disable and configure parameters for RSI (Oversold, Divergence), Volume, Candle patterns, Stochastic (Oversold, Divergence), MACD crossover, OBV trend, and ADX weakness.
2.2. Advanced - LBU Settings:
Tổng Vốn Dự kiến (Cho mã này) & Đơn vị Tiền tệ: Your intended total capital for this specific trading instrument and its currency (used for calculating position size with strategy.cash).
Chế độ Giải ngân LBU:
"Fixed Ratio": Uses pre-defined fixed percentage steps for LBU.
"Adaptive Ratio": (Currently simplified in V12 - may use a fixed factor).
"Custom Ratio": Manually set the percentage of capital for each LBU entry (LBU 1% to LBU 5%).
Số Lần Mua Tối Đa (Bậc LBU): Maximum number of LBU entries (1 to 5).
Tỷ lệ LBU 1 (%) - Tỷ lệ LBU 5 (%): Custom percentages for each LBU step if "Custom Ratio" is selected.
Buffer Giá LBU (%): Allows buying on a new LBU step if the new low is not strictly lower than the previous buy's low, but within this buffer percentage. 0.0 requires a strictly lower low.
⛔ Chặn Mua khi vào Uptrend?: Prevents further LBU entries if the market regime shifts to REGIME_UPTREND.
2.3. Advanced - Standard Exit Settings (SL/TS/TP):
Stop Loss (SL):
🛡️ Bật Stop Loss Chuẩn?: Enable/disable standard stop loss.
Loại SL: "ATR" (based on Average True Range) or "Swing Low" (based on recent lowest lows).
Parameters for ATR (Length, Base Multiplier) and Swing Low (Lookback, Buffer ATR Multiplier).
Trailing Stop (TS):
💧 Bật Trailing Stop Chuẩn?: Enable/disable standard trailing stop.
Loại TS: "EMA Trail", "PSAR", "Chandelier Trail", "ATR Trail (SuperTrend)".
Base parameters for each TS type (e.g., EMA Length, PSAR Start/Inc/Max, Chandelier Period/Multiplier, ATR Trail Length/Multiplier).
Take Profit (TP):
🎯 Loại Chốt lời:
"Không dùng TP": Disables automatic take profit.
"TP Đa mức (ATR/RR/Kênh)": Calculates 1-3 TP levels based on ATR, Risk/Reward, or Channel Uppers.
"TP % Mục tiêu": Exits when a fixed profit percentage from the average entry price is reached.
% Lãi Mục tiêu: The target profit percentage if "TP % Mục tiêu" is chosen.
Settings for "TP Đa mức":
Bật Tính toán & Vẽ TP Đa mức?: Whether to calculate and display these levels (useful even if not auto-exiting).
Số Mức TP Đa mức: How many TP levels to calculate (1-3).
Cách Tính TP Đa mức: "KC/BB Upper", "ATR Offset", "Fixed RR".
Detailed parameters for each calculation method.
Tự động Thoát lệnh tại TP Đa mức?: If "TP Đa mức" is the chosen type, enable this to auto-exit.
Mức TP Đa mức Thoát lệnh: Which of the calculated TP levels (1, 2, or 3) will trigger an automatic exit.
2.4. Advanced - Peak Detection Sell Settings:
🔥 Ưu tiên Bán Dò Đỉnh?: Enables the Peak Sell mode.
Signal Sources: RSI Fall from Overbought (OB), Bearish Divergence (RSI or MACD source), Stochastic OB Cross. Includes parameters like thresholds, lookbacks.
Logic Kết hợp Đỉnh: "ANY" (any peak signal triggers) or "ALL" (all enabled peak signals must trigger).
2.5. Advanced - Adaptive Layer Control:
🧠 Bật Chế độ Thích ứng?: Enable/disable the adaptive adjustments for Advanced mode.
⚙️ Độ nhạy Thích ứng Tổng thể: Controls how strongly the adaptive layer influences thresholds (uses internal market scores in this mode).
3. PREMIUM (DEV) MODE SETTINGS: (Only active if MODE_PREMIUM is selected)
3.1. Premium - Market Context Engine: Configure the reference Index (HOSE:VNINDEX by default), EMA/RSI/ADX/BB lengths, and thresholds for defining market regimes and internal scores.
3.2. Premium - Adaptive Layer Deep Dive: Input manual market/volatility scores, choose the source for adaptive scores ("Manual", "Internal Assessment", "Blended"), adjust overall sensitivity, and fine-tune impact factors for trend, volatility, and breadth. Includes base parameters for trailing stops that can be adaptively modified.
3.3. Premium - Scoring Logic (Buy/Sell): Set base minimum scores for bottoming/topping and, critically, assign weights (w - ...) to each individual confirmation signal (e.g., w - RSI OS, w - Divergence). This determines how influential each signal is in the overall buy/sell consensus score. Option to Điều chỉnh Trọng số Tín hiệu theo Bối cảnh TT? (Adjust signal weights by market context).
3.4. Premium - V17 Legacy Params (Research): For research, enables older V17 dynamic parameter adjustments.
3.5. Premium - Debug Options: Show detailed debug information on the chart for market context, adaptive layer calculations, scoring, and signal states.
4. COMMON SETTINGS - Display & UI:
Toggles for showing/hiding Buy (▲) / Sell (▼) shapes, EMA line, Trigger Channel lines, SL/TS/TP lines.
Buy Label customization (background/text color, size, offset).
Tô màu Nến theo Tín hiệu?: Note: This is traditional bar coloring. For the new Momentum Candles, see section 5 and disable this if using Momentum Candles.
Dashboard settings: Show/hide, position, background/text color, and toggles for what information to display (Market Context, Scores, LBU status, Position, SL/TP distance, Exit Mode).
5. COMMON SETTINGS - Momentum Candle Viz: (New in V12B)
🕯️ Bật Tô màu Nến Động Lượng?: Enable this to use Momentum Candles. If enabled, you MUST HIDE THE ORIGINAL CHART CANDLES from TradingView's main chart style settings for the effect to be visible correctly.
MC - Nguồn Vị Trí Nến: Choose "Bollinger Bands (%B)" or "Keltner Channels" as the basis for candle coloring.
Parameters for the chosen indicator (BB Length/Mult or KC Length/Mult for momentum calculation).
MC - Màu Bắt đầu (Thấp) & MC - Màu Kết thúc (Cao): Gradient colors for the candle body.
MC - Màu Bấc Nến & MC - Độ Trong Suốt Thân (%): Wick color and body transparency.
6. COMMON SETTINGS - Alert Messages:
Templates for Buy, Stop Loss, Trailing Stop, Take Profit, and Peak Sell alerts. You can customize these using placeholders (see "Alerts" section below).
How to Use
Initial Setup: Add the DUP V12B script to your chart. The first and most important step is to select your desired ⚙️ Chọn Chế độ Hoạt động (Operation Mode).
Basic Mode Users:
Navigate to "1. BASIC MODE SETTINGS."
Toggle the main features on/off as per your preference (e.g., Bật Chế độ Bám theo Thị trường, choose buy signal sources, select sell methods).
Advanced Mode Users:
Navigate to "2. ADVANCED MODE SETTINGS."
Configure Buy Signals & Base Parameters (EMA, Trigger Channel, confirmation indicators).
Set up your LBU strategy (Total Capital, Ratios, Max Entries).
Define your Standard Exit rules (SL, TS, TP types and their specific parameters).
Configure Peak Detection Sell if you intend to use it.
Adjust Adaptive Layer sensitivity if desired.
Premium Mode Users:
Navigate to "3. PREMIUM (DEV) MODE SETTINGS."
Dive deep into the Market Context Engine, Adaptive Layer, Scoring Logic, etc. Exercise caution, as these settings significantly impact the strategy's core behavior.
Momentum Candles (All Modes):
If you enable 🕯️ Bật Tô màu Nến Động Lượng? in "5. COMMON SETTINGS - Momentum Candle Viz," remember to hide the main chart's candles. Right-click on the chart -> Settings -> Symbol -> Untick "Body", "Borders", "Wick". This will prevent visual overlap.
LBU (Laddered Buy-in Units):
The strategy will attempt to buy in multiple steps if LBU is configured for more than one entry.
Each buy signal (rawDupBuySignal) is a potential LBU entry. The actual entry depends on lbuCounter, price conditions (lowerPriceCondition), budget, and uptrend restrictions.
Your Tổng Vốn Dự kiến is divided according to the LBU ratios for each entry.
Exits:
The strategy has a clear exit hierarchy:
Stop Loss (Hard SL): Always has the highest priority.
Peak Sell Mode (If Active): If Ưu tiên Bán Dò Đỉnh? is enabled and a peak sell signal occurs, this will take precedence over standard TS/TP.
Standard Exits (If Peak Sell is Inactive or Not Triggered): Trailing Stop or Take Profit (either multi-level or target %).
Dashboard:
Enable the Dashboard in "4. COMMON SETTINGS - Display & UI" to get a real-time overview of the market regime, current buy/sell scores vs. thresholds, LBU status, active position details, and SL/TP distances.
Alerts
The DUP V12B strategy supports customizable alert messages using placeholders that get dynamically replaced with real-time values when an alert is triggered.
Placeholders: You can use placeholders like:
{{ticker}}: Trading symbol (e.g., BTCUSD)
{{exchange}}: Exchange name (e.g., NASDAQ)
{{price}}: Price at which the alert condition met.
{{plot_X}}: Value of a specific plot (e.g., {{plot_0}} for the first plot() output). More complex for strategy-specific info.
Strategy-Specific Placeholders (as defined in the script's alert message inputs):
{{lbu_info}}: Information about the LBU entry.
{{sl_level}}: Stop loss level.
{{tp_level}}: Take profit level.
{{bottom_score}}: Buy score.
{{ratio}}%: LBU ratio percentage.
{{ts_type}}: Type of trailing stop hit.
{{ts_level}}: Trailing stop level.
{{tp_num}}: Take profit level number (for multi-level TP).
{{top_score}}: Sell score for peak detection.
{{peak_reason}}: Reason for peak detection sell.
Setting up Alerts in TradingView:
Click the "Alert" icon (clock) in TradingView's right-hand toolbar or on the script's name on the chart.
Condition: Select "DUP V12B".
Choose the specific alert condition you want (e.g., "Buy", "Sell", or any custom alert setup via alertcondition() if you were to add them – though strategies typically use strategy.entry, strategy.exit, strategy.close_all which can trigger alerts). For strategies, you often select the script name and then the specific entry/exit condition provided by TradingView (e.g., "Order fills and alert function calls").
Trigger: "Once Per Bar Close" is generally recommended for strategies to avoid premature signals based on intra-bar price fluctuations.
Alert Actions: Choose how you want to be notified (Notify on app, Show pop-up, Send email, Webhook URL, etc.).
Message: You can use the default messages from the script's input settings or craft your own using the placeholders.
To use the script's dynamic messages for strategy alerts, you typically use {{strategy.order.alert_message}} in the TradingView alert message box if the strategy call (like strategy.entry) includes an alert_message parameter. Since this script defines alert templates in inputs but doesn't explicitly pass them to strategy.entry/order via alert_message parameter in the provided code, you'd manually copy your desired template from the script's input into the TradingView alert message box, replacing placeholders as needed for what TradingView offers natively for strategies.
Example Alert Message (manual setup in TradingView alert dialog for a buy):
{{ticker}} DUP V12 BUY | LBU: {{strategy.order.comment}} | Price: {{strategy.order.price}} | SL: CheckScript | TP: CheckScript
(Note: Accessing exact dynamic SL/TP levels directly in strategy.order.alert_message without them being part of the order comment or a dedicated alert variable can be tricky. Often, the comment field is used, or you set separate alerts for SL/TP breaches if possible.)
For strategy alerts, it's often best to rely on the "Order Fill" alerts and use the comment field of your strategy.entry or strategy.close_all calls to pass dynamic information, then reference {{strategy.order.comment}} in your alert message.
Backtesting and Optimization
Thorough Backtesting: Before trading live, extensively backtest DUP V12B on various financial instruments (stocks, forex, crypto, etc.) and timeframes.
Parameter Optimization:
Adjust LBU ratios, stop-loss percentages, take-profit targets, and indicator lengths based on the specific asset's volatility and your risk tolerance.
The Advanced and Premium modes offer many parameters to fine-tune. Start with Advanced before moving to Premium.
max_bars_back: The script requests 1000 bars of historical data (max_bars_back=1000). Ensure your chart has sufficient data for accurate calculations, especially for longer-term indicators.
Commission & Slippage: The script includes settings for commission_value (e.g., 0.15%) and slippage (in ticks). Adjust these to reflect your actual trading costs for more realistic backtest results.
Troubleshooting & Tips
No Signals/Lines:
Check "COMMON SETTINGS - Display & UI" to ensure shapes and lines are enabled.
Verify that the features you expect to see signals from are enabled in your chosen Operation Mode (Basic, Advanced, or Premium settings).
Momentum Candles Not Displaying Correctly: Ensure you have hidden the original chart candles from TradingView's main chart settings (Style -> untick Body, Borders, Wick).
Start Simple: Begin with Basic or Advanced mode to understand the fundamental behavior before venturing into the Premium settings.
Read Tooltips: Hover over the input settings in the script's configuration panel. Many options have tooltips (in Vietnamese in the original script, but their function is described here) explaining their purpose.
Dashboard is Your Friend: Keep an eye on the on-chart dashboard (if enabled) for a quick status check of the script's internal state.
Dual Candle Engulfing (Classic + Heikin Ashi) Indicators based on ris deviations and characteristic K-line patterns
Key Candle Re-Entry ZonesTime zone markups for the 1:25 & 9:25 times. This helps build identity for the pre-market and market analysis
Candlestick IdentifierThis indicator is useful for identifying 11 common candlestick patterns. Candlestick patterns shouldn't be used for entries on their own, but they are a great confluence to validate other trade ideas. Some values can be adjusted to change the indicator's sensitivity depending on how stringent you want the defining candlestick parameters to be.
VWAP + Engulfing CandlesHere’s a clear breakdown of what your merged Pine Script does:
---
### 📌 **Indicator Name: VWAP + Engulfing Candles**
* This custom TradingView indicator **plots VWAP (Volume Weighted Average Price)** along with **up to 3 dynamic bands** around it.
* It also **detects Bullish and Bearish Engulfing Candlestick Patterns**, displaying visual markers and triggering alerts.
---
## 🔹 **1. VWAP Section**
### ➤ **Main Features:**
* Calculates VWAP anchored to a **customizable time period**:
* Options: Session, Week, Month, Quarter, Year, Decade, Century, Earnings, Dividends, Splits.
* Optional **hiding of VWAP on Daily/Weekly/Monthly charts** to reduce clutter.
### ➤ **Bands Around VWAP:**
* Up to **3 bands** can be plotted above and below the VWAP.
* Bands can be based on either:
* **Standard Deviation** of the price from VWAP (volatility-based), or
* **Percentage** deviation from VWAP (fixed range).
* You can control:
* Whether each band is shown
* Band width via multiplier (e.g., 1x, 2x, 3x)
### ➤ **Plot Colors:**
* VWAP: Blue
* Bands: Green (1x), Olive (2x), Teal (3x)
* Band fill areas are semi-transparent.
---
## 🔹 **2. Engulfing Candlestick Pattern Detector**
### ➤ **Bullish Engulfing Criteria:**
* Current candle opens **below** or **equal to** the close of the previous candle.
* Current candle opens **below** the previous candle's open.
* Current candle closes **above** the previous candle’s open.
### ➤ **Bearish Engulfing Criteria:**
* Current candle opens **above** or **equal to** the close of the previous candle.
* Current candle opens **above** the previous candle’s open.
* Current candle closes **below** the previous candle’s open.
### ➤ **Visual Signals:**
* 🔼 Green triangle **below bar** for **Bullish Engulfing**
* 🔽 Red triangle **above bar** for **Bearish Engulfing**
### ➤ **Alerts:**
* The script includes two alert conditions:
* One for Bullish Engulfing
* One for Bearish Engulfing
These alerts can be used to automate notifications for potential reversal points.
---
## 🛠️ **Use Cases**
* **Trend following or reversal spotting**: VWAP helps identify the average trading price; engulfing patterns often signal reversals.
* **Intraday and swing trading**: Works best on timeframes like 5m, 15m, 1h for intraday, or 4h, 1D for swing.
* **Mean reversion strategies**: Bands help spot overbought/oversold areas relative to VWAP.
Helen Trend RegimeGreatness starts from a tiny step forward.
This indicator combines EMA as a directional signal, BBWP as a volatility signal, and Volume Z-score as an volume signal to mark the market status: either in up trend, down trend, range, or in transition.
3 MA/EMA Khít Chính XácThis script is designed to detect highly precise convergence of 3 moving averages: MA(8), MA(21), and EMA(21).
When these three lines meet very closely on the chart, it may indicate a potential breakout or trend change.
Useful for short-term momentum traders who want to identify low-risk entry zones.
Includes:
- Real-time alert condition when MA lines converge
- Optional Bollinger Band smoothing
- Triangle-shaped visual signal for convergence points
Created by KimTrading 🟡 | For 1-min to 1H scalping & trend analysis.
EMA Cross Signal Dashboard V4Amazing Scanner for demo useAmazing Scanner for demo useAmazing Scanner for demo useAmazing Scanner for demo useAmazing Scanner for demo useAmazing Scanner for demo use
Moving Average Convergence DivergenceThe MACD indicator dedicated to the K-line kinetic theory has added different background colors for the yellow line above and below the zero axis + modified the default value of the MACD energy column (*2)
K线动能理论专用的MACD指标,添加了黄线在零轴之上和之下不同的背景色+修改了默认的MACD能量柱的值(*2)
A+ Trade Checklist
See bearish or bullish trends for QQQ and SPY
Check if the ticker is above or below important levels like Previous Day High/Low and Premarket High/Low
Set your own X-minute High/Low and see if the price is above or below
Set your own EMA and check if the price is above or below
Choose the corner of the chart to display the table
Customize all colors to match your preferences
EMA-MACD-RSI Strategy PRO//@version=5
strategy("EMA-MACD-RSI Strategy PRO", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=10)
// === Indicatori ===
ema20 = ta.ema(close, 20)
ema50 = ta.ema(close, 50)
macdLine = ta.ema(close, 12) - ta.ema(close, 26)
signalLine = ta.ema(macdLine, 9)
rsi = ta.rsi(close, 14)
// === Condizioni Long ===
longCond = ta.crossover(ema20, ema50) and macdLine > signalLine and rsi > 50
if (longCond)
strategy.entry("Long", strategy.long)
// === Condizioni Short ===
shortCond = ta.crossunder(ema20, ema50) and macdLine < signalLine and rsi < 50
if (shortCond)
strategy.entry("Short", strategy.short)
// === Uscita ===
exitLong = ta.crossunder(macdLine, signalLine)
exitShort = ta.crossover(macdLine, signalLine)
if (exitLong)
strategy.close("Long")
if (exitShort)
strategy.close("Short")
// === Plot indicatori ===
plot(ema20, title="EMA 20", color=color.orange)
plot(ema50, title="EMA 50", color=color.teal)
// === Dashboard ===
var table dash = table.new(position.top_right, 2, 4, border_width=1)
if bar_index % 1 == 0
table.cell(dash, 0, 0, "Segnale", text_color=color.white, bgcolor=color.gray)
table.cell(dash, 1, 0, longCond ? "LONG" : shortCond ? "SHORT" : "-", text_color=color.white, bgcolor=longCond ? color.green : shortCond ? color.red : color.gray)
table.cell(dash, 0, 1, "RSI", text_color=color.white, bgcolor=color.gray)
table.cell(dash, 1, 1, str.tostring(rsi, format.mintick), text_color=color.white)
table.cell(dash, 0, 2, "MACD > Signal", text_color=color.white, bgcolor=color.gray)
table.cell(dash, 1, 2, str.tostring(macdLine > signalLine), text_color=color.white)
table.cell(dash, 0, 3, "EMA20 > EMA50", text_color=color.white, bgcolor=color.gray)
table.cell(dash, 1, 3, str.tostring(ema20 > ema50), text_color=color.white)
// === Alert ===
alertcondition(longCond, title="Segnale Long", message="LONG: EMA20 > EMA50, MACD > Signal, RSI > 50")
alertcondition(shortCond, title="Segnale Short", message="SHORT: EMA20 < EMA50, MACD < Signal, RSI < 50")
Strategia 9-30 Candle con Dashboard//@version=5
indicator("Strategia 9-30 Candle con Dashboard", overlay=true)
// Impostazioni EMA
ema9 = ta.ema(close, 9)
ema30 = ta.ema(close, 30)
plot(ema9, color=color.blue, title="EMA 9")
plot(ema30, color=color.red, title="EMA 30")
// RSI e filtro
rsi = ta.rsi(close, 14)
rsiFiltroLong = rsi > 50
rsiFiltroShort = rsi < 50
// Volume e filtro
volFiltroLong = volume > ta.sma(volume, 20)
volFiltroShort = volume > ta.sma(volume, 20)
// Condizioni LONG
longCondition = ta.crossover(ema9, ema30) and close > ema9 and close > ema30 and rsiFiltroLong and volFiltroLong
plotshape(longCondition, title="Entrata Long", location=location.belowbar, color=color.green, style=shape.labelup, text="LONG")
exitLong = ta.crossunder(ema9, ema30)
plotshape(exitLong, title="Uscita Long", location=location.abovebar, color=color.orange, style=shape.labeldown, text="EXIT")
// Condizioni SHORT
shortCondition = ta.crossunder(ema9, ema30) and close < ema9 and close < ema30 and rsiFiltroShort and volFiltroShort
plotshape(shortCondition, title="Entrata Short", location=location.abovebar, color=color.red, style=shape.labeldown, text="SHORT")
exitShort = ta.crossover(ema9, ema30)
plotshape(exitShort, title="Uscita Short", location=location.belowbar, color=color.orange, style=shape.labelup, text="EXIT")
// Background per segnali forti
bgcolor(longCondition ? color.new(color.green, 85) : na, title="BG Long")
bgcolor(shortCondition ? color.new(color.red, 85) : na, title="BG Short")
// Trailing Stop
var float trailPriceLong = na
var float trailPriceShort = na
trailPerc = input.float(0.5, title="Trailing Stop %", minval=0.1, step=0.1)
if (longCondition)
trailPriceLong := close * (1 - trailPerc / 100)
else if (close > trailPriceLong and not na(trailPriceLong))
trailPriceLong := math.max(trailPriceLong, close * (1 - trailPerc / 100))
if (shortCondition)
trailPriceShort := close * (1 + trailPerc / 100)
else if (close < trailPriceShort and not na(trailPriceShort))
trailPriceShort := math.min(trailPriceShort, close * (1 + trailPerc / 100))
plot(trailPriceLong, title="Trailing Stop Long", color=color.green, style=plot.style_linebr, linewidth=1)
plot(trailPriceShort, title="Trailing Stop Short", color=color.red, style=plot.style_linebr, linewidth=1)
// Dashboard
var table dashboard = table.new(position.top_right, 2, 4, border_width=1)
bgCol = color.new(color.gray, 90)
signal = longCondition ? "LONG" : shortCondition ? "SHORT" : "-"
signalColor = longCondition ? color.green : shortCondition ? color.red : color.gray
if bar_index % 1 == 0
table.cell(dashboard, 0, 0, "Segnale:", text_color=color.white, bgcolor=bgCol)
table.cell(dashboard, 1, 0, signal, text_color=color.white, bgcolor=signalColor)
table.cell(dashboard, 0, 1, "RSI:", text_color=color.white, bgcolor=bgCol)
table.cell(dashboard, 1, 1, str.tostring(rsi, format.mintick), text_color=color.white, bgcolor=bgCol)
table.cell(dashboard, 0, 2, "Volume:", text_color=color.white, bgcolor=bgCol)
table.cell(dashboard, 1, 2, str.tostring(volume, format.volume), text_color=color.white, bgcolor=bgCol)
table.cell(dashboard, 0, 3, "EMA9 > EMA30:", text_color=color.white, bgcolor=bgCol)
table.cell(dashboard, 1, 3, str.tostring(ema9 > ema30), text_color=color.white, bgcolor=bgCol)
// Alert
alertcondition(longCondition, title="Segnale Long", message="LONG: EMA9 incrocia EMA30, RSI > 50, volume alto")
alertcondition(shortCondition, title="Segnale Short", message="SHORT: EMA9 incrocia EMA30 verso il basso, RSI < 50, volume alto")
alertcondition(exitLong, title="Uscita Long", message="Uscita da LONG: EMA9 incrocia EMA30 verso il basso")
alertcondition(exitShort, title="Uscita Short", message="Uscita da SHORT: EMA9 incrocia EMA30 verso l'alto")