Update: v1.12 volatility filters implementation
This commit is contained in:
@@ -273,3 +273,55 @@ file:///home/garfield/mt5-docker/config/.wine/drive_c/users/abc/Desktop/ReportHi
|
|||||||
### Note
|
### Note
|
||||||
The HTML report is from **March 15** (3.07% profit). For the **live** current data ($6,935 / 6.94%), use the MT5 terminal directly or the `create-live-report.sh` utility.
|
The HTML report is from **March 15** (3.07% profit). For the **live** current data ($6,935 / 6.94%), use the MT5 terminal directly or the `create-live-report.sh` utility.
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Session Update: v1.12 Volatility Filters Added
|
||||||
|
**Timestamp:** $(date '+%Y-%m-%d %H:%M:%S')
|
||||||
|
|
||||||
|
### Problem Identified
|
||||||
|
Backtesting analysis showed significant profits followed by drawdowns during narrow trading band periods. When price is in a tight range, breakout signals often result in false breakouts without follow-through.
|
||||||
|
|
||||||
|
### Solution Implemented: Anti-Chop Filters (v1.12)
|
||||||
|
Added dual volatility filters to block trades during low-volatility/consolidating periods:
|
||||||
|
|
||||||
|
1. **ATR Filter** (`InpUseVolatilityFilter = true`)
|
||||||
|
- Minimum ATR: 0.5% of current price
|
||||||
|
- Period: 14 bars
|
||||||
|
- Blocks: Narrow band / low volatility conditions
|
||||||
|
|
||||||
|
2. **ADX Filter** (`InpUseADXFilter = true`)
|
||||||
|
- Minimum ADX: 20.0
|
||||||
|
- Period: 14 bars
|
||||||
|
- Blocks: Weak trend / choppy markets
|
||||||
|
|
||||||
|
### Code Changes
|
||||||
|
```cpp
|
||||||
|
// NEW: Volatility Filter Inputs (lines 30-36)
|
||||||
|
input group "=== Volatility Filter (Anti-Chop) ==="
|
||||||
|
input bool InpUseVolatilityFilter = true;
|
||||||
|
input int InpATRPeriod = 14;
|
||||||
|
input double InpMinATRPercent = 0.5; // Min ATR as % of price
|
||||||
|
input bool InpUseADXFilter = true;
|
||||||
|
input int InpADXPeriod = 14;
|
||||||
|
input double InpMinADX = 20.0; // Min ADX (20-25 recommended)
|
||||||
|
|
||||||
|
// NEW: Global handles (lines 46-47)
|
||||||
|
int ATRHandle;
|
||||||
|
int ADXHandle;
|
||||||
|
|
||||||
|
// NEW: CheckVolatilityFilter() function (lines 200-223)
|
||||||
|
// Called before every trade in OnTick() (line 616)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Repository Status
|
||||||
|
- Version: 1.12
|
||||||
|
- Commit: 86fa4b2
|
||||||
|
- Message: "Add volatility filters v1.12 (Anti-Chop)"
|
||||||
|
- Status: Pushed to Gitea
|
||||||
|
|
||||||
|
### Expected Impact
|
||||||
|
- **Reduced:** False breakout trades during consolidation
|
||||||
|
- **Reduced:** Over-trading in choppy markets
|
||||||
|
- **Improved:** Win rate (fewer bad trades)
|
||||||
|
- **Maintained:** Profitable trending market entries
|
||||||
|
|||||||
Reference in New Issue
Block a user