Appearance
Personalize your experience
Value Area Rotation
Admin's ChoiceFreeRotates to POC in balance, follows acceptance out of value
Live engine preview
The QuaScript engine's own output on the chart the terminal uses. Change the settings or edit the code and press Run to recompute it.
About
Trades the auction's two states. While price stays inside the session value area, the market is in balance and moves from one edge tend to rotate back to the point of control (POC); when two closes are accepted outside value, balance has broken and the move tends to extend. The strategy fades edge tests in balance and follows acceptance out of it. Entry: rotation, a bar that pokes beyond VAH / VAL and closes back inside; breakout, the second consecutive close outside value. Exit: rotation targets the POC, breakouts trail; stops beyond the bar. Risk: 1 % per trade. Method: Steidlmayer market profile, volume at price.
Settings
Profile rows: 40
Value area: 0.7
Stop (ATR): 1.5
Measured backtests
Run by the backtest engine on public candles, 2025-11-01 to 2026-11-01, with the script's own commission and slippage, on BTCUSDT 1h (Binance) and ETHUSDT 1h (Binance). The figures per market are in the Measured backtest panel below. Past results do not predict future returns.
Backtest it yourself
Open it on the backtesting page to run it on any symbol, interval and date range, then use Monte Carlo, optimisation, walk-forward and robustness tests.
Strategy Rules
Entry Conditions
- ▸ rotation, a bar that pokes beyond VAH / VAL and closes back inside; breakout, the second consecutive close outside value
Exit Conditions
- ▸ rotation targets the POC, breakouts trail; stops beyond the bar
Measured backtest
BTCUSDT 1h (Binance), 2025-11-01 to 2026-11-01 · backtest engine, script costs included
-18.0%
Return
-0.87
Sharpe
-25.2%
Max DD
44.0%
Win Rate
341
Trades
| Market | Trades | Return | Sharpe | Max DD | Win rate | Profit factor |
|---|---|---|---|---|---|---|
| BTCUSDT 1h | 341 | -18.0% | -0.87 | -25.2% | 44.0% | 0.87 |
| ETHUSDT 1h | 115 | -22.0% | -2.00 | -25.1% | 38.3% | 0.63 |
Past results on historical data do not predict future returns.
Source Code
Edit in IDE| 1 | strategy "Value Area Rotation" { |
| 2 | overlay = true |
| 3 | capital = 100000 |
| 4 | commission = 0.05 |
| 5 | slippage = 1 |
| 6 | sizing = risk_percent |
| 7 | max_leverage = 1 |
| 8 | size = 1 |
| 9 | pyramiding = 1 |
| 10 | } |
| 11 | /// Trades the auction's two states. While price stays inside the session value area, the market is |
| 12 | /// in balance and moves from one edge tend to rotate back to the point of control (POC); when two |
| 13 | /// closes are accepted outside value, balance has broken and the move tends to extend. The strategy |
| 14 | /// fades edge tests in balance and follows acceptance out of it. |
| 15 | /// Entry: rotation, a bar that pokes beyond VAH / VAL and closes back inside; breakout, the second |
| 16 | /// consecutive close outside value. Exit: rotation targets the POC, breakouts trail; stops beyond |
| 17 | /// the bar. Risk: 1 % per trade. Method: Steidlmayer market profile, volume at price. |
| 18 | use "viz/premium" as pr |
| 19 | rows = param.int(40, title = "Profile rows", min = 10, max = 200, group = "Profile") |
| 20 | va = param.float(0.7, title = "Value area", min = 0.5, max = 0.95, step = 0.01, group = "Profile") |
| 21 | stop_k = param.float(1.5, title = "Stop (ATR)", min = 0.3, max = 6, step = 0.1, group = "Risk") |
| 22 | (poc, vah, val) = ta.volume_profile(rows, va, "session") |
| 23 | a = ta.atr(20) |
| 24 | inside = close <= vah and close >= val |
| 25 | rot_l = low < val and close > val and inside |
| 26 | rot_s = high > vah and close < vah and inside |
| 27 | acc_u = close > vah and close[1] > vah[1] and not (close[2] > vah[2]) |
| 28 | acc_d = close < val and close[1] < val[1] and not (close[2] < val[2]) |
| 29 | flat = position.size == 0 |
| 30 | if flat and rot_l and poc - close > 0.5 * a { |
| 31 | order.market("RL", side.long) |
| 32 | exit.bracket("RL exit", entry = "RL", stop = low - stop_k * a * 0.5, target = poc) |
| 33 | } |
| 34 | if flat and rot_s and close - poc > 0.5 * a { |
| 35 | order.market("RS", side.short) |
| 36 | exit.bracket("RS exit", entry = "RS", stop = high + stop_k * a * 0.5, target = poc) |
| 37 | } |
| 38 | if flat and acc_u { |
| 39 | order.market("BL", side.long) |
| 40 | exit.bracket("BL exit", entry = "BL", stop = close - stop_k * a, trail_offset = stop_k * a, trail_trigger = close + stop_k * a) |
| 41 | } |
| 42 | if flat and acc_d { |
| 43 | order.market("BS", side.short) |
| 44 | exit.bracket("BS exit", entry = "BS", stop = close + stop_k * a, trail_offset = stop_k * a, trail_trigger = close - stop_k * a) |
| 45 | } |
| 46 | dom = time.day(time) |
| 47 | new_day = dom != dom[1] |
| 48 | if new_day and position.size != 0 and position.bars_held > 1 { exit.close_all() } |
| 49 | risk.max_drawdown(25) |
| 50 | p_h = render.step(vah, "Value area high", color = color.translucent(color.violet.300, 30), width = 1) |
| 51 | p_p = render.step(poc, "POC", color = color.amber.300, width = 2) |
| 52 | p_l = render.step(val, "Value area low", color = color.translucent(color.violet.300, 30), width = 1) |
| 53 | render.band(p_h, p_l, color = color.violet.500, opacity = 0.06, title = "Value area") |
| 54 | render.mark(rot_l or rot_s, shape = shape.circle, at = anchor.above_bar, color = color.violet.300, size = 0.4, title = "Edge rejection") |
| 55 | render.mark(acc_u or acc_d, shape = shape.diamond, at = anchor.below_bar, color = color.amber.300, size = 0.6, title = "Acceptance outside value") |
| 56 | persist t = draw.table.create(anchor.top_right, 4, 2) |
| 57 | if bar.is_last { |
| 58 | pr.heading(t, 2, "Value Area Rotation", "Strategy · session auction") |
| 59 | pr.row(t, 2, "State", inside ? "Balance (rotate)" : "Imbalance (follow)", color.white) |
| 60 | pr.row(t, 3, "POC", str.format("{:.2f}", poc), color.amber.300) |
| 61 | } |
| 62 |
Reviews
No reviews yet. Be the first to review this listing.