Performance Throttle
Performance Throttle is a strategy that trades EURUSD on 30-minute bars. It holds at most 1 open trade and stops for the day after losing $500.
account and history
strategy "Performance Throttle"market: EURUSDbars: 30mmax_open: 1max_daily_loss: $500input base_risk = 1%week = history.this_weekrecent_r = trades.closed(tag: "trend").keep_last(10).map(t => t.r).sum()risk_scale = if week.profit_factor < 1 or recent_r < -3 then 0.5 else 1.0when crosses_above(ema(close, 20), ema(close, 50)):buy risk: base_risk * risk_scale, stop: 25 pips, target: 2R, tag: "trend"on exit(trade):if trade.reason == "stop" and trade.r <= -1:log "Stopped out; recent R total is {recent_r:0.0}"Performance Throttle is a strategy that trades EURUSD on 30-minute bars. It holds at most 1 open trade and stops for the day after losing $500.
You can change one input: base_risk (default 1%).
It calculates week as history.this_week, recent_r as trades.closed(tag: "trend").keep_last(10).map(t => t.r).sum() and risk_scale as 0.5 when week.profit_factor is below 1 or recent_r is below -3, otherwise 1.0.
When the 20-bar EMA of the close crosses above the 50-bar EMA of the close, it buys at market, risking base_risk × risk_scale of the balance, with a stop 25 pips from the entry, with a target 2R from the entry and tagged "trend".
When a trade closes, it checks whether trade.reason is "stop" and trade.r is at or below -1 and, if so, logs "Stopped out; recent R total is {recent_r:0.0}".