AlgoRover Variance Impulse Fade v0.1.0 Visual — Strategy by AlgoRover
By AlgoRover
Performance Metrics
- Author: AlgoRover
- Symbol: BINANCE:SUIUSDT.P
- Timeframe: 1 hour
- Profit Factor: 1.173
Description
1. Strategy Logic / 策略基础逻辑I use this strategy to test whether recent price movement should be faded or followed when its volatility changes. It trades BINANCE:SUIUSDT.P, standard 1-hour candles, using the latest 12 hourly log returns, split into two groups of six. Let M be the sum of the later six returns and ΔQ the later squared-return sum minus the earlier squared-return sum. The raw impulse is M×ΔQ; the default polarity −1 reverses its direction. Rising prices with expanding squared-return energy produce a short; rising prices with contracting energy produce a long. Falling prices reverse those directions. I describe Q as squared-return energy because the code does not subtract the mean: this is not the usual statistical variance, a volatility forecast or a significance test.我用这个策略检验一个具体问题:近期价格运动伴随波动变化时,应该逆向还是顺向交易?策略交易 BINANCE:SUIUSDT.P,使用标准1小时K线,把最近12个小时对数收益分成前后各6期。设M为后6期收益之和,ΔQ为后6期收益平方和减去前6期收益平方和,原始冲击得分为M×ΔQ,默认极性−1将方向取反。上涨伴随收益平方能量扩张时做空,上涨伴随能量收缩时做多;下跌时方向相反。我把Q称为收益平方能量,因为源码没有减去均值,它不是通常统计定义下的方差,也不是波动率预测或显著性检验。Figure 1Figure 1 is an actual TradingView chart in UTC+8. The lower pane shows the polarity-adjusted impulse multiplied by one million: positive values are teal, negative values purple. On scheduled observation bars, red shading marks expanding energy and blue shading contracting energy. V+/V− mark qualified directional signals; IMPULSE_MARKET and TIME/STOP/TARGET/END are actual simulated order markers. A direction signal does not necessarily open another trade while a position exists. Red and green segments show fixed protective stop and target references. Indicator values can continue beyond the research cutoff, while trade signals and new orders stop at that cutoff; END closes the final position.图1来自TradingView实际图表,时间显示为UTC+8。副图将经过极性调整的冲击得分放大一百万倍,正值为青色、负值为紫色。在定时取样K线上,红色背景表示能量扩张,蓝色表示能量收缩。V+/V−是合格方向信号,IMPULSE_MARKET及TIME/STOP/TARGET/END才是实际模拟订单标记;已有持仓时,出现方向信号不一定重新开仓。红绿线段分别表示固定保护止损及目标价。研究截止后指标仍可继续显示,但交易信号和新订单停止,END用于结束最后持仓。2. Parameters and Rules / 参数规则Defaults are a 12-return window, six-hour sampling interval, UTC opening-hour phase 3 and polarity −1. The eligible bars open at 03:00, 09:00, 15:00 or 21:00 UTC; decisions occur at their confirmed hourly closes. Readiness requires 13 price observations. There is no magnitude threshold, no moving-average filter, no pyramiding and no immediate same-decision reversal. ATR 14 is recursively smoothed from the first true range, matching the source initialization. Each entry captures that ATR for a fixed 5 ATR stop and 8 ATR target; levels round outward to the symbol tick. Maximum holding time is four hourly bars; an opposite qualified signal also closes the position. Market entry and timed exit use confirmed closes. The source’s touched-market target is represented by a Pine limit-order proxy, so gaps and tick paths can behave differently.默认参数为12期收益窗口、每6小时取样、UTC开盘小时相位3及极性−1。只在UTC开盘时刻03:00、09:00、15:00、21:00对应小时K线的确认收盘时决策,13个价格观测后就绪。没有得分幅度门槛、没有均线过滤,不加仓,也不在同一次决策中直接反手。ATR长度14,从第一根真实波幅递推初始化,与源码一致。入场时锁定ATR,设置固定5倍ATR止损、8倍ATR目标,并按品种最小价格单位向外取整。最多持有4根小时K线,出现合格反向信号也会退出。市价入场及时间退出使用确认收盘价;原生触价市价目标在Pine中以限价单近似,跳空和逐笔路径可能不同。Initial capital is 100,000 USDT. Entry notional is 0.95×min(current equity,100,000), rounded down to 0.1 SUI; profits above the original allocation do not increase the order budget. The research calculation/trading window is 2025-11-23 00:00 to 2026-11-23 00:00 UTC. The inherited maker/taker assumptions are 0.01%/0.025%, but this preset uses market-intent entries and exits, so Pine charges 0.025% per fill. Funding and extra slippage are excluded. As in the preceding native-position comparison, emulator margin checks are disabled while explicit sizing bounds entry notional to at most 0.95 times equity and 95,000 USDT. The Properties “Infinity” label means that check is off; it is not actual strategy leverage or a Binance liquidation model.初始资金为100,000 USDT,入场名义金额为“当前权益与100,000中的较小值”乘以0.95,数量向下取整至0.1 SUI;超过初始分配的利润不再扩大订单预算。研究计算及交易窗口为2025-11-23 00:00至2026-11-23 00:00 UTC。沿用maker/taker为0.01%/0.025%的假设,但该预设使用市价意图入场和退出,因此Pine对每次成交统一收取0.025%,不计资金费率及额外滑点。与前述原生仓位对照相同,模拟器保证金检查关闭,但代码将入场名义金额限制在不超过权益0.95倍及95,000 USDT。属性中的“Infinity”只表示该检查关闭,不是策略实际杠杆,更不代表币安清算模型。A source-level numerical issue matters here: when the later six returns start and end at the same price, their exact cumulative log return is zero. Python’s sum of individual logs can nevertheless leave a tiny signed residue. With no zero tolerance, the source can trade that residue. Four such native-only trades were identified in this archive; I did not add date-specific overrides to force Pine to reproduce them. A future native correction should explicitly define zero handling and be rerun as a separate revision, rather than silently changing this source version.本次发现一个实质性源码问题:后6期起止价格相同时,累计对数收益在数学上应为0,但Python逐项求和可能留下极小的带符号浮点残差。源码没有零值容忍规则,可能据此开仓。本存档已定位4笔仅存在于原生的此类交易,我没有加入按日期硬编码的方向规则强行复制它们。后续若修正原生逻辑,应明确零值处理并形成独立修订后重新回测,不能静默改动当前版本。3. Backtest Results / 回测效果The verified TradingView full-year result is +127,981.58 USDT (+127.98%), maximum tester drawdown 16.40% (26,887.11 USDT), 1,454 completed trades, 52.06% winners and profit factor 1.173. Exits comprise 1,443 TIME, six STOP, four target-proxy and one END exit; there are no margin-call records. This is based on the loaded hourly chart with the code’s fixed annual calculation window, not the earlier short one-minute-chart test. Another user still needs enough loaded hourly history to reproduce it. All five visualization switches were tested: the trade exports with visuals on and all off are byte-identical.已验证的 TradingView 全年结果为 +127,981.58 USDT,收益+127.98%,测试器最大回撤 16.40%,金额26,887.11 USDT,1454笔完整交易,胜率 52.06%,盈利因子 1.173。退出由1443笔持仓到期、6笔止损、4笔目标近似退出及1笔END结束退出组成,没有保证金减仓记录。这是已加载小时图表配合代码固定全年计算窗口的结果,不是此前1分钟图表仅覆盖最近几天的测试;其他用户仍需加载足够小时历史才能复算。五项图示开关已实测,全部开启与全部关闭时的成交导出逐字节一致。The reused AlgoRover native 365-day archive, 2025-11-23 to 2026-11-23 UTC, returned 129.07% with 18.17% maximum hourly-equity drawdown, 1,458 completed positions, 52.06% winners, net-P&L profit factor 1.174 and 69,241.70 USDT fees. Sharpe from exact UTC-midnight daily equity and √365 is 2.360; the engine’s own convention reports 2.006. The 90-day archive, 2026-08-25 to 2026-11-23 UTC, returned 28.43%, with 20.79% drawdown, 358 completed positions, 51.68% winners, net-P&L profit factor 1.151 and 16,869.90 USDT fees. These are archived results, not new native runs from this upload. Both archives have continuous hourly coverage, no recorded sizing rejection or strategy fault, and no remaining position/order at termination. Current catalog 90-day metrics use a different date/cost context and are not substituted for these archives.复用的 AlgoRover原生 365天存档覆盖2025-11-23至2026-11-23 UTC,收益 129.07%,小时权益最大回撤 18.17%,1458笔完整平仓,胜率52.06%,净盈亏口径盈利因子1.174,手续费69,241.70 USDT。按UTC零点日权益及√365计算的夏普为2.360,引擎自身口径报告2.006。90天存档覆盖2026-08-25至2026-11-23 UTC,收益 28.43%,最大回撤 20.79%,358笔完整平仓,胜率51.68%,净盈亏盈利因子1.151,手续费16,869.90 USDT。这些是已归档结果,并非本次上传重新运行的原生回测。两段小时数据连续,没有记录到仓位审批拒绝或策略故障,结束时没有残余持仓和订单;当前目录90天指标的日期与成本背景不同,本文没有用它们替代这些存档。Figure 2Figure 2 reconstructs native equity and running-peak drawdown from all 8,761 hourly observations, without smoothing; it is not a Pine equity curve. All 1,454 common trades match in entry price, quantity and exit price. The four native-only trades occur on 2026-04-06, 06-09, 08-15 and 11-06 UTC. Their later-half endpoint returns are exactly zero, while summed-log residues are about 10⁻¹⁷ to 10⁻¹⁶; together they contribute +1,085.68 USDT and explain the total P&L difference. The 18.17% native hourly floating-equity drawdown and the 16.40% tester statistic remain separately defined; I do not interpret the lower Pine number as an improvement. Historical price agreement also does not certify exchange liquidation, queue, funding or future gap behavior.图2使用全部8,761个小时权益观测重建原生净值和相对运行峰值的回撤,不做平滑,不是Pine净值曲线。1454笔共同交易的入场价、数量、退出价全部一致。原生独有的4笔发生在UTC的2026-04-06、06-09、08-15及11-06;后半段起止收益严格为0,但逐项对数求和残差约为10⁻¹⁷至10⁻¹⁶,合计贡献+1,085.68 USDT,解释了总盈亏差额。原生小时浮动权益回撤18.17%与测试器16.40%的统计仍按各自定义分列,不把较低的Pine数字解释为策略改善。历史成交价格吻合,也不代表交易所清算、排队、资金费率和未来跳空行为已经得到认证。This strategy was generated using AlgoRover and adapted into Pine Script for visual analysis and backtesting in TradingView, demonstrating a research workflow that moves from a trading idea to explicit rules, then to understanding, modification, and validation. AlgoRover supports more than 4,000 strategies across different categories, custom strategy generation, modification of existing strategy parameters and logic, extensive market data, and execution on local and cloud servers. Its positioning spans strategy generation, rule comprehension, logic modification, and historical validation, lowering the barriers to quantitative strategy research and implementation and making quantitative trading simpler. See the profile for details, and copy the command to install AlgoRover (codex can be replaced with claude or cursor):codex plugin marketplace add AlgoRover/algorover-hub --ref main该策略通过 AlgoRover 生成,并改写为Pine Script,以便在TradingView中进行图示观察与回测,展示了从交易想法到明确规则,再到理解、修改和验证的研究流程。AlgoRover支持 4,000余种不同类别的策略,支持策略自定义生成、现有策略参数与逻辑改写,并提供海量市场数据及本地、云端服务器运行能力。其定位贯穿策略生成、规则理解、逻辑改写和历史验证,降低量化策略研究与实现的门槛,让量化交易变得更简单。详情请看主页,直接复制命令安装AlgoRover:(codex可以替换成claude,cursor)codex plugin marketplace add AlgoRover/algorover-hub --ref main