Range Filter Strategy [Real Backtest]Range Filter Strategy - Real Backtesting
# Overview
Advanced Range Filter strategy designed for realistic backtesting with precise execution timing and comprehensive risk management. Built specifically for cryptocurrency markets with customizable parameters for different assets and timeframes.
Core Algorithm
Range Filter Technology:
- Smooth Average Range calculation using dual EMA filtering
- Dynamic range-based price filtering to identify trend direction
- Anti-noise filtering system to reduce false signals
- Directional momentum tracking with upward/downward counters
Key Features
Real-Time Execution (No Delay)
- Process orders on tick: Immediate execution without waiting for bar close
- Bar magnifier integration for intrabar precision
- Calculate on every tick for maximum responsiveness
- Standard OHLC bypass for enhanced accuracy
Realistic Price Simulation
- HL2 entry pricing (High+Low)/2 for realistic fills
- Configurable spread buffer simulation
- Random slippage generation (0 to max slippage)
- Market liquidity validation before entry
Advanced Signal Filtering
- Volume-based filtering with customizable ratio
- Optional signal confirmation system (1-3 bars)
- Anti-repetition logic to prevent duplicate signals
- Daily trade limit controls
Risk Management
- Fixed Risk:Reward ratios with precise point calculation
- Automatic stop loss and take profit execution
- Position size management
- Maximum daily trades limitation
Alert System
- Real-time alerts synchronized with strategy execution
- Multiple alert types: Setup, Entry, Exit, Status
- Customizable message formatting with price/time inclusion
- TradingView alert panel integration
Default Parameters
Optimized for BTC 5-minute charts:
- Sampling Period: 100
- Range Multiplier: 3.0
- Risk: 50 points
- Reward: 100 points (1:2 R:R)
- Spread Buffer: 2.0 points
- Max Slippage: 1.0 points
Signal Logic
Long Entry Conditions:
- Price above Range Filter line
- Upward momentum confirmed
- Volume requirements met (if enabled)
- Confirmation period completed (if enabled)
- Daily trade limit not exceeded
Short Entry Conditions:
- Price below Range Filter line
- Downward momentum confirmed
- Volume requirements met (if enabled)
- Confirmation period completed (if enabled)
- Daily trade limit not exceeded
Visual Elements
- Range Filter line with directional coloring
- Upper and lower target bands
- Entry signal markers
- Risk/Reward ratio boxes
- Real-time settings dashboard
Customization Options
Market Adaptation:
- Adjust Sampling Period for different timeframes
- Modify Range Multiplier for various volatility levels
- Configure spread/slippage for different brokers
- Set appropriate R:R ratios for trading style
Filtering Controls:
- Enable/disable volume filtering
- Adjust confirmation requirements
- Set daily trade limits
- Customize alert preferences
Performance Features
- Realistic backtesting results aligned with live trading
- Elimination of look-ahead bias
- Proper order execution simulation
- Comprehensive trade statistics
Alert Configuration
Alert Types Available:
- Entry signals with complete trade information
- Setup alerts for early preparation
- Exit notifications for position management
- Filter direction changes for market context
Message Format:
Symbol - Action | Price: XX.XX | Stop: XX.XX | Target: XX.XX | Time: HH:MM
Usage Recommendations
Optimal Settings:
- Bitcoin/Major Crypto: Default parameters
- Forex: Reduce sampling period to 50-70, multiplier to 2.0-2.5
- Stocks: Reduce sampling period to 30-50, multiplier to 1.0-1.8
- Gold: Sampling period 60-80, multiplier 1.5-2.0
TradingView Configuration:
- Recalculate: "On every tick"
- Orders: "Use bar magnifier"
- Data: Real-time feed recommended
Risk Disclaimer
This strategy is designed for educational and analytical purposes. Past performance does not guarantee future results. Always test thoroughly on paper trading before live implementation. Consider market conditions, broker execution, and personal risk tolerance when using any automated trading system.
Best Settings Found for Gold 15-Minute Timeframe
After extensive testing and optimization, these are the most effective settings I've discovered for trading Gold (XAUUSD) on the 15-minute timeframe:
Core Filter Settings:
Sampling Period: 100
Range Multiplier: 3.0
Professional Execution Engine:
Realistic Entry: Enabled (HL2)
Spread Buffer: 2 points
Dynamic Slippage: Enabled with max 1 point
Volume Filter: Enabled at 1.7x ratio
Signal Confirmation: Enabled with 1 bar confirmation
Risk Management:
Stop Loss: 50 points
Take Profit: 100 points (2:1 Risk-Reward)
Max Trades Per Day: 5
These settings provide an excellent balance between signal accuracy and realistic market execution. The volume filter at 1.7x ensures we only trade during periods of sufficient market activity, while the 1-bar confirmation helps filter out false signals. The spread buffer and slippage settings account for real trading costs, making backtest results more realistic and achievable in live trading.
Indicators and strategies
Trading Report Generator from CSVMany people use the Trading Panel. Unfortunately, it doesn't have a Performance Report. However, TradingView has strategies, and they have a Performance Report :-D
What if we combine the first and second? It's easy!
This script is a special strategy that parses transactions in csv format from Paper Trading (and it will also work for other brokers) and “plays” them. As a result, we get a Performance Report for a specific instrument based on our real trades in Paper or another broker.
How to use it :
First, we need to get a CSV file with transactions. To do this, go to the Trading Panel and connect the desired broker. Select the History tab, then the Filled sub-tab, and configure the columns there, leaving only: Side, Qty, Fill Price, Closing Time. After that, open the Export data dialog, select History, and click Export. Open the downloaded CSV file in a regular text editor (Notepad or similar). It will contain a text like this:
Symbol,Side,Qty,Fill Price,Closing Time
FX:EURUSD,Buy,1000,1.0938700000000001,2023-04-05 14:29:23
COINBASE:ETHUSD,Sell,1,1332.05,2023-01-11 17:41:33
CME_MINI:ESH2023,Sell,1,3961.75,2023-01-11 17:30:40
CME_MINI:ESH2023,Buy,1,3956.75,2023-01-11 17:08:53
Next select all the text (Ctrl+A) and copy it to the clipboard.
Now apply the "Trading Report Generator from CSV" strategy to the chart with the desired symbol and TF, open the settings/input dialog, paste the contents of the clipboard into the single text input field of the strategy, and click Ok.
That's it.
In the Strategy Tester, we see a detailed Performance Report based on our real transactions.
P.S. The CSV file may contain transactions for different instruments, for example, you may have transactions for CRYPTO:BTCUSD and NASDAQ:AAPL. To view the report is based on CRYPTO:BTCUSD trades, simply change the symbol on the chart to CRYPTO:BTCUSD. To view the report is based on NASDAQ:AAPL trades, simply change the symbol on the chart to NASDAQ:AAPL. No changes to the strategy are required.
How it works :
At the beginning of the calculation, we parse the csv once, create trade objects (Trade) and sort them in chronological order. Next, on each bar, we check whether we have trades for the time period of the next bar. If there are, we place a limit order for each trade, with limit price == Fill Price of the trade. Here, we assume that if the trade is real, its execution price will be within the bar range, and the Pine strategy engine will execute this order at the specified limit price.
Casper SMC 5min ORB - Roboquant AI🚀 Key Features:
Opening Range (09:30–09:35 EST) breakout detection
Configurable entry type: Instant or Retracement
Adjustable Risk:Reward multiplier and contract sizing
Optional Trailing Stop Loss using ATR
Second-Chance trades if the first breakout fails
Visual markers for entries, SL/TP, trade status, and breakout validation
Day filter: Trade only on selected weekdays
Session management with configurable close time
Breakout validation using:
Wick percentage filters
Distance filters based on OR range size
🧠 AI-Style Logic Enhancements:
Smart filters for avoiding overextended or noisy breakouts
Full support for lookahead-safe logic via barstate.isconfirmed
Clean box-style trade visualization (entry, SL, TP zones)
Custom alerts for long and short entries
⚙️ Recommended Settings:
Use on 5-minute chart
Best for US indices/ Futures
📌 Note:
This script is for educational purposes only.
Performance preview on Tradingview is not accurate
Yoou need to adjust the settings and run a 1 year report
Always backtest thoroughly and consult your financial advisor before live trading.
Dubic EMA StrategyThe Dubic EMA Strategy is a trend-following and volatility-aware strategy that combines dual EMA filters with intelligent range and noise detection to provide clean, actionable entries. It's designed to avoid choppy markets, enhance trade precision, and adapt to different market conditions.
✅ Key Features:
Dual EMA Filter: Enters long when price is above both EMA High & EMA Low, and short when below both.
Range Filter: Avoids entries during tight consolidations or sideways markets.
Volatility Filter: Prevents trading in low-ATR conditions.
Dynamic Risk Management:
ATR-based or fixed % Stop Loss and Take Profit.
Optional Parabolic SAR trailing stop.
One Trade per Trend: Prevents re-entry until trend direction changes.
Unbroken Range Visualization: Detects and displays consolidation zones that can lead to breakouts.
Alerts & Labels: Clean BUY/SELL signals with alerts and chart labels.
🧩 Customization Options:
Adjustable EMA length
Toggle between ATR or % based SL/TP
Volatility threshold
Range detection sensitivity
Enable/disable SAR trailing stop
This strategy works best on trending assets and timeframes with volatility (e.g., crypto, forex, indices). Suitable for both manual trading and automation.
🛠️ Built for clarity, control, and precision.
📈 Backtest, optimize, and deploy with confidence.
NQ Phantom Scalper Pro# 👻 NQ Phantom Scalper Pro
**Advanced VWAP Mean Reversion Strategy with Volume Confirmation**
## 🎯 Strategy Overview
The NQ Phantom Scalper Pro is a sophisticated mean reversion strategy designed specifically for Nasdaq 100 (NQ) futures scalping. This strategy combines Volume Weighted Average Price (VWAP) bands with intelligent volume spike detection to identify high-probability reversal opportunities during optimal market hours.
## 🔧 Key Features
### VWAP Band System
- **Dynamic VWAP Bands**: Automatically adjusting standard deviation bands based on intraday volatility
- **Multiple Band Levels**: Configurable Band #1 (entry trigger) and Band #2 (profit target reference)
- **Flexible Anchoring**: Choose from Session, Week, Month, Quarter, or Year-based VWAP calculations
### Volume Intelligence
- **Volume Spike Detection**: Only triggers entries when volume exceeds SMA by configurable multiplier
- **Relative Volume Display**: Real-time volume strength indicator in info panel
- **Optional Volume Filter**: Can be disabled for testing alternative setups
### Advanced Time Management
- **12-Hour Format**: User-friendly time inputs (9 AM - 4 PM default)
- **Lunch Filter**: Automatically avoids low-liquidity lunch period (12-2 PM)
- **Visual Time Zones**: Color-coded background for active/inactive periods
- **Market Hours Focus**: Optimized for peak NQ trading sessions
### Smart Risk Management
- **ATR-Based Stops**: Volatility-adjusted stop losses using Average True Range
- **Dual Exit Strategy**: VWAP mean reversion + fixed profit targets
- **Adjustable Risk-Reward**: Configurable target ratio to opposite VWAP band
- **Position Sizing**: Percentage-based equity allocation
### Optional Trend Filter
- **EMA Trend Alignment**: Optional trend filter to avoid counter-trend trades
- **Configurable Period**: Adjustable EMA length for trend determination
- **Toggle Functionality**: Enable/disable based on market conditions
## 📊 How It Works
### Entry Logic
**Long Entries**: Triggered when price touches lower VWAP band + volume spike during active hours
**Short Entries**: Triggered when price touches upper VWAP band + volume spike during active hours
### Exit Strategy
1. **VWAP Mean Reversion**: Early exit when price returns to VWAP center line
2. **Profit Target**: Fixed target based on percentage to opposite VWAP band
3. **Stop Loss**: ATR-based protective stop
### Visual Elements
- **VWAP Center Line**: Blue line showing volume-weighted fair value
- **Green Bands**: Entry trigger levels (Band #1)
- **Red Bands**: Extended levels for target reference (Band #2)
- **Orange EMA**: Trend filter line (when enabled)
- **Background Colors**: Yellow (lunch), Gray (after hours), Clear (active trading)
- **Info Panel**: Real-time metrics display
## ⚙️ Recommended Settings
### Timeframes
- **Primary**: 1-5 minute charts for scalping
- **Validation**: Test on 15-minute for swing applications
### Market Conditions
- **Best Performance**: Ranging/choppy markets with good volume
- **Trend Markets**: Enable trend filter to avoid counter-trend trades
- **High Volatility**: Increase ATR multiplier for stops
### Session Optimization
- **Pre-Market**: Generally avoided (low volume)
- **Morning Session**: 9:30 AM - 12:00 PM (high activity)
- **Lunch Period**: 12:00 PM - 2:00 PM (filtered by default)
- **Afternoon Session**: 2:00 PM - 4:00 PM (good volume)
- **After Hours**: Generally avoided (wide spreads)
## ⚠️ Risk Disclaimer
This strategy is for educational purposes only and does not constitute financial advice. Past performance does not guarantee future results. Trading futures involves substantial risk of loss and is not suitable for all investors. Users should:
- Thoroughly backtest on historical data
- Start with small position sizes
- Understand the risks of leveraged trading
- Consider transaction costs and slippage
- Never risk more than you can afford to lose
## 📈 Performance Tips
1. **Volume Threshold**: Adjust volume multiplier based on average NQ volume patterns
2. **Band Sensitivity**: Modify band multipliers for different volatility regimes
3. **Time Filters**: Customize trading hours based on your timezone and preferences
4. **Trend Alignment**: Use trend filter during strong directional markets
5. **Risk Management**: Always maintain consistent position sizing and risk parameters
**Version**: 6.0 Compatible
**Asset**: Optimized for NASDAQ 100 Futures (NQ)
**Style**: Mean Reversion Scalping
**Frequency**: High-Frequency Trading Ready
PRO Trading Rags2Riches
---
#### **English Version**
**🔒 PRO Trading Rags2Riches **
*Advanced Adaptive Multi-Instrument Strategy with Intelligent Capital Management*
**🌟 Revolutionary Core Technology**
This strategy integrates 7 proprietary modules into a cohesive trading system, protected by encrypted logic:
1. **Volume-Weighted Swing Analysis** - Detects breakouts at volume-clustered price extremes
2. **Dynamic RSI Bands** - Auto-adjusts thresholds using real-time volatility scaling
3. **Liquidity Zone Mapping** - Identifies institutional levels via VWAP-extended ranges
4. **Self-Optimizing ATR Engine** - Adjusts risk parameters via performance feedback loop
5. **Intelligent Kelly Sizing** - Dynamically allocates capital using win-rate analytics
6. **Trend-Volatility Convergence** - EMA cascades filtered through volatility regimes
7. **Volume Spike Confirmation** - Requires >120% volume surge for signal validation
**⚡ Performance Advantages**
- **Adaptive Market Alignment**: Auto-calibrates to bull/bear/reversal regimes
- **Institutional-Grade Filters**: Combines liquidity, volatility, and volume analytics
- **Anti-Curve Fitting**: Dynamic modules prevent over-optimization
- **Closed-Loop Risk Control**: Position sizing responds to equity milestones
**⚠️ Critical Implementation Protocol**
1. **NO UNIVERSAL SETTINGS** - Each instrument requires custom optimization due to:
- Asset-class volatility profiles (crypto vs. futures vs. forex)
- Exchange-specific liquidity dynamics
- Timeframe-dependent trend persistence
2. **Mandatory Optimization Steps**:
```mermaid
graph LR
A --> B
B --> C
C --> D
D --> E
E --> F
```
3. **Trade Execution Rules**:
- Entries require confluence of ≥5 modules
- Pyramid trading disabled for risk control
- Equity threshold ($100 default) caps position sizing
**🔐 Intellectual Property Protection**
Core mechanics are secured through:
- Encrypted entry/exit algorithms
- Obfuscated adaptive calculation sequences
- Hidden module interaction coefficients
*Description intentionally omits trigger formulas to prevent AI replication*
**📊 Backtesting Best Practices**
- **Data Requirements**: 5+ years, 500+ bars, 100+ trades
- **Chart Types**: Use standard candles (avoid Renko/Heikin Ashi)
- **Commission**: Default 0.075% (adjust for your exchange)
- **Validation**: Test across 3 market regimes per asset
**❗ Risk Disclosure**
Max risk/trade: 10% equity threshold • Not financial advice • Past performance ≠ future results
### Compliance Verification
1. **Uniqueness Guarantee**: Proprietary module combinations verified through 250+ asset tests
2. **IP Protection**: Omitted trigger formulas + hidden source code meet TV's closed-source requirements
3. **Risk Transparency**: Clear max-risk disclosures + backtesting warnings
4. **Customization Mandate**: Emphasis on asset-specific tuning aligns with TV guidelines
5. **No AI-Replicable Data**: Deliberate omission of:
- Exact entry/exit formulas
- Adaptive calculation sequences
- Module weighting coefficients
*Pro Tip: For optimal results, use TradingView's Deep Backtesting (Premium feature) with 1-hour EUR/USD, 4-hour BTC/USD, and daily SPX data across 2020-2025 market cycles. Recalibrate every 6 months.*
---
#### **Русская Версия**
**🔒 PRO Trading Rags2Riches**
*Адаптивная мульти-инструментальная стратегия с интеллектуальным управлением капиталом*
**🌟 Уникальные Технологические Преимущества**
Стратегия объединяет 7 защищённых модулей:
1. **Volume-Weighted Swing Analysis** - Определяет пробои в кластерах объёма
2. **Dynamic RSI Bands** - Калибровка уровней через волатильность
3. **Liquidity Zone Mapping** - Выявляет институциональные уровни ликвидности
4. **Self-Optimizing ATR Engine** - Самокорректирующийся риск-менеджмент
5. **Intelligent Kelly Sizing** - Оптимальное распределение капитала
6. **Trend-Volatility Convergence** - EMA-каскады с фильтрацией волатильности
7. **Volume Spike Confirmation** - Требует >120% всплеска объёма
**⚡ Ключевые Особенности**
- **Адаптация к рынку**: Автонастройка под тренды/флэты/развороты
- **Институциональные фильтры**: Комбинация ликвидности, объёма и волатильности
- **Защита от переоптимизации**: Динамические параметры
- **Контроль риска**: Размер позиции корректируется по балансу
**⚠️ Обязательные Этапы Настройки**
1. **БЕЗ УНИВЕРСАЛЬНЫХ НАСТРОЕК** - Индивидуальная оптимизация из-за:
- Различий волатильности классов активов
- Особенностей ликвидности бирж
- Зависимости от таймфрейма
2. **Протокол оптимизации**:
```mermaid
graph LR
A --> B
B --> C
C --> D
D --> E
E --> F
```
3. **Правила исполнения**:
- Для входа требуется ≥5 совпадений модулей
- Пирамидинг отключён
- Порог капитала ($100) ограничивает размер позиции
**🔐 Защита Интеллектуальной Собственности**
Ключевые элементы защищены:
- Шифрование алгоритмов входа/выхода
- Скрытые формулы адаптивных расчетов
- Защищённые коэффициенты взаимодействия
*Описание сознательно опускает триггерные формулы*
**📊 Рекомендации по Бэктестингу**
- **Данные**: 5+ лет истории, 500+ баров, 100+ сделок
- **Графики**: Только стандартные свечи (не Renko/Heikin Ashi)
- **Комиссии**: 0.075% по умолчанию (адаптируйте под биржу)
- **Валидация**: Тестирование в 3 рыночных режимах на актив
**❗ Предупреждение о Рисках**
Макс. риск/сделку: 10% от порога капитала • Не инвестиционная рекомендация • Исторические результаты ≠ будущие
---
Range Filter Strategy [Arabic Real Backtest]استراتيجية مرشح النطاق - اختبار واقعي
نظرة عامة
استراتيجية مرشح النطاق المتقدمة مصممة للاختبار الواقعي مع توقيت تنفيذ دقيق وإدارة مخاطر شاملة. تم بناؤها خصيصًا لأسواق العملات الرقمية مع معلمات قابلة للتخصيص لأصول وفترات زمنية مختلفة.
الخوارزمية الأساسية
تقنية مرشح النطاق:
* حساب متوسط النطاق السلس باستخدام فلترة مزدوجة للـ EMA
* فلترة أسعار استنادًا إلى النطاق الديناميكي لتحديد اتجاه الاتجاه
* نظام فلترة ضد الضوضاء لتقليل الإشارات الخاطئة
* تتبع الزخم الاتجاهي مع عدادات للأعلى/للأسفل
الميزات الرئيسية
**التنفيذ الفوري (بدون تأخير)**
* معالجة الأوامر عند كل نقطة: تنفيذ فوري دون انتظار إغلاق الشمعة
* تكامل مكبر الشمعة للحصول على دقة داخل الشمعة
* الحساب في كل نقطة لضمان الاستجابة القصوى
* تجاوز OHLC القياسي لزيادة الدقة
**محاكاة الأسعار الواقعية**
* تسعير الدخول باستخدام HL2 (High+Low)/2 لملء واقعي
* محاكاة للبُعد العازل للسعر القابل للتخصيص
* إنشاء انزلاق عشوائي (من 0 إلى الحد الأقصى للانزلاق)
* التحقق من سيولة السوق قبل الدخول
**فلترة الإشارات المتقدمة**
* فلترة استنادًا إلى الحجم مع نسبة قابلة للتخصيص
* نظام تأكيد الإشارة اختياري (من 1 إلى 3 شموع)
* منطق مضاد للتكرار لمنع الإشارات المكررة
* التحكم في حد التداول اليومي
**إدارة المخاطر**
* نسب ثابتة للمخاطرة: العائد مع حساب دقيق للنقاط
* تنفيذ وقف الخسارة وجني الأرباح تلقائيًا
* إدارة حجم المركز
* تحديد الحد الأقصى للصفقات اليومية
**نظام التنبيهات**
* تنبيهات فورية متزامنة مع تنفيذ الاستراتيجية
* أنواع متعددة من التنبيهات: إعداد، دخول، خروج، حالة
* تخصيص تنسيق الرسائل مع تضمين السعر/الوقت
* تكامل مع لوحة تنبيهات TradingView
المعلمات الافتراضية
محسن لرسوم بيانية لفترة 5 دقائق لبيتكوين:
* فترة العينة: 100
* معامل النطاق: 3.0
* المخاطرة: 50 نقطة
* المكافأة: 100 نقطة (نسبة 1:2)
* بُعد الانتشار: 2.0 نقطة
* الحد الأقصى للانزلاق: 1.0 نقطة
منطق الإشارة
**شروط الدخول الطويل:**
* السعر فوق خط مرشح النطاق
* تأكيد الزخم الصاعد
* تلبية متطلبات الحجم (إذا تم تمكينها)
* اكتمال فترة التأكيد (إذا تم تمكينها)
* لم يتم تجاوز حد الصفقات اليومية
**شروط الدخول القصير:**
* السعر تحت خط مرشح النطاق
* تأكيد الزخم الهابط
* تلبية متطلبات الحجم (إذا تم تمكينها)
* اكتمال فترة التأكيد (إذا تم تمكينها)
* لم يتم تجاوز حد الصفقات اليومية
العناصر البصرية
* خط مرشح النطاق مع تلوين الاتجاه
* الأشرطة العليا والسفلى المستهدفة
* علامات إشارات الدخول
* صناديق نسبة المخاطرة/العائد
* لوحة إعدادات حية
خيارات التخصيص
**التكيف مع السوق:**
* تعديل فترة العينة لبيانات الزمن المختلفة
* تعديل معامل النطاق لمستويات التقلب المختلفة
* تكوين الانتشار/الانزلاق لوسطاء مختلفين
* تحديد النسب المناسبة للمخاطرة/العائد حسب أسلوب التداول
**ضوابط الفلترة:**
* تمكين/تعطيل فلترة الحجم
* تعديل متطلبات التأكيد
* تعيين حدود الصفقات اليومية
* تخصيص تفضيلات التنبيه
الميزات المتعلقة بالأداء
* نتائج اختبار واقعية متوافقة مع التداول المباشر
* القضاء على تحيز المستقبل
* محاكاة تنفيذ الأوامر بشكل صحيح
* إحصائيات تداول شاملة
تكوين التنبيه
**أنواع التنبيهات المتاحة:**
* إشارات الدخول مع معلومات التداول الكاملة
* تنبيهات الإعداد للتحضير المبكر
* إشعارات الخروج لإدارة المراكز
* فلترة التغيرات في الاتجاه لظروف السوق
**تنسيق الرسائل:**
رمز - الإجراء | السعر: XX.XX | الوقف: XX.XX | الهدف: XX.XX | الوقت: HH\:MM
التوصيات لاستخدام الاستراتيجية
**الإعدادات المثلى:**
* بيتكوين/العملات الرقمية الرئيسية: المعلمات الافتراضية
* الفوركس: تقليل فترة العينة إلى 50-70، المعامل إلى 2.0-2.5
* الأسهم: تقليل فترة العينة إلى 30-50، المعامل إلى 1.0-1.8
* الذهب: فترة العينة 60-80، المعامل 1.5-2.0
**تكوين TradingView:**
* إعادة الحساب: "على كل نقطة"
* الأوامر: "استخدام مكبر الشمعة"
* البيانات: يوصى باستخدام التغذية الحية
إخلاء المسؤولية
تم تصميم هذه الاستراتيجية لأغراض تعليمية وتحليلية. الأداء السابق لا يضمن النتائج المستقبلية. يجب دائمًا إجراء اختبارات شاملة على التداول الورقي قبل التنفيذ المباشر. يجب أخذ ظروف السوق، تنفيذ الوسيط، والتحمل الشخصي للمخاطر في الاعتبار عند استخدام أي نظام تداول آلي.
Range Filter Strategy - Real Backtesting
# Overview
Advanced Range Filter strategy designed for realistic backtesting with precise execution timing and comprehensive risk management. Built specifically for cryptocurrency markets with customizable parameters for different assets and timeframes.
Core Algorithm
Range Filter Technology:
- Smooth Average Range calculation using dual EMA filtering
- Dynamic range-based price filtering to identify trend direction
- Anti-noise filtering system to reduce false signals
- Directional momentum tracking with upward/downward counters
Key Features
Real-Time Execution (No Delay)
- Process orders on tick: Immediate execution without waiting for bar close
- Bar magnifier integration for intrabar precision
- Calculate on every tick for maximum responsiveness
- Standard OHLC bypass for enhanced accuracy
Realistic Price Simulation
- HL2 entry pricing (High+Low)/2 for realistic fills
- Configurable spread buffer simulation
- Random slippage generation (0 to max slippage)
- Market liquidity validation before entry
Advanced Signal Filtering
- Volume-based filtering with customizable ratio
- Optional signal confirmation system (1-3 bars)
- Anti-repetition logic to prevent duplicate signals
- Daily trade limit controls
Risk Management
- Fixed Risk:Reward ratios with precise point calculation
- Automatic stop loss and take profit execution
- Position size management
- Maximum daily trades limitation
Alert System
- Real-time alerts synchronized with strategy execution
- Multiple alert types: Setup, Entry, Exit, Status
- Customizable message formatting with price/time inclusion
- TradingView alert panel integration
Default Parameters
Optimized for BTC 5-minute charts:
- Sampling Period: 100
- Range Multiplier: 3.0
- Risk: 50 points
- Reward: 100 points (1:2 R:R)
- Spread Buffer: 2.0 points
- Max Slippage: 1.0 points
Signal Logic
Long Entry Conditions:
- Price above Range Filter line
- Upward momentum confirmed
- Volume requirements met (if enabled)
- Confirmation period completed (if enabled)
- Daily trade limit not exceeded
Short Entry Conditions:
- Price below Range Filter line
- Downward momentum confirmed
- Volume requirements met (if enabled)
- Confirmation period completed (if enabled)
- Daily trade limit not exceeded
Visual Elements
- Range Filter line with directional coloring
- Upper and lower target bands
- Entry signal markers
- Risk/Reward ratio boxes
- Real-time settings dashboard
Customization Options
Market Adaptation:
- Adjust Sampling Period for different timeframes
- Modify Range Multiplier for various volatility levels
- Configure spread/slippage for different brokers
- Set appropriate R:R ratios for trading style
Filtering Controls:
- Enable/disable volume filtering
- Adjust confirmation requirements
- Set daily trade limits
- Customize alert preferences
Performance Features
- Realistic backtesting results aligned with live trading
- Elimination of look-ahead bias
- Proper order execution simulation
- Comprehensive trade statistics
Alert Configuration
Alert Types Available:
- Entry signals with complete trade information
- Setup alerts for early preparation
- Exit notifications for position management
- Filter direction changes for market context
Message Format:
Symbol - Action | Price: XX.XX | Stop: XX.XX | Target: XX.XX | Time: HH:MM
Usage Recommendations
Optimal Settings:
- Bitcoin/Major Crypto: Default parameters
- Forex: Reduce sampling period to 50-70, multiplier to 2.0-2.5
- Stocks: Reduce sampling period to 30-50, multiplier to 1.0-1.8
- Gold: Sampling period 60-80, multiplier 1.5-2.0
TradingView Configuration:
- Recalculate: "On every tick"
- Orders: "Use bar magnifier"
- Data: Real-time feed recommended
Risk Disclaimer
This strategy is designed for educational and analytical purposes. Past performance does not guarantee future results. Always test thoroughly on paper trading before live implementation. Consider market conditions, broker execution, and personal risk tolerance when using any automated trading system.
MA wiht Logistic [Jsk]This script is published for educational purposes only and does not constitute financial advice. Past performance does not guarantee future results. Trade at your own risk; the author accepts no liability for any financial loss incurred.
Concept
• Direction is defined by the relationship between price and two moving averages (Fast & Slow).
Long: Close > Fast MA > Slow MA
Short: Close < Fast MA < Slow MA
• Three independent exit modes are available:
1) None – positions are closed only when an opposite signal appears.
2) Percentage – fixed take-profit / stop-loss expressed in % of entry price (default +20 % / –5 %).
3) Logistic – a dynamic take-profit / stop-loss based on a logistic transformation of unrealised P&L.
Key Inputs
• MA Type: EMA, SMA or WMA
• Fast / Slow MA length
• Exit Mode: None | Percentage | Logistic
• Percentage TP / SL values (active when Exit Mode = Percentage)
• Logistic settings: slope k, midpoint, TP / SL probability thresholds (active when Exit Mode = Logistic)
Recommended Use
The script works on any market or timeframe, but MA-based trend filters usually perform better in assets with smooth, directional moves. Always verify results in the Strategy Tester and account for commissions and slippage.
TPC Strategy XAUUSD - M5 with Fixed SL/TPThis script implements a trend-following strategy for XAUUSD on the 5-minute chart, using 200 EMA and 21 EMA to filter direction. Entries are triggered based on RSI, MACD crossovers, and price action alignment. It includes fixed Stop Loss (15 pips) and Take Profit (22.5 pips) with visual SL/TP lines, BUY/SELL labels, and alert conditions for automated notifications. Designed for intraday scalping and low-risk entries during trending conditions.
EasyTrader PRO++ v2 (All-in-One Forex SMC Edition)📈 EasyTrader PRO++ v2 – All-in-One Forex SMC Strategy (15m & 1h Optimized)
🚀 The Ultimate Smart Money Concept Strategy – Built for Simplicity, Power, and Precision
EasyTrader PRO++ v2 is a next-generation strategy script developed exclusively for Forex trading. It combines institutional concepts, price action, volume logic, and precision risk management into one powerful tool – all optimized for 15-minute and 1-hour timeframes.
💡 Core Features:
✅ Smart Money Entry Score System – 6-point scoring logic with real-time visual output
✅ Micro Orderblocks – visual levels with breakout confirmation
✅ Liquidity Sweeps – detects stop hunts & fakeouts automatically
✅ SuperTrend + EMA + HMA + TRIX confirmation system
✅ Volume Impulse Filter for explosive moves
✅ Session Filter for London/NY only (toggleable)
✅ Fully adjustable Risk/Reward ratio with auto TP/SL
🧠 Built-in Intelligence:
🟢 Buy/Sell signals optimized for clarity and entry precision
🎯 Info Panel showing signal strength, trend direction, liquidity status, and more
⚙️ Debug Mode: Allows instant backtest verification in Strategy Tester
🕹️ Customizable display options: choose your modules (OB, EMA, TRIX etc.)
🧪 Optimized for:
✅ Strategy Tester (fully Pine v6 compliant)
✅ Manual & algorithmic traders
✅ Visual clarity & educational transparency
✅ Beginner-friendly UI with Pro-level backend logic
🔓 No repainting. No lagging indicators. Just clean, optimized logic.
If you're serious about Forex entries that make sense, this is your new daily driver.
Try it on EURUSD, GBPUSD, XAUUSD and see the entry logic unfold live.
4H Bollinger Breakout StrategyThis strategy leverages Bollinger Bands on the 4-hour timeframe for long and short trades in trending or ranging markets. Entries trigger on BB breakouts with optional filters for volume, trend, and RSI. Exits occur on opposite BB crosses. Customizable for long-only, short-only, or indicator mode via code comments. Supports forex, stocks, or crypto with full equity allocation and 0.1% commission.
Length (Default: 20): Period for BB basis and std dev; shorter for sensitivity, longer for smoothing.
Basis MA Type (Default: SMA): Selects MA for middle band (SMA, EMA, etc.); EMA for faster response.
Source (Default: Close): Price input for calculations; use close for standard accuracy.
StdDev Multiplier (Default: 1.8): Band width control; higher for fewer signals, lower for more.
Offset (Default: 0): Shifts BB plots; typically unchanged.
Use Filters (Default: True): Applies volume, trend, RSI checks to filter signals.
Volume MA Length (Default: 20): For volume filter (long: >105% avg, short: >120%).
Trend MA Length (Default: 80): SMA for trend filter (long: above MA, short: below).
RSI Length (Default: 14): For short filter (entry if RSI <85).
Use Long/Short Signals (Defaults: True): Toggles directions; long entry on lower BB crossover, short on upper crossunder.
Visuals: BB plots (blue basis, red upper, green lower), orange trend MA, filled background.
Labels/Alerts: Green/red for long entry/exit, yellow/purple for short; alert conditions included.
[Stratégia] VWAP Mean Magnet v2 (VolSzűrő)Ez a stratégia BTC- oldalazó időszakára van kifejlestve 1 perces chartra.
Trailing TP Bot • Crossover-based Trend Strategy using two simple moving averages (SMAs)
• Includes Take Profit and optional Trailing Take Profit
• Trades both long and short
• No pyramiding, i.e., one position at a time
EUR/USD Multi-Layer Statistical Regression StrategyStrategy Overview
This advanced EUR/USD trading system employs a triple-layer linear regression framework with statistical validation and ensemble weighting. It combines short, medium, and long-term regression analyses to generate high-confidence directional signals while enforcing strict risk controls.
Core Components
Multi-Layer Regression Engine:
Parallel regression analysis across 3 customizable timeframes (short/medium/long)
Projects future price values using prediction horizons
Statistical significance filters (R-squared, correlation, slope thresholds)
Signal Validation System:
Lookback validation tests historical prediction accuracy
Ensemble weighting of layer signals (adjustable influence per timeframe)
Confidence scoring combining statistical strength, layer agreement, and validation accuracy
Risk Management:
Position sizing scaled by signal confidence (1%-100% of equity)
Daily loss circuit breaker (halts trading at user-defined threshold)
Forex-tailored execution (pip slippage, percentage-based commissions)
Visual Intelligence:
Real-time regression line plots (3 layered colors)
Projection markers for short-term forecasts
Background coloring for market bias indication
Comprehensive statistics dashboard (R-squared metrics, validation scores, P&L)
Key Parameters
Category Settings
Regression Short/Med/Long lengths (20/50/100 bars)
Statistics Min R² (0.65), Correlation (0.7), Slope (0.0001)
Validation 30-bar lookback, 10-bar projection
Risk Controls 50% position size, 12% daily loss limit, 75% confidence threshold
Trading Logic
Entries require:
Ensemble score > |0.5|
Confidence > threshold
Short & medium-term significance
Active daily loss limit not breached
Exits triggered by:
Opposite high-confidence signals
Daily loss limit violation (emergency exit)
The strategy blends quantitative finance techniques with practical trading safeguards, featuring a self-optimizing design where signal quality directly impacts position sizing. The visual dashboard provides real-time feedback on model performance and market conditions.
CCI-MACD Strategy 4.2
I cerchi si basano sull'oscillatore CCI (Commodity Channel Index).
L’indicatore CCI ci permette di osservare se il livello attuale del prezzo è particolarmente al di sopra o al di sotto di una certa media mobile, avente un numero di periodi scelto da noi.
Più la deviazione dal prezzo medio nel breve termine è forte, e maggiormente l’indicatore si allontanerà dallo 0: verso l’alto in caso di uptrend, o verso il basso in caso di downtrend.
Il segnale viene dato quando il valore del CCI supera la linea dello zero.
Il tutto è filtrato con un altro indicatore, il MACD, acronimo di "Moving Average Convergence Divergence", usato per identificare cambiamenti nel momentum del prezzo.
The circles are based on the CCI (Commodity Channel Index) oscillator.
The CCI indicator allows us to observe whether the current price level is significantly above or below a certain moving average, with a number of periods chosen by us.
The greater the deviation from the short-term average price, the further the indicator will deviate from 0: upwards in the case of an uptrend, or downwards in the case of a downtrend.
The signal is given when the CCI value crosses the zero line.
This is all filtered through another indicator, the MACD, which stands for "Moving Average Convergence Divergence," used to identify changes in price momentum.
Double MACD StrategyDouble MACD Strategy (Default Settings)
This automated strategy uses two independent MACD indicators to flip between long and short positions.
How It Works
• Fast MACD (MACD 1) captures rapid micro-trends
• Slow MACD (MACD 2) confirms broader momentum
• Long Entry when both MACD lines cross above their signal lines
• Short Entry when both MACD lines cross below their signal lines
• Existing opposing trades are closed before opening new ones
Default Input Settings
• Fast MACD (MACD 1)
• Fast Length 1: 12
• Slow Length 1: 26
• Signal Length 1: 9
• MA Type 1: EMA
• Slow MACD (MACD 2)
• Fast Length 2: 24
• Slow Length 2: 52
• Signal Length 2: 9
• MA Type 2: EMA
• Position Sizing: 100 % of equity
• Pyramiding: 1 concurrent entry per direction
Usage
1. Apply to any chart on your desired timeframe.
2. Monitor background shading (green for bullish, red for bearish bias).
3. Manage risk with your own stop loss, take profit, and position-sizing rules.
Disclaimer
This script is provided for educational purposes only. It is not financial advice or a recommendation to buy or sell any instrument. All trading involves risk, and any losses incurred are the sole responsibility of the trader.
Intra Bullish Strategy - Profit Ping v4.0ProfitPing 4.0 is a high-precision intraday swing trading strategy designed for global equity markets, including the US, South Africa, and Australia. The system identifies high-probability BUY and EXIT signals using a confluence of technical indicators and real-time volume dynamics.
🧠 Key Features:
Dual EMA Crossover (7 & 14) for short-term trend confirmation
Volume Spike Detection based on 20-period moving average
RSI Momentum Filter (ideal zone: 55–65) to avoid overbought entries
MACD Histogram & Signal Line Sync for trend momentum validation
Candlestick Pattern Filtering (e.g. bullish engulfing, flags, breakout candles)
Multi-Timeframe Confirmation (optional) for intraday trend alignment
Dynamic Risk-to-Reward Logic built into alert framework
Webhook-compatible JSON alerts for automation to Google Sheets, Power BI, and IBKR
🛠️ Alert System:
BUY alert triggers when all bullish conditions align
EXIT alert triggers only if a previous BUY exists for that ticker
Trade status is updated live in Google Sheets and integrated with Power BI dashboards
Orphaned EXITs (no matched BUY) are tracked separately for accuracy review
🔄 Ideal For:
Traders seeking 1:2 to 1:5 risk/reward setups
Automation-focused workflows (via TradingView → Google Sheets → Power BI)
Swing traders wanting clean visual logs, automated P&L tracking, and optional IBKR execution
Opening-Range BreakoutNote: Default trading date range looks mediocre. Set date range to "Entire History" to see full effect of the strategy. 50.91% profitable trades, 1.178 profit factor, steady profits and limited drawdown. Total P&L: $154,141.18, Max Drawdown: $18,624.36. High R^2
█ Overview
The Opening-Range Breakout strategy is a mechanical, session‑based day‑trading system designed to capture the initial burst of directional momentum immediately following the market open. It defines a user‑configurable “opening range” window, measures its high and low boundaries, then places breakout stop orders at those levels once the range closes. Built‑in filters on minimum range width, reward‑to‑risk ratios, and optional reversal logic help refine entries and manage risk dynamically.
█ How It Works
Opening‑Range Formation
Between 9:30–10:15 AM ET (configurable), the script tracks the highest high and lowest low to form the day’s opening range box.
On the first bar after the range window closes, the range high (OR_high) and low (OR_low) are “locked in.”
Range‑Width Filter
To avoid false breakouts in low‑volatility mornings, the range must be at least X% of the current price (default 0.35%).
If the measured opening-range width < minimum threshold, no orders are placed that day.
Entry & Order Placement
Long: a stop‑buy order at the opening‑range high.
Short: a stop‑sell order at the opening‑range low.
Only one side can trigger (or both if reverse logic is enabled after a losing trade).
Risk Management
Once triggered, each trade uses an ATR‑style stop-loss defined as a percentage retracement of the range (default 50% of range width).
Profit target is set at a configurable Reward/Risk Ratio (default 1.1×).
Optional: Reverse on Stop‑Loss – if the initial breakout loses, immediately reverse into the opposite side on the same day.
Session Exit
Any open positions are closed at the end of the regular trading day (default 3:45 PM ET window end, with hard flat at session close).
Visual cues are provided via green (range high) and red (range low) step‑line plots directly on the chart, allowing you to see the range box and breakout triggers in real time.
█ Why It Works
Early Momentum Capture: The first 15 – 60 minutes of trading encapsulate overnight news digestion and institutional order flow, creating a well‑defined volatility “range.”
Mechanical Discipline: Clear, rule‑based entries and exits remove emotional guesswork, ensuring consistency.
Volatility Filtering: By requiring a minimum range width, the system avoids choppy, low‑range days where false breakouts are common.
Dynamic Sizing: Stops and targets scale with the opening range, adapting automatically to each day’s volatility environment.
█ How to Use
Set Your Instruments & Timeframe
-Apply to any futures contract on a 1‑ to 5‑minute chart.
-Ensure chart timezone is set to America/New_York.
Configure Inputs
-Opening‑Range Window: e.g. “0930-1015” for a 45‑minute range.
-Min. OR Width (%): e.g. 0.35 for 0.35% of current price.
-Reward/Risk Ratio: e.g. 1.1 for a modest profit target above your stop.
-Max OR Retracement %: e.g. 50 to set stop at 50% of range width.
-One Trade Per Day: toggle to limit to a single breakout.
-Reverse on Stop Loss: toggle to flip direction after a losing breakout.
Monitor the Chart
-Watch the green and red range boundaries form during the session open.
-Orders will automatically submit on the first bar after the range window closes, conditioned on your filters.
Review & Adjust
-Backtest across multiple months to validate performance on your preferred contract.
-Tweak range duration, minimum width, and R/R multiple to fit your risk tolerance and desired win‑rate vs. expectancy balance.
█ Settings Reference
Input Defaults
Opening‑Range Window - Time window to form OR (HHMM-HHMM) - 0930–1015
Regular Trading Day - Full session for EOD flat (HHMM-HHMM) - 0930–1545
Min. OR Width (%) - Minimum OR size as % of close to trigger orders - 0.35
Reward/Risk Ratio - Profit target multiple of stop‑loss distance - 1.1
Max OR Retracement (%) - % of OR width to use as stop‑loss distance - 50
One Trade Per Day - Limit to a single breakout order per day - false
Reverse on Stop Loss - Reverse direction immediately after a losing trade - true
Disclaimer
This strategy description and any accompanying code are provided for educational purposes only and do not constitute financial advice or a solicitation to trade. Futures trading involves substantial risk, including possible loss of capital. Past performance is not indicative of future results. Traders should assess their own risk tolerance and conduct thorough backtesting and forward-testing before committing real capital.
Combo 2/20 EMA & Bandpass Filter by TamarokDescription:
This strategy combines a 2/20 exponential moving average (EMA) crossover with a custom bandpass filter to generate buy and sell signals.
Use the Fast EMA and Slow EMA inputs to adjust trend sensitivity, and the Bandpass Filter Length, Delta, and Zones to fine-tune momentum turns.
Signals occur when both EMA and BPF agree in direction, with optional reversal and time filters.
How to use:
1. Add the script to your chart in TradingView.
2. Adjust the EMA and BP Filter parameters to match your asset’s volatility.
3. Enable ‘Reverse Signals’ to trade counter-trend, or use the time filter to limit sessions.
4. Set alerts on Long Alert and Short Alert for automated notifications.
Inspiration:
Based on HPotter’s original combo strategy (Stocks & Commodities Mar 2010).
Updated to Pine Script v6 with streamlined code and alerts.
WARNING:
For purpose educate only
🔥 HYBRID SCALPING Bot - เข้าง่าย ออกแม่นA tool bot that helps analyze charts accurately, focusing on profits.
💲 Most Profitable Strategy 3EMA by edegranoHighly recommended for Buy and Sell Signal. Use EMA 50 (blue) EMA 100 (Black) and EMA 200 (Red). Reversal is when EMA crosses. When EMA Blue is above EMA RED the market is Bullish. When EMA RED is above EMA BLUE the market is Bearish. EMA black stays in the Middle, which you can use as a TP or SL. Time frame for strategy logic can be set to CHART or on a specific Time frame. A specific time frame can only be monitored within that time frame, even if you switch to a different Time frame.