OPEN-SOURCE SCRIPT
Hash Momentum Indicator

Hash Momentum Indicator
Overview
The Hash Momentum Indicator provides real-time momentum-based trading signals with visual entry/exit markers and automatic risk management levels. This is the indicator version of the popular Hash Momentum Strategy, designed for traders who want signal alerts without backtesting functionality.
Perfect for: Live trading, automation via alerts, multi-indicator setups, and clean chart visualization.
What Makes This Indicator Special
1. Pure Momentum-Based Signals
Captures price acceleration in real-time - not lagging moving average crossovers. Enters when momentum exceeds a dynamic ATR-based threshold, catching moves as they begin accelerating.
2. Automatic Risk Management Visualization
Every signal automatically displays:
Entry level (white dashed line)
Stop loss level (red line)
Take profit target (green line)
Partial TP levels (dotted green lines)
3. Smart Trade Management
Trade Cooldown: Prevents overtrading by enforcing waiting period between signals
EMA Trend Filter: Only trades with the trend (optional)
Session Filters: Trade only during Tokyo/London/New York sessions (optional)
Weekend Toggle: Avoid low-liquidity weekend periods (optional)
4. Clean Visual Design
🟢 Tiny green dot = Long entry signal
🔴 Tiny red dot = Short entry signal
🔵 Blue X = Long exit
🟠 Orange X = Short exit
No cluttered labels or dashboard - just clean signals
5. Professional Alerts Ready
Set up TradingView alerts for:
Long signals
Short signals
Long exits
Short exits
How It Works
Step 1: Calculate Momentum
Momentum = Current Price - Price [N bars ago]
Normalized by standard deviation for consistency
Must exceed ATR × Threshold to trigger
Step 2: Confirm Acceleration
Momentum must be increasing (positive momentum change)
Price must be moving in signal direction
Step 3: Apply Filters
EMA Filter: Long only above EMA, short only below EMA (if enabled)
Session Filter: Check if in allowed trading session (if enabled)
Weekend Filter: Block signals on Sat/Sun (if enabled)
Cooldown: Ensure minimum bars passed since last signal
Step 4: Generate Signal
All conditions met = Entry signal fires
Lines automatically drawn for entry, stop, and targets
Step 5: Exit Detection
Opposite momentum detected = Exit signal
Stop loss or take profit hit = Exit signal
Lines removed from chart
⚙️ Settings Guide
Core Strategy
Momentum Length (Default: 13)
Number of bars for momentum calculation. Higher values = stronger signals but fewer trades.
Aggressive: 10
Balanced: 13
Conservative: 18-24
Momentum Threshold (Default: 2.25)
ATR multiplier for signal generation. Higher values = only trade the biggest momentum moves.
Risk:Reward Ratio (Default: 2.5)
Your target profit as a multiple of your risk. With 2.2% stop and 2.5 R:R, your target is 5.5% profit.
Conservative: 3.0+ (need 25% win rate to profit)
Balanced: 2.5 (need 29% win rate to profit)
Aggressive: 2.0 (need 33% win rate to profit)
Overview
The Hash Momentum Indicator provides real-time momentum-based trading signals with visual entry/exit markers and automatic risk management levels. This is the indicator version of the popular Hash Momentum Strategy, designed for traders who want signal alerts without backtesting functionality.
Perfect for: Live trading, automation via alerts, multi-indicator setups, and clean chart visualization.
What Makes This Indicator Special
1. Pure Momentum-Based Signals
Captures price acceleration in real-time - not lagging moving average crossovers. Enters when momentum exceeds a dynamic ATR-based threshold, catching moves as they begin accelerating.
2. Automatic Risk Management Visualization
Every signal automatically displays:
Entry level (white dashed line)
Stop loss level (red line)
Take profit target (green line)
Partial TP levels (dotted green lines)
3. Smart Trade Management
Trade Cooldown: Prevents overtrading by enforcing waiting period between signals
EMA Trend Filter: Only trades with the trend (optional)
Session Filters: Trade only during Tokyo/London/New York sessions (optional)
Weekend Toggle: Avoid low-liquidity weekend periods (optional)
4. Clean Visual Design
🟢 Tiny green dot = Long entry signal
🔴 Tiny red dot = Short entry signal
🔵 Blue X = Long exit
🟠 Orange X = Short exit
No cluttered labels or dashboard - just clean signals
5. Professional Alerts Ready
Set up TradingView alerts for:
Long signals
Short signals
Long exits
Short exits
How It Works
Step 1: Calculate Momentum
Momentum = Current Price - Price [N bars ago]
Normalized by standard deviation for consistency
Must exceed ATR × Threshold to trigger
Step 2: Confirm Acceleration
Momentum must be increasing (positive momentum change)
Price must be moving in signal direction
Step 3: Apply Filters
EMA Filter: Long only above EMA, short only below EMA (if enabled)
Session Filter: Check if in allowed trading session (if enabled)
Weekend Filter: Block signals on Sat/Sun (if enabled)
Cooldown: Ensure minimum bars passed since last signal
Step 4: Generate Signal
All conditions met = Entry signal fires
Lines automatically drawn for entry, stop, and targets
Step 5: Exit Detection
Opposite momentum detected = Exit signal
Stop loss or take profit hit = Exit signal
Lines removed from chart
⚙️ Settings Guide
Core Strategy
Momentum Length (Default: 13)
Number of bars for momentum calculation. Higher values = stronger signals but fewer trades.
Aggressive: 10
Balanced: 13
Conservative: 18-24
Momentum Threshold (Default: 2.25)
ATR multiplier for signal generation. Higher values = only trade the biggest momentum moves.
- Aggressive: 2.0
- Balanced: 2.25
- Conservative: 2.5-3.0
Risk:Reward Ratio (Default: 2.5)
Your target profit as a multiple of your risk. With 2.2% stop and 2.5 R:R, your target is 5.5% profit.
Conservative: 3.0+ (need 25% win rate to profit)
Balanced: 2.5 (need 29% win rate to profit)
Aggressive: 2.0 (need 33% win rate to profit)
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
Quant research firm developing proprietary indicators, trading automation, and risk frameworks for digital & macro markets.
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
Quant research firm developing proprietary indicators, trading automation, and risk frameworks for digital & macro markets.
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน