SPY200SMA (+4%/-3%) TQQQ/QQQ STRATEGYSummary of the Improved Strategy: When the price of AMEX:SPY is +4% above the 200SMA BUY NASDAQ:TQQQ and when the price of SPY drops to -3% under the SPY 200SMA SELL everything and slowly DCA into NASDAQ:QQQ over the next 6-12 months or until price returns to +4% above the SPY 200SMA at which point you will go back into 100% TQQQ.
Note: (if the price of QQQ goes 30% above the 200SMA of QQQ deleverage to QQQ or Sell to protect yourself from dot com level event)
More info and stats -https://www.reddit.com/r/LETFs/comments/1nhye66/spy_200sma_43_tqqqqqq_long_term_investment/
Indicators and strategies
Moon Phases Long/Short StrategyThis is an experiment of Moon Phases, likely buy when full moon and sell when new moon with few changes, like it would buy a day ahead or sometimes sell a day post these events, with Stop loss and take profits, 50% profitable so sounds good to me
Long only good for bitcoin gold, both modes(L+S) better for stocks and alt coins
ATR + VIX Breakout StrategyChange the symbol to UVXY. Work great for option l long and S short. Take profits before it closes the trade. Pls remember you are using it at your own risk.
超趨勢策略 (中文)-Caelusif ta.change(direction) < 0
strategy.entry("My Long Entry Id", strategy.long)
if ta.change(direction) > 0
strategy.entry("My Short Entry Id", strategy.short)
XAU Aurum Precision Scalper Pro v1.0🏆 Aurum Precision Scalper Pro v1.0
SMMA 21/50/200 + RSI14 | Multi-Rule Gold Strategy (M3–M15)
💡 Overview
Aurum Precision Scalper Pro is a professional multi-rule intraday strategy built for scalping and day-trading XAUUSD (Gold) on short timeframes (3m, 5m, 15m).
It combines RSI, SMMA trend filters, volume, and volatility logic with clean breakout and mean-reversion mechanics.
Optimized for the London–New York overlap, this system captures directional moves while filtering out noise and false breakouts — the most common trap for gold traders.
⚙️ Core Components
1️⃣ Multi-Timeframe Guardrail
Works only on 3m / 5m / 15m charts for precision.
Prevents accidental backtests on irrelevant timeframes.
2️⃣ SMMA Trend Framework
Uses SMMA(21) for short-term bias,
SMMA(50) for medium-term direction,
SMMA(200) for higher-order trend control.
RSI(14) confirms momentum and prevents chasing extreme moves.
3️⃣ Global Filters
✅ Trend filter (optional):
• Longs only if close > SMMA200
• Shorts only if close < SMMA200
✅ SMMA proximity filters:
• Blocks trades when SMMA21–SMMA50 or SMMA21–SMMA200 are too close → reduces chop.
✅ Volume filter:
• Requires volume > SMA(volume) × multiplier.
✅ Impulse filter:
• Body size ≥ k × ATR (volatility confirmation).
✅ Active-session filter:
• Default: 07:00–20:00 CET (Europe/Brussels).
4️⃣ XAUUSD Preset (optional toggle)
When symbol = “XAU” or “GOLD”, auto-applies gold-specific tuning:
RSI thresholds tightened (BUY > 55 / SELL < 45)
Stronger volume & volatility filters
Stricter SMMA distance checks
Automatic session activation
⚔️ Entry Rules
Rule Setup Type Logic Summary
R1 Full SMMA breakout Price closes above (or below) all SMMAs + RSI confirms direction
R2 SMMA21 touch + alignment Price bounces on 21 while aligned with 50 & 200 + RSI filter
R3 3-bar engulfing reversal After 3 candles in one direction, an engulfing opposite bar + RSI momentum
R4 SMMA21/50 crossover 21 crosses 50 with trend & volume confirmation
All rules respect your global filters (trend, volume, impulse, proximity, sessions).
R2–R4 entries can be individually toggled ON/OFF in inputs.
💰 Exit Logic
Simple % exits (for quick prototyping):
• TP = +X% (default 1.0%)
• SL = −X% (default 0.5%)
All entries are managed individually (R1–R4 IDs).
More advanced versions include ATR-based partials, breakeven and dynamic trailing logic.
🎨 Visuals
SMMA21 → teal line
SMMA50 → orange line
SMMA200 → magenta line
On-chart labels for each rule (BUY/SELL R1–R4).
Alerts for all entry conditions — ready for automation or alerting bots.
🧠 Suggested Usage
Best window: 14:00–17:00 CET (London–New York overlap).
Ideal timeframes: M5 and M15.
Avoid over-trading during low volatility (Asian session).
For XAUUSD, enable all filters for realistic conditions.
Recommended baseline:
TP = 1.0%
SL = 0.5%
UseVolFilter = true
UseImpulse = true
GapFilter = true
TrendFilter = true
📈 Performance Tips
✅ Stronger filter = fewer but higher-quality trades.
✅ When gold volatility spikes (CPI/NFP/FOMC), increase “minGap%” thresholds slightly.
✅ For smooth trend capture, use R4 (SMMA21/50 cross) with trend filters ON.
✅ For reversals, combine R3 (engulfing) + RSI confirmation.
🧾 Changelog (v1.0)
✅ Multi-timeframe guard (3/5/15min only)
✅ 4 rule logic (R1–R4)
✅ Global filters: trend, volume, impulse, proximity
✅ XAUUSD preset with adaptive parameters
✅ Session/timezone logic
✅ Simple exits for fast backtesting
✅ On-chart labels and alert system
🧭 Recommended Title / Tagline for TradingView
Aurum Precision Scalper Pro v1.0
“A high-precision RSI-SMMA strategy for Gold scalpers — designed for the London–NY overlap.”
🔖 Tags
#XAUUSD #Gold #Scalping #SMMA #RSI #Strategy #DayTrading #PineScriptV6 #ATR #TrendFollowing #Breakout
DCA Test Daily / Weekly / Monthly1.Input daily, weekly or monthly preferance of DCA
2.Select how much to DCA
3.Use the slider on the indicator down to select from where to DCA
Important: Don't use a higher timeframe chart than the desired DCA frequency, or all the DCA buys won't get executed.
Nifty Options 3Point SL - Buy OnlyThis is suitable for only Option Buyer only,
The provided strategy uses a combination of technical indicators and filters for entering and exiting buy (long) trades on Nifty options with specific criteria and risk management. Here is an analysis of the trade criteria and precautions:
### Trade Criteria
1. **Trend Filter (EMA 200):**
The strategy trades only in the direction of the major trend defined by the 200-period Exponential Moving Average (EMA).
- Long trades occur only when the price is above the EMA 200, indicating an uptrend.
2. **Squeeze Momentum Indicator (LazyBear Squeeze):**
This indicator combines Bollinger Bands and Keltner Channels to detect periods of low volatility (squeeze) and subsequent momentum bursts when price starts moving with direction.
- The strategy requires the squeeze to be off (volatility expanding) and positive squeeze momentum for long entries.
3. **Swing High/Low Levels:**
The strategy uses recent pivot highs and lows as breakout and exit points.
- Long entries happen on a breakout above the last swing high.
- Exits occur when price drops below the last swing low.
4. **Price Angle Filter:**
The entry requires the price movement angle over a lookback period to exceed a set threshold (27 degrees). This filters for strong momentum in price direction.
5. **Time Filter:**
Trades are only taken during India trading hours from 4:00 AM to 11:00 PM IST, likely to avoid low liquidity periods.
6. **Stop Loss:**
A fixed stop loss of 137 points below the entry price is used to limit loss on each trade.
### Precautions and Risk Management
- **Trend Confirmation:** Restricting entries only in the direction of the 200 EMA prevents counter-trend trades, reducing risk of false signals and larger drawdowns.
- **Volatility Squeeze and Momentum Requirement:** Entering trades only after volatility expansion and confirmed momentum increases probability of a sustained move.
- **Breakout Entry:** Using recent swing highs as entry triggers helps ensure price is confirming strength and not entering prematurely.
- **Angle Threshold:** Filtering entries to strong price moves avoids whipsaws when price movement is weak or sideways.
- **Time Window:** Restricting the trading window reduces exposure to after-hours or low volume moves that can cause erratic behavior.
- **Fixed Stop Loss:** Predefined stop loss size allows strict risk control on each trade.
- **Exit on Swing Low Break:** Exiting on price falling below recent swing low helps to cut losses or secure profits when momentum reverses.
### Summary
Overall, the strategy combines trend, volatility, momentum, price pattern, and time filters for trade selection with fixed stop loss for risk management. It is designed to participate in strong trending moves to the upside while avoiding sideways or low momentum conditions.
This cautious multi-filter approach reduces false entries but may miss some moves due to strict criteria. Monitoring performance and adjusting parameters like stop loss points or angle threshold can further optimize risk-reward.
Let me know if you want a detailed breakdown or suggestions for enhancing this strategy further.
⦁ Disclaimer: The content in this video is for educational purposes only and should not be considered financial advice. We are not SEBI-registered advisors. Cryptocurrency trading is highly volatile and carries significant risk. Consult a qualified financial advisor before making any investment decisions. Forex trading is prohibited in India. About Us: We provide educational content on trading strategies and market analysis.
Connect With Us: For business inquiries, email us at: customercare@eamzn.in
Backtesting Services: We offer strategy backtesting on TradingView. Fee: Contact us for details.
Confluence Dashboard + Strategy [Daily + Weekly Adaptive]Removed duplicate strategy() declarations
Scoped getWeeklyBias() safely with correct request.security() usage
Ensured all variables are declared before use
Aligned background shading with bias logic
Streamlined signal tier logic to avoid overlap
Integrated strategy entries/exits cleanly
Institutional Confluence Strategy - 4H Only This is the best 4H Strategy with over 8.1 Win rate. Test before implementing it.
| 🧠 **Auto Risk Sizing** | Calculates position size dynamically (based on equity & ATR). |
| ⚙️ **Dynamic SL/TP** | Adjusts to volatility automatically. |
| ⚡ **Range Adaptation** | Uses RSI + BB compression to catch sideways reversals. |
| 🎯 **Low-Noise Entries** | Requires SMA crossover + RSI + BB touch. |
| 📊 **Backtestable** | Use Strategy Tester to view win rate, profit factor, etc. |
Triple SuperTrend + RSI + Fib BB + Vol Osc Strategy✅ Key Features Implemented:
Three SuperTrend Indicators with different opacities:
ST1: 10 period, 1.0 multiplier (solid)
ST2: 11 period, 2.0 multiplier (40% transparent)
ST3: 12 period, 3.0 multiplier (70% transparent)
Signal Logic (no repainting):
BUY: All 3 SuperTrends turn green + RSI(7) > 50
SELL: All 3 SuperTrends turn red + RSI(7) < 50
EXIT: Any SuperTrend changes color OR price touches Fib BB
Fibonacci Bollinger Bands (200 SMA ± 2.618 × StdDev):
Purple bands with subtle fill
Gray dashed middle line
Visual Elements:
Green "BUY" labels below bars
Red "SELL" labels above bars
Yellow circle "EXIT" labels at candle tops
Green/red background tint when all STs align
Info dashboard showing real-time status
Alert Conditions for BUY, SELL, and EXIT
Position Tracking ensures only one signal per condition change
📊 Usage:
Copy the entire code and paste it into TradingView's Pine Editor, then click "Add to Chart". The indicator will display all three SuperTrends, Fibonacci Bollinger Bands, and generate signals according to your exact specifications.
The dashboard in the top-right corner shows the current status of each SuperTrend, RSI value, and whether you're in a position!RetryLH
ALMASTO – Pro Trend & Momentum (v1.1)ALMASTO — Pro Trend & Momentum Strategy
Description:
This strategy is designed for precision trading in both Forex (FX) and Crypto markets.
It combines multi-timeframe trend confirmation (EMA200), momentum filters (RSI, MACD, ADX), and ATR-based dynamic risk management.
ALMASTO — Pro Trend & Momentum Strategy automatically manages take-profit levels, stop-loss, and breakeven adjustments once TP1 is reached — providing a structured and emotion-free trading approach.
Optimal Use
Works best on lower timeframes (5m–15m) with strong liquidity sessions.
Optimized for pairs like EURUSD, XAUUSD, and BTCUSDT.
Built for trend-following setups and momentum reversals with high volatility confirmation.
Recommended Settings
🔹 Forex – 5m
EMA Fast = 34, EMA Slow = 200, HTF = 1H
RSI (14): Long ≥ 55 / Short ≤ 45
MACD (8 / 21 / 5), ADX Len 10 / Min 27
ATR Len 7, Stop Loss = ATR × 2.1
TP1 = 1.1 RR, TP2 = 2.3 RR
Session = 07:00–11:00 & 12:30–16:00 (Exchange Time)
Risk = 0.8% per trade
🔹 Forex – 15m
EMA Fast = 50, EMA Slow = 200, HTF = 4H
RSI (14): Long ≥ 53 / Short ≤ 47
MACD (12 / 26 / 9), ADX Min 24
ATR Len 10, SL = ATR × 1.9
TP1 = 1.2 RR, TP2 = 2.6 RR
Risk = 1.0% per trade
🔹 Crypto – 5m (BTC/USDT)
EMA Fast = 34, EMA Slow = 200, HTF = 4H
RSI (14): Long ≥ 56 / Short ≤ 44
MACD (8 / 21 / 5), ADX Min 30
ATR Len 7, SL = ATR × 2.2
TP1 = 1.0 RR, TP2 = 2.5 RR
Session = 00:00–06:00 & 12:00–22:00 (UTC)
Risk = 0.5% per trade
Core Features
✅ Auto breakeven after TP1
✅ Dual take-profit system (1:1 & 1:2 RR)
✅ ATR-based stop & trailing logic
✅ Filters for session time, volume, and volatility
✅ Candle-body vs ATR size filter to avoid noise
✅ Optional cooldown between trades
Important Notes
Use bar close confirmation only (barstate.isconfirmed) to avoid repainting on lower timeframes.
Adjust commission (0.01–0.03%) and slippage (1–2 ticks) in Strategy Tester for realistic results.
Avoid low-liquidity hours (after 21:00 UTC for FX / after midnight for crypto).
Backtest using realistic broker data (e.g., BlackBull Markets / Bybit / Binance Futures).
Best results occur during London & New York sessions with moderate volatility.
⚠️ Disclaimer
This script is for educational and research purposes only.
It does not constitute financial advice.
Use proper risk management and test thoroughly before using on live accounts.
Developed by KING FX Labs
Built and optimized by Yousef Almasto — combining advanced price-action logic, multi-timeframe EMA structure, and volatility-adaptive ATR management.
Tested across Forex, Gold, and Crypto markets to ensure consistent performance and minimal drawdown.
📈 “Precision Trading. Zero Emotion. Pure Momentum.”
Strategy with Reference Lines📊 Strategy with Reference Lines
Description:
This strategy uses a contrarian approach based on the analysis of the previous candle to identify entry and exit points. The strategy draws horizontal reference lines at important levels of the previous candle and generates buy/sell signals based on the candle's direction.
Key Features:
🔹 Multi-Timeframe Analysis: Configurable for 1H, 2H, 3H, 4H, 6H, 12H, and 1D
🔹 Reference Lines: High, low, close, and midpoint (50%) of the previous candle
🔹 Visual Signals: Labels with prices and actions (BUY/SELL/TP)
🔹 Optional Trading: Enable/disable automatic order execution
🔹 Complete System: Automatic entry, Take Profit, and Stop Loss
🔹 Alerts: Notifications when a new candle is detected
Strategy Logic:
When the previous candle is POSITIVE:
Signal: 🔴 SELL at the previous candle's close
Take Profit: 🎯 Midpoint (50%) of the previous candle
Stop Loss: 🔴 High of the previous candle
When the previous candle is NEGATIVE:
Signal: 🟢 BUY at the previous candle's close
Take Profit: 🎯 Midpoint (50%) of the previous candle
Stop Loss: 🟢 Low of the previous candle
Visual Elements:
Green Line: High of the previous candle (when positive)
Red Line: Low of the previous candle (when negative)
Yellow Line: Close of the previous candle (always present)
Blue Line: Midpoint (50%) of the previous candle (always present)
Labels: Prices and actions with emojis for easy identification
Settings:
Timeframe: Default 4H (configurable)
Auto Trading: Disabled by default (safety)
Alerts: Include entry prices, TP, and SL
Recommended Usage:
✅ Visual Analysis: Use with trading disabled for analysis
✅ Backtesting: Enable trading to test historically
✅ Swing Trading: Ideal for 4H or higher timeframes
✅ Risk Management: Automatic SL and TP for protection
Risk Disclaimer:
This strategy is for educational and analysis purposes only. Always test in a simulation environment before using with real capital. Trading involves significant risks and may result in losses.
MAC's V6 finalBreakout retest strategy
Works best on a NQ 1 hour chart
Also works on other futures charts
Adjust the initial capital to 100000
and the margin requirement percent to 0
Supertrend + MACD + EMA200 (Pro) V2 — Strict & TrailingThis strategy uses Supertrend, MACD and EMA 200 as indicators. When all three indicators shows the sema direction, you enter the trade.
LW Outside Day Strategy[SpeculationLab]This strategy is inspired by the “Outside Day” concept introduced by Larry Williams in Long-Term Secrets to Short-Term Trading, and has been extended with configurable risk management tools and realistic backtesting parameters.
Concept
The “Outside Day” is a classic price action pattern that reflects strong market rejection or continuation pressure.
An Outside Bar occurs when the current bar’s high exceeds the previous high and the low falls below the previous low.
A body-size filter ensures only significant candles are included.
Entry Logic
Buy setup: Price closes below the previous low (bullish rejection).
Sell setup: Price closes above the previous high (bearish rejection).
Only confirmed bars are used (no intrabar signals).
Stop-Loss Modes
Prev Low/High: Uses the previous swing point ± ATR-based buffer.
ATR: Dynamic stop based on Average True Range × multiplier.
Fixed Pips: User-defined fixed distance (for forex testing).
Take-Profit Modes
Prev High/Low (PHL): Exits near the opposite swing.
Risk-Reward (RR): Targets a user-defined multiple of the stop distance (default = 2 : 1).
Following Price Open (FPO): Exits on the next bar’s open if price opens in profit (used to test overnight price continuation).
Risk Management & Backtest Settings
Default risk per trade is set at 10% of account equity (user-adjustable).
Commission = 0.1% and slippage = 2 ticks are applied to simulate realistic conditions.
For reliable statistics, test on data that yields over 100 trades.
Suitable for daily and 4-hour timeframes across stocks, forex, and crypto markets.
Visual Elements
Green and red triangles show entry signals.
Stop-loss (red) and take-profit (green) reference lines are drawn for clarity.
Optional alerts notify when a valid setup forms.
Disclaimer
This script is for educational and research purposes only.
It does not constitute financial advice or guarantee profits.
Always backtest thoroughly and manage your own risk.
Enhancements over Classic Outside Bar Models
Adjustable stop and target logic with ATR and buffer multipliers.
“Following Price Open” exit logic for realistic day-end management.
Optimized to avoid repainting and bar-confirmation issues.
Built with realistic trading costs and position sizing.
策略逻辑
外包线识别
当日最高价高于前一日最高价,且当日最低价低于前一日最低价,即形成外包线。
同时过滤掉较小实体的 K 线,仅保留实体显著大于前一根的形态。
方向过滤
收盘价低于前一日最低价 → 视为买入信号。
收盘价高于前一日最高价 → 视为卖出信号。
止损设置(可选参数)
前低/高止损:以形态前低/前高为止损,带有缓冲倍数。
ATR 止损:根据平均波动率(ATR)动态调整。
固定点数止损:按照用户设定的点数作为止损范围。
止盈设置(可选参数)
前高/低止盈(PHL):以前高/前低为目标。
固定盈亏比(RR):根据用户设定的风险回报比自动计算。
隔夜开盘(FPO):若次日开盘价高于进场价(多单)或低于进场价(空单),则平仓。
信号标记
在图表中标注买入/卖出信号(三角形标记)。
绘制止损与目标位参考线。
使用说明
适用周期:建议用于 日线图(Daily)。
适用市场:股票、外汇、加密货币等各类市场均可。
提示:此策略为历史研究与学习用途,不构成投资建议。实际交易请结合自身风险管理。
MA Crossover Strategy V6//@version=6
strategy("MA Crossover Strategy V6", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=10)
// === Inputs ===
shortLength = input.int(9, title="Short MA Length", minval=1)
longLength = input.int(21, title="Long MA Length", minval=1)
useEMA = input.bool(false, title="Use EMA Instead of SMA")
// === Moving Averages ===
shortMA = useEMA ? ta.ema(close, shortLength) : ta.sma(close, shortLength)
longMA = useEMA ? ta.ema(close, longLength) : ta.sma(close, longLength)
// === Plot MAs ===
plot(shortMA, color=color.orange, title="Short MA", linewidth=2)
plot(longMA, color=color.blue, title="Long MA", linewidth=2)
// === Entry Conditions ===
longCondition = ta.crossover(shortMA, longMA)
shortCondition = ta.crossunder(shortMA, longMA)
// === Strategy Logic ===
if (longCondition)
strategy.entry("Long", strategy.long)
if (shortCondition)
strategy.entry("Short", strategy.short)
// === Optional: Plot Buy/Sell Signals ===
plotshape(longCondition, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.triangleup, size=size.small)
plotshape(shortCondition, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.small)
Commodity Pulse Matrix (CPM) [WavesUnchained] [Strategy]Commodity Pulse Matrix (CPM) - Strategy Version
⚠️ Development Status
ACTIVE DEVELOPMENT - This strategy is currently under heavy development and optimization. The risk management settings, entry/exit logic, and parameter tuning are still being refined and are NOT yet satisfactory for live trading.
Current development areas:
Stop-loss and take-profit optimization
Position sizing and risk management
Entry timing and signal filtering
Backtest validation across different market conditions
⚠️ Use for testing and backtesting only - NOT recommended for live trading yet!
For detailed information about the underlying indicator logic, signals, and analysis methods, please refer to the Commodity Pulse Matrix (CPM) indicator description.
Overview
The CPM Strategy is an automated trading system based on the Commodity Pulse Matrix indicator. It converts the indicator's multi-timeframe confluence signals into executable trades with dynamic ATR-based risk management.
Strategy Core Features
Signal Sources
The strategy trades based on:
Strong Buy/Sell signals from the CPM indicator
Multi-timeframe alignment (configurable: 3/3, 2/3, or score-only)
EMA-200 trend filter (prevents counter-trend entries)
Dynamic signal cooldown (5-8 bars)
Optional reversal zone signals (triple-confirmed)
Risk Management (ATR-Based)
Stop-Loss & Take-Profit
Stop-Loss: 2.5x ATR (default) - Dynamic distance based on volatility
Take-Profit: 4.0x ATR (default) - Risk/Reward ratio of 1.6:1
ATR Length: 14 periods (adjustable)
Both SL and TP adjust to current market volatility
Trailing Stop (Optional)
Enabled by default
Trails at 2.5x ATR distance
Protects profits in trending moves
Can be disabled for fixed SL/TP only
Position Management
Trade Direction Filter
Both Directions (default) - Trade both Long and Short
Long Only - Only enter long positions
Short Only - Only enter short positions
Cooldown After Exit
Default: 3 bars minimum after closing a position
Prevents immediate re-entry (whipsaw protection)
Adjustable from 0 (disabled) to any number of bars
Signal Filtering
Signal Mode (Timeframe Consensus)
Strict (3/3 TFs): All 3 timeframes must agree - Most conservative
Majority (2/3 TFs): At least 2 of 3 timeframes agree - Balanced (default)
Flexible (Score Only): Overall score threshold only - Most signals
Optional Filters
Min ABS(overallScore): Only trade when confluence score meets minimum (default: 0 = disabled)
Confirmed Bar Only: Wait for bar close before entry (prevents repainting) - Recommended ON
Strategy Settings Guide
For Conservative Trading (Lower Risk)
Signal Mode: "Strict (3/3 TFs)"
Stop-Loss: 3.0x ATR or higher
Take-Profit: 5.0x ATR or higher
Trailing Stop: Enabled
Cooldown: 5-10 bars
Min Score: 8.0 or higher
For Aggressive Trading (More Signals)
Signal Mode: "Flexible (Score Only)"
Stop-Loss: 2.0x ATR
Take-Profit: 3.0x ATR
Trailing Stop: Optional
Cooldown: 0-3 bars
Min Score: 4.0 or disabled
For Balanced Trading (Recommended Starting Point)
Signal Mode: "Majority (2/3 TFs)"
Stop-Loss: 2.5x ATR
Take-Profit: 4.0x ATR
Trailing Stop: Enabled
Cooldown: 3 bars
Min Score: 6.0-8.0
TradingView Strategy Tester Settings
Essential Settings to Configure:
Properties Tab
Initial Capital: Set to realistic account size
Order Size: Use "% of Equity" (e.g., 10-25% per trade)
Commission: Set realistic commission (e.g., 0.05% for crypto, 0.1% for stocks)
Slippage: Add realistic slippage (1-3 ticks for liquid markets)
Verify "Recalculate: On Every Tick" is DISABLED (for realistic backtests)
Inputs Tab
Adjust ATR multipliers for your market
Set appropriate cooldown period
Choose signal mode based on desired trade frequency
Enable/disable trailing stop
Configure directional filter if needed
Backtesting Recommendations
Before Using This Strategy:
Test across multiple markets - What works for one commodity may not work for another
Test different timeframes - Strategy behavior changes significantly with TF
Test different market conditions - Trending vs ranging markets
Validate performance metrics - Win rate, profit factor, max drawdown, Sharpe ratio
Forward test on paper account - Before risking real capital
Key Metrics to Monitor:
Win Rate (aim for >40% minimum)
Profit Factor (aim for >1.5)
Max Drawdown (should be acceptable for your risk tolerance)
Sharpe Ratio (higher is better, >1.0 is good)
Average Trade (should be positive after commissions/slippage)
Known Limitations
Range-bound markets: May produce more whipsaws despite filters
Low volatility: ATR-based stops may be too tight
High volatility: ATR-based stops may be too wide
News events: Strategy cannot account for fundamental shocks
Signal timing: Entry timing is still being optimized
Indicator vs Strategy
When to use the Indicator:
- Manual trading with discretion
- Confluence analysis and timing
- Multiple signal validation
- Learning market structure
When to use the Strategy:
- Automated backtesting
- System validation
- Parameter optimization
- Performance measurement
⚠️ The indicator provides richer information and context than the strategy can execute!
Technical Details
Pine Script v6
Non-repainting: Uses confirmed bars for HTF data
Strategy type: Long/Short with dynamic stops
Risk management: ATR-based (adaptive to volatility)
Position sizing: Configured in Strategy Tester
Pyramiding: Default 1 (no adding to positions)
Important Notes
⚠️ Strategy parameters are still under optimization - Current settings may not be optimal for all markets or timeframes
⚠️ Backtest thoroughly before live trading - Test across different market conditions and timeframes
⚠️ Risk management is critical - Use appropriate position sizing (1-2% risk per trade recommended)
⚠️ Market conditions change - A strategy that works in trending markets may fail in ranging markets
⚠️ Commission and slippage matter - Always include realistic costs in backtests
✅ Start with conservative settings and optimize gradually
✅ Paper trade before going live
✅ Monitor performance and adjust as needed
✅ Never risk more than you can afford to lose
Disclaimer
Educational and testing purposes only. Not financial advice.
This strategy is provided as-is for backtesting and educational purposes. Past performance is not indicative of future results. Trading involves substantial risk of loss. The developer is not responsible for any losses incurred from using this strategy. Always do your own research, backtest thoroughly, and consult with a qualified financial advisor before making trading decisions.
NEVER use this strategy with real money until:
You have thoroughly backtested it on your specific market and timeframe
You understand all parameters and their impact
You have forward tested it on a paper account
You are comfortable with the maximum drawdown and risk profile
The strategy has been marked as production-ready by the developer
Version
v1.2 - Strategy Adapter (Active Development)
Based on: Commodity Pulse Matrix v1.2 Indicator
Last Updated: 2025-10-10
For detailed indicator documentation, see the Commodity Pulse Matrix (CPM) indicator description.
Larry Williams Oops StrategyThis strategy is a modern take on Larry Williams’ classic Oops setup. It trades intraday while referencing daily bars to detect opening gaps and align entries with the prior day’s direction. Risk is managed with day-based stops, and—unlike the original—all positions are closed at the end of the session (or at the last bar’s close), not at a fixed profit target or the first profitable open.
Entry Rules
Long setup (bullish reversion): Today opens below yesterday’s low (down gap) and yesterday’s candle was bearish. Place a buy stop at yesterday’s low + Filter (ticks).
Short setup (bearish reversion): Today opens above yesterday’s high (up gap) and yesterday’s candle was bullish. Place a sell stop at yesterday’s high − Filter (ticks).
Longs are only taken on down-gap days; shorts only on up-gap days.
Protective Stop
If long, stop loss trails the current day’s low.
If short, stop loss trails the current day’s high.
Exit Logic
Positions are force-closed at the end of the session (in the last bar), ensuring no overnight exposure. There is no take-profit; only stop loss or end-of-day flat.
Notes
This strategy is designed for intraday charts (minutes/seconds) using daily data for gaps and prior-day direction.
Longs/shorts can be enabled or disabled independently.
Larry Williams Bonus Track PatternThis strategy trades the day immediately following an Inside Day, under specific directional and timing conditions. It is designed for daily-based setups but executed on intraday charts to ensure orders are placed exactly at the open of the following day, rather than at the daily bar close.
Entry Conditions
Only trades on Monday, Thursday, or Friday.
The previous day must be an Inside Day (its high is lower than the prior high and its low is higher than the prior low).
The bar before the Inside Day must be bullish (close > open).
On the following day (t):
The daily open must be below both the Inside Day’s high and the highest high of the two days before that.
A buy stop is placed at the highest high of the three previous days (Inside Day and the two days before it).
If the new day’s open is already above that level (gap up), the strategy enters long immediately at the open.
Exit Rules
Stop Loss: Fixed, defined in points or percentage (user input).
FPO (First Profitable Open): the position is closed at the first daily open after the entry day where the open price is above the average entry price (the first profitable open).
Notes
The script must be applied on an intraday timeframe (e.g., 15-minute or 1-hour) so that the strategy can:
Detect the Inside Day pattern using daily data (request.security).
Execute orders in real time at the next day’s open.
Running it directly on the daily timeframe will delay executions by one bar due to Pine Script’s evaluation model.
ORDER BLCOK custom strategy# OB Matrix Strategy - Documentation
**Version:** 1.0
**Author:** HPotter
**Date:** 31/07/2017
The **OB Matrix Strategy** is based on the identification of **bullish and bearish Order Blocks** and the management of conditional orders with multiple Take Profit (TP) and Stop Loss (SL) levels. It uses trend filters, ATR, and percentage-based risk management.
---
## 1. Main Parameters
### Strategy
- `initial_capital`: 50
- `default_qty_type`: percentage of capital
- `default_qty_value`: 10
### Money Management
- `rr_threshold`: minimum Risk/Reward threshold to open a trade
- `risk_percent`: percentage of capital to risk per trade (default 2%)
- `maxPendingBars`: maximum number of bars for a pending order
- `maxBarsOpen`: maximum number of bars for an open position
- `qty_tp1`, `qty_tp2`, `qty_tp3`: quantity percentages for multiple TPs
---
## 2. Order Block Identification
### Order Block Parameters
- `obLookback`: number of bars to identify an Order Block
- `obmode`: method to calculate the block (`Full` or `Breadth`)
- `obmiti`: method to determine block mitigation (`Close`, `Wick`, `Avg`)
- `obMaxBlocks`: maximum number of Order Blocks displayed
### Main Variables
- `bullBlocks`: array of bullish blocks
- `bearBlocks`: array of bearish blocks
- `last_bull_volume`, `last_bear_volume`: volume of the last block
- `dom_block`: dominant block type (Bullish/Bearish/None)
- `block_strength`: block strength (normalized volume)
- `price_distance`: distance between current price and nearest block
---
## 3. Visual Parameters
- `Width`: line thickness for swing high/low
- `amountOfBoxes`: block grid segments
- `showBorder`: show block borders
- `borderWidth`: width of block borders
- `showVolume`: display volume inside blocks
- `volumePosition`: vertical position of volume text
Customizable colors:
- `obHighVolumeColor`, `obLowVolumeColor`, `obBearHighVolumeColor`, `obBearLowVolumeColor`
- `obBullBorderColor`, `obBearBorderColor`
- `obBullFillColor`, `obBearFillColor`
- `volumeTextColor`
---
## 4. Screener Table
- `showScreener`: display the screener table
- `tablePosition`: table position (`Top Left`, `Top Right`, `Bottom Left`, `Bottom Right`)
- `tableSize`: table size (`Small`, `Normal`, `Large`)
The table shows:
- Symbol, Timeframe
- Type and status of Order Block
- Number of retests
- Bullish and bearish volumes
---
## 5. Trend Filters
- EMA as a trend filter (`emaPeriod`, default 223)
- `bullishTrend` if close > EMA
- `bearishTrend` if close < EMA
---
## 6. ATR and Swing Points
- ATR calculated with a customizable period (`atrLength`)
- Swing High/Low for SL/TP calculation
- `f_getSwingTargets` function to calculate SL and TP based on direction
---
## 7. Trade Logic
### Buy Limit on Bullish OB
- Conditions:
- New bullish block
- Uptrend
- RR > threshold (`rr_threshold`)
- SL: `bullishOBPrice * (1 - atr * atrMultiplier)`
- Multiple TPs: TP1 (50%), TP2 (80%), TP3 (100% max)
- Quantity calculation based on percentage risk
### Sell Limit on Bearish OB
- Conditions:
- New bearish block
- Downtrend
- RR > threshold (`rr_threshold`)
- SL: `bearishOBPrice * (1 + atr * atrMultiplier)`
- Multiple TPs: TP1 (50%), TP2 (80%), TP3 (100% max)
- Quantity calculation based on percentage risk
---
## 8. Order Management and Timeout
- Close pending orders after `maxPendingBars` bars
- Close open positions after `maxBarsOpen` bars
- Label management for open orders
---
## 9. Alert Conditions
- `bull_touch`: price inside maximum bullish volume zone
- `bear_touch`: price inside maximum bearish volume zone
- `bull_reject`: confirmation of bullish zone rejection
- `bear_reject`: confirmation of bearish zone rejection
- `new_bull`: new bullish block
- `new_bear`: new bearish block
---
## 10. Level Calculation
- Swing levels based on selected timeframe (`SelectPeriod`)
- `xHigh` and `xLow` for S1 and R1 calculation
- Levels plotted on chart
---
## 11. Take Profit / Stop Loss
- Extended horizontal lines (`extendBars`) to visualize TP and SL
- Customizable colors (`tpColor`, `slColor`)
---
## 12. Notes
- Complete script based on Pine Script v5
- Advanced graphical management with boxes, lines, labels
- Dynamically displays volumes and Order Blocks
- Integrated internal screener
---
### End of Documentation
Larry Williams - Smash Day (SL/TP in %)This strategy implements Larry Williams’ “Smash Day” reversal concept on any symbol and timeframe (daily is the classic). A Smash Day is a bar that closes beyond a recent extreme and then potentially reverses on the next session.
Aggressive Options Trade Strategy - CALLS (2025+) - ASALEHMomentum-driven options strategy built for call buyers. Uses RSI, MACD, and EMA alignment with volatility filters to spot aggressive long setups and manage exits with profit targets and trailing stops.