Harmonic Patterns Pro - Exact Ratios [abusuhil]═══════════════════════════════════════════════════════════════════
Harmonic Patterns Pro - Exact Ratios
═══════════════════════════════════════════════════════════════════
ENGLISH DESCRIPTION:
A professional harmonic pattern detector using precise Fibonacci ratios based on standard harmonic analysis reference tables.
KEY FEATURES:
• Exact Ratio System: Uses precise ratios from harmonic pattern reference tables
• Advanced Tolerance Control: Choose between 4 detection modes (All Exact, Exact+1, Exact+2, Exact+3 Flexible)
• Customizable Tolerance: Adjust exact (±3% default) and flexible (±8% default) tolerance levels
• 9 Harmonic Patterns: Gartley, Bat, Alternate Bat, Butterfly, Crab, Deep Crab, Shark, Cypher, AB=CD
• Smart ZigZag: Automatic pivot point detection
• PRZ Zones: Visual potential reversal zones
• Multiple Targets: TP1 (38.2%), TP2 (61.8%), TP3 (Point C)
• Auto Stop Loss: Calculated based on pattern structure
• Simplified Mode: Clean view with only essential signals
• Full Customization: Colors, opacity, sizes, styles
• Built-in Alerts: Notifications for pattern completion
WHAT MAKES IT DIFFERENT:
Unlike traditional harmonic indicators using approximate ratios, this indicator:
- Uses exact ratios from harmonic pattern reference tables
- Provides intelligent ratio tolerance control
- Allows mixing exact and flexible ratios
- Reduces false signals through advanced pattern matching
- Supports both conservative and aggressive trading approaches
HOW TO USE:
1. Select your preferred tolerance mode (Exact + 2 Flexible recommended for balanced detection)
2. Adjust tolerance percentages if needed
3. Enable/disable specific patterns based on your strategy
4. Customize visual settings
5. Set up alerts for automatic notifications
6. Use TP1, TP2, TP3 for profit-taking strategy
7. Place stop loss according to the SL indicator line
DISCLAIMER:
This indicator is provided for educational and informational purposes only. It should not be considered as financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss. Always perform your own analysis, use proper risk management, and consult with a qualified financial advisor before making trading decisions. Past performance is not indicative of future results.
═══════════════════════════════════════════════════════════════════
الوصف بالعربية:
كاشف احترافي للأنماط التوافقية يستخدم نسب فيبوناتشي الدقيقة المبنية على جداول التحليل التوافقي المرجعية القياسية.
المميزات الرئيسية:
• نظام النسب الدقيقة: يستخدم نسباً دقيقة من جداول الأنماط التوافقية المرجعية
• التحكم المتقدم بالتسامح: اختر بين 4 أوضاع كشف (كل النسب دقيقة، دقيق+1، دقيق+2، دقيق+3 مرن)
• تسامح قابل للتخصيص: اضبط مستويات التسامح الدقيق (±3% افتراضي) والمرن (±8% افتراضي)
• 9 أنماط توافقية: جارتلي، خفاش، خفاش بديل، فراشة، سلطعون، سلطعون عميق، قرش، سايفر، AB=CD
• زجزاج ذكي: كشف تلقائي لنقاط الارتكاز
• مناطق PRZ: مناطق مرئية للانعكاسات المحتملة
• أهداف متعددة: TP1 (38.2%)، TP2 (61.8%)، TP3 (النقطة C)
• وقف خسارة تلقائي: يُحسب بناءً على هيكل النمط
• وضع مبسط: عرض نظيف بالإشارات الأساسية فقط
• تخصيص كامل: الألوان، الشفافية، الأحجام، الأنماط
• تنبيهات مدمجة: إشعارات لاكتمال الأنماط
ما الذي يميزه:
على عكس مؤشرات الأنماط التوافقية التقليدية التي تستخدم نسباً تقريبية، هذا المؤشر:
- يستخدم نسباً دقيقة من جداول الأنماط التوافقية المرجعية
- يوفر تحكماً ذكياً بتسامح النسب
- يسمح بمزج النسب الدقيقة والمرنة
- يقلل الإشارات الخاطئة من خلال المطابقة المتقدمة للأنماط
- يدعم أساليب التداول المحافظة والعدوانية
كيفية الاستخدام:
1. اختر وضع التسامح المفضل (دقيق + 2 مرن موصى به للكشف المتوازن)
2. اضبط نسب التسامح إذا لزم الأمر
3. فعّل/عطّل أنماط معينة بناءً على استراتيجيتك
4. خصص إعدادات العرض
5. اضبط التنبيهات للإشعارات التلقائية
6. استخدم TP1 وTP2 وTP3 لاستراتيجية جني الأرباح
7. ضع وقف الخسارة وفقاً لخط مؤشر SL
إخلاء المسؤولية:
يُقدم هذا المؤشر لأغراض تعليمية وإعلامية فقط. لا ينبغي اعتباره نصيحة مالية أو توصية لشراء أو بيع أي أداة مالية. ينطوي التداول على مخاطر كبيرة للخسارة. قم دائماً بإجراء التحليل الخاص بك، واستخدم إدارة مخاطر مناسبة، واستشر مستشاراً مالياً مؤهلاً قبل اتخاذ قرارات التداول. الأداء السابق ليس مؤشراً على النتائج المستقبلية.
═══════════════════════════════════════════════════════════════════
Educational
The Wave Levels (ORB Indicator)This Indicator is made for the ORB trader. It's purpose is to help make your charting faster by providing some basic key levels to reference at a glance. This was optimized to be used on the 5m timeframe.
Key features:
1. Green and Red ORB rays to indicate the 15 minute Opening Range. These ranges will only extend as long as its respective session's length.
2. Previous sessions zones for historical easily identification of historical data (best used in UTC-4 timezone)
3. White Liquidity Rays. These rays are used to mark a previous session's high or low which hasn't been swept yet. This makes for a good TP area or identifying a potential reversal area.
Once a previous session high or low has been taken, the ray will automatically remove.
I am not a professional coder. This indicator was created by continuously prompting AI commands over the course of 3 days.
WTG_JMMB 2.0NYC Bus Schedule. Wall Street route. Streets Broadway, William Street, South Street. Do not be late.
First 15 Minutes From OpenHighlights the first 15 minutes after open and the tick value between high and low
Custom Drawdown LevelsInput fields for three custom percentages.
Calculation of drawdown levels from the all-time high.
Plotting horizontal lines at those levels.
Market Opens + Killzones — Tokyo, London & New York (Pro)Market Opens + Institutional Killzones — Tokyo, London & New York (Pro)
This indicator automatically plots the opening times and Institutional Killzones for the three most important financial centers in the world: Tokyo, London, and New York.
Designed for SMC / ICT traders, it provides a precise visual map of when liquidity, volatility, and institutional order flow are most active.
🕓 Sessions Included:
Tokyo → Opening Line (09:00 JST) | Killzone 09:00–11:00 JST
London → Opening Line (08:00 London) | Killzone 07:00–10:00 London
New York → Opening Line (09:30 NY) | Killzone 08:30–10:30 NY
London–New York Overlap → 13:30–16:00 London / 08:30–11:00 NY
⚙️ Features:
Opening lines for each major market
Configurable colors, line styles, and transparencies
Optional Killzones (session blocks) for each region
Auto-adjusts for Daylight Saving Time (DST)
Works on any timeframe and any symbol
💡 Usage:
Use it to align your analysis with the times when institutional traders are active — the most likely moments for liquidity grabs, reversals, or true directional moves.
Combine with other concepts like Liquidity Pools, Fair Value Gaps, Order Blocks, and Session Bias for maximum precision.
© javierpueblamolina — Built for Smart Money Traders.
Alerts v6The strategy includes:
✅ EMA-based trend direction (fast vs slow)
✅ RSI filtering for overbought/oversold control
✅ ADX confirmation for strong trend validation
✅ Pullback & BOS detection for precision entries
✅ Per-bar change logic for adaptive entry timing
✅ Session/day gating to control trading hours
✅ JSON alert integration for AI trading bots or webhooks
This script is Pine Script v6 compatible and optimized for automated alert-based trading setups such as AI trading bots, webhook systems, and VPS-linked executions.
Recommended Timeframes: 5m, 15m, 30m
Markets: XAUUSD, FX pairs, indices, and metals
Enhanced OB Retest Strategy v7.0The OB Retest Strategy is a full Order Block retest trading system that detects, plots, and trades OB zones across multiple timeframes. It uses structure breaks, retrace depth, and ATR filters to identify strong reversal or continuation setups.
⸻
⚙️ Core Features
• Multi-timeframe OB detection using break-of-structure (BOS) logic
• Automatic zone creation for bullish and bearish order blocks
• Smart merging of overlapping OB zones
• Dynamic flip-zone logic that turns invalidated OBs into new zones
• Wick zone detection for high-precision entries
• ATR-based trailing stop and optional breakeven
• Adjustable retrace depth, breakout %, and ATR filters
• Built-in performance table showing PnL, win rate, and total trades
• Fully backtestable with date range and commission control
⸻
🧠 Logic Summary
1. Detects a BOS on the higher timeframe.
2. Identifies the last opposing candle as the valid OB.
3. Validates the OB based on ATR size and breakout strength.
4. Waits for price to retest the zone to a set depth.
5. Executes trades and manages exits using trailing stop or breakeven.
6. Flips invalidated zones automatically.
⸻
💡 Usage Tips
• Best used on 1H to 4H charts for swing setups.
• Tune ATR and breakout thresholds for your market’s volatility.
• Combine with higher-timeframe bias or liquidity levels for better accuracy.
⸻
⚠️ Notes
• For educational and testing purposes only.
• Backtested results do not predict future performance.
• Always test before live use.
SD Demand & Supply IndicatorSD Demand & Supply Indicator automatically identifies and displays demand and supply zones across multiple timeframes.
The indicator detects:
Demand Zones: Drop–Boring–Rally (DBR) and Rally–Boring–Rally (RBR) formations
Supply Zones: Rally–Boring–Drop (RBR) and Drop–Boring–Drop (DBD) formations
When a Demand Zone is detected, it plots a blue Label below the relevant boring candle. When a Supply Zone is detected, it plots a red Label above the relevant boring candle — making it easy to visualize potential reversal areas.
With built-in alert functionality, you can also set alerts on your preferred symbols and timeframes to get instant notifications whenever new Demand or Supply Zones are formed.
How the Script Works?
1. The script scans the price action of three to five consecutive candles to identify potential Demand and Supply patterns based on the open, High, Low and close prices.
2. The script evaluates every candle’s price movement based on set conditions to confirm a valid demand or supply pattern.
3. For demand cases, the script recognizes specific formations such as Drop– Boring –Rally (DBR) and Rally– Boring –Rally (RBR), which indicate potential buying zones.
4. For supply cases, it identifies Rally– Boring –Drop (RBD) and Drop– Boring –Drop (DBD) structures, indicate potential selling zones.
5. When a valid Demand Zone is detected, the script plots a Blue label below the relevant Boring candle.
6. When a valid Supply Zone is found, it plots a Red label above the relevant Boring candle.
7. The script includes an alert feature that notifies users in real-time whenever a valid demand or supply pattern is formed, allowing timely action
How Users can get benefited using this Script?
1. The labels and text plotted by the script help traders visually identify potential entry and exit points.
2. When a valid Demand Zone is detected and the price revisits it, it may indicate a potential bullish reversal.
3. When a valid Supply Zone is detected and the price revisits it, it may indicate a potential bearish reversal.
4. Users can integrate this script with other indicators, fundamental data, or sentiment analysis to confirm signals and make more informed decisions.
5. Traders should use proper risk management strategies, including stop-loss orders to limit losses and targets when the trade moves in their favor.
Settings Explained
1. Boring & Legin Ratio
This is the ratio between the Legin candle and the Boring candle.
A default value of 2 means the Legin candle size (High–Low) is twice the size (High–Low) of the Boring candle.
2. Leg-In & Leg-Out Ratio
This is the ratio of Legin candle and Legout candle.
A default value 2 means the Legout candle size (High-Low) is twice the size (High-Low) of the Legin candle.
3. Leg-In & Three-Leg-Out Ratio
This is the ratio of Legin candle and to the combined size of three Legout candles. A default value 2 means the overall size of the three Legout candles is twice that of the Legin candle.
4. Leg-In Body to Wick Ratio
It is the ratio between the body size of a candle and its total wick length.
A default value of 0.6 means that 60% of the total candle length should be the body.
Zone Selection Filters
1. All Possible Zones
Displays all types of zones, including with or without Clear Area and with or without True Range (TR) vs Average True Range (ATR) criteria
2. All Zones with TR Vs ATR
Shows all zones but with True Range (TR) vs Average True Range (ATR) criteria.
3. Clear Area Zone Only
It will show the Zone with Clear Area and either with or without TR Vs ATR compliance
Clear Area Zone – is considered when the body of the Legout candle does not overlap the Boring candle. In other words, the right side of the Boring candle area remains completely free
4. Clear Area Zone with TR vs ATR Compliance
It will show the Zone with Clear Area and with TR Vs ATR compliance
Note: No. 1 and 2 is suitable for Forex, and crypto market segment
No. 3 and 4 is suitable for commodity and stock market segment
What is TR Vs ATR Criteria?
TR (True Range) vs ATR (Average True Range) criteria is used to validate the strength of a Demand or Supply Zone and it is very important criteria.
For Legin Candle (first candle of the pattern from left) — TR value should be greater than the ATR value.
For Boring Candle (second candle of the pattern from left) — TR value should be smaller than the ATR value.
For Legout Candle (third ,fourth & fifth candle of the pattern from left) — TR value should again be greater than the ATR value,
Important:
Due to the high calculation effort, the history is limited to maximum 10 Zones in total. All zones prior to that will not be displayed so that chart remain clear. Once our indicator has started displaying a Zone, then zone will be visible until it exceeds maximum 10 Zone history. This indicator does not repaint. All signals remain fixed once a candle closes.
What Makes this Indicator Unique?
The Smart Dude Indicator stands out because it doesn’t just mark Demand and Supply Zones — it qualifies them using advanced candle behavior and volatility analysis by using TR Vs ATR analysis .
Unlike typical zone indicators that rely only on price structure, Smart Dude combines candle-to-candle ratio logic with TR vs ATR criteria
Why traders use this indicator?
This strategy is already being used by many experienced traders, including some of my close trading associates. They’ve seen results and even encouraged me to publish it so that more traders can benefit from it. The indicator combines key elements like candle ratio and TR vs ATR criteria, giving users a structured and reliable way to identify zones.
How this Indicator Is Original?
The Smart Dude Indicator is a fully original work — designed and coded from scratch with a unique logic structure.
It is not copied or derived from any existing open-source script.
Key points that make it unique and original:
Exclusive Candle Ratio Logic
TR vs ATR Integration
Clear Area Detection
Fully Hand-Written Logic
Every condition — from candle identification to ratio calculation and plotting — has been manually coded line by line without importing or modifying any existing public logic.
Disclaimer:
This indicator is only for educational purposes and that highlights potential market opportunities. It should not be treated as financial or investment advice.
Trading in financial markets involves risk. The indicator is designed to assist you in making more informed decisions but outcomes depend on your due intelligence and zone validation skills
Alpha Signal PROSuggested Title:
Probability Indicator: Alpha Signal PRO
English Description for TradingView Publication:
Overview
Tired of indicators that generate endless signals without telling you the true quality of each setup?
Alpha Signal PRO is more than just another buy/sell indicator; it is a complete decision-support system designed for traders who operate on confluence and high-probability setups. Instead of just telling you when to enter, this indicator analyzes each potential opportunity through a proprietary engine and grades it within a clear hierarchy. This allows you to focus only on the highest quality setups and manage your risk intelligently.
👑 The Difference: The Signal Grading Engine™
The true power of Alpha Signal PRO lies in its intelligent analysis engine. Rather than treating all signals equally, it qualifies them across different confidence levels, enabling superior risk management and a focus on A++ setups.
Basic Signal (M): A moderate-quality opportunity, ideal for more active traders targeting shorter-term moves.
Reinforced Signal (M+): A high-quality setup where multiple trend and momentum factors are in alignment. These are the signals that form the foundation of a consistent strategy.
ALPHA Signal (A++): The "Golden Setup." A rare confluence of ideal market conditions, confirmed by an algorithm that detects institutional strength. These are the highest-conviction signals, designed to capture the most significant market moves.
✅ Key Features
High-Precision Signals: A proprietary algorithm identifies entry points based on momentum and trend continuation.
Signal Quality Grading: Every signal is graded (M, M+, A++) so you instantly know the strength of each opportunity.
100% Non-Repainting: What you see on the chart is exactly how signals would have appeared in real-time. Absolute reliability for your studies and visual backtesting.
Dynamic Risk Management: Stop Loss and Take Profit levels are automatically calculated based on the market's current volatility (ATR), adapting to any asset.
Multiple Exit Modes: Configure your exit strategy to suit your style, whether for scalping, day trading, or swing trading.
Complete Performance Dashboard: Track key performance metrics directly on your chart, allowing for quick and efficient optimization.
Integrated Alert System: Never miss an opportunity. Receive detailed alerts, including the signal's quality grade, on your mobile device or desktop.
How to Use: The Sniper Philosophy
Alpha Signal PRO is designed for traders who prefer quality over quantity.
Focus on ALPHA Signals: Patience is key. Wait for the A++ setups, which represent the best opportunities the system can find.
Adapt to the Asset: The strategy thrives on momentum-driven assets like Indices, Crypto, and Metals. For slower, mean-reverting markets like Forex pairs, we strongly recommend using higher timeframes (H1, H4) to capture clearer trends.
Trust the Risk Management: Use the ATR-based SL and TP levels as a foundation for solid and consistent risk management.
Access
This is a private, invite-only indicator. It will not be made available in the public TradingView library.
Disclaimer: Success in trading requires more than a good tool. It is essential to combine the use of Alpha Signal PRO with strict risk management and discipline. Past performance is not indicative of future results.
RVI Divergence Detector with Custom SMA Filter (v6)This script enhances the classic Relative Vigor Index (RVI) by integrating divergence detection with a user-configurable SMA filter applied directly to the RVI oscillator. The goal is to help traders identify high-probability reversal and continuation signals by combining momentum analysis with dynamic baseline filtering.
How it works:
- The RVI measures the conviction behind price moves by comparing closing vs. opening prices relative to the high-low range over a 10-period window.
- Divergences are detected when price makes a new high/low but the RVI does not:
- Regular Bullish: Price makes a lower low, RVI makes a higher low → potential reversal up.
- Hidden Bullish: Price makes a higher low, RVI makes a lower low → trend continuation.
- Inverse logic applies for bearish cases.
- A customizable SMA (default: 14 periods) is plotted on the RVI line. This acts as a dynamic reference to assess whether divergences occur in strong momentum zones (far from SMA) or neutral zones (near SMA), helping filter out weaker signals.
- Users can adjust:
- Pivot lookback range (min/max bars)
- SMA period (1–200)
- Visibility of bullish/bearish and hidden/regular divergences
Why this version adds value:
Unlike basic RVI scripts, this adaptation introduces a configurable trend filter (SMA) and clear visual labeling ("D" for regular, "H" for hidden) with colored lines (green/red) connecting oscillator and price pivots—making divergences instantly recognizable. The logic is optimized for both scalping (short SMA) and swing trading (longer SMA).
Credits:
Based on the original RVI divergence concept by madoqa. This is an open-source adaptation under the Mozilla Public License 2.0. No financial advice. Use at your own risk.
Multi-Entry Position SizerMulti-Entry Position Sizer (with Risk, Margin & Tables)
This tool is designed for traders who manage multiple staggered entries (scaling in) with fixed risk allocation. It calculates position sizes, margin requirements, and liquidation levels for up to 5 custom entry points, based on a defined stop loss and wallet risk.
🔧 Features
Entry Management
Supports up to 5 entries.
Use 0 to ignore an entry, -1 to auto-use current price.
Valid entries are drawn as colored dashed lines.
Invalid entries (e.g., entry on wrong side of stop loss) are flagged with red dotted lines and labels.
Risk Control
Risk defined in Direct USDT or % of wallet size.
Risk automatically split across all valid entries.
Per-entry quantity and margin calculated dynamically.
Visualization
Stop loss line in red.
Liquidation levels drawn as faded dotted lines.
Entry labels show price and required margin in USDT.
Summary table (top-right) with symbol, side, risk, SL, leverage.
Entries table (bottom-right) listing each valid entry with:
Price
Quantity
Margin in USDT
Risk/entry in USDT
Liquidation level
Alerts
Alerts trigger when price touches a valid entry.
Separate alert for stop loss hit.
📊 How to Use
Select Side (Long or Short).
Enter your Wallet Size, Risk Parameters, and Leverage.
Define your Stop Loss Price.
Configure up to 5 Entry Points.
0 = disabled
-1 = current market price
Any positive value = custom entry price
Watch tables and chart update automatically:
Invalid entries turn red (ignored in sizing).
Valid entries show correct margin and liquidation prices.
✅ Who Is It For?
Traders who scale in with multiple orders.
Traders who want precise risk per trade.
Anyone who needs to see margin requirements and liquidation prices before placing orders.
⚠️ Disclaimer:
This script is for educational purposes. It does not place orders automatically and should not be considered financial advice. Always double-check calculations with your exchange before trading.
ICT Liquidity Sweep Asia/London 1 Trade per High & Low🧠 ICT Liquidity Sweep Asia/London — 1 Trade per High & Low
This strategy is inspired by the ICT (Inner Circle Trader) concepts of liquidity sweeps and market structure, focusing on the Asia and London sessions.
It automatically identifies liquidity grabs (sweeps) above or below key session highs/lows and enters trades with a fixed risk/reward ratio (RR).
----------------------------------------------------------------------------------
----------------------------------------------------------------------------------
⚙️ Core Logic
-Asia Session: 8:00 PM – 11:59 PM (New York time)
-London Session: 2:00 AM – 5:00 AM (New York time)
-The script marks the Asia High/Low and London High/Low ranges for each day.
-When the market sweeps above a session high → potential Short setup
-When the market sweeps below a session low → potential Long setup
-A trade is triggered when the confirmation candle closes in the opposite direction of the sweep (bearish after a high sweep, bullish after a low sweep).
-Only one trade per sweep type (1 per High, 1 per Low) is allowed per session.
----------------------------------------------------------------------------------
----------------------------------------------------------------------------------
📈 Risk Management
-Configurable Risk/Reward Target (default = 2:1)
-Configurable Position Size (number of contracts)
-Each trade uses a fixed Stop Loss (beyond the wick of the sweep) and a Take Profit calculated from the RR setting.
-All trades are automatically logged in the Strategy Tester with performance metrics.
----------------------------------------------------------------------------------
----------------------------------------------------------------------------------
💡 Features
✅ Visual session highlighting (Asia = Aqua, London = Orange)
✅ Automatic liquidity line plotting (session highs/lows)
✅ Entry & exit labels (optional visual display)
✅ Customizable RR and contract size
✅ Works on any instrument (ideal for indices, futures, or forex)
✅ Compatible with all timeframes (optimized for 1M–15M)
----------------------------------------------------------------------------------
----------------------------------------------------------------------------------
⚠️ Notes
-Best used on New York time-based charts.
-Designed for educational and backtesting purposes — not financial advice.
-Use as a foundation for further optimization (e.g., SMT confirmation, FVG filter, or time-based restrictions).
----------------------------------------------------------------------------------
----------------------------------------------------------------------------------
🧩 Recommended Use
Pair this with:
-ICT’s concepts like CISD (Change in State of Delivery) and FVGs (Fair Value Gaps)
-Higher timeframe liquidity maps
-Session bias or daily narrative filters
----------------------------------------------------------------------------------
----------------------------------------------------------------------------------
Author: jygirouard
Strategy Version: 1.3
Type: ICT Liquidity Sweep Automation
Timezone: America/New_York
4-Hour Range Scalping [v6.3]User Guide: 4-Hour Range Scalping Strategy
Hello! Here is the guide for the Pine Script strategy. Please read it carefully to get the best results.
📈 This script automates the "4-Hour Range Scalping Strategy" from the video.
The main idea is that the first four hours of a major trading day (like New York) set up a "trap zone." The strategy waits for the price to break out of this zone and then fail, giving us a signal that the breakout was false and the price is likely to reverse.
Here’s the simple logic:
Define the Range: It precisely calculates the highest high and lowest low during the first four hours of the selected trading session (e.g., 00:00 to 04:00 New York Time).
Wait for a Breakout: It then monitors the 5-minute chart for a price breakout where a candle fully closes outside of this established range.
Identify the Reversal: The trade trigger occurs when the price fails to continue its breakout and a subsequent 5-minute candle closes back inside the range. This signals a potential reversal or "failed breakout."
Execute the Trade:
]A Short (Sell) trade is triggered after a failed breakout above the range high.
A Long (Buy) trade is triggered after a failed breakout below the range low.
Manage the Risk: The Stop Loss is automatically placed at the peak (for shorts) or trough (for longs) of the breakout move, and the Take Profit is set to a default 2:1 Risk/Reward Ratio.
How to Use the Script (Step-by-Step) ⚙️
Follow these instructions to get it running perfectly.
1. Set Your Chart Timeframe This is the most important step. The strategy is designed to run on a 5-minute (5m) chart. Open your TradingView chart and make sure the timeframe is set to "5m".
2. Add the Script to Your Chart Open the Pine Editor tab at the bottom of TradingView, paste the entire script, and click the "Add to chart" button.
3. Configure the Settings On your chart, find the strategy's name (e.g., "4-Hour Range Scalping ") and click the gear icon ⚙️ to open its settings.
Trading Session: Choose the session for the range. New York is the default and the one from the video.
Risk/Reward Ratio: The default is 2.0, meaning your potential profit is twice your potential loss. You can adjust this to test other targets.
Backtesting Period: To see how the strategy performed on all historical data, go to the "Strategy Tester" panel, click its own gear icon ⚙️, and uncheck the boxes for "Start Date" and "End Date."
4. Understand the Visuals on Your Chart
Blue Background Area: This is the 4-hour calculation window. The script is identifying the day's high and low during this time. No trades will ever happen here.
Red Line (Range High): The highest price of the 4-hour window. This is the upper boundary of the "trap zone."
Green Line (Range Low): The lowest price of the 4-hour window. This is the lower boundary.
Green Triangle (▲): Shows where a Long (Buy) trade was entered.
Red Triangle (▼): Shows where a Short (Sell) trade was entered.
A Very Important Note on Timezones 🕒
This is critical for you in the Philippines (PHT).
The script is based on the New York session, which is 12 hours behind you. Your TradingView chart will still show your local time, but the script works on NY time in the background.
The New York "day" begins at 12:00 PM (Noon) your time.
The script's blue calculation window will be from 12:00 PM to 4:00 PM your local time.
The red and green range lines will appear on your chart only after 4:00 PM your time.
So, if you look at your chart in the morning or early afternoon, you will not see today's range yet. This is normal! The script is just waiting for the New York session to start.
How to Set Up Trade Alerts 🔔
You can have TradingView send you a notification whenever the script enters a trade.
Click the "Alert" button (looks like a clock) in the right-hand toolbar of TradingView.
In the "Condition" dropdown, select the name of the script (e.g., "4-Hour Range Scalping...").
You will then see two options: "Long Signal" and "Short Signal".
Select one (e.g., "Long Signal") and configure how you want to be notified (e.g., "Notify on app").
Click "Create". Repeat the process to create an alert for the other signal.
⚠️ Important Disclosure
For Educational and Research Purposes Only.
This script and all accompanying information are provided for educational and research purposes only. The strategy demonstrated is a technical concept and should not be misconstrued as financial, investment, legal, or tax advice.
Trading financial markets involves substantial risk and is not suitable for every investor. There is a possibility that you could sustain a loss of some or all of your initial investment. Therefore, you should not invest money that you cannot afford to lose.
Past performance is not indicative of future results. The backtesting results shown by this script are historical and do not guarantee future performance. Market conditions are constantly changing.
By using this script, you acknowledge that you are solely responsible for any and all trading decisions you make. You should conduct your own thorough research and, if necessary, seek advice from an independent financial advisor before making any investment decisions. The creators of this script assume no liability for any of your trading results.
FVG and OB🧠 Concept Behind the “FVG and OB” Indicator
This indicator merges two core ICT (Inner Circle Trader) concepts — Fair Value Gaps (FVGs) and Order Blocks (OBs) — into one clean, dynamic visualization tool.
It is designed for professional price-action traders who want to track institutional imbalances and smart money footprints directly on the chart.
🟩 FAIR VALUE GAP (FVG)
An FVG represents an imbalance in price caused by aggressive buying or selling where the market fails to offer two-way liquidity.
It’s typically created when a strong candle leaves a visible “gap” between the previous candle’s high and the next candle’s low (for bullish FVG), or vice versa (for bearish FVG).
In this indicator:
🟢 Bullish FVGs are drawn when low > high
🔴 Bearish FVGs are drawn when high < low
Each gap box dynamically extends to the right until it is mitigated (partially or fully filled).
You can choose between two mitigation modes:
Boundary Touch (default): The FVG is considered mitigated once price touches the gap boundary.
Full Fill: The FVG remains active until the entire gap range is filled.
This gives you real-time awareness of whether liquidity has been rebalanced — a key ICT concept in identifying market turning points.
🟥 ORDER BLOCK (OB)
An Order Block represents the last opposing candle before a strong impulsive move.
It is where institutional traders likely executed large block orders, creating supply or demand zones that price often revisits.
In this script, an OB is automatically drawn:
🟥 Bearish OBs form after a strong down move (usually following a bearish FVG).
🟩 Bullish OBs form after a strong up move (usually following a bullish FVG).
Key features:
The indicator can detect OBs in two ways:
Only FVG’s First Candle: A stricter mode aligning OB formation directly with FVG events.
Classic (Last Opposite Color): A more traditional ICT-style detection that finds the last candle of the opposite color within a defined lookback range.
OBs auto-expand with the next candle’s wick, so any extra high/low beyond the original OB is included by default.
Each OB remains extended until mitigated — when price revisits and closes the imbalance.
⚙️ CONTROL & CUSTOMIZATION
You can control the entire behavior and visualization through the settings panel:
Display Mode: Show only FVGs, only OBs, or both simultaneously.
Mitigation Mode: Choose how strict the FVG closure logic should be.
Body-Only Option: Restrict OB calculation to candle bodies instead of wicks for cleaner structure.
Individual Color Settings: Customize border and fill colors for each block type.
Lookback Depth: Define how far back the system searches for valid OB structures.
The result is a clean, layered representation of institutional footprints — with automatic cleanup logic that prevents chart clutter and keeps only active zones visible.
📊 PRACTICAL APPLICATION
Use this indicator to:
Identify imbalances left by aggressive moves (potential retracement targets).
Confirm confluences between FVGs and OBs — the overlap areas often mark powerful reaction zones.
Track mitigation progress as price revisits those zones.
Refine entry timing when price reacts to unmitigated OBs or fills the last untested FVG.
🧩 TECHNICAL DESIGN
Built in Pine Script v5 with fully modular code architecture.
FVG and OB modules can be toggled or used independently.
Uses arrays for efficient management of multiple boxes.
Auto-updates in real-time and mitigates per-bar to minimize lag.
Designed for multi-timeframe backtesting compatibility.
💡 Summary
This tool visually bridges two of the most powerful Smart Money Concepts —
FVG = imbalance zones and OB = institutional origin blocks.
Together, they help traders map out liquidity flows, identify premium/discount zones, and anticipate where price is likely to react next.
🧑💻 Credits
Based on ICT & Smart Money Concepts, rewritten in modular PineScript with precision mitigation logic.
# For educational and analytical purposes only.
Conviction Ratio | viResearchConviction Ratio | viResearch
Conceptual Foundation and Innovation
The Conviction Ratio by viResearch is a trend strength indicator designed to measure the conviction behind market movements by analyzing price returns over a defined period. It reflects how consistently and powerfully an asset has trended within that time window. The higher the ratio, the stronger and more confident the trend.
This approach provides a clear and intuitive way to gauge whether recent price action is supported by genuine momentum or merely short-term noise. By quantifying return intensity, the indicator helps traders identify assets that are trending with conviction versus those moving without sustained direction.
Technical Composition and Calculation
The Conviction Ratio evaluates an asset’s performance by comparing its current price level to past values over a customizable lookback period. It measures how much the market has advanced or declined, translating that movement into a normalized ratio that reflects overall trend conviction.
A rising ratio indicates strong and accelerating trend strength, while a falling or negative ratio suggests fading momentum or potential reversal. This dynamic view helps traders visually assess whether a trend is strengthening, weakening, or entering a transition phase.
Features and User Inputs
To accommodate different trading styles and timeframes, the indicator offers several adjustable settings:
Period (Days): Defines how far back the indicator measures return performance, allowing users to analyze short-term bursts or longer-term trends.
Start Date: Sets the beginning of the analysis window, useful for backtesting or focusing on a specific time period.
The Conviction Ratio line changes color dynamically to reflect market conviction:
Aqua: Positive ratio, indicating strong upward trend strength.
Pink: Negative ratio, signaling weak or declining market conviction.
Practical Applications
The Conviction Ratio can be applied across all asset classes — equities, cryptocurrencies, forex, and commodities — to identify where the strongest trends are forming. It’s particularly useful for:
Measuring Trend Strength: Quickly determine how strong or sustained a trend is within the chosen timeframe.
Identifying Momentum Shifts: Spot when market conviction is increasing or fading, signaling potential trend continuation or reversal.
Comparative Analysis: Compare multiple assets to find which ones are trending with greater conviction and consistency.
Advantages and Strategic Value
The Conviction Ratio offers a simple yet powerful way to quantify trend quality. Instead of relying on price direction alone, it evaluates the strength and persistence behind that movement. This makes it an ideal tool for trend followers, momentum traders, and portfolio managers seeking to align with assets showing genuine directional confidence.
Its normalized structure ensures consistency across different volatility environments, making it suitable for both discretionary and systematic trading strategies.
Visual Cues and Interpretation
The indicator plots a smooth, color-coded ratio line centered around zero, with key reference levels at +1.0 and –1.0.
Ratios above +1.0 indicate strong, confident uptrends.
Ratios below +1.0 suggest weakening or unstable market conditions.
Ratios below 0 represent unprofitable or negative-return periods.
Sharp declines in the ratio, even from high positive levels, can serve as early warning signals of weakening momentum or potential trend reversal.
By tracking both the level and the rate of change of the ratio, traders can detect when market conviction starts to fade — often before price itself shows clear reversal signs.
Summary and Usage Tips
The Conviction Ratio | viResearch provides traders with a clean, data-driven way to interpret market strength. By focusing on return-based trend conviction, it highlights where the market is moving with genuine confidence and warns when conviction begins to erode.
Use it to confirm breakout strength, identify fading rallies, or monitor early signs of trend exhaustion. The higher the ratio, the stronger the conviction — but when it starts falling sharply, take note. It might be your first signal that the trend is losing strength.
Note: Historical results are for reference only and do not guarantee future performance.
Trade History Label Display On Chart (Copy-paste from Rakuten)Overview
This script automatically displays buy/sell labels on the chart simply by copying and pasting your trade history (execution records) exported from Rakuten Securities in Excel format.
It also automatically calculates the profit and loss for each trade.
Background
When reviewing one’s trades, manually matching the broker’s execution records — “date, time, symbol, number of shares, buy or sell” — with the exact points on the chart can be extremely time-consuming.
This is especially inefficient for day traders and scalpers, who may execute dozens of trades per day.
With this script, you can automatically display the entry (IN) and exit (OUT) points on your chart as labels.
It’s also useful when attaching charts to your trading notes or journals, as you can visually confirm exactly where you entered and exited, greatly speeding up the review process.
The script also supports multiple symbols.
Even if you paste a combined dataset containing trades for several stocks, only the trades for the currently displayed symbol will appear automatically.
This allows you to maintain a single master record and instantly visualize the relevant trades just by switching charts.
How to Use
1. Preparing your Excel data
(1)Export trade history
Export your trade history as a CSV file from Rakuten Securities MarketSpeed II, etc.
If you want to include detailed execution times (seconds), make sure to export the data on the same day.
If you export later as a batch, only the date will remain — the time information (hh:mm:ss) will be lost.
(2)Open and format in Excel
Always open the CSV file in Excel — not in Notepad.
If opened in Notepad, double quotes (") will be automatically added, which makes the script unable to recognize the data correctly.
If you need to include seconds in the execution date/time, set a custom format in Excel as follows:
yyyy/mm/dd hh:mm:ss
Copy the range from Execution Date (Column A) to Execution Price (Column L).
Do not include header rows.
Copy data only. Including the header line will cause parsing errors in the script.
(3)If you create a memo column
You can add a Memo column (Column M) next to the “Execution Price” column.
Anything written here (e.g., trade reasoning or notes) will appear on the chart labels.
If you add a memo column, copy the range from Execution Date (A) to Memo (M) when pasting into the script.
Again, copy only the data (not headers). Including column names will cause errors.
2. Paste data into TradingView
Open the script settings and paste the copied data into the text area labeled “Trade Data Paste Area.”
The script automatically parses the text and recognizes date, time, symbol, trade type, position type, credit type, quantity, price, and memo, displaying them as labels at the correct bar.
You can paste data for multiple stocks at once.
Only the rows matching the currently displayed chart’s symbol will be plotted.
3. Display settings (ON/OFF controls)
Each label element (credit type, position type, quantity, memo, etc.) can be turned ON/OFF individually in the script settings via checkboxes (input.bool).
If you’ve created a memo column, its content will also appear on the label.
4. Checking on the chart
Each trade’s entry and exit are shown directly above or below the relevant candlestick.
You can switch between daily and intraday timeframes for more detailed inspection.
Labels are color-coded (e.g., Buy / Sell / Settlement) for quick visual recognition.
When switching symbols, only the relevant trade labels for that symbol will automatically appear.
5. Notes
The script is designed for use on 1-minute to daily charts.
If there’s no matching candlestick for a given trade date/time, the label may not display correctly.
Data input is manual paste only (automatic import not supported).
CSV files must be edited in Excel. Other editors may alter the text format, causing parsing errors.
Due to Pine Script limitations, input.text_area can hold a maximum of 40,960 characters.
The script is tailored for Rakuten Securities’ export format.
Using data from other brokers may require aligning column structures.
If Rakuten changes its export format, the script may need adjustment.
--------------------------------------------------------------------------------------------
概要
このスクリプトは、楽天証券の約定履歴(取引記録)をExcelからコピーして貼り付けるだけで、チャート上に売買ラベルを自動表示するツールです。
また、各取引の損益も自動で計算されます。
背景
自分のトレードを振り返る際、証券会社の約定記録から「何月何日何時何分、どの銘柄を、何株、買った・売った」を確認して、チャート上の位置と突き合わせる作業は非常に時間がかかります。
特にデイトレードやスキャルピングをしていると、1日に数十件以上の約定が発生し、手動で位置を確認するのは非効率です。
このスクリプトを使えば、IN・OUTのタイミングをチャート上にラベルとして自動表示できます。
自分のトレードノート、トレード日記にチャート画像を貼り付ける際も利用 でき、チャートのどこでエントリー/決済したかを視覚的に確認できるため、振り返り作業が大幅に効率化されます。
また、 複数銘柄に対応しており、貼り付けたデータの中から現在表示中のチャート銘柄と一致する売買履歴だけを抽出・表示します。
これにより、複数銘柄分の約定記録を一括管理していても、チャートを切り替えるだけで該当銘柄の取引履歴を瞬時に可視化できます。
使用方法
1. Excelデータの準備
(1)約定履歴のエクスポート
楽天証券マーケットスピードⅡなどから約定履歴をCSV形式でエクスポートします。
約定の詳細な時刻(時分秒単位)データを取得したい場合は、必ず当日中にエクスポートしてください。後日まとめて過去分をエクスポートしても、日付までしか記録されず、時刻情報(hh:mm:ss)は失われます。
(2)Excelで開いて整形
CSVは必ずExcelで開いて編集してください。メモ帳で開くと "(ダブルクォーテーション) が自動的に付与され、スクリプトが正しく認識できません。
約定日の秒単位までを扱いたい場合は、Excelのセル書式設定を開き、「ユーザー定義」で次の形式を新規作成して適用します。書式を変更しないでコピーした場合は分までのデータとなり、スクリプトは00秒と認識します。
yyyy/mm/dd hh:mm:ss
約定日(A列)~約定単価(L列)までのデータ部分をコピーする。
※このとき、項目名(ヘッダー行)は含めず、データ部分のみをコピーしてください。項目名を含めるとスクリプトが誤認識してエラーになります
(3)メモ欄を作成する場合
約定単価の右隣の列(M列)を「メモ欄」として利用できます。ここにエントリー根拠など任意のメモを書いておくとラベル上でもメモを確認できます。
メモ欄を作成した場合は、約定日(A列)からメモ欄(M列)までをコピーして貼り付けてください。
※このとき、項目名(ヘッダー行)は含めず、データ部分のみをコピーしてください。項目名を含めるとスクリプトが誤認識してエラーになります。
2. データをTradingViewに貼り付ける
スクリプトの設定画面を開き、「取引データ貼り付け欄」にExcelからコピーしたデータをそのまま貼り付けます。
スクリプトが自動でテキストを解析し、日付・時刻・銘柄コード・取引区分・建玉区分・信用区分・数量・単価・メモなどを認識して、ラベルをチャート上に自動配置します。
複数銘柄のデータを一度に貼り付けても問題ありません。現在表示中のチャート銘柄と一致する行だけがラベルとして描画されます。
3. 表示設定(ON/OFF切り替え)
各表示要素(信用区分・建玉区分・数量・メモなど)は、設定画面のチェックボックス(input.bool)で個別に表示/非表示を切り替えられます。
メモ欄を作成している場合は、その内容もラベルに表示されます。
4. チャートでの確認
各取引のIN・OUTが、チャート上の該当バー(ローソク足)にラベルとして表示されます。
日足・分足を切り替えることで、より詳細なタイミングを確認できます。
ラベルは、買い(Buy)・売り(Sell)・返済などで色分けされ、視覚的に理解しやすい構成になっています。
チャートを銘柄ごとに切り替えるだけで、その銘柄の取引履歴のみが自動表示されます。
5. 注意点
このスクリプトは 1分足~日足 での使用を想定しています。データ上の日付や時刻に対応するローソク足が存在しない場合、ラベルを正しく表示できません。
データは手動貼り付け方式です。自動取得には対応していません。
Excel以外のアプリで開いたCSVは、文字列形式が変わるため解析できないことがあります。
Pineスクリプトの仕様上、テキストエリアには40,960文字までしか貼り付けできません。
楽天証券の出力フォーマットを想定しているため、他社形式を使う場合は列構成を揃える必要があります。
また、楽天証券の出力フォーマットが変更された場合は、正しく表示出来なります。
Relative Performance Tracker [QuantAlgo]🟢 Overview
The Relative Performance Tracker is a multi-asset comparison tool designed to monitor and rank up to 30 different tickers simultaneously based on their relative price performance. This indicator enables traders and investors to quickly identify market leaders and laggards across their watchlist, facilitating rotation strategies, strength-based trading decisions, and cross-asset momentum analysis.
🟢 Key Features
1. Multi-Asset Monitoring
Track up to 30 tickers across any market (stocks, crypto, forex, commodities, indices)
Individual enable/disable toggles for each ticker to customize your watchlist
Universal compatibility with any TradingView symbol format (EXCHANGE:TICKER)
2. Ranking Tables (Up to 3 Tables)
Each ticker's percentage change over your chosen lookback period, calculated as:
(Current Price - Past Price) / Past Price × 100
Automatic sorting from strongest to weakest performers
Rank: Position from 1-30 (1 = strongest performer)
Ticker: Symbol name with color-coded background (green for gains, red for losses)
% Change: Exact percentage with color intensity matching magnitude
For example, Rank #1 has the highest gain among all enabled tickers, Rank #30 has the lowest (or most negative) return.
3. Histogram Visualization
Adjustable bar count: Display anywhere from 1 to 30 top-ranked tickers (user customizable)
Bar height = magnitude of percentage change.
Bars extend upward for gains, downward for losses. Taller bars = larger moves.
Green bars for positive returns, red for negative returns.
4. Customizable Color Schemes
Classic: Traditional green/red for intuitive interpretation
Aqua: Blue/orange combination for reduced eye strain
Cosmic: Vibrant aqua/purple optimized for dark mode
Custom: Full personalization of positive and negative colors
5. Built-In Ranking Alerts
Six alert conditions detect when rankings change:
Top 1 Changed: New #1 leader emerges
Top 3/5/10/15/20 Changed: Shifts within those tiers
🟢 Practical Applications
→ Momentum Trading: Focus on top-ranked assets (Rank 1-10) that show strongest relative strength for trend-following strategies
→ Market Breadth Analysis: Monitor how many tickers are above vs. below zero on the histogram to gauge overall market health
→ Divergence Spotting: Identify when previously leading assets lose momentum (drop out of top ranks) as potential trend reversal signals
→ Multi-Timeframe Analysis: Use different lookback periods on different charts to align short-term and long-term relative strength
→ Customized Focus: Adjust histogram bars to show only top 5-10 strongest movers for concentrated analysis, or expand to 20-30 for comprehensive overview
Signal vs. Noise Have been working on this to get a better feel for market conditions. Am generally a pretty shit trader so just wanted to give this a go. Any feedback is appreciated.
EGSell v2.76A technical analysis tool designed to automatically detect and visualize bearish engulfing sell patterns on price charts
DayTrader Plug and Play Score Strategy HSBeen playing around with automating a strategy and to make something more flexible in updating indicators/ risk reward scenarios.
I Trade on 5 min timeframe choosing stocks from a day trading scanner I use to evaluate premarket movement.
This script take into account short term EMA crossovers, VWAP, RSI, Candlesticks, and previous day S/R lines to determine buy/sell points. It Mostly runs on a VWAP strategy and will only buy when price is above VWAP and only sell when price is below VWAP. But uses the other indicators as more confirmations.
All of these indicators come together to form a score 1-8.5 and gives buy/sell signals based on the score.
Strategy is as below:
My Stock scanner gives me anywhere from 3-5 stocks per day to trade. (Not included)
Strategy will only trade once per day per stock.
Strategy closes positions after 2 hours in the market.
Strategy closes all positions 5 min before end of day close.
Trade size is set to 1% of the account size. The risk is 2% of that trade, reward is 4%.
Score threshold for hitting the indicator threshold is set to 5.5 score
^^This is all editable in the script.
After building and testing an rebuilding for a few months this has been my most profitable strategy in PAPER TRADING so I thought id share. I enjoy this kind of tinkering and scenario testing. Enjoy!






















