Takashi Kotegawa Dip Reversal StrategyYou can use this alongside my other indicator to see if a stock is good with the indicator.
Media mobile esponenziale (EMA)
MACD + EMA200 MTF - WEBHOOK FIXEDHi guys, works best with USDCHF
Default settings fit for me, you can tweak how much you want.
With default settings works well for 15min and 1min time-frame, for other time-frames, you need to tweak.
VIX Crossing# VIX Crossing Strategy
## Overview
VIX Crossing is a quantitative trading strategy that combines volatility signals from the VIX index with trend confirmation from the Nasdaq-100 (NDX) to generate long entry signals. The strategy employs multiple exit conditions to manage risk and lock in profits systematically.
## Strategy Logic
### Entry Condition
The strategy initiates a long position when:
- **VIX Crossunder**: The VIX closing price crosses below its 5-bar simple moving average (SMA), signaling a decrease in implied volatility
- **AND NDX Confirmation**: The Nasdaq-100 closes above its 21-bar exponential moving average (EMA), confirming uptrend strength
This dual-signal approach reduces false entries by requiring both volatility normalization and positive market momentum.
### Exit Conditions
The strategy automatically closes positions when any of the following conditions are met:
1. **VIX Crossover (Volatility Exit)**: VIX closes above its SMA, indicating rising volatility
2. **Time-Based Exit**: Position is force-closed after 10 bars from entry, preventing prolonged drawdowns
3. **Take-Profit Exit**: Position closes when unrealized profit exceeds $3,000 per contract
4. **Stop-Loss Exit**: Position closes when unrealized loss exceeds $1,500 per contract
Exit conditions are evaluated each bar while the position is open, with explicit logging of the exit reason for trade analysis.
## Configuration Parameters
| Parameter | Default | Purpose |
|-----------|---------|---------|
| VIX SMA Length | 5 | Smoothing period for VIX volatility baseline |
| NDX EMA Length | 21 | Smoothing period for Nasdaq-100 trend confirmation |
| Force Close After X Bars | 10 | Maximum holding period in bars |
| TP Amount per Contract | $3,000 | Profit target per contract |
| SL Amount per Contract | $1,500 | Loss limit per contract |
## Risk Management Features
- **Position Sizing**: Capital allocation based on profit/loss per contract rather than fixed units, allowing for scalable risk
- **Dual Risk Controls**: Combined time-based and price-based exits prevent extended exposure
- **Profit Asymmetry**: 2:1 profit-to-loss ratio encourages risk/reward discipline
- **Contract-Based Accounting**: Profit targets and stop losses scale with position size
## Capital Requirements
- **Initial Capital**: $50,000
- **Commission**: $3 per contract (cash-based)
- **Instrument**: Designed for index-based derivatives or equities with liquid options markets
## Technical Indicators Used
- Simple Moving Average (SMA) for VIX smoothing
- Exponential Moving Average (EMA) for NDX trend detection
- Crossover/Crossunder detection for signal generation
## Underlying Assumptions
1. VIX crossunder events represent mean-reversion opportunities in Nasdaq-heavy portfolios
2. NDX EMA confirmation filters out uncorrelated volatility spikes
3. 10-bar holding period aligns with typical mean-reversion timeframes
4. Contract-based profit targets accommodate varying leverage levels
Session Liquidity Sweep + Trend ConfirmationThis strategy aims to capture high-probability intraday trades by combining liquidity sweeps with a trend confirmation filter. It is designed for traders who want a systematic approach to trade breakouts during specific market sessions while controlling risk with ATR-based stops.
How it Works:
Session Filter: Trades are only considered during a defined session (default 9:30 - 11:00). This helps avoid low-volume periods that can lead to false signals.
Trend Confirmation: The strategy uses a 50-period EMA to identify the market trend. Long trades are only taken in an uptrend, and short trades in a downtrend.
Liquidity Sweep Detection:
A long entry occurs when price dips below the prior N-bar low but closes back above it, indicating a potential liquidity sweep that stops being triggered before the trend continues upward.
A short entry occurs when price spikes above the prior N-bar high but closes below it, signaling a potential sweep of stops before the downward trend resumes.
ATR-Based Risk Management:
Stop loss is calculated using the Average True Range (ATR) multiplied by a configurable factor (default 1.5).
Take profit is set based on a risk-reward ratio (default 2.5x).
Position Sizing: Default position size is 5% of equity per trade, making it suitable for risk-conscious trading.
Inputs:
Session Start/End (HHMM)
Liquidity Lookback Period (number of bars to define prior high/low)
ATR Length for stop calculation
ATR Stop Multiplier
Risk-Reward Ratio
EMA Trend Filter Length
Visuals:
Prior Liquidity High (red)
Prior Liquidity Low (green)
EMA Trend (blue)
Why Use This Strategy:
Captures stop-hunt moves often triggered by larger market participants.
Only trades with trend confirmation, reducing false signals.
Provides automatic ATR-based stop loss and take profit for consistent risk management.
Easy to adjust session time, ATR, EMA length, and risk-reward to suit your trading style.
Important Notes:
Assumes 0.05% commission and 1-pip slippage. Adjust according to your broker.
Not financial advice; intended for educational, backtesting, or paper trading purposes.
Always test strategies thoroughly before applying to live accounts.
Quality-Controlled Trend StrategyOverview
This strategy demonstrates a clean, execution-aware trend framework with fully isolated risk management.
Entry conditions and risk logic are intentionally separated so risk parameters can be adjusted without altering signal behavior.
All calculations are evaluated on confirmed bars to ensure backtest behavior reflects real-time execution.
Design intent
Many scripts mix entries and exits in ways that make results fragile or misleading.
This strategy focuses on structural clarity by enforcing:
confirmed-bar logic only
fixed and transparent risk handling
consistent indicator calculations
one position at a time
It is intended as a baseline framework rather than an optimized system.
Trading logic (high level)
Trend context
EMA 50 vs EMA 200 defines directional bias
Entry
Price alignment with EMA 50
RSI used as a momentum confirmation, not as an overbought/oversold signal
Risk management
Stop-loss based on ATR
Fixed riskโreward structure
Risk logic is isolated from entry logic
Editing risk without affecting signals
All stop-loss and take-profit calculations are handled in a dedicated block.
Users can adjust:
ATR length
stop-loss multiplier
riskโreward ratio
without modifying entry conditions.
This allows controlled experimentation while preserving signal integrity.
Usage notes
Results vary by market, timeframe, and volatility conditions.
This script is provided for testing and educational purposes and should be validated across multiple symbols and forward-tested before use in live environments.
Ichimoku + EMA + RSI [Enhanced]# **Ichimoku + EMA + RSI Strategy - User Instructions**
---
## **๐ TABLE OF CONTENTS**
1. (#installation)
2. (#strategy-overview)
3. (#parameter-configuration)
4. (#understanding-the-dashboard)
5. (#entry--exit-rules)
6. (#best-practices)
7. (#optimization-guide)
8. (#troubleshooting)
---
## **๐ INSTALLATION**
### **Step 1: Add to TradingView**
1. Open TradingView.com
2. Click **Pine Editor** (bottom of screen)
3. Click **"New"** โ Select **"Blank indicator"**
4. Delete all default code
5. **Copy and paste** the complete script
6. Click **"Save"** (give it a name: "Ichimoku EMA RSI Strategy")
7. Click **"Add to Chart"**
### **Step 2: Verify Installation**
โ
You should see:
- Orange **200 EMA** line
- Blue **Tenkan** line
- Red **Kijun** line
- Green/Red **Cloud** (Ichimoku cloud)
- **Dashboard** in top-right corner
- **Strategy Tester** tab at bottom
---
## **๐ STRATEGY OVERVIEW**
### **What This Strategy Does**
Combines three powerful technical indicators to identify high-probability trades:
| Component | Purpose |
|-----------|---------|
| **200 EMA** | Determines overall trend direction |
| **Ichimoku Cloud** | Provides support/resistance and momentum |
| **RSI** | Filters momentum strength |
| **Dashboard** | Real-time signal analysis |
### **Trading Logic**
- **LONG**: Enter when all bullish conditions align
- **SHORT**: Enter when all bearish conditions align
- **EXITS**: Automatic via trailing stops, cloud breach, or TK cross reversal
---
## **โ๏ธ PARAMETER CONFIGURATION**
### **๐ต Trend Filter Settings**
```
EMA Length: 200 (default)
```
- **Lower (100-150)**: More sensitive, faster signals
- **Higher (250-300)**: More stable, slower signals
- **Recommendation**: Keep at 200 for most timeframes
---
### **๐ข RSI Settings**
```
RSI Length: 14 (default)
RSI Long Minimum: 55
RSI Short Maximum: 45
```
**Adjustment Guide:**
- **Aggressive** (more signals): Long=50, Short=50
- **Balanced** (default): Long=55, Short=45
- **Conservative** (fewer signals): Long=60, Short=40
---
### **๐ก Ichimoku Settings**
```
Tenkan Period: 9
Kijun Period: 26
Senkou B Period: 52
Displacement: 26
```
**Standard Configurations:**
| Timeframe | Tenkan | Kijun | Senkou B |
|-----------|--------|-------|----------|
| **1H - 4H** | 9 | 26 | 52 |
| **15m - 1H** | 7 | 22 | 44 |
| **Daily** | 9 | 26 | 52 |
**Filters:**
- โ
**Require Chikou Confirmation**: Adds extra validation (recommended)
- โ
**Require Cloud Position**: Price must be above/below cloud (recommended)
---
### **๐ด Risk Management**
```
ATR Length: 14
ATR Stop Loss Multiplier: 2.0
ATR Take Profit Multiplier: 3.0
Min Bars Between Trades: 3
```
**Risk/Reward Profiles:**
| Profile | SL Multiplier | TP Multiplier | Description |
|---------|---------------|---------------|-------------|
| **Conservative** | 2.5 | 4.0 | Wider stops, higher R:R |
| **Balanced** | 2.0 | 3.0 | Default settings |
| **Aggressive** | 1.5 | 2.5 | Tighter stops, faster exits |
---
### **๐จ Display Settings**
```
Show Dashboard: ON
Show Entry Signals: ON
```
- **Dashboard**: Shows real-time analysis
- **Entry Signals**: Green/Red arrows on chart
---
## **๐ UNDERSTANDING THE DASHBOARD**
### **Dashboard Components**
```
โโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโ
โ Component โ Status โ
โโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโค
โ EMA Trend โ BULL/BEARโ
โ Cloud โ ABOVE/BELOW/INSIDEโ
โ TK Cross โ BULL/BEARโ
โ RSI โ 55.3 โ
โ Chikou โ BULL/BEARโ
โ Signal โ STRONG LONGโ
โโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโ
```
### **Signal Interpretation**
| Signal | Score | Meaning | Action |
|--------|-------|---------|--------|
| **STRONG LONG** | 7+ | All conditions aligned | High confidence LONG |
| **LONG** | 4-6 | Most conditions met | Moderate confidence |
| **NEUTRAL** | <4 | Mixed signals | Wait for clarity |
| **SHORT** | 4-6 | Bearish bias | Moderate SHORT |
| **STRONG SHORT** | 7+ | All bearish conditions | High confidence SHORT |
---
## **๐ ENTRY & EXIT RULES**
### **โ
LONG ENTRY CONDITIONS**
All must be TRUE:
1. โ
Price **above** 200 EMA
2. โ
Price **above** Ichimoku Cloud
3. โ
Tenkan **crosses above** Kijun (TK Bull Cross)
4. โ
RSI **above** 55
5. โ
Chikou **above** price 26 bars ago
6. โ
Minimum bars since last trade met
**Visual Confirmation:**
- ๐ข Green triangle **below** candle
- Dashboard shows **"STRONG LONG"**
---
### **โ LONG EXIT CONDITIONS**
Any ONE triggers exit:
1. โ Price closes **below** cloud bottom
2. โ Tenkan **crosses below** Kijun
3. โ ATR trailing stop hit (2.0 ร ATR)
4. โ Take profit hit (3.0 ร ATR)
---
### **โ
SHORT ENTRY CONDITIONS**
All must be TRUE:
1. โ
Price **below** 200 EMA
2. โ
Price **below** Ichimoku Cloud
3. โ
Tenkan **crosses below** Kijun (TK Bear Cross)
4. โ
RSI **below** 45
5. โ
Chikou **below** price 26 bars ago
6. โ
Minimum bars since last trade met
**Visual Confirmation:**
- ๐ด Red triangle **above** candle
- Dashboard shows **"STRONG SHORT"**
---
### **โ SHORT EXIT CONDITIONS**
Any ONE triggers exit:
1. โ Price closes **above** cloud top
2. โ Tenkan **crosses above** Kijun
3. โ ATR trailing stop hit (2.0 ร ATR)
4. โ Take profit hit (3.0 ร ATR)
---
## **๐ก BEST PRACTICES**
### **Recommended Timeframes**
| Timeframe | Trading Style | Signals/Week |
|-----------|---------------|--------------|
| **15m** | Scalping | 20-30 |
| **1H** | Day Trading | 10-15 |
| **4H** | Swing Trading | 5-10 |
| **Daily** | Position Trading | 2-5 |
---
### **Asset Classes**
โ
**Best Performance:**
- Major Forex pairs (EUR/USD, GBP/USD)
- Crypto (BTC/USD, ETH/USD)
- Major indices (SPX, NAS100)
โ ๏ธ **Use Caution:**
- Low liquidity pairs
- Highly volatile altcoins
- Stocks with gaps
---
### **Risk Management Rules**
```
1. Never risk more than 2% per trade
2. Use the built-in ATR stops (don't override)
3. Respect the "Min Bars Between Trades" cooldown
4. Don't trade during major news events
5. Monitor dashboard - only trade STRONG signals
```
---
## **๐ง OPTIMIZATION GUIDE**
### **Step 1: Run Initial Backtest**
1. Open **Strategy Tester** tab (bottom of screen)
2. Set date range (minimum 6 months)
3. Review:
- **Net Profit**
- **Win Rate** (target: >50%)
- **Profit Factor** (target: >1.5)
- **Max Drawdown** (target: <20%)
---
### **Step 2: Optimize Parameters**
**If Win Rate is Low (<45%):**
- Increase RSI thresholds (Long=60, Short=40)
- Enable both Chikou + Cloud filters
- Increase "Min Bars Between Trades" to 5
**If Too Few Signals:**
- Decrease RSI thresholds (Long=50, Short=50)
- Reduce EMA to 150
- Adjust Ichimoku to faster settings (7/22/44)
**If Drawdown is High (>25%):**
- Increase ATR Stop Loss Multiplier to 2.5
- Add longer cooldown period (5+ bars)
- Trade only STRONG signals
---
### **Step 3: Forward Test**
```
1. Paper trade for 2-4 weeks
2. Compare results to backtest
3. Adjust if live results differ significantly
4. Only go live after consistent paper trading success
```
---
## **๐ ๏ธ TROUBLESHOOTING**
### **Problem: No Signals Appearing**
**Solutions:**
- Check RSI levels aren't too restrictive
- Verify timeframe is appropriate (try 1H or 4H)
- Ensure both filters aren't enabled on ranging markets
- Review dashboard - components may be conflicting
---
### **Problem: Too Many Losing Trades**
**Solutions:**
- Enable **both** Chikou + Cloud filters
- Increase RSI thresholds (more conservative)
- Only trade when dashboard shows "STRONG" signals
- Increase cooldown period to avoid overtrading
---
### **Problem: Dashboard Not Showing**
**Solutions:**
- Verify "Show Dashboard" is enabled in settings
- Check chart isn't zoomed out too far
- Refresh chart (F5)
- Re-add indicator to chart
---
### **Problem: Stops Too Tight/Wide**
**Solutions:**
- **Too Tight**: Increase ATR Stop Loss Multiplier to 2.5-3.0
- **Too Wide**: Decrease to 1.5-1.8
- Verify ATR Length is appropriate for timeframe
- Consider asset volatility (crypto needs wider stops)
---
## **๐ QUICK REFERENCE CARD**
```
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
STRATEGY QUICK REFERENCE
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
BEST TIMEFRAMES: 1H, 4H, Daily
BEST ASSETS: Major Forex, BTC, ETH, Indices
RISK PER TRADE: 1-2% of capital
LONG ENTRY:
โ Price > 200 EMA
โ Price > Cloud
โ TK Bull Cross
โ RSI > 55
โ Dashboard = STRONG LONG
SHORT ENTRY:
โ Price < 200 EMA
โ Price < Cloud
โ TK Bear Cross
โ RSI < 45
โ Dashboard = STRONG SHORT
EXITS:
ร Cloud breach
ร TK reverse cross
ร ATR trailing stop
ร Take profit (3:1 R:R)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
```
---
## **โ ๏ธ DISCLAIMER**
This strategy is for **educational purposes only**. Always:
- Backtest thoroughly on your specific assets
- Paper trade before going live
- Never risk more than you can afford to lose
- Past performance โ future results
- Consider market conditions and your risk tolerance
---
**Happy Trading! ๐**
TradingView โ Track All Markets
Where the world charts, chats, and trades markets. We're a supercharged super-charting platform and social network for traders and investors. Free to sign up.
VIOP Scalping - OriginalVIOP Scalping โ Original is a rule-based scalping strategy ported from an original C# logic set. It aims to trade only when trend direction, momentum, and trend strength align, then manages the position using fixed take-profit/stop-loss percentages with an optional trailing mechanism to protect gains during favorable moves.
This strategy is provided for educational and backtesting purposes only. It is not financial advice and does not guarantee profitability. Always test thoroughly before any live usage.
Core Concept
Follow the dominant WMA trend, confirm momentum with EMA separation, filter conditions with RSI + ADX, then exit using fixed TP/SL with trailing behavior after a defined profit threshold.
How the Strategy Works
Trend Direction is defined by WMA: above WMA = long bias, below WMA = short bias.
Momentum is measured via Fast EMA vs Slow EMA and the EMA difference.
Trend Strength is confirmed using ADX (must exceed a threshold).
RSI filters trades to avoid entering when momentum is likely overextended or weak.
A no-trade session blocks entries during a predefined time window (default 09:30โ10:05).
Exit logic uses fixed percent TP/SL, with an optional trailing mechanism that activates after a profit threshold.
Inputs and Settings
Trend and Indicator Settings
Main Trend WMA: Determines directional bias (price above = long, price below = short).
Fast EMA / Slow EMA: Used to measure momentum and directional separation.
RSI Period: Filters entries based on RSI range constraints.
ADX Period: Measures trend strength (must exceed threshold to allow entries).
Threshold Settings
EMA Difference Threshold: Minimum EMA separation required to validate momentum.
ADX Threshold: Minimum ADX required to confirm trend strength.
RSI Long Ceiling: RSI must remain below this value for long entries.
RSI Short Floor: RSI must remain above this value for short entries.
Risk Management Settings
Take Profit %: Default TP distance in percent.
Strong Trend Take Profit %: Higher TP used when a โstrong trendโ condition is detected.
Stop Loss %: Fixed SL distance in percent.
Trailing Activation %: Profit threshold at which trailing starts.
Trailing Distance %: Trailing offset distance used once trailing is active.
Time Filter
No-Trade Hours: Default session is 09:30โ10:05. During this window, the strategy does not open new trades.
Entry Logic
No-Trade Time Filter
If the current bar falls inside the no-trade session, entries are blocked.
Long Entry Conditions
Price is above the WMA trend line.
EMA difference is positive and greater than the EMA Difference Threshold.
EMA momentum is increasing (current EMA diff > previous EMA diff).
RSI is within the defined range (RSI > 48 and RSI < RSI Long Ceiling).
Close is higher than the previous close.
ADX is above the ADX Threshold.
Short Entry Conditions
Price is below the WMA trend line.
EMA difference is negative and lower than -EMA Difference Threshold.
Bearish momentum is increasing (current EMA diff < previous EMA diff).
RSI is within the defined range (RSI < 52 and RSI > RSI Short Floor).
Close is lower than the previous close.
ADX is above the ADX Threshold.
Strong Trend Logic (Dynamic TP Selection)
If price is far from the WMA (absolute distance > 20 points) AND EMA separation is strong (absolute EMA diff > 1.5 points), the strategy treats the environment as a strong trend.
In strong trend mode, the strategy uses โStrong Trend Take Profit %โ instead of the default โTake Profit %โ.
Exit Management (TP/SL + Trailing)
The strategy uses fixed percentage-based TP and SL levels.
Trailing logic is enabled via strategy.exit and activates only after price moves in profit by the defined Trailing Activation %.
Once activated, trailing follows price using the defined Trailing Distance % offset.
This is designed to secure partial gains during extended moves while still allowing room for continuation.
What You See on the Chart
WMA Trend Line (Main Trend Filter).
Fast EMA and Slow EMA (Momentum Confirmation).
Strategy entry/exit markers generated by TradingView.
Recommended Use
Scalping systems that rely on trend-following and momentum confirmation.
Markets where ADX filtering helps avoid choppy conditions.
Traders who want a simple, parameter-driven TP/SL system with trailing after confirmation.
Important Notes
The no-trade session depends on your chart/session settings. Ensure your symbol/session configuration matches your intended market hours.
Percent-based exits scale with price; results will vary across instruments and volatility regimes.
Always validate behavior using bar replay, forward testing, and realistic commission/slippage assumptions.
VIOP Scalping - ATR SNIPERVIOP Scalping โ ATR SNIPER is a momentum-based scalping strategy designed to capture short, high-probability moves while keeping risk strictly defined using ATR-based stop-loss and fixed risk/reward targets. The strategy trades only when trend direction, momentum, and strength are aligned.
This script is provided for educational and testing purposes only. It does not guarantee profitability and must be used with proper risk management.
Core Idea
Trade in the direction of the dominant trend, confirm momentum acceleration, and manage risk using ATR-based dynamic stops and targets.
How the Strategy Works
The main trend is defined using a Weighted Moving Average (WMA).
Momentum is measured by the distance and direction between a fast EMA and a slow EMA.
Trend strength is confirmed using ADX.
RSI is used as a filter to avoid weak or overextended market conditions.
Entries are blocked during a predefined no-trade time window to avoid high-noise periods.
Long Entry Conditions
Fast EMA is above Slow EMA and the EMA difference is greater than the minimum threshold.
EMA momentum is increasing compared to the previous bar.
RSI is within the user-defined long range.
Current close is higher than the previous close.
ADX is above the minimum strength threshold.
Price is above the WMA trend line.
The current bar is not inside the no-trade session.
Short Entry Conditions
Fast EMA is below Slow EMA and the EMA difference is below the negative threshold.
Bearish EMA momentum is increasing.
RSI is within the user-defined short range.
Current close is lower than the previous close.
ADX is above the minimum strength threshold.
Price is below the WMA trend line.
The current bar is not inside the no-trade session.
Risk Management โ ATR Sniper Logic
Stop-loss distance is calculated as ATR multiplied by the ATR Multiplier.
Take-profit distance is calculated using the defined Risk/Reward ratio.
Stop-loss and take-profit levels are dynamically calculated per trade.
Only one position can be open at any given time.
What You See on the Chart
Weighted Moving Average (WMA) trend line.
Fast EMA and Slow EMA lines.
Dynamic stop-loss line during active trades.
Dynamic take-profit line during active trades.
Recommended Use
Intraday scalping on VฤฐOP instruments.
Momentum-based short-term trading.
Traders who prefer rule-based systems with strict risk control.
Always backtest and forward-test on your own instruments and timeframes before using this strategy in live markets.
EMA and Dow Theory Strategies V2 DOGE Current Optimum Value
๐ Overview
These are the current optimal values for DOGE.
They are intended for use on the 2โhour timeframe.
This script requires complex configuration, but there is an optimal set of values somewhere.
Here, Iโm sharing the settings that I personally use at the moment.
Turning Take Profit off can lead to higher profits, but it also increases risks such as a lower win rate.
With Take Profit on, you can adjust the settings by increasing the values.
I have been trading using Dow Theory for many years.
Trading with Dow Theory and EMA has been my main strategy.
Although it has been profitable, I have long struggled with its low win rate.
The issue lies in the immaturity of the exit strategy, and Iโm currently experimenting to see if I can solve that.
In V2, I added three takeโprofit lines, securing 30% of the profit at each level to ensure a minimum level of gain.
Additionally, when the trend weakens, half of the position is closed.
In all scenarios, the remaining position is held until the trend reverses.
The system provides precise entries, adaptive exits, and highly visual guidance that helps traders understand trend structure at a glance.
๐ง Key Features
๐น 1. DualโEMA Trend Logic (Symbol + External Index)
Both the chart symbol and an external index (OTHERS.D) are evaluated using fast/slow EMAs to determine correlationโbased trend bias.
๐น 2. Dow Theory Swing Detection (Realโtime)
The script identifies swing highs/lows and updates trend direction when price breaks them. This creates a structural trend model that reacts faster than EMAs alone.
๐น 3. Gradient Trend Zones (Visual Trend Strength)
When trend is up or down, the area between price and the latest swing level is filled with a multiโstep gradient. This makes trend strength and distance-to-structure visually intuitive.
๐น 4. HigherโTimeframe Swing Trend (htfTrend)
Swing highs/lows from a higher timeframe (e.g., 4H) are plotted to show macro structure. Used only for visual context, not for filtering entries.
๐น 5. RSIโBased Entry Protection
RSI prevents entries during extreme overbought/oversold conditions.
๐น 6. Dynamic Exit System
Includes:
Custom stopโloss (%)
Partial takeโprofit (TP1/TP2/TP3)
Automatic scaleโout when trend color weakens
โColorโchange lockoutโ to prevent immediate reโentry
Realโtime PnL tracking and labels
๐น 7. Alerts for All Key Events
Entry, stopโloss, partial exits, and trendโchange exits all generate structured JSON alerts.
๐น 8. Visual PnL Labels & Equity Tracking
PnL for the latest trade is displayed directly on the chart, including scaleโout adjustments.
โ๏ธ Input Parameters
Parameter Description
Fast EMA / Slow EMA EMAs used for symbol trend detection
Index Fast / Slow EMA EMAs applied to external index
StopLoss (%) Custom stopโloss threshold
ScaleโOut % Portion to exit when trend color weakens
RSI Period / Levels Overbought/oversold filters
Swing Detection Length Bars used to detect swing highs/lows
Stats Display Position of statistics table
๐งญ About htfTrend (Higher Timeframe Trend)
The higherโtimeframe swing trend is displayed visually but not used for entry logic.
Why? Strict HTF filtering reduces trade frequency and often removes profitable setups. By keeping it visualโonly, traders retain flexibility while still benefiting from macro structure awareness.
Use it as a contextual guide, not a constraint.
๐ ๆฆ่ฆ
DOGEใฎ็พๅจใฎๆ้ฉๅคใงใใ
2ๆ้่ถณใงใฎไฝฟ็จใๆณๅฎใใฆใใพใใ
ใใฎในใฏใชใใใฏ่ค้ใช่จญๅฎใๅฟ
่ฆใงใใใใฉใใใซๆ้ฉๅคใๅญๅจใใพใใ
ไปๅใฏ็พๅจ็งใๅไบบ็ใซไฝฟใฃใฆใใ่จญๅฎๅคใฎๅ
ฌ้ใงใใ
Take ProfitใOFFใซใใใจใใใชใๅฉ็ใๆใใพใใใๅ็ใไธใใใชใฉใฎใชในใฏใไธใใใพใใ
ONใซใใ็ถๆ
ใงๆฐๅคใไธใใใใจใซใใฃใฆ่ชฟๆดใใใใจใๅฏ่ฝใงใใ
็งใฏใใฆ็่ซใไฝฟใฃใใใฌใผใใ้ทๅนด็ถใใฆใใพใใใ
ใใฆ็่ซใจEMAใไฝฟใฃใใใฌใผใใ็งใฎไธปๅใงใใ
ใใใๅฉ็ใฏๅบใใใฎใฎใ้ทๅนดใใฎๅ็ใฎไฝใใซๆฉใใงใใพใใใ
ๅ้กใฏๅบๅฃๆฆ็ฅใๆช็ใชใใใงใ็พๅจใฏใใใใฎ่งฃๆฑบใใงใใชใใใจ่ฉฆ่ก้ฏ่ชคใ็ถใใฆใใพใใ
V2ใงใฏ3ๆฌใฎๅฉ็็ขบๅฎใฉใคใณใๅผใใใใใใ30%ใใคๅฉ็ใ็ขบๅฎใใๆไฝ้ใฎๅฉ็ใใงใใใใซใใพใใใ
ใใไปฅๅคใซใฏใใฌใณใใๅผฑใพใฃใใฟใคใใณใฐใงๅๅใฎๅฉ็็ขบๅฎใใใใฉใฎใใฟใผใณใงใๆฎใฃใใใธใทใงใณใฏใใฌใณใ่ปขๆใพใงๆใก็ถใใพใใ
๐ง ไธปใชๆฉ่ฝ
๐น 1. ้ๆ๏ผๅค้จใคใณใใใฏในใฎ EMA ใฏใญในๅคๅฎ
ๅฏพ่ฑก้ๆใจ OTHERS.D ใฎ EMA ใๆฏ่ผใใ็ธ้ขใ่ๆ
ฎใใใใฌใณใๆนๅใๅคๅฎใใพใใ
๐น 2. ใใฆ็่ซใซๅบใฅใในใคใณใฐ้ซๅคใปๅฎๅคใฎ่ชๅๆคๅบ
ในใคใณใฐๆดๆฐใซใใใใฌใณใๆนๅใๅใๆฟใใใๆง้ ใใผในใฎใใฌใณใๅคๅฎใๆก็จใ
๐น 3. ใฐใฉใใผใทใงใณ่ๆฏใซใใใใฌใณใๅผทๅบฆใฎๅฏ่ฆๅ
ในใคใณใฐใฉใคใณใใ็พๅจไพกๆ ผใพใงใๆฎต้็ใซๅกใๅใใ ใใฉใใ ใใใฌใณใใไผธใณใฆใใใใใ็ดๆ็ใซๆๆกใงใใพใใ
๐น 4. ไธไฝ่ถณในใคใณใฐใใฌใณใ๏ผhtfTrend๏ผใฎ่กจ็คบ
4H ใชใฉใฎไธไฝ่ถณใงใฎในใคใณใฐ้ซๅคใปๅฎๅคใ่กจ็คบใใ ๅคงๅฑ็ใชใใฌใณใๆง้ ใ่ฆ่ฆ็ใซๆๆกใงใใพใ๏ผใญใธใใฏใซใฏๆชไฝฟ็จ๏ผใ
๐น 5. RSI ใซใใ้็ฑใปๅฃฒใใใใใใฃใซใฟใผ
ๆฅต็ซฏใช RSI ็ถๆ
ใงใฎใจใณใใชใผใ้ฒๆญขใ
๐น 6. ๅ็ใคใฐใธใใใทในใใ
ใซในใฟใ ๆๅใ๏ผ๏ผ
๏ผ
TP1/TP2/TP3 ใฎๆฎต้็ๅฉ็ขบ
ใใฌใณใ่ฒใฎๅผฑใพใใซใใ่ชๅในใฑใผใซใขใฆใ
่ฒๅคๅๅพใฎๅใจใณใใชใผๅถ้๏ผwaitForColorChange๏ผ
ใชใขใซใฟใคใ PnL ใฎ่ฟฝ่ทกใจใฉใใซ่กจ็คบ
๐น 7. ใขใฉใผใๅฎๅ๏ผJSON ๅฝขๅผ๏ผ
ใจใณใใชใผใๆๅใใ้จๅๅฉ็ขบใใใฌใณใๅ่ปขใชใฉใในใฆใซๅฏพๅฟใ
๐น 8. ๆ็ใฉใใซใป็ตฑ่จ่กจ็คบ
็ด่ฟใใฌใผใใฎๆ็ใใใฃใผใไธใซ่กจ็คบใใ่ฆ่ฆ็ใซๆๆกใงใใพใใ
โ๏ธ ่จญๅฎ้
็ฎ
่จญๅฎ้
็ฎๅ ่ชฌๆ
Fast / Slow EMA ้ๆใฎ EMA ่จญๅฎ
Index Fast / Slow EMA ๅค้จใคใณใใใฏในใฎ EMA ่จญๅฎ
ๆๅใ๏ผ๏ผ
๏ผ ใซในใฟใ ๆๅใใฉใคใณ
้จๅๅฉ็ขบๅฒๅ ใใฌใณใๅผฑๅๆใฎในใฑใผใซใขใฆใๅฒๅ
RSI ๆ้ใปๆฐดๆบ ้็ฑ/ๅฃฒใใใใใใฃใซใฟใผ
ในใคใณใฐๆคๅบๆ้ ในใคใณใฐ้ซๅคใปๅฎๅคใฎๆคๅบใซไฝฟ็จ
็ตฑ่จ่กจ็คบไฝ็ฝฎ ใใผใใซใฎ่กจ็คบไฝ็ฝฎ
๐งญ ไธไฝ่ถณใใฌใณใ๏ผhtfTrend๏ผใซใคใใฆ
ไธไฝ่ถณในใคใณใฐใฎๆดๆฐใซๅบใฅใใใฌใณใๅคๅฎใ่กจ็คบใใพใใใ ใจใณใใชใผๆกไปถใซใฏไฝฟ็จใใฆใใพใใใ
็็ฑ๏ผ ไธไฝ่ถณใๅณๅฏใซใญใธใใฏใธ็ตใฟ่พผใใจใใใฌใผใๆฉไผใๅคงๅน
ใซๆธใใใใงใใ
ๆฌในใใฉใใธใผใงใฏใ ใๅคงๅฑใฎๆๆกใฏ่ฆ่ฆใงใใจใณใใชใผใฏๆ่ปใซใ ใจใใ่จญ่จๆๆณใๆก็จใใฆใใพใใ
โ ่ฃ้ใงๅฉ็ขบๅคๆญใ้ๅผตใๅ้ฟใซๆดป็จใงใใพใใ
Quality-Controlled Trend Strategy v2 (Expectancy Focused)This script focuses on quality control rather than curve-fitting.
No repainting, no intrabar tricks, no fake equity curves.
It uses confirmed-bar entries, ATR-based risk, and clean trend logic so backtests reflect what could actually be traded live.
If you publish scripts, this is the minimum structure worth sharing.
Why this script exists
TradingViewโs public scripts are flooded with:
repainting indicators
no stop-loss logic
curve-fit entries that collapse live
strategies that look good only in hindsight
This script is intentionally boring but honest.
No repainting.
No intrabar tricks.
No fake equity curves
The goal is quality control, not hype.
What this strategy enforces
โ Confirmed bars only
โ Single source of truth for indicators
โ Fixed risk structure
โ No signal repainting
โ Clean exits with unique IDs
โ Works on any liquid market
Trading Logic (simple & auditable)
Trend filter
EMA 50 vs EMA 200
Entry
Pullback to EMA 50
RSI confirms momentum (not oversold/overbought)
Risk
ATR-based stop
Fixed R:R
One position at a time
This is the minimum bar for a strategy to be considered publish-worthy.
Why this helps TradingView quality
Most low-value scripts fail because they:
hide repainting logic
skip exits entirely
use inconsistent calculations
rely on hindsight candles
This strategy forces discipline:
every signal is confirmed
every trade has defined risk
behavior is repeatable across symbols & timeframes
If more scripts followed this baseline, TradingViewโs public library would be far more usable.
Commodity Channel Index CCI + EMA strategy
================================================================================
COMMODITY CHANNEL INDEX CCI + EMA STRATEGY - STRATEGY GUIDE ๐
================================================================================
๐ก COLLABORATION & SUPPORT
---------------------------
If you want to collaborate, have an idea for a strategy, or need help writing
or customizing code, send an email to burdytrader@gmail.com or send me a
message. Suggestions, ideas, and comments are always welcome! ๐ค
I also develop automated trading codes for other trading platforms including:
- CTrader (C#)
- MetaTrader 4 (MQL4)
- MetaTrader 5 (MQL5)
If you need a strategy converted or developed for any of these platforms, feel
free to contact me!
================================================================================
โ ๏ธ IMPORTANT: INSTRUMENT SELECTION ๐
-------------------------------------
This strategy performs BEST with currency pairs (forex). The CCI indicator
works particularly well in the forex market due to the nature of currency
movements and the effectiveness of the CCI in identifying overbought and
oversold conditions in trending markets.
Why Currency Pairs? ๐ฏ
- CCI is highly effective in identifying reversals in forex markets
- Currency pairs show clear overbought/oversold patterns
- EMA filter (50/200) aligns well with major forex trends
- High liquidity ensures reliable signal execution
Performance Highlights:
In specific currency pairs, when properly configured, this strategy can achieve:
- Profit Factor: Over 2.0
- Win Rate: Up to 70%
- Particularly effective pairs: USDCAD, EURUSD, GBPJPY
While the strategy can work with other instruments (stocks, indices, commodities),
currency pairs provide the most consistent and reliable results. For optimal
performance, focus on major forex pairs with good liquidity and clear trending
characteristics.
================================================================================
WHAT DOES THIS STRATEGY DO? ๐ฏ
---------------------------
This strategy combines the Commodity Channel Index (CCI) with Exponential
Moving Averages (EMA) to identify high-probability trading opportunities.
The strategy uses CCI crossovers with a smoothing moving average and filters
signals using EMA trend confirmation. The strategy automatically enters trades
when CCI crosses the smoothing MA in specific zones, indicating potential trend
reversals or continuations.
HOW IT WORKS? โ๏ธ
---------------
1. CCI CALCULATION ๐
The strategy calculates the Commodity Channel Index using:
- CCI = (Price - SMA(Price, length)) / (0.015 ร Deviation(Price, length))
- Default length: 20 periods
- Source: HLC3 (typical price)
The CCI shows:
- Values above +100 = Overbought conditions
- Values below -100 = Oversold conditions
- Values around 0 = Neutral conditions
2. SMOOTHING MOVING AVERAGE ๐
A moving average is applied to the CCI to smooth out fluctuations:
- Types available: SMA, EMA, SMMA (RMA), WMA, VWMA
- Default: SMA with length 14
- Can be disabled (set to "None")
This smoothed line acts as a reference for crossover signals.
3. EMA TREND FILTER ๐ฏ
Two EMAs are calculated on the CCI:
- EMA 50 (fast EMA)
- EMA 200 (slow EMA)
When the EMA filter is enabled:
- LONG signals only occur when EMA50 > EMA200 (uptrend confirmation)
- SHORT signals only occur when EMA50 < EMA200 (downtrend confirmation)
This filter can be enabled/disabled via the "Use EMA Filter" option.
4. ENTRY CONDITIONS ๐ฒ
LONG ENTRY (Buy Signal):
- CCI crosses ABOVE the Smoothing MA (crossover)
- CCI is between Lower Level (-100) and Middle Level (0)
- EMA Filter: EMA50 > EMA200 (if filter enabled)
- No existing positions (or close opposite positions first)
SHORT ENTRY (Sell Signal):
- CCI crosses BELOW the Smoothing MA (crossunder)
- CCI is between Middle Level (0) and Upper Level (+100)
- EMA Filter: EMA50 < EMA200 (if filter enabled)
- No existing positions (or close opposite positions first)
5. POSITION MANAGEMENT ๐ฐ
The strategy uses a simple position management approach:
- Only ONE position at a time (no pyramiding)
- If a signal occurs in the opposite direction, closes existing position first
- Then opens new position in the new direction
- This prevents overexposure and simplifies risk management
6. TAKE PROFIT & STOP LOSS SETTINGS ๐ฏ
The strategy uses percentage-based TP/SL:
- Take Profit: 1.0% (default, configurable)
- Stop Loss: 0.5% (default, configurable)
- Risk/Reward Ratio: 2:1 (TP is double the SL)
TP/SL are calculated once when the position opens and remain fixed.
AVAILABLE PARAMETERS โ๏ธ
-----------------------
CCI SETTINGS:
1. CCI Length (Default: 20)
- Period for CCI calculation
- Lower values = More sensitive to recent price action
- Higher values = More smoothed, less sensitive
2. CCI Source (Default: HLC3)
- Price source for CCI calculation
- Options: close, open, high, low, hlc3, hlcc4, ohlc4
3. CCI Lower Level (Default: -100)
- Lower boundary for LONG entry zone
- Typically -100 for oversold conditions
4. CCI Middle Level (Default: 0)
- Neutral level separating LONG and SHORT zones
5. CCI Upper Level (Default: +100)
- Upper boundary for SHORT entry zone
- Typically +100 for overbought conditions
SMOOTHING MA:
6. Type (Default: SMA)
- Moving average type: None, SMA, EMA, SMMA (RMA), WMA, VWMA
- Set to "None" to disable smoothing
7. Length (Default: 14)
- Period for smoothing MA
- Range: 7-28, step 7
EMA FILTER:
8. EMA 1 Length (Default: 50)
- Fast EMA period applied to CCI
9. EMA 2 Length (Default: 200)
- Slow EMA period applied to CCI
10. Use EMA Filter (Default: true)
- Enable/disable EMA trend filter
- When enabled: LONG only if EMA50 > EMA200, SHORT only if EMA50 < EMA200
RISK MANAGEMENT:
11. Take Profit (%) (Default: 1.0%)
- Profit target as percentage of entry price
- For LONG: Entry ร (1 + TP%)
- For SHORT: Entry ร (1 - TP%)
12. Stop Loss (%) (Default: 0.5%)
- Stop loss as percentage of entry price
- For LONG: Entry ร (1 - SL%)
- For SHORT: Entry ร (1 + SL%)
VISUALIZATION ๐
---------------
The strategy displays in a separate panel below the price chart:
1. CCI LINE
- Blue line showing the CCI value
- Oscillates around zero
2. SMOOTHING MA LINE
- Yellow line showing the smoothed CCI
- Reference line for crossover signals
3. CCI LEVEL LINES
- Red dashed line: Upper Level (+100)
- Green dashed line: Lower Level (-100)
- Yellow dashed line: Middle Level (0)
4. ENTRY SIGNALS
- Green cross: LONG entry signal (when CCI crosses above MA)
- Red cross: SHORT entry signal (when CCI crosses below MA)
RECOMMENDED SETTINGS ๐ฏ
-----------------------
To get started, you can use these settings:
CCI SETTINGS:
- CCI Length: 20 (default)
- CCI Source: HLC3 (default)
- CCI Lower Level: -100 (default)
- CCI Middle Level: 0 (default)
- CCI Upper Level: +100 (default)
SMOOTHING MA:
- Type: SMA (default) or EMA for faster response
- Length: 14 (default)
EMA FILTER:
- EMA 1 Length: 50 (default)
- EMA 2 Length: 200 (default)
- Use EMA Filter: true (recommended for better signal quality)
RISK MANAGEMENT:
- Take Profit (%): 1.0% (adjust based on your risk/reward preference)
- Stop Loss (%): 0.5% (adjust based on your risk tolerance)
For more aggressive trading:
- Reduce CCI Length to 14-16
- Reduce Smoothing MA Length to 7
- Disable EMA Filter
For more conservative trading:
- Increase CCI Length to 24-30
- Increase Smoothing MA Length to 21-28
- Keep EMA Filter enabled
RECOMMENDED CURRENCY PAIRS ๐ฑ
------------------------------
This strategy is optimized for currency pairs and performs exceptionally well
on the following pairs when properly configured:
TOP PERFORMING PAIRS:
- USDCAD: Can achieve Profit Factor > 2.0 and Win Rate up to 70%
- EURUSD: Excellent performance with consistent signals
- GBPJPY: Strong results with proper EMA filter configuration
These pairs have shown the best historical performance due to:
- Clear trending characteristics
- Good response to CCI overbought/oversold levels
- Strong alignment with EMA 50/200 trend filter
- High liquidity ensuring reliable execution
When trading these pairs, use the default settings or slightly adjusted
parameters based on the pair's volatility. Always backtest on historical
data before using real money to find the optimal configuration for each
specific pair.
PRACTICAL EXAMPLE ๐
--------------------
Scenario: LONG Entry on EUR/USD
1. Market conditions:
- Price: 1.1000
- CCI: -80 (in oversold zone)
- Smoothing MA: -90
- CCI crosses above Smoothing MA (crossover occurs)
- EMA50: -50, EMA200: -70 (EMA50 > EMA200, uptrend confirmed)
2. Strategy checks conditions:
โ Smoothing MA enabled: Yes
โ Crossover: Yes (CCI crosses above MA)
โ CCI in range: Yes (-100 <= -80 <= 0)
โ EMA Filter: Yes (EMA50 > EMA200)
โ No existing position: Yes
3. Strategy opens position:
- Direction: LONG (Buy)
- Entry: 1.1000 (current close)
- Take Profit: 1.1110 (1.0% above entry)
- Stop Loss: 1.0945 (0.5% below entry)
- Risk/Reward: 2:1
4. Outcome scenarios:
- If price rises to 1.1110 โ Take Profit hit (profit)
- If price falls to 1.0945 โ Stop Loss hit (loss limited)
IMPORTANT NOTE โ ๏ธ
-----------------
This strategy is a technical analysis tool based on CCI and EMA indicators.
Like all trading strategies, it does NOT guarantee profits. Trading involves
significant risks and you can lose money, including your entire investment.
Past performance does not guarantee future results.
Always:
- Use appropriate risk management
- Never risk more than you can afford to lose
- Test the strategy on historical data (backtesting) before using real money
- Start with small position sizes or paper trading
- Understand that no strategy works 100% of the time
- Consider market conditions, news events, and other factors
- Keep a trading journal to learn and improve
The author and contributors are NOT responsible for any losses incurred from
using this strategy. Trading decisions are your own responsibility. Profits
are NOT guaranteed, and losses are possible.
LICENSE ๐
----------
This code is open source and available for modification. You are free to use,
modify, and distribute this strategy. If you republish or share a modified
version, please kindly mention the original author.
================================================================================
EMA and Dow Theory Strategies V2๐ Overview
This strategy is an advanced evolution of the original EMA ร Dow Theory hybrid model. V2 introduces true swingโbased trend detection, gradient trendโzones, higherโtimeframe swing overlays, and dynamic exit logic designed for intraday to shortโterm trading across crypto, forex, stocks, and indices.
The system provides precise entries, adaptive exits, and highly visual guidance that helps traders understand trend structure at a glance.
๐ง Key Features
๐น 1. DualโEMA Trend Logic (Symbol + External Index)
Both the chart symbol and an external index (OTHERS.D) are evaluated using fast/slow EMAs to determine correlationโbased trend bias.
๐น 2. Dow Theory Swing Detection (Realโtime)
The script identifies swing highs/lows and updates trend direction when price breaks them. This creates a structural trend model that reacts faster than EMAs alone.
๐น 3. Gradient Trend Zones (Visual Trend Strength)
When trend is up or down, the area between price and the latest swing level is filled with a multiโstep gradient. This makes trend strength and distance-to-structure visually intuitive.
๐น 4. HigherโTimeframe Swing Trend (htfTrend)
Swing highs/lows from a higher timeframe (e.g., 4H) are plotted to show macro structure. Used only for visual context, not for filtering entries.
๐น 5. RSIโBased Entry Protection
RSI prevents entries during extreme overbought/oversold conditions.
๐น 6. Dynamic Exit System
Includes:
Custom stopโloss (%)
Partial takeโprofit (TP1/TP2/TP3)
Automatic scaleโout when trend color weakens
โColorโchange lockoutโ to prevent immediate reโentry
Realโtime PnL tracking and labels
๐น 7. Alerts for All Key Events
Entry, stopโloss, partial exits, and trendโchange exits all generate structured JSON alerts.
๐น 8. Visual PnL Labels & Equity Tracking
PnL for the latest trade is displayed directly on the chart, including scaleโout adjustments.
โ๏ธ Input Parameters
Parameter Description
Fast EMA / Slow EMA EMAs used for symbol trend detection
Index Fast / Slow EMA EMAs applied to external index
StopLoss (%) Custom stopโloss threshold
ScaleโOut % Portion to exit when trend color weakens
RSI Period / Levels Overbought/oversold filters
Swing Detection Length Bars used to detect swing highs/lows
Stats Display Position of statistics table
๐งญ About htfTrend (Higher Timeframe Trend)
The higherโtimeframe swing trend is displayed visually but not used for entry logic.
Why? Strict HTF filtering reduces trade frequency and often removes profitable setups. By keeping it visualโonly, traders retain flexibility while still benefiting from macro structure awareness.
Use it as a contextual guide, not a constraint.
๐ ๆฆ่ฆ
ๆฌในใใฉใใธใผใฏใV1 ใๅคงๅน
ใซๆกๅผตใใ EMA ร ใใฆ็่ซ ร ในใคใณใฐๆง้ ร ไธไฝ่ถณใใฌใณใๅฏ่ฆๅ ใฎ่คๅๅใขใใซใงใใ ็ญๆใใใคใใฌใผใๅใใซๆ้ฉๅใใใฆใใใไปฎๆณ้่ฒจใปFXใปๆ ชๅผใปๆๆฐใชใฉๅน
ๅบใใขใปใใใงๅฉ็จใงใใพใใ
V2 ใงใฏใในใคใณใฐๆง้ ใฎ่ชๅๆคๅบใใฐใฉใใผใทใงใณใซใใใใฌใณใๅผทๅบฆใฎๅฏ่ฆๅใไธไฝ่ถณในใคใณใฐใฉใคใณใๅ็ใชๅฉ็ขบ/ๆๅใใญใธใใฏ ใ่ฟฝๅ ใใใ่ฆ่ฆ็ใซใใญใธใใฏ็ใซใๅคงๅน
ใซๅผทๅใใใฆใใพใใ
๐ง ไธปใชๆฉ่ฝ
๐น 1. ้ๆ๏ผๅค้จใคใณใใใฏในใฎ EMA ใฏใญในๅคๅฎ
ๅฏพ่ฑก้ๆใจ OTHERS.D ใฎ EMA ใๆฏ่ผใใ็ธ้ขใ่ๆ
ฎใใใใฌใณใๆนๅใๅคๅฎใใพใใ
๐น 2. ใใฆ็่ซใซๅบใฅใในใคใณใฐ้ซๅคใปๅฎๅคใฎ่ชๅๆคๅบ
ในใคใณใฐๆดๆฐใซใใใใฌใณใๆนๅใๅใๆฟใใใๆง้ ใใผในใฎใใฌใณใๅคๅฎใๆก็จใ
๐น 3. ใฐใฉใใผใทใงใณ่ๆฏใซใใใใฌใณใๅผทๅบฆใฎๅฏ่ฆๅ
ในใคใณใฐใฉใคใณใใ็พๅจไพกๆ ผใพใงใๆฎต้็ใซๅกใๅใใ ใใฉใใ ใใใฌใณใใไผธใณใฆใใใใใ็ดๆ็ใซๆๆกใงใใพใใ
๐น 4. ไธไฝ่ถณในใคใณใฐใใฌใณใ๏ผhtfTrend๏ผใฎ่กจ็คบ
4H ใชใฉใฎไธไฝ่ถณใงใฎในใคใณใฐ้ซๅคใปๅฎๅคใ่กจ็คบใใ ๅคงๅฑ็ใชใใฌใณใๆง้ ใ่ฆ่ฆ็ใซๆๆกใงใใพใ๏ผใญใธใใฏใซใฏๆชไฝฟ็จ๏ผใ
๐น 5. RSI ใซใใ้็ฑใปๅฃฒใใใใใใฃใซใฟใผ
ๆฅต็ซฏใช RSI ็ถๆ
ใงใฎใจใณใใชใผใ้ฒๆญขใ
๐น 6. ๅ็ใคใฐใธใใใทในใใ
ใซในใฟใ ๆๅใ๏ผ๏ผ
๏ผ
TP1/TP2/TP3 ใฎๆฎต้็ๅฉ็ขบ
ใใฌใณใ่ฒใฎๅผฑใพใใซใใ่ชๅในใฑใผใซใขใฆใ
่ฒๅคๅๅพใฎๅใจใณใใชใผๅถ้๏ผwaitForColorChange๏ผ
ใชใขใซใฟใคใ PnL ใฎ่ฟฝ่ทกใจใฉใใซ่กจ็คบ
๐น 7. ใขใฉใผใๅฎๅ๏ผJSON ๅฝขๅผ๏ผ
ใจใณใใชใผใๆๅใใ้จๅๅฉ็ขบใใใฌใณใๅ่ปขใชใฉใในใฆใซๅฏพๅฟใ
๐น 8. ๆ็ใฉใใซใป็ตฑ่จ่กจ็คบ
็ด่ฟใใฌใผใใฎๆ็ใใใฃใผใไธใซ่กจ็คบใใ่ฆ่ฆ็ใซๆๆกใงใใพใใ
โ๏ธ ่จญๅฎ้
็ฎ
่จญๅฎ้
็ฎๅ ่ชฌๆ
Fast / Slow EMA ้ๆใฎ EMA ่จญๅฎ
Index Fast / Slow EMA ๅค้จใคใณใใใฏในใฎ EMA ่จญๅฎ
ๆๅใ๏ผ๏ผ
๏ผ ใซในใฟใ ๆๅใใฉใคใณ
้จๅๅฉ็ขบๅฒๅ ใใฌใณใๅผฑๅๆใฎในใฑใผใซใขใฆใๅฒๅ
RSI ๆ้ใปๆฐดๆบ ้็ฑ/ๅฃฒใใใใใใฃใซใฟใผ
ในใคใณใฐๆคๅบๆ้ ในใคใณใฐ้ซๅคใปๅฎๅคใฎๆคๅบใซไฝฟ็จ
็ตฑ่จ่กจ็คบไฝ็ฝฎ ใใผใใซใฎ่กจ็คบไฝ็ฝฎ
๐งญ ไธไฝ่ถณใใฌใณใ๏ผhtfTrend๏ผใซใคใใฆ
ไธไฝ่ถณในใคใณใฐใฎๆดๆฐใซๅบใฅใใใฌใณใๅคๅฎใ่กจ็คบใใพใใใ ใจใณใใชใผๆกไปถใซใฏไฝฟ็จใใฆใใพใใใ
็็ฑ๏ผ ไธไฝ่ถณใๅณๅฏใซใญใธใใฏใธ็ตใฟ่พผใใจใใใฌใผใๆฉไผใๅคงๅน
ใซๆธใใใใงใใ
ๆฌในใใฉใใธใผใงใฏใ ใๅคงๅฑใฎๆๆกใฏ่ฆ่ฆใงใใจใณใใชใผใฏๆ่ปใซใ ใจใใ่จญ่จๆๆณใๆก็จใใฆใใพใใ
โ ่ฃ้ใงๅฉ็ขบๅคๆญใ้ๅผตใๅ้ฟใซๆดป็จใงใใพใใ
[SM-021] Gaussian Trend System [Optimized]This script is a comprehensive trend-following strategy centered around a Gaussian Channel. It is designed to capture significant market movements while filtering out noise during consolidation phases. This version (v2) introduces code optimizations using Pine Script v6 Arrays and a new Intraday Time Control feature.
1. Core Methodology & Math
The foundation of this strategy is the Gaussian Filter, originally conceptualized by @DonovanWall.
Gaussian Poles: Unlike standard moving averages (SMA/EMA), this filter uses "poles" (referencing signal processing logic) to reduce lag while maintaining smoothness.
Array Optimization: In this specific iteration, the f_pole function has been refactored to utilize Pine Script Arrays. This improves calculation efficiency and rendering speed compared to recursive variable calls, especially when calculating deep historical data.
Channel Logic: The strategy calculates a "Filtered True Range" to create High and Low bands around the main Gaussian line.
Long Entry: Price closes above the High Band.
Short Entry: Price closes below the Low Band.
2. Signal Filtering (Confluence)
To reduce false signals common in trend-following systems, the strategy employs a "confluence" approach using three additional layers:
Baseline Filter: A 200-period (customizable) EMA or SMA acts as a regime filter. Longs are only taken above the baseline; Shorts only below.
ADX Filter (Volatility): The Average Directional Index (ADX) is used to measure trend strength. If the ADX is below a user-defined threshold (default: 20), the market is considered "choppy," and new entries are blocked.
Momentum Check: A Stochastic RSI check ensures that momentum aligns with the breakout direction.
3. NEW: Intraday Session Filter
Per user requests, a time-based filter has been added to restrict trading activity to specific market sessions (e.g., the New York Open).
How it works: Users can toggle a checkbox to enable/disable the filter.
Configuration: You can define a specific time range (Default: 09:30 - 16:00) and a specific Timezone (Default: New York).
Logic: The strategy longCondition and shortCondition now check if the current bar's timestamp falls within this window. If outside the window, no new entries are generated, though existing trades are managed normally.
4. Risk Management
The strategy relies on volatility-based exits rather than fixed percentage stops:
ATR Stop Loss: A multiple of the Average True Range (ATR) is calculated at the moment of entry to set a dynamic Stop Loss.
ATR Take Profit: An optional Reward-to-Risk (RR) ratio can be set to place a Take Profit target relative to the Stop Loss distance.
Band Exit: If the trend reverses and price crosses the opposite band, the trade is closed immediately to prevent large drawdowns.
Credits & Attribution
Original Gaussian Logic: Developed by @DonovanWalll. This script utilizes his mathematical formula for the pole filters.
Strategy Wrapper & Array Refactor: Developed by @sebamarghella.
Community Request: The Intraday Session Filter was added to assist traders focusing on specific liquidity windows.
Disclaimer: This strategy is for educational purposes. Past performance is not indicative of future results. Please use the settings menu to adjust the Session Time and Risk parameters to fit your specific asset class.
Katik EMA BUY SELLThis strategy uses EMA 9, EMA 20, and EMA 200 to generate Buy and Sell signals.
BUY Conditions
EMA 9 crosses above EMA 20
Stoploss: Recent Swing Low
Target: EMA 9 touches or crosses EMA 200
SELL Conditions
EMA 9 crosses below EMA 20
Stoploss: Recent Swing High
Target: EMA 9 touches or crosses EMA 200
Features
Automatic Long & Short entries
Dynamic swing-based stoploss
Clear EMA plots with line width 3
Works on all timeframes
Hyper Insight MA Strategy [Universal]Hyper Insight MA Strategy ** is a comprehensive trend-following engine designed for traders who require precision and flexibility. Unlike standard indicators that lock you into a single calculation method, this strategy serves as a "Universal Adapter," allowing you to **Mix & Match 13 different Moving Average types** for both the Fast and Slow trend lines independently.
Whether you need the smoothness of T3, the responsiveness of HMA, or the classic reliability of SMA, this script enables you to backtest thousands of combinations to find the perfect edge for your specific asset class.
---
๐ฌ Deep Dive: Calculation Logic of Included MAs
This strategy includes 13 distinct calculation methods. Understanding the math behind them will help you choose the right tool for your specific market conditions.
#### 1. Standard Averages
* **SMA (Simple Moving Average):** The unweighted mean of the previous $n$ data points.
* *Logic:* Treats every price point in the period with equal importance. Good for identifying long-term macro trends but reacts slowly to recent volatility.
* **WMA (Weighted Moving Average):** A linear weighted average.
* *Logic:* Assigns heavier weight to current data linearly (e.g., $1, 2, 3... n$). It reacts faster than SMA but is still relatively smooth.
* **SWMA (Symmetrically Weighted Moving Average):**
* *Logic:* Uses a fixed-length window (usually 4 bars) with symmetrical weights $ $. It prioritizes the center of the recent data window.
#### 2. Exponential & Lag-Reducing Averages
* **EMA (Exponential Moving Average):**
* *Logic:* Applies an exponential decay weighting factor. Recent prices have significantly more impact on the average than older prices, reducing lag compared to SMA.
* **RMA (Running Moving Average):** Also known as Wilder's Smoothing (used in RSI).
* *Logic:* It is essentially an EMA but with a slower alpha weight of $1/length$. It provides a very smooth, stable line that filters out noise effectively.
* **DEMA (Double Exponential Moving Average):**
* *Logic:* Calculated as $2 \times EMA - EMA(EMA)$. By subtracting the "lag" (the smoothed EMA) from the original EMA, DEMA provides a much faster reaction to price changes with less noise than a standard EMA.
* **TEMA (Triple Exponential Moving Average):**
* *Logic:* Calculated as $3 \times EMA - 3 \times EMA(EMA) + EMA(EMA(EMA))$. This effectively eliminates the lag inherent in single and double EMAs, making it an extremely fast-tracking indicator for scalping.
#### 3. Advanced & Adaptive Averages
* **HMA (Hull Moving Average):**
* *Logic:* A composite formula involving Weighted Moving Averages: ASX:WMA (2 \times Integer(n/2)) - WMA(n)$. The result is then smoothed by a $\sqrt{n}$ WMA.
* *Effect:* It eliminates lag almost entirely while managing to improve curve smoothness, solving the traditional trade-off between speed and noise.
* **ZLEMA (Zero Lag Exponential Moving Average):**
* *Logic:* This calculation attempts to remove lag by modifying the data source before smoothing. It calculates a "lag" value $(length-1)/2$ and applies an EMA to the data: $Source + (Source - Source )$. This creates a projection effect that tracks price tightly.
* **T3 (Tillson T3 Moving Average):**
* *Logic:* A complex smoothing technique that runs an EMA through a filter multiple times using a "Volume Factor" (set to 0.7 in this script).
* *Effect:* It produces a curve that is incredibly smooth and free of "overshoot," making it excellent for filtering out market chop.
* **ALMA (Arnaud Legoux Moving Average):**
* *Logic:* Uses a Gaussian distribution (bell curve) to assign weights. It allows the user to offset the moving average (moving the peak of the weight) to align it perfectly with the price, balancing smoothness and responsiveness.
* **LSMA (Least Squares Moving Average):**
* *Logic:* Calculates the endpoint of a Linear Regression line for the lookback period. It essentially guesses where the price "should" be based on the best-fit line of the recent trend.
* **VWMA (Volume Weighted Moving Average):**
* *Logic:* Weights the closing price by the volume of that bar.
* *Effect:* Prices on high volume days pull the MA harder than prices on low volume days. This is excellent for validating true trend strength (i.e., a breakout on high volume will move the VWMA significantly).
---
### ๐ Features & Settings
* **Universal Switching:** Change the `Fast MA` and `Slow MA` types instantly via the settings menu.
* **Trend Cloud:** A dynamic background fill (Green/Red) highlights the crossover zone for immediate visual trend identification.
* **Strategy Mode:** Built-in Backtesting logic triggers `LONG` entries when Fast MA crosses over Slow MA, and `EXIT` when Fast MA crosses under.
### โ ๏ธ Disclaimer
This script is intended for educational and research purposes. The wide variety of MA combinations can produce vastly different results. Past performance is not indicative of future results. Please use proper risk management.
EMA 12-26-100 Momentum Strategy# Triple EMA Multi-Signal Momentum Strategy
## ๐ Overview
**Triple EMA Multi-Signal** is a comprehensive trend-following momentum strategy designed specifically for cryptocurrency markets. It combines multiple technical indicators and signal types to identify high-probability trading opportunities while maintaining strict risk management protocols.
The strategy excels in trending markets and uses adaptive position sizing with trailing stops to maximize profits during strong trends while protecting capital during choppy conditions.
## ๐ฏ Core Algorithm
### Triple EMA System
The strategy employs a three-layer EMA system to identify trend direction and strength:
- **Fast EMA (12)**: Quick response to price changes
- **Slow EMA (26)**: Confirmation of trend direction
- **Trend EMA (100)**: Overall market bias filter
Trades are only taken when all three EMAs align in the same direction, ensuring we trade with the dominant trend.
### Multi-Signal Confirmation (8 Signal Types)
The strategy requires at least 1-2 confirmed signals from multiple independent sources before entering a position:
1. **EMA Crossover** - Fast EMA crossing Slow EMA (primary signal)
2. **MACD Cross** - MACD line crossing signal line (momentum confirmation)
3. **RSI Reversal** - RSI bouncing from oversold/overbought zones
4. **Price Action** - Strong bullish/bearish candles (>60% of range)
5. **Volume Spike** - Above-average volume confirmation
6. **Breakout** - Price breaking 20-period high/low with volume
7. **Pullback to EMA** - Trend continuation after healthy retracement
8. **Bollinger Bounce** - Price bouncing from BB bands
This multi-signal approach significantly reduces false signals and improves win rate.
## ๐ฐ Risk Management
### Position Sizing
- Default: 20-25% of equity per trade
- Adjustable based on risk tolerance
- Smaller positions recommended for leveraged trading
### Stop Loss & Take Profit
- **Stop Loss**: 2.0% (tight control of risk)
- **Take Profit**: 5.5% (2.75:1 reward-to-risk ratio)
- Both levels are fixed at entry to avoid emotional decisions
### Trailing Stop System
- Activates after 1.8% profit
- Trails at 1.3% below current price
- Locks in profits during extended trends
- Automatically adjusts as price moves in your favor
### Maximum Hold Time
- 36-48 hours maximum (configurable)
- Designed to minimize funding rate costs on futures
- Forces position closure to avoid excessive exposure
- Helps maintain capital velocity
## ๐ Key Features
### Trend Filters
- **ADX Filter**: Ensures sufficient trend strength (threshold: 20)
- **EMA Alignment**: All three EMAs must confirm trend direction
- **RSI Boundaries**: Avoids extreme overbought/oversold entries
### Volume Analysis
- Volume must exceed 20-period moving average
- Configurable multiplier (default: 1.0x)
- Helps identify institutional participation
### Automatic Exit Conditions
1. Take Profit target reached
2. Stop Loss triggered
3. Trailing stop activated
4. Trend reversal (EMA cross in opposite direction)
5. Maximum hold time exceeded
## ๐ฎ Recommended Settings
### For Spot Trading (Conservative)
```
Position Size: 15-20%
Stop Loss: 2.5%
Take Profit: 6.0%
Max Hold: 72 hours
Leverage: 1x
```
### For Futures 3-5x Leverage (Balanced)
```
Position Size: 12-15%
Stop Loss: 2.0%
Take Profit: 5.5%
Max Hold: 36 hours
Trailing: Active
```
### For Aggressive Trading 5-10x (High Risk)
```
Position Size: 8-12%
Stop Loss: 1.5%
Take Profit: 4.5%
Max Hold: 24 hours
ADX Filter: Disabled
```
## ๐ Performance Metrics
### Backtested Results (BTC/USDT 1H, 2 years)
- **Total Return**: ~19% (spot) / ~75% (5x leverage)*
- **Total Trades**: 240-300
- **Win Rate**: 49-52%
- **Profit Factor**: 1.25-1.50
- **Max Drawdown**: ~18-22%
- **Average Trade**: 0.5-3 days
*Leverage results exclude funding rates and real-world slippage
### Optimal Timeframes
- **1 Hour**: Best for active trading (recommended)
- **4 Hour**: More stable, fewer signals
- **15 Min**: High frequency (requires monitoring)
### Best Performing Assets
- BTC/USDT (most tested)
- ETH/USDT
- Major altcoins with good liquidity
- Not recommended for low-cap or illiquid pairs
## โ๏ธ How to Use
1. **Add to Chart**: Apply strategy to 1H BTC/USDT chart
2. **Adjust Settings**: Configure risk parameters based on your preference
3. **Review Signals**: Green = Long, Red = Short, labels show signal count
4. **Monitor Performance**: Check strategy tester for detailed statistics
5. **Optimize**: Use strategy optimization to find best parameters for your market
## ๐จ Visual Indicators
The strategy provides clear visual feedback:
- **EMA Lines**: Blue (Fast), Red (Slow), Orange (Trend)
- **BUY/SELL Labels**: Show entry points with signal count
- **Stop/Target Lines**: Red (SL), Green (TP) displayed during active trades
- **Background Color**: Light green (long), light red (short) when in position
- **Info Panel**: Shows current trend, RSI, ADX, and volume status
## โ ๏ธ Important Notes
### Risk Disclaimer
- This strategy is for educational purposes only
- Past performance does not guarantee future results
- Cryptocurrency trading involves substantial risk
- Only trade with capital you can afford to lose
- Always use proper position sizing and risk management
### Limitations
- Performs poorly in sideways/choppy markets
- Requires sufficient liquidity for best execution
- Backtests do not include:
- Real-world slippage (especially during volatility)
- Funding rates (for perpetual futures)
- Exchange downtime or connection issues
- Emotional trading decisions
### For Futures Trading
If using this strategy on futures with leverage:
- Reduce position size proportionally to leverage
- Account for funding rates (~0.01% per 8h)
- Set max hold time to minimize funding costs
- Use lower leverage (3-5x max recommended)
- Monitor liquidation price carefully
## ๐ง Customization
All parameters are fully customizable:
- EMA periods (fast/slow/trend)
- MACD settings (12/26/9)
- RSI levels (30/70)
- Stop Loss / Take Profit percentages
- Trailing stop activation and offset
- Volume multiplier
- ADX threshold
- Maximum hold time
## ๐ Strategy Logic
The strategy follows this decision tree:
```
1. Check Trend Direction (EMA alignment)
โ
2. Scan for Entry Signals (8 types)
โ
3. Confirm with Filters (ADX, Volume, RSI)
โ
4. Enter Position with Fixed SL/TP
โ
5. Monitor for Exit Conditions:
- TP Hit โ Close with profit
- SL Hit โ Close with loss
- Trailing Active โ Follow price
- Trend Reversal โ Close position
- Max Time โ Force close
```
## ๐ Best Practices
1. **Start Conservative**: Use smaller position sizes initially
2. **Track Performance**: Monitor actual vs backtested results
3. **Optimize Regularly**: Market conditions change, adapt parameters
4. **Combine with Analysis**: Don't rely solely on automated signals
5. **Manage Emotions**: Stick to the system, avoid manual overrides
6. **Paper Trade First**: Test on demo before risking real capital
## ๐ Support & Updates
This strategy is actively maintained and updated based on:
- Market condition changes
- User feedback and suggestions
- Performance optimization
- Bug fixes and improvements
## ๐ Conclusion
Triple EMA Multi-Signal Strategy offers a robust, systematic approach to cryptocurrency trading by combining trend following, momentum indicators, and strict risk management. Its multi-signal confirmation system helps filter false signals while the trailing stop mechanism captures extended trends.
The strategy is suitable for both manual traders looking for high-probability setups and algorithmic traders seeking a proven systematic approach.
**Remember**: No strategy wins 100% of the time. Success comes from consistent application, proper risk management, and continuous adaptation to changing market conditions.
---
*Version: 1.0*
*Last Updated: November 2025*
*Tested on: BTC/USDT, ETH/USDT (1H, 4H timeframes)*
*Recommended Capital: $5,000+ for optimal position sizing*
Vital Wave 20-50Simplicity is almost always the most effective approach, and here Iโm giving you a trend-following system that exploits the bullish bias of traditional markets and their trending nature, with very basic rules.
Rules (long entries only)
โข Market entry: When the EMA 20 crosses above the EMA 50 (from below)
โข Main market exit: When the EMA 20 crosses below the EMA 50 (from above)
โข Fixed Stop Loss: Placed at the price level of the Lower Bollinger Band at the moment the trade is entered.
In my strategy, the primary exit is when the EMA 20 crosses below the EMA 50. However, this crossover can sometimes take a while to occur, and in the meantime the price may have already dropped significantly. The Stop Loss based on the Lower Bollinger Band is designed to limit losses in case the market moves sharply against the position without giving the bearish crossover signal in time. Having two exit conditions makes the strategy much more robust in terms of risk management.
Risk Management:
โข Initial capital: $10,000
โข Position size: 10% of available capital per trade
โข Commissions: 0.1% on traded volume
โข Stop Loss: Based on the Lower Bollinger Band
โข Take Profit / Exit: When EMA 20 crosses below EMA 50
Recommended Markets:
XAUUSD (OANDA) (Daily)
Period: January 3, 1833 โ November 23, 2025
Total Profit & Loss: +$6,030.62 USD (+57.57%)
Maximum Drawdown: $541.53 USD (3.83%)
Total Trades: 136
Winning Trades (Win Rate): 36.03% (49/136)
Profit Factor: 2.483
XAUUSD (OANDA) (12-hour)
Period: March 19, 2006 โ November 23, 2025
Total Profit & Loss: +$1,209.56 USD (+11.89%)
Maximum Drawdown: $384.58 USD (3.61%)
Total Trades: 97
Winning Trades (Win Rate): 35.05% (34/97)
Profit Factor: 1.676
XAUUSD (OANDA) (8-hour)
Period: March 19, 2006 โ November 23, 2025
Total Profit & Loss: +$1,179.36 USD (+11.81%)
Maximum Drawdown: $246.88 USD (2.32%)
Total Trades: 147
Winning Trades (Win Rate): 31.97% (47/147)
Profit Factor: 1.626
Tesla (NASDAQ) (4-hour)
Period: June 29, 2010 โ November 23, 2025
Total Profit & Loss (Absolute): +$11,687.90 USD (+116.88%)
Maximum Drawdown: $922.05 USD (6.50%)
Total Trades: 68
Winning Trades (Win Rate): 39.71% (27/68)
Profit Factor: 4.156
Tesla (NASDAQ) (3-hour)
Total Profit & Loss: +$11,522.33 USD (+115.22%)
Maximum Drawdown: $1,247.60 USD (8.80%)
Total Trades: 114
Winning Trades: 33.33% (38/114)
Profit Factor: 2.811
Additional Recommendations
(These assets have shown good trending behavior with the same strategy across multiple timeframes):
โข NVDA (15 min, 30 min, 1h, 2h, 3h, 4h, 6h, 8h, 12h, Daily)
โข NFLX (1h, 2h, 3h, 4h, 6h, 8h, 12h, Daily)
โข MA (1h, 2h, 3h, 4h, 6h, 8h, 12h, Daily)
โข META (1h, 2h, 3h, 4h, 6h, 8h, 12h, Daily)
โข AAPL (1h, 2h, 3h, 4h, 6h, 8h, 12h, Daily)
โข SPY (12h, Daily)
About the Code
The user can modify:
โข EMA periods (20 and 50 by default)
โข Bollinger Bands length (20 periods)
โข Standard deviation (2.0)
Visualization
โข EMA 20: Blue line
โข EMA 50: Red line
โข Green background when EMA20 > EMA50 (bullish trend)
โข Red background when EMA20 < EMA50 (bearish trend)
Important Note:
We can significantly increase the profit factor and overall profitability by risking a fixed percentage per trade instead of a fixed amount. This would prevent losses from fluctuating with changes in volatility.
This could be implemented by reducing position size or adjusting leverage based on the volatility percentage required for each trade, but Iโm not sure if this is fully possible in Pine Script. In my other script, โ Golden Cross 50/200 EMA ,โ I go deeper into this topic and provide examples.
I hope you enjoy this contribution. Best regards!
Golden Cross 50/200 EMATrend-following systems are characterized by having a low win rate, yet in the right circumstances (trending markets and higher timeframes) they can deliver returns that even surpass those of systems with a high win rate.
Below, I show you a simple bullish trend-following system with clear execution rules:
System Rules
-Long entries when the 50-period EMA crosses above the 200-period EMA.
-Stop Loss (SL) placed at the lowest low of the 15 candles prior to the entry candle.
-Take Profit (TP) triggered when the 50-period EMA crosses below the 200-period EMA.
Risk Management
-Initial capital: $10,000
-Position size: 10% of capital per trade
-Commissions: 0.1% per trade
Important Note:
In the code, the stop loss is defined using the swing low (15 candles), but the position size is not adjusted based on the distance to the stop loss. In other words, 10% of the equity is risked on each trade, but the actual loss on the trade is not controlled by a maximum fixed percentage of the account โ it depends entirely on the stop loss level. This means the loss on a single trade could be significantly higher or lower than 10% of the account equity, depending on volatility.
Implementing leverage or reducing position size based on volatility is something I havenโt been able to include in the code, but it would dramatically improve the systemโs performance. It would fix a consistent percentage loss per trade, preventing losses from fluctuating wildly with changes in volatility.
For example, we can maintain a fixed loss percentage when volatility is low by using the following formula:
Leverage = % of SL youโre willing to risk / % volatility from entry point to stop loss
And when volatility is high and would exceed the fixed percentage we want to expose per trade (if the SL is hit), we could reduce the position size accordingly.
Practical example:
Imagine we only want to risk 15% of the position value if the stop loss is triggered on Tesla (which has high volatility), but the distance to the SL represents a potential 23.57% drop. In this case, we subtract the desired risk (15%) from the actual volatility-based loss (23.57%):
23.57% โ 15% = 8.57%
Now suppose we normally use $200 per trade.
To calculate 8.57% of $200:
200 ร (8.57 / 100) = $17.14
Then subtract that amount from the original position size:
$200 โ $17.14 = $182.86
In summary:
If we reduce the position size to $182.86 (instead of the usual $200), even if Tesla moves 23.57% against us and hits the stop loss, we would still only lose approximately 15% of the original $200 position โ exactly the risk level we defined. This way, we strictly respect our risk management rules regardless of volatility swings.
I hope this clearly explains the importance of capping losses at a fixed percentage per trade. This keeps risk under control while maintaining a consistent percentage of capital invested per trade โ preventing both statistical distortion of the system and the potential destruction of the account.
About the code:
Strategy declaration:
The strategy is named 'Golden Cross 50/200 EMA'.
overlay=true means it will be drawn directly on the price chart.
initial_capital=10000 sets the initial capital to $10,000.
default_qty_type=strategy.percent_of_equity and default_qty_value=10 means each trade uses 10% of available equity.
margin_long=0 indicates no margin is used for long positions (this is likely for simulation purposes only; in real trading, margin would be required).
commission_type=strategy.commission.percent and commission_value=0.1 sets a 0.1% commission per trade.
Indicators:
Calculates two EMAs: a 50-period EMA (ema50) and a 200-period EMA (ema200).
Crossover detection:
bullCross is triggered when the 50-period EMA crosses above the 200-period EMA (Golden Cross).
bearCross is triggered when the 50-period EMA crosses below the 200-period EMA (Death Cross).
Recent swing:
swingLow calculates the lowest low of the previous 15 periods.
Stop Loss:
entryStopLoss is a variable initialized as na (not available) and is updated to the current swingLow value whenever a bullCross occurs.
Entry and exit conditions:
Entry: When a bullCross occurs, the initial stop loss is set to the current swingLow and a long position is opened.
Exit on opposite signal: When a bearCross occurs, the long position is closed.
Exit on stop loss: If the price falls below entryStopLoss while a position is open, the position is closed.
Visualization:
Both EMAs are plotted (50-period in blue, 200-period in red).
Green triangles are plotted below the bar on a bullCross, and red triangles above the bar on a bearCross.
A horizontal orange line is drawn that shows the stop loss level whenever a position is open.
Alerts:
Alerts are created for:Long entry
Exit on bearish crossover (Death Cross)
Exit triggered by stop loss
Favorable Conditions:
Tesla (45-minute timeframe)
June 29, 2010 โ November 17, 2025
Total net profit: $12,458.73 or +124.59%
Maximum drawdown: $1,210.40 or 8.29%
Total trades: 107
Winning trades: 27.10% (29/107)
Profit factor: 3.141
Tesla (1-hour timeframe)
June 29, 2010 โ November 17, 2025
Total net profit: $7,681.83 or +76.82%
Maximum drawdown: $993.36 or 7.30%
Total trades: 75
Winning trades: 29.33% (22/75)
Profit factor: 3.157
Netflix (45-minute timeframe)
May 23, 2002 โ November 17, 2025
Total net profit: $11,380.73 or +113.81%
Maximum drawdown: $699.45 or 5.98%
Total trades: 134
Winning trades: 36.57% (49/134)
Profit factor: 2.885
Netflix (1-hour timeframe)
May 23, 2002 โ November 17, 2025
Total net profit: $11,689.05 or +116.89%
Maximum drawdown: $844.55 or 7.24%
Total trades: 107
Winning trades: 37.38% (40/107)
Profit factor: 2.915
Netflix (2-hour timeframe)
May 23, 2002 โ November 17, 2025
Total net profit: $12,807.71 or +128.10%
Maximum drawdown: $866.52 or 6.03%
Total trades: 56
Winning trades: 41.07% (23/56)
Profit factor: 3.891
Meta (45-minute timeframe)
May 18, 2012 โ November 17, 2025
Total net profit: $2,370.02 or +23.70%
Maximum drawdown: $365.27 or 3.50%
Total trades: 83
Winning trades: 31.33% (26/83)
Profit factor: 2.419
Apple (45-minute timeframe)
January 3, 2000 โ November 17, 2025
Total net profit: $8,232.55 or +80.59%
Maximum drawdown: $581.11 or 3.16%
Total trades: 140
Winning trades: 34.29% (48/140)
Profit factor: 3.009
Apple (1-hour timeframe)
January 3, 2000 โ November 17, 2025
Total net profit: $9,685.89 or +94.93%
Maximum drawdown: $374.69 or 2.26%
Total trades: 118
Winning trades: 35.59% (42/118)
Profit factor: 3.463
Apple (2-hour timeframe)
January 3, 2000 โ November 17, 2025
Total net profit: $8,001.28 or +77.99%
Maximum drawdown: $755.84 or 7.56%
Total trades: 67
Winning trades: 41.79% (28/67)
Profit factor: 3.825
NVDA (15-minute timeframe)
January 3, 2000 โ November 17, 2025
Total net profit: $11,828.56 or +118.29%
Maximum drawdown: $1,275.43 or 8.06%
Total trades: 466
Winning trades: 28.11% (131/466)
Profit factor: 2.033
NVDA (30-minute timeframe)
January 3, 2000 โ November 17, 2025
Total net profit: $12,203.21 or +122.03%
Maximum drawdown: $1,661.86 or 10.35%
Total trades: 245
Winning trades: 28.98% (71/245)
Profit factor: 2.291
NVDA (45-minute timeframe)
January 3, 2000 โ November 17, 2025
Total net profit: $16,793.48 or +167.93%
Maximum drawdown: $1,458.81 or 8.40%
Total trades: 172
Winning trades: 33.14% (57/172)
Profit factor: 2.927
Qullamagi EMA Breakout Autotrade (Crypto Futures L+S)Title: Qullamagi EMA Breakout โ Crypto Autotrade
Overview
A crypto-focused, Qullamagi-style EMA breakout strategy built for autotrading on futures and perpetual swaps.
It combines a 5-MA trend stack (EMA 10/20, SMA 50/100/200), volatility contraction boxes, volume spikes and an optional higher-timeframe 200-MA filter. The script supports both long and short trades, partial take profit, trailing MA exits and percent-of-equity position sizing for automated crypto futures trading.
Key Features (Crypto)
Qullamagi MA Breakout Engine โ trades only when price is aligned with a strong EMA/SMA trend and breaks out of a tight consolidation range. Longs use: Close > EMA10 > EMA20 > SMA50 > SMA100 > SMA200. Shorts are the mirror condition with all MAs sloping in the trend direction.
Strict vs Loose Modes โ Strict (Daily) is designed for cleaner swing trades on 1Hโ4H (full MA stack, box+ATR and volume filters, optional HTF filter). Loose (Intraday) focuses on 10/20/50 alignment with relaxed filters for more frequent 15mโ30m signals.
Volatility & Volume Filters for Crypto โ ATR-based box height limit to detect volatility contraction, wide-candle filter to avoid chasing exhausted breakouts, and a volume spike condition requiring current volume to exceed an SMA of volume.
Higher-Timeframe Trend Filter (Optional) โ uses a 200-period SMA on a higher timeframe (default: 1D). Longs only when HTF close is above the HTF 200-SMA, shorts only when it is below, helping avoid trading against dominant crypto trends.
Autotrade-Oriented Trade Management โ position size as % of equity, initial stop anchored to a chosen MA (EMA10 / EMA20 / SMA50) with optional buffer, partial take profit at a configurable R-multiple, trailing MA exit for the remainder, and an optional cooldown after a full exit.
Markets & Timeframes
Best suited for BTC, ETH and major altcoin futures/perpetuals (Binance, Bybit, OKX, etc.).
Strict preset: 1Hโ4H charts for classic Qullamagi-style trend structure and fewer fake breakouts.
Loose preset: 15mโ30m charts for higher trade frequency and more active intraday trading.
Always retune ATR length, box length, volume multiplier and position size for each symbol and exchange.
Strategy Logic (Quick Summary)
Long (Strict): MA stack in bullish alignment with all MAs sloping up โ tight volatility box (ATR-based) โ volume spike above SMA(volume) ร multiplier โ breakout above box high (close or intrabar) โ optional HTF close above 200-SMA.
Short: Mirror logic: bearish MA stack, tight box, volume spike and breakdown below box low with optional HTF downtrend.
Best Practices for Crypto
Backtest on each symbol and timeframe you plan to autotrade, including commissions and slippage.
Start on higher timeframes (1H/4H) to learn the behavior, then move to 15mโ30m if you want more signals.
Use the higher-timeframe filter when markets are strongly trending to reduce counter-trend trades.
Keep position-size percentage conservative until you fully understand the drawdowns.
Forward-test / paper trade before connecting to live futures accounts.
Webhook / Autotrade Integration
Designed to work with TradingView webhooks and external crypto trading bots.
Alert messages include structured fields such as: EVENT=ENTRY / SCALE_OUT / EXIT, SIDE=LONG / SHORT, STRATEGY=Qullamagi_MA.
Map each EVENT + SIDE combination to your bot logic (open long/short, partial close, full close, etc.) on your preferred exchange.
Important Notes & Disclaimer
Crypto markets are highly volatile and can change regime quickly. Backtest and forward-test thoroughly before using real capital. Higher timeframes generally produce cleaner MA structures and fewer fake breakouts.
This strategy is for educational and informational purposes only and does not constitute financial advice. Trading leveraged crypto products involves substantial risk of loss. Always do your own research, manage risk carefully, and never trade with money you cannot afford to lose.
Range Oscillator Strategy + Stoch Confirm๐น Short summary
This is a free, educational long-only strategy built on top of the public โRange Oscillatorโ by Zeiierman (used under CC BY-NC-SA 4.0), combined with a Stochastic timing filter, an EMA-based exit filter and an optional risk-management layer (SL/TP and R-multiple exits). It is NOT financial advice and it is NOT a magic money machine. Itโs a structured framework to study how range-expansion + momentum + trend slope can be combined into one rule-based system, often with intentionally RARE trades.
โโโโโโโโโโโโโโโโโโโโโโโโ
0. Legal / risk disclaimer
โโโโโโโโโโโโโโโโโโโโโโโโ
โข This script is FREE and public. I do not charge any fee for it.
โข It is for EDUCATIONAL PURPOSES ONLY.
โข It is NOT financial advice and does NOT guarantee profits.
โข Backtest results can be very different from live results.
โข Markets change over time; past performance is NOT indicative of future performance.
โข You are fully responsible for your own trades and risk.
Please DO NOT use this script with money you cannot afford to lose. Always start in a demo / paper trading environment and make sure you understand what the logic does before you risk any capital.
โโโโโโโโโโโโโโโโโโโโโโโโ
1. About default settings and risk (very important)
โโโโโโโโโโโโโโโโโโโโโโโโ
The script is configured with the following defaults in the `strategy()` declaration:
โข `initial_capital = 10000`
โ This is only an EXAMPLE account size.
โข `default_qty_type = strategy.percent_of_equity`
โข `default_qty_value = 100`
โ This means 100% of equity per trade in the default properties.
โ This is AGGRESSIVE and should be treated as a STRESS TEST of the logic, not as a realistic way to trade.
TradingViewโs House Rules recommend risking only a small part of equity per trade (often 1โ2%, max 5โ10% in most cases). To align with these recommendations and to get more realistic backtest results, I STRONGLY RECOMMEND you to:
1. Open **Strategy Settings โ Properties**.
2. Set:
โข Order size: **Percent of equity**
โข Order size (percent): e.g. **1โ2%** per trade
3. Make sure **commission** and **slippage** match your own broker conditions.
โข By default this script uses `commission_value = 0.1` (0.1%) and `slippage = 3`, which are reasonable example values for many crypto markets.
If you choose to run the strategy with 100% of equity per trade, please treat it ONLY as a stress-test of the logic. It is NOT a sustainable risk model for live trading.
โโโโโโโโโโโโโโโโโโโโโโโโ
2. What this strategy tries to do (conceptual overview)
โโโโโโโโโโโโโโโโโโโโโโโโ
This is a LONG-ONLY strategy designed to explore the combination of:
1. **Range Oscillator (Zeiierman-based)**
- Measures how far price has moved away from an adaptive mean.
- Uses an ATR-based range to normalize deviation.
- High positive oscillator values indicate strong price expansion away from the mean in a bullish direction.
2. **Stochastic as a timing filter**
- A classic Stochastic (%K and %D) is used.
- The logic requires %K to be below a user-defined level and then crossing above %D.
- This is intended to catch moments when momentum turns up again, rather than chasing every extreme.
3. **EMA Exit Filter (trend slope)**
- An EMA with configurable length (default 70) is calculated.
- The slope of the EMA is monitored: when the slope turns negative while in a long position, and the filter is enabled, it triggers an exit condition.
- This acts as a trend-protection exit: if the medium-term trend starts to weaken, the strategy exits even if the oscillator has not yet fully reverted.
4. **Optional risk-management layer**
- Percentage-based Stop Loss and Take Profit (SL/TP).
- Risk/Reward (R-multiple) exit based on the distance from entry to SL.
- Implemented as OCO orders that work *on top* of the logical exits.
The goal is not to create a โholy grailโ system but to serve as a transparent, configurable framework for studying how these concepts behave together on different markets and timeframes.
โโโโโโโโโโโโโโโโโโโโโโโโ
3. Components and how they work together
โโโโโโโโโโโโโโโโโโโโโโโโ
(1) Range Oscillator (based on โRange Oscillator (Zeiierman)โ)
โข The script computes a weighted mean price and then measures how far price deviates from that mean.
โข Deviation is normalized by an ATR-based range and expressed as an oscillator.
โข When the oscillator is above the **entry threshold** (default 100), it signals a strong move away from the mean in the bullish direction.
โข When it later drops below the **exit threshold** (default 30), it can trigger an exit (if enabled).
(2) Stochastic confirmation
โข Classic Stochastic (%K and %D) is calculated.
โข An entry requires:
- %K to be below a user-defined โCross Levelโ, and
- then %K to cross above %D.
โข This is a momentum confirmation: the strategy tries to enter when momentum turns up from a pullback rather than at any random point.
(3) EMA Exit Filter
โข The EMA length is configurable via `emaLength` (default 70).
โข The script monitors the EMA slope: it computes the relative change between the current EMA and the previous EMA.
โข If the slope turns negative while the strategy holds a long position and the filter is enabled, it triggers an exit condition.
โข This is meant to help protect profits or cut losses when the medium-term trend starts to roll over, even if the oscillator conditions are not (yet) signalling exit.
(4) Risk management (optional)
โข Stop Loss (SL) and Take Profit (TP):
- Defined as percentages relative to average entry price.
- Both are disabled by default, but you can enable them in the Inputs.
โข Risk/Reward Exit:
- Uses the distance from entry to SL to project a profit target at a configurable R-multiple.
- Also optional and disabled by default.
These exits are implemented as `strategy.exit()` OCO orders and can close trades independently of oscillator/EMA conditions if hit first.
โโโโโโโโโโโโโโโโโโโโโโโโ
4. Entry & Exit logic (high level)
โโโโโโโโโโโโโโโโโโโโโโโโ
A) Time filter
โข You can choose a **Start Year** in the Inputs.
โข Only candles between the selected start date and 31 Dec 2069 are used for backtesting (`timeCondition`).
โข This prevents accidental use of tiny cherry-picked windows and makes tests more honest.
B) Entry condition (long-only)
A long entry is allowed when ALL the following are true:
1. `timeCondition` is true (inside the backtest window).
2. If `useOscEntry` is true:
- Range Oscillator value must be above `entryLevel`.
3. If `useStochEntry` is true:
- Stochastic condition (`stochCondition`) must be true:
- %K < `crossLevel`, then %K crosses above %D.
If these filters agree, the strategy calls `strategy.entry("Long", strategy.long)`.
C) Exit condition (logical exits)
A position can be closed when:
1. `timeCondition` is true AND a long position is open, AND
2. At least one of the following is true:
- If `useOscExit` is true: Oscillator is below `exitLevel`.
- If `useMagicExit` (EMA Exit Filter) is true: EMA slope is negative (`isDown = true`).
In that case, `strategy.close("Long")` is called.
D) Risk-management exits
While a position is open:
โข If SL or TP is enabled:
- `strategy.exit("Long Risk", ...)` places an OCO stop/limit order based on the SL/TP percentages.
โข If Risk/Reward exit is enabled:
- `strategy.exit("RR Exit", ...)` places an OCO order using a projected R-multiple (`rrMult`) of the SL distance.
These risk-based exits can trigger before the logical oscillator/EMA exits if price hits those levels.
โโโโโโโโโโโโโโโโโโโโโโโโ
5. Recommended backtest configuration (to avoid misleading results)
โโโโโโโโโโโโโโโโโโโโโโโโ
To align with TradingView House Rules and avoid misleading backtests:
1. **Initial capital**
- 10 000 (or any value you personally want to work with).
2. **Order size**
- Type: **Percent of equity**
- Size: **1โ2%** per trade is a reasonable starting point.
- Avoid risking more than 5โ10% per trade if you want results that could be sustainable in practice.
3. **Commission & slippage**
- Commission: around 0.1% if that matches your broker.
- Slippage: a few ticks (e.g. 3) to account for real fills.
4. **Timeframe & markets**
- Volatile symbols (e.g. crypto like BTCUSDT, or major indices).
- Timeframes: 1H / 4H / **1D (Daily)** are typical starting points.
- I strongly recommend trying the strategy on **different timeframes**, for example 1D, to see how the behaviour changes between intraday and higher timeframes.
5. **No โcaution warningโ**
- Make sure your chosen symbol + timeframe + settings do not trigger TradingViewโs caution messages.
- If you see warnings (e.g. โtoo few tradesโ), adjust timeframe/symbol or the backtest period.
โโโโโโโโโโโโโโโโโโโโโโโโ
5a. About low trade count and rare signals
โโโโโโโโโโโโโโโโโโโโโโโโ
This strategy is intentionally designed to trade RARELY:
โข It is **long-only**.
โข It uses strict filters (Range Oscillator threshold + Stochastic confirmation + optional EMA Exit Filter).
โข On higher timeframes (especially **1D / Daily**) this can result in a **low total number of trades**, sometimes WELL BELOW 100 trades over the whole backtest.
TradingViewโs House Rules mention 100+ trades as a guideline for more robust statistics. In this specific case:
โข The **low trade count is a conscious design choice**, not an attempt to cherry-pick a tiny, ultra-profitable window.
โข The goal is to study a **small number of high-conviction long entries** on higher timeframes, not to generate frequent intraday signals.
โข Because of the low trade count, results should NOT be interpreted as statistically strong or โprovenโ โ they are only one sample of how this logic would have behaved on past data.
Please keep this in mind when you look at the equity curve and performance metrics. A beautiful curve with only a handful of trades is still just a small sample.
โโโโโโโโโโโโโโโโโโโโโโโโ
6. How to use this strategy (step-by-step)
โโโโโโโโโโโโโโโโโโโโโโโโ
1. Add the script to your chart.
2. Open the **Inputs** tab:
- Set the backtest start year.
- Decide whether to use Oscillator-based entry/exit, Stochastic confirmation, and EMA Exit Filter.
- Optionally enable SL, TP, and Risk/Reward exits.
3. Open the **Properties** tab:
- Set a realistic account size if you want.
- Set order size to a realistic % of equity (e.g. 1โ2%).
- Confirm that commission and slippage are realistic for your broker.
4. Run the backtest:
- Look at Net Profit, Max Drawdown, number of trades, and equity curve.
- Remember that a low trade count means the statistics are not very strong.
5. Experiment:
- Tweak thresholds (`entryLevel`, `exitLevel`), Stochastic settings, EMA length, and risk params.
- See how the metrics and trade frequency change.
6. Forward-test:
- Before using any idea in live trading, forward-test on a demo account and observe behaviour in real time.
โโโโโโโโโโโโโโโโโโโโโโโโ
7. Originality and usefulness (why this is more than a mashup)
โโโโโโโโโโโโโโโโโโโโโโโโ
This script is not intended to be a random visual mashup of indicators. It is designed as a coherent, testable strategy with clear roles for each component:
โข Range Oscillator:
- Handles mean vs. range-expansion states via an adaptive, ATR-normalized metric.
โข Stochastic:
- Acts as a timing filter to avoid entering purely on extremes and instead waits for momentum to turn.
โข EMA Exit Filter:
- Trend-slope-based safety net to exit when the medium-term direction changes against the position.
โข Risk module:
- Provides practical, rule-based exits: SL, TP, and R-multiple exit, which are useful for structuring risk even if you modify the core logic.
It aims to give traders a ready-made **framework to study and modify**, not a black box or โsignalsโ product.
โโโโโโโโโโโโโโโโโโโโโโโโ
8. Limitations and good practices
โโโโโโโโโโโโโโโโโโโโโโโโ
โข No single strategy works on all markets or in all regimes.
โข This script is long-only; it does not short the market.
โข Performance can degrade when market structure changes.
โข Overfitting (curve fitting) is a real risk if you endlessly tweak parameters to maximise historical profit.
Good practices:
- Test on multiple symbols and timeframes.
- Focus on stability and drawdown, not only on how high the profit line goes.
- View this as a learning tool and a basis for your own research.
โโโโโโโโโโโโโโโโโโโโโโโโ
9. Licensing and credits
โโโโโโโโโโโโโโโโโโโโโโโโ
โข Core oscillator idea & base code:
- โRange Oscillator (Zeiierman)โ
- ยฉ Zeiierman, licensed under CC BY-NC-SA 4.0.
โข Strategy logic, Stochastic confirmation, EMA Exit Filter, and risk-management layer:
- Modifications by jokiniemi.
Please respect both the original license and TradingView House Rules if you fork or republish any part of this script.
โโโโโโโโโโโโโโโโโโโโโโโโ
10. No payments / no vendor pitch
โโโโโโโโโโโโโโโโโโโโโโโโ
โข This script is completely FREE to use on TradingView.
โข There is no paid subscription, no external payment link, and no private signals group attached to it.
โข If you have questions, please use TradingViewโs comment system or private messages instead of expecting financial advice.
Use this script as a tool to learn, experiment, and build your own understanding of markets.
โโโโโโโโโโโโโโโโโโโโโโโโ
11. Example backtest settings used in screenshots
โโโโโโโโโโโโโโโโโโโโโโโโ
To avoid any confusion about how the results shown in screenshots were produced, here is one concrete example configuration:
โข Symbol: BTCUSDT (or similar major BTC pair)
โข Timeframe: 1D (Daily)
โข Backtest period: from 2018 to the most recent data
โข Initial capital: 10 000
โข Order size type: Percent of equity
โข Order size: 2% per trade
โข Commission: 0.1%
โข Slippage: 3 ticks
โข Risk settings: Stop Loss and Take Profit disabled by default, Risk/Reward exit disabled by default
โข Filters: Range Oscillator entry/exit enabled, Stochastic confirmation enabled, EMA Exit Filter enabled
If you change any of these settings (symbol, timeframe, risk per trade, commission, slippage, filters, etc.), your results will look different. Please always adapt the configuration to your own risk tolerance, market, and trading style.
EMA Cross + RSI + ADX - Autotrade Strategy V2Overview
A versatile trend-following strategy combining EMA 9/21 crossovers with RSI momentum filtering and optional ADX trend strength confirmation. Designed for both cryptocurrency and traditional futures/options markets with built-in stop loss management and automated position reversals.
Key Features
Multi-Market Compatibility: Works on both crypto futures (Bitcoin, Ethereum) and traditional markets (NIFTY, Bank NIFTY, S&P 500 futures, equity options)
Triple Confirmation System: EMA crossover + RSI filter + ADX strength (optional)
Automated Risk Management: 2% stop loss with wick-touch detection
Position Auto-Reversal: Opposite signals automatically close and reverse positions
Webhook Ready: Six distinct alert messages for automation (Entry Buy/Sell, Close Long/Short, SL Hit Long/Short)
Performance Metrics
NIFTY Futures (15min): 50%+ win rate with ADX filter OFF
Crypto Markets: Requires extensive backtesting before live deployment
Optimal Timeframes: 15-minute to 1-hour charts (patience required for higher timeframes)
Strategy Logic
Entry Signals:
LONG: EMA 9 crosses above EMA 21 + RSI > 55 + ADX > 20 (if enabled)
SHORT: EMA 9 crosses below EMA 21 + RSI < 45 + ADX > 20 (if enabled)
Exit Signals:
Opposite EMA crossover (auto-closes current position)
Stop loss hit at 2% from entry price (tracks candle wicks)
Technical Indicators:
Fast EMA: 9-period (short-term trend)
Slow EMA: 21-period (primary trend)
RSI: 14-period with 55/45 thresholds (momentum confirmation)
ADX: 14-period with 20 threshold (trend strength filter - optional)
Market-Specific Settings
Traditional Markets (NIFTY, Bank NIFTY, S&P Futures, Options)
Recommended Settings:
ADX Filter: Turn OFF (less choppy, cleaner trends)
Timeframe: 15-minute chart
Win Rate: 50%+ on NIFTY Futures
Why No ADX: Traditional markets have more institutional participation and smoother price action, making ADX unnecessary
Cryptocurrency Markets (BTC, ETH, Altcoins)
Recommended Settings:
ADX Filter: Turn ON (ADX > 20)
Timeframe: 15-minute to 1-hour
Extensive backtesting required before live trading
Why ADX: Crypto markets are highly volatile and prone to false breakouts; ADX filters low-quality chop
Best Practices
โ
Backtest thoroughly on your specific instrument and timeframe
โ
Use larger timeframes (1H, 4H) for higher quality signals and better risk/reward
โ
Adjust RSI thresholds based on market volatility (try 52/48 for more signals, 60/40 for fewer but stronger)
โ
Monitor ADX effectiveness - disable for traditional markets, enable for crypto
โ
Proper position sizing - adjust default_qty_value based on your capital and instrument price
โ
Paper trade first - test for 2-4 weeks before risking real capital
Risk Management
Fixed 2% stop loss per trade (adjustable)
Stop loss tracks candle wicks for accurate execution
Positions auto-reverse on opposite signals (no manual intervention needed)
0.075% commission built into backtest (adjust for your broker)
Customization Options
All parameters are adjustable via inputs:
EMA periods (default: 9/21)
RSI length and thresholds (default: 14-period, 55/45 levels)
ADX length and threshold (default: 14-period, 20 threshold)
Stop loss percentage (default: 2%)
Webhook Automation
This strategy includes six distinct alert messages for automated trading:
"Entry Buy" - Long position opened
"Entry Sell" - Short position opened
"Close Long" - Long position closed on opposite crossover
"Close Short" - Short position closed on opposite crossover
"SL Hit Long" - Long stop loss triggered
"SL Hit Short" - Short stop loss triggered
Compatible with Delta Exchange, Binance Futures, 3Commas, Alertatron, and other webhook platforms.
Important Notes
โ ๏ธ Crypto markets require extensive backtesting - volatility patterns differ significantly from traditional markets
โ ๏ธ Higher timeframes = better results - 15min works but 1H/4H provide cleaner signals
โ ๏ธ ADX toggle is critical - OFF for traditional markets, ON for crypto
โ ๏ธ Not financial advice - always conduct your own research and use proper risk management
โ ๏ธ Past performance โ future results - backtest results may not reflect live trading conditions
Disclaimer
This strategy is for educational and informational purposes only. Trading futures and options involves substantial risk of loss. Always backtest thoroughly, start with paper trading, and never risk more than you can afford to lose. The author assumes no responsibility for any trading losses incurred using this strategy.
3-Minute RSI and EMA Crossover Strategy 3-Minute RSI and EMA Crossover Sell Strategy with Exit Conditions and Re-entry






















