AI-powered quant strategies, automatically selected and deployed as markets change. Systematic trading, made simpler. Not financial advice.
algorover.ai
SuperTrend підтверджує перетинання чи пропускає його?
Ця стратегія поєднує перетинання SMA 20/50 із SuperTrend, але фільтр працює суворіше, ніж можуть очікувати багато читачів. Для входу в довгу позицію швидка SMA має перетнути повільну SMA знизу вгору, а SuperTrend на цій самій свічці вже має бути висхідним. Для входу в коротку позицію потрібне протилежне перетинання, а SuperTrend уже має бути низхідним. Якщо перетинання SMA відбувається спочатку, а SuperTrend змінює напрямок пізніше, попереднє перетинання не враховується. Стратегія чекає на наступне перетинання SMA. SuperTrend використовує HL2, ATR за 10 свічок і множник 3. Його відстань збільшується та зменшується залежно від руху останніх свічок. У цьому й полягає адаптивність; періоди SMA залишаються незмінними.
Можна було б очікувати, що стратегія «пробою імпульсу» використовує поріг імпульсу та пробій ціни або каналу. У цій реалізації немає жодного з них як окремого правила. Він будує дві цінові траєкторії. Одна починається з рекурсивного значення, схожого на Хейкін-Аші; інша — з HLC3. Кожна проходить через два етапи TEMA, після чого отримуємо: підсумкова лінія = 2 × етап TEMA один − етап TEMA два Різниця між цими етапами проєктується назад на лінію. Схоже, це і є компонент «імпульсу». Торгова подія — це перетин двох похідних ліній. Для довгої позиції лінія B має бути вище лінії A зараз і на рівні або нижче неї на попередньому барі. Для короткої позиції нерівності протилежні.
Відтворення 30-денного бек-тесту стратегії повернення до середнього для BTC в робочому середовищі для програмування зі ШІ
Результат бек-тесту має сенс лише тоді, коли інші можуть перевірити припущення, що лежать в його основі. Я провів невеликий експеримент із безстроковим контрактом BTCUSDT і записав конфігурацію, результат та тести, які ще потрібно виконати. Стратегія: Набір правил поєднує RSI та просту ковзну середню: - Ринок: безстроковий контракт Binance BTCUSDT - Свічки: 1 година - Період тестування: 10 жовтня — 9 листопада 2026 року - Початковий капітал: 100 000 USDT - Кредитне плече: 1× - Розмір позиції: близько 30% капіталу на позицію - RSI: 14 періодів, порогові значення 30/70
Why This EMA–RSI–ATR Strategy Is More Than an EMA Crossover
When a strategy is called “EMA–RSI–ATR,” the obvious assumption is that it buys an EMA crossover, checks RSI, and places a volatility-based stop. That is not what this implementation does. In the version reviewed for the HYPEUSDT perpetual market on the 1-hour chart, the EMA pair defines the broader direction, RSI checks whether momentum agrees, a prior-range breakout triggers the setup, and ATR controls both position sizing and the distance to the exits. The most unusual detail comes after entry: the ATR stop and target are recalculated while the position remains open. The average entry price stays fixed, but the volatility envelope around it can expand or contract. The four gates behind an entry Figure 1: EMA and RSI define eligibility; the previous-range breakout supplies the entry trigger. The documented defaults are: - Fast EMA: 50 periods- Slow EMA: 200 periods- RSI: 14 periods with a midpoint of 50- ATR: 14 periods- Swing lookback: 10 bars- Stop distance: 1.5 × ATR- Target distance: 3 × ATR A long setup requires four layers to agree. First, both price and the 50 EMA must be above the 200 EMA. This defines a bullish trend structure. There is no requirement for the two averages to cross on the current candle, so the EMA condition can remain valid across many bars. Second, RSI must be above 50 and satisfy the strategy’s rising-momentum test. RSI is not being used as an oversold signal here. It acts as a directional filter. Third, the current close must be strictly above the highest high from the previous 10-bar window. The previous-window detail matters: the strategy is asking whether the current candle has closed beyond an already established range. Finally, the optional trading-session condition must allow the setup. That filter is disabled by default. The short setup mirrors the same structure: price and the fast EMA below the slow EMA, RSI below 50 with falling momentum, and a close below the previous range low. EMA is the environment; the breakout is the trigger This distinction changes how the signals should be read. The EMA structure describes an eligible market environment. It does not create a new entry every time the fast EMA remains above or below the slow EMA. The breakout supplies the bar-specific trigger. That makes the strategy closer to a trend-filtered breakout model than a simple EMA crossover system. For $HYPE on an hourly chart, a hypothetical long sequence would be: 1. Price and the 50 EMA are above the 200 EMA.2. RSI(14) is above 50 and passes the rising test.3. The current close moves strictly above the previous 10-bar high.4. A long order intent is produced.5. Once a fill establishes the average entry price, ATR determines the exit distances. The sequence matters because a chart signal, an order submission, and an actual fill are not the same event. ATR changes exposure as well as the exit levels Before entry, the strategy converts ATR into a stop distance: stop distance = ATR × 1.5 The modeled quantity is then inversely related to that distance. When ATR is larger, the stop distance is wider and the calculated quantity becomes smaller. When ATR is lower, the calculated quantity becomes larger. For perpetual contracts, this calculation only makes sense when contract value, minimum order size, and quantity precision are mapped correctly. A mathematical “fixed risk” formula does not automatically guarantee fixed account risk. The ATR envelope can widen after entry Figure 2: The entry anchor stays fixed while current ATR expands or contracts both exit boundaries. For a long position with average entry price E, the exit rules are: stop = E − 1.5 × current ATR target = E + 3 × current ATR The short equations reverse the directions. Because the formula uses current ATR while the position is open, the stop and target are not necessarily frozen at their entry-bar values. Suppose a hypothetical HYPEUSDT long position has an average entry price of 20.10 and ATR is 0.20. The initial stop calculation is 19.80, while the target calculation is 20.70. If ATR later rises to 0.30 while the entry anchor remains 20.10, the recalculated stop becomes 19.65 and the target becomes 21.00. Both boundaries move farther away. If ATR falls, both boundaries move inward instead. This is not a conventional trailing stop. A trailing stop normally avoids moving in an unfavorable direction, while this ATR envelope can loosen when volatility expands. What should be tested before using the idea Several implementation choices can materially change this rule set: - freezing ATR at entry instead of updating it each bar;- replacing the prior-range breakout with an EMA crossover;- treating a touch of the range boundary as a breakout, even though the source uses strict comparisons;- changing how the RSI rising and falling tests are calculated;- ignoring contract value or quantity rounding;- assuming a displayed stop price is a guaranteed fill during gaps or fast markets;- leaving old exit orders active when an opposite-direction signal appears. These are not minor coding details. Each one changes the set of trades the strategy is capable of producing. The mechanism worth remembering The three indicators actually perform four jobs: - EMA defines the trend environment.- RSI checks momentum direction.- The previous 10-bar range provides the entry trigger.- ATR controls both modeled exposure and a moving exit envelope. The question I would test first is simple: should ATR be frozen when the position opens, or should the stop and target continue adapting as volatility changes? This article explains a public strategy rule set for technical education. It does not predict the future behavior of $HYPE and is not individualized investment advice. The strategy can be installed and backtested using Codex/Curser/Claude on AlgoRover.ai to inspect the same rules and parameter behavior.
Adaptive CCI Thresholds as a Stateful Mean-Reversion Model Strategy hypothesis A fixed CCI threshold assumes that the same negative reading has the same meaning in every recent market regime. This strategy tests a different idea: use the recent distribution of CCI to decide which entry threshold is active, then treat the current CCI reading as a separate trigger. The example configuration is long-only and uses one-hour SOLUSDT perpetual bars. It is an implementation study, not a claim about expected returns. Indicator and data assumptions The Commodity Channel Index measures how far the current input is from its rolling mean relative to the mean absolute deviation: CCI = (current input - rolling mean) / (0.015 × mean absolute deviation) The documented configuration uses a 10-bar CCI. Public strategy material describes the input as closing prices, although the managed implementation is not fully exposed, so the exact input field should be confirmed before reproducing the model in LEAN. CCI has no fixed 0-to-100 range. A very negative value describes a large downward deviation from the recent center; it does not establish that a reversal has begun. Selecting the active threshold The strategy begins with an initial threshold of -203 and evaluates these lookback/threshold pairs in order: 40 bars / -9050 bars / -7060 bars / -5090 bars / -4120 bars / 0140 bars / 25160 bars / 50180 bars / 70 For each pair, it asks whether the minimum CCI inside that lookback window is strictly greater than the candidate threshold. If the test passes, that candidate replaces the previously active threshold. The last qualifying candidate therefore becomes the effective entry line for the bar. Entry is a second comparison: the current CCI must be strictly below the effective threshold. Qualification and entry point in opposite directions, so they should not be collapsed into one condition. Figure 1: Historical qualification and current-bar entry are separate, opposite comparisons. For example, if the 40-bar minimum is -80, the -90 candidate qualifies. If the 50-bar minimum is -75, the -70 candidate fails. At that stage, the current CCI must be below -90 to create a long intent. Figure 2: The effective CCI threshold changes in discrete steps rather than following price continuously. Algorithm state and event order A platform implementation needs to retain at least: a rolling CCI window long enough for the 180-bar test;the current effective threshold;whether a long position or an outstanding entry order exists;the highest observed price after entry;the number of completed bars in the position. The per-bar order is: Update CCI from the completed bar.Wait until the indicator and maximum lookback are ready.Evaluate the threshold levels from shortest to longest lookback.If flat and the current CCI is below the final threshold, emit a long intent.While invested, update the post-entry peak.Exit when the trailing condition or the 168-bar maximum holding period is reached.Do not immediately re-enter on the same bar as the time exit. The current metadata exposes a trailing parameter of 0.01, but its displayed unit is not sufficiently documented to assume whether the interface means 1% or 0.01%. A LEAN port should define that unit explicitly instead of silently copying the number. LEAN implementation sketch In LEAN, the indicator and rolling history can be updated in OnData, but signal state and order state should remain separate. A minimal structure would calculate the final threshold only after all required history is available, then generate an order intent. An order ticket or portfolio holding confirms what the execution layer actually accepted. The same separation applies to exits. A low price touching a trailing boundary is a signal condition; it does not guarantee the fill price. Contract specifications, spread, slippage, order type, and partial fills remain execution concerns. Parameters to isolate during research The CCI length changes the entire indicator series. A lookback length changes which historical extremes enter a qualification test. A candidate threshold changes both the difficulty of qualification and, once qualified, the ease of current-bar entry. The trailing distance and 168-bar limit govern different exit paths. Because these parameters affect different layers, changing them together makes it difficult to identify why behavior changed. A useful implementation test changes one group at a time and checks readiness, threshold selection, signal count, state transitions, and exit timing—not profitability. Takeaway The defining feature is not simply “buy a low CCI.” The model first asks which threshold the recent CCI distribution allows, then asks whether the current reading crosses below that threshold. Keeping those two comparisons and the execution layer separate is the key to reproducing the strategy faithfully. Disclosure: This article explains a public strategy rule set for technical education. The rules can be reproduced and backtested on AlgoRover.ai. It is not individualized investment advice.
Building a CMO Mean-Reversion Strategy: Why the Five-Bar Timer Matters
Disclosure: This article explains a public strategy rule set for technical education. The rules can be reproduced and backtested on AlgoRover.io. It is not individualized investment advice. A mean-reversion strategy can look simple on paper: identify unusually negative momentum, open a long position, and close it when momentum recovers. The implementation becomes more interesting when the exit is controlled by both an indicator threshold and a timer. In the Adaptive CMO Mean Reversion strategy, that timer does not necessarily begin at entry. It is tied to the most recent low-CMO condition, so it can reset while a position is already open. This guide explains the indicator, the complete rule sequence, and the implementation details that can cause two versions of the “same” strategy to behave differently. What the Chande Momentum Oscillator Measures The Chande Momentum Oscillator, or CMO, compares recent upward and downward price changes over a selected lookback period. Figure 1: CMO compares total gains with total losses; it does not estimate reversal probability. Its basic form is: CMO = 100 × (sum of gains − sum of losses) ÷ (sum of gains + sum of losses) The result normally falls between −100 and +100: A positive value means upward changes dominated the lookback window.A negative value means downward changes dominated it.A reading near either extreme means one side dominated more strongly. CMO is descriptive, not predictive. A reading below −50 does not prove that price has reached a bottom. It only tells us that recent downward changes were sufficiently dominant to cross the strategy’s entry threshold. The Strategy Rules The default configuration is long only: Calculate CMO over nine bars.Enter when CMO is strictly below −50.Exit when CMO is strictly above +50.If the momentum exit does not occur, exit five bars after the latest bar where CMO was below −50. The comparisons are strict. Exactly −50 does not trigger entry, and exactly +50 does not trigger the momentum exit. This boundary detail is easy to overlook when translating a written strategy into code. Figure 2: One strict entry condition leads to two independent exit routes. Why the Five-Bar Timer Is Not a Fixed Holding Period The timer is the defining implementation detail. It is tempting to interpret the rule as “exit five bars after entry.” That is not what this state model does. It records the latest bar where CMO is below −50 and counts forward from there. Figure 3: The timer resets at the latest CMO reading below −50. Consider this sequence: Bar 0: CMO falls below −50 and the long condition appears.Bar 1: the position is active, but CMO remains below −50.Bar 2: CMO is still below −50.Bar 3 onward: CMO moves back above −50. The timer now begins from Bar 2, not Bar 0. If CMO falls below −50 again before the trade closes, the timer resets again. This makes the exit state-dependent. It is better described as “five bars since the latest low-momentum condition” than “a five-bar holding period.” Two Exit Routes, Two Different Questions The strategy can close a position through either route: Momentum recovery: Has CMO moved strictly above +50?Timed release: Has the low-CMO condition been absent for five bars? The first route waits for positive momentum to dominate the lookback window. The second prevents the position from waiting indefinitely when that stronger recovery never appears. Whichever condition becomes true first closes the position. A timed exit without CMO reaching +50 is therefore expected behavior, not an exception. A Minimal State Model The core behavior can be represented with compact Python-like pseudocode: if not position_open and cmo < -50: open_long() last_low_cmo_bar = bar_index elif position_open: if cmo < -50: last_low_cmo_bar = bar_index momentum_exit = cmo > 50 timed_exit = bar_index - last_low_cmo_bar >= 5 if momentum_exit or timed_exit: close_long() This is an explanatory state model, not production trading code. A real implementation still needs indicator warm-up, bar-finalization rules, order-state handling, error recovery, and exchange-specific constraints. A Step-by-Step Signal Reconstruction In an offline HYPEUSDT daily-bar example, CMO was −59.62 on 2026-01-22 UTC. Because −59.62 is strictly below −50, the entry condition is satisfied. Figure 4: The highlighted HYPEUSDT bar satisfies the CMO < −50 entry rule; date in UTC. An implementation should then process later bars in this order: Confirm that a long position is active.Update the latest low-CMO timestamp whenever CMO is again below −50.Check whether CMO is strictly above +50.If not, count bars since the latest observation below −50.Close through whichever exit route qualifies first. This example reconstructs a signal from bar data. It is not an exchange fill record. Live execution still depends on when a bar is considered complete, order timing, spread, slippage, liquidity, contract precision, and available margin. How the Main Parameters Change Behavior The three visible parameters affect different parts of the system: Figure 5: Changing the period recalculates CMO; changing the threshold only moves the comparison line. CMO period: Changing nine bars to a shorter or longer window recalculates the entire indicator series. A shorter window gives recent changes more influence; a longer window includes more history.Entry threshold: Moving −50 changes which existing CMO readings qualify for entry.Timeout: Moving five bars changes how long the strategy waits after the latest low-CMO condition disappears. These should be tested separately. Changing the period, threshold, and timeout together makes it difficult to identify which assumption changed the signals. There is no universal “best” value implied by the rule set. Different markets and bar intervals can produce different CMO distributions, gap behavior, liquidity conditions, and data boundaries. Implementation Checklist Before treating two implementations as equivalent, verify the following: Is CMO calculated from completed bars?Can the strategy fill on the signal bar, or only afterward?Are −50 and +50 strict or inclusive comparisons?Does another reading below −50 reset the timer while already long?Is the timeout anchored to the signal, the fill, or the latest qualifying bar?Can a second long position open while one is already active?How are missing bars and session boundaries handled? These details often explain discrepancies more clearly than the indicator formula itself. Main Takeaway Adaptive CMO Mean Reversion is not simply “buy oversold and sell overbought.” It is a small state machine with a strict momentum entry and two competing exits. The most important distinction is the timer anchor: counting five bars from entry produces a different strategy from counting five bars since the latest condition below −50. Prepared with research support from AlgoRover using publicly available strategy materials and documented default parameters. The rule set can be reproduced and backtested on AlgoRover.io. This article is for educational purposes only and is not individualized investment advice.
Увійдіть, щоб переглянути інший контент
Приєднуйтесь до користувачів криптовалют по всьому світу на Binance Square
⚡️ Отримуйте актуальну та корисну інформацію про криптовалюти.
💬 Приєднуйтесь до найбільшої у світі криптобіржі.
👍 Відкрийте справжні ідеї від перевірених авторів.