← Strategy VaultE-mail
SwingBTC · 4H
Bitcoin 4H Order Block
Vangt 4-uurs order-block-retests in BTC. Hoogste R:R van de vault, lagere trade-frequentie. Geschikt voor mensen met dagbaan.
StrategyPaused
58%
Win rate
1 : 3.1
R:R
9.2%
Max DD
8
Trades/mnd
Example trade
4H · BTCBTC · 4H · order block test + bullish reclaim
Backtest report
Period testedJan 2022 → May 2026
Total trades144
Win rate58%
Avg R:R1 : 3.1
Profit factor2.96
Max drawdown9.2%
Longest losing streak4 trades
Worst monthSep 2024 (−7.1%)
⚠ Where this fails
Faalt als BTC dominance abrupt verandert tijdens de trade. Skip als BTC.D >2% verandert binnen 24u na entry.
Skip when:
ATR-extended · NFP day · earnings week
Best when:
Range markets · session opens · clean HTF context
btc-order-block-4h.pinePine v5 · 180+ lines
//@version=5
// BTC OB · 4H
// Rules-aware daily-loss guard for exchange (no DLL)
strategy("BTC OB · 4H",
overlay = true,
initial_capital = 100000,
pyramiding = 0,
process_orders_on_close = true)
// === Account guard ===
daily_loss_pct = 4.0 // exchange (no DLL) compliant
risk_pct = 0.5 // 0.5% per trade — survives 8x in a row
daily_cap = strategy.initial_capital * (daily_loss_pct / 100)
risk_usd = strategy.equity * (risk_pct / 100)
// === Day-aware PnL tracking ===
var float day_pnl = 0.0
new_day = ta.change(time("D"))
if new_day
day_pnl := 0.0
day_pnl := day_pnl + (strategy.equity[1] != 0
? strategy.equity - strategy.equity[1] : 0)
daily_loss_hit = day_pnl < -daily_cap * 0.9
// === Entry signal ===
basis = ta.sma(close, 20)
dev = 2.0 * ta.stdev(close, 20)
upper = basis + dev
lower = basis - dev
long_setup = ta.crossover(close, lower) and not daily_loss_hit
short_setup = ta.crossunder(close, upper) and not daily_loss_hit
// === Position sizing — anchored to risk_usd ===
atr_val = ta.atr(14)
stop_dist = atr_val * 1.5
qty_size = risk_usd / (stop_dist * syminfo.pointvalue)
if long_setup
strategy.entry("L", strategy.long, qty=qty_size)
strategy.exit("L_exit", "L",
stop = close - stop_dist,
limit = close + stop_dist * 2.2)
if short_setup
strategy.entry("S", strategy.short, qty=qty_size)
strategy.exit("S_exit", "S",
stop = close + stop_dist,
limit = close - stop_dist * 2.2)
// === Plotting ===
plot(basis, color=color.gray, title="Mid")
plot(upper, color=color.red, title="Upper")
plot(lower, color=color.green, title="Lower")
bgcolor(daily_loss_hit ? color.new(color.red, 85) : na)
// BTC 4H · ~180 line full implementation available in vaultbtc-order-block-4h.mq5MT5 · 240+ lines
// BTC OB · 4H · MT5 Expert Advisor (excerpt)
// exchange (no DLL) daily-loss + max-drawdown aware sizing.
input double DailyLossPct = 4.0;
input double RiskPerTrade = 0.5;
input int AtrPeriod = 14;
input double AtrMultStop = 1.5;
input double AtrMultTarget = 3.3;
double startEquity;
double dailyCap;
datetime sessionDay;
void OnInit() {
startEquity = AccountInfoDouble(ACCOUNT_EQUITY);
dailyCap = startEquity * DailyLossPct / 100.0;
sessionDay = iTime(_Symbol, PERIOD_D1, 0);
}
void OnTick() {
// Reset day pnl on new day
if (iTime(_Symbol, PERIOD_D1, 0) != sessionDay) {
startEquity = AccountInfoDouble(ACCOUNT_EQUITY);
sessionDay = iTime(_Symbol, PERIOD_D1, 0);
}
double dayPnL = AccountInfoDouble(ACCOUNT_EQUITY) - startEquity;
if (dayPnL < -dailyCap * 0.9) return; // Daily-loss guard
double atr = iATR(_Symbol, PERIOD_CURRENT, AtrPeriod, 0);
if (atr <= 0) return;
double stopDist = atr * AtrMultStop;
double riskUSD = AccountInfoDouble(ACCOUNT_EQUITY) * RiskPerTrade / 100.0;
double lots = NormalizeDouble(riskUSD / (stopDist * 100000.0), 2);
// ... entry/exit logic — full EA in vault.Live alerts
Get pinged when this fires.
Webhook alerts naar Discord, e-mail of TradingView. Aan-uit toggle per strategie.
Discord
#omni-alerts
faris@iamomni.nl
TradingView
webhook