Guide CHV Trend Strategy
Overview
CHV Trend is a percentage-swing trend-following strategy. It tracks how far price has moved from a trailing anchor and flips between long and short positions whenever the move exceeds the configured Reversal % threshold. There are no ATR brackets, no whipsaw inversions — each trade is a clean directional bet held until the opposite signal fires.
State Machine
The engine maintains two variables:
anchor_price— the price level the current swing started from (trailing)current_trend— current direction:+1(up),-1(down),0(neutral at start)
Uptrend (+1)
Anchor trails to new highs.
if close > anchor → anchor = close
Flip to short when:
((close − anchor) / anchor) × 100 ≤ −reversal_pct
Downtrend (−1)
Anchor trails to new lows.
if close < anchor → anchor = close
Flip to long when:
((close − anchor) / anchor) × 100 ≥ +reversal_pct
Entry & Exit
- Entry: At the close of the signal candle (when the trend flips)
- Exit: At the close of the next signal candle (opposite flip)
- There is no fixed TP or SL — the strategy rides the trend until a reversal is confirmed
- If data ends before the next signal, the open trade closes at the last available candle
Parameters
| Parameter | Default | Description |
|---|---|---|
| Reversal % | 3.0% | Required price move from anchor to trigger a trend flip. Lower = more signals, more noise. Higher = fewer signals, longer holds. |
| Timeframe | 4h | Candle timeframe for state machine and trade execution. Higher TF = smoother signals, wider swings. |
| Base Lots | symbol min | Fixed position size per trade. Overridden by Fixed Margin mode. |
| Fixed Margin | Off | When on, lots = target_margin × leverage ÷ price. Normalises risk across symbols. |
| Leverage | 10× | Affects position sizing only. P&L is always price_diff × lots (USDM perpetuals). |
| Capital | $1,000 | Starting capital. Used for margin checks and equity curve baseline. |
| Taker Fee | 0.05% | Applied to both entry and exit fills. |
| Slippage | 0.05% | Additional cost per fill modelled as a price slippage against the trade direction. |
| Lookback Days | 365 | How many days of historical data to fetch and backtest over. |
Tuning Tips
- Start with 3.0%–5.0% on 4h or daily — it balances signal frequency with trend quality
- Lower reversal % on volatile assets (e.g. DOGE) will generate too many signals — use 4h+ TF to compensate
- For BTC/ETH on 1h, 2.0%–3.0% typically produces 40–80 trades per year
- Profit factor above 1.5 with win rate above 45% is a solid baseline to look for
- Use Fixed Margin per Trade to compare results across different symbols fairly
P&L Calculation
For LONG trade:
gross_pnl = (exit_price − entry_price) × lots
fees = lots × entry_price × fee_rate + lots × exit_price × fee_rate
net_pnl = gross_pnl − fees
For SHORT trade:
gross_pnl = (entry_price − exit_price) × lots
Margin required = lots × entry_price / leverage
(no leverage multiplier on P&L — USDM perpetuals)