V4B3P FeeSafe Extended SMA200 A3 Early ExitV4B3P – FeeSafe Extended + SMA200 Filter + A3 Early Exit
About this script
This script was originally developed as a personal learning project while exploring rule-based and fee-aware trading systems.
Over time, it evolved into a structured positional strategy, primarily tested on TQQQ and similar leveraged ETFs, where disciplined execution and trade pacing are especially important.
This public version is shared for educational and analytical purposes, reflecting a simplified and transparent subset of the broader research.
⸻
Strategy Overview
V4B3P is built around a trend-continuation framework with strict execution rules.
The logic is intentionally kept simple, transparent, and non-repainting, making it suitable for:
• Learning systematic trading concepts
• Evaluating positional trend behavior
• Automation-oriented workflows (rule clarity > discretion)
There is no forecasting or prediction involved — only confirmation and predefined exits.
⸻
Core Components
The strategy combines the following elements:
1. Primary Trend Filter (SMA200)
Trades are considered only when price is above the long-term trend baseline.
2. Momentum-Based Entry (HMA Crossover + Curvature Filter)
Entries occur only when short-term momentum aligns with the broader trend, avoiding weak or flat conditions.
3. Fee-Safe Trade Pacing (Minimum Hold Bars)
A minimum holding period is enforced before trailing exits are activated, reducing over-trading and fee drag.
4. A3 Early Exit (SMA200 Break Protection)
If price decisively breaks the long-term trend shortly after entry, the position is exited early to limit adverse exposure.
⸻
Core Idea
The strategy aims to participate only in sustained directional moves, while avoiding:
• Counter-trend trades
• Low-momentum chop
• Frequent in-and-out behavior
All decisions are rule-based.
Once a trade is opened, exit behavior is handled automatically by predefined logic.
⸻
Entry Logic (Long Only)
A long position is considered when all of the following conditions are met:
1. Price is above the SMA200 (trend confirmation)
2. Fast HMA crosses above Slow HMA (momentum alignment)
3. Curvature of momentum exceeds a minimum threshold
4. Trade occurs within the defined backtest / execution window
Only one position at a time is allowed.
No pyramiding or scaling is used.
⸻
Exit Logic
Exit behavior is fully rule-driven and consists of two stages:
1. Early Protection (A3 Exit)
If price falls back below the SMA200 before the minimum holding period is reached, the position is closed early.
2. Standard Exit (After Minimum Hold)
Once the minimum holding period is satisfied, exits are managed using:
• ATR-based stop loss
• ATR-based trailing stop
This structure allows the strategy to:
• Cut weak trades early
• Let stronger trends develop with controlled risk
⸻
Trade Management Rules
• Long-only strategy
• One open position at a time
• No pyramiding
• No intrabar execution logic
• All decisions evaluated on confirmed bar closes only
This ensures non-repainting and repeatable behavior across backtests and live execution.
⸻
Visual Features
• BUY / EXIT labels are plotted only on actual position changes
• No indicator clutter (RSI / momentum tools are not plotted)
• SMA200 and execution markers only
• Designed to keep charts clean and readable
⸻
Recommended Usage
• Timeframes: 1H, 2H, 4H, Daily
• Markets: ETFs and liquid equities
• Style: Positional / Swing trading
This strategy is not intended for scalping or very low timeframes.
⸻
Open & Educational Intent
This version of V4B3P is shared for educational and analytical purposes.
Users are encouraged to:
• Study the logic
• Understand the trade-offs
• Experiment responsibly in simulation or backtesting
Advanced risk management features, automation-grade alerts, and multi-layer protections are intentionally not included in this release.
⸻
Important Notes
1. This is a rule-based analytical strategy, not a signal service
2. No performance guarantees are made
3. Results depend on market conditions, timeframe, and parameters
4. Users should fully understand the logic before applying it to live trading
⸻
Disclaimer
This strategy reflects a personal learning and research process.
It is shared publicly to encourage understanding of rule-based trading concepts.
Please treat it as an analytical tool rather than a trading recommendation,
and always consider your own risk tolerance and experience level.
Estrategia Pine Script®






















