Decay Block: Complete Guide for Algorithmic Trading

The Decay block in Arrow Algo takes any input signal and gradually reduces it toward zero over a defined number of periods. When a signal fires, Decay outputs its initial value on that candle and then steps down toward zero with each subsequent candle — creating a fading memory of the event. This makes it one of the most useful blocks for preventing signal stacking, enforcing cooldown logic, and giving recent events more weight than older ones in your strategy’s decision-making.

What Is the Decay Block?

Decay is a time-attenuation block. Connect any numeric input — typically a binary signal output from a Crossover or condition block — and set a period length. When the input fires a non-zero value, Decay starts at that value and decreases by a fixed amount each candle until it reaches zero. Once it hits zero, it stays at zero until the input fires again.

The period you set controls the decay rate. A period of 5 means the output decreases by one-fifth of its starting value each candle, reaching zero after 5 candles. A period of 10 gives a gentler decay across 10 candles before the signal fully fades.

This output — a value that starts high and falls toward zero — is then used in downstream logic. The most common use is as a blocking condition: while Decay is above zero, certain actions are suppressed. This prevents a strategy from firing multiple entries in rapid succession after a single setup.

How Does Decay Calculate Its Output?

The calculation is linear. On the candle where the input fires a non-zero value, Decay outputs that value — typically 1 for a binary signal input. On each subsequent candle, it subtracts 1/N from the output, where N is the period you set. After N candles, the output reaches zero and stays there until the input fires again.

For example, with a period of 4 and a binary input that fires 1:

  • Candle 0 (signal fires): output = 1.0
  • Candle 1: output = 0.75
  • Candle 2: output = 0.50
  • Candle 3: output = 0.25
  • Candle 4+: output = 0.0

If the input fires again before the decay reaches zero, the output resets to the input value and begins decaying again from that point. This reset behaviour is important to understand — a strategy that generates frequent signals will keep the Decay output elevated, effectively blocking cooldown logic from triggering.

What Problems Does the Decay Block Solve?

Decay addresses two specific problems that arise in systematic strategies:

Signal stacking: Without a cooldown mechanism, a strategy can fire multiple entries on consecutive candles when conditions remain favourable. Each entry adds exposure at slightly different prices, creating an unintended pyramiding effect. Decay provides a simple, configurable cooldown window — the strategy cannot add a new position while the Decay output from the previous signal is still above zero.

Over-representation of old signals: In strategies that weight historical conditions, older events can carry the same influence as recent ones. Decay allows you to express “this condition matters more if it happened recently” — the further back a signal occurred, the less influence its decayed output has on current decisions.

Both problems are common in medium-frequency systematic strategies running on hourly or 4-hour timeframes, where multiple valid signals can occur within a single trending day. Decay provides a lightweight, no-code solution to both.

What Are the Best Decay Block Trading Strategies?

1. Entry Cooldown After a Signal

Connect your entry signal output — from a Crossover block, an RSI condition, or any block that outputs 1 at entry — to a Decay block set to your desired cooldown period (e.g. 5 candles). Feed the Decay output into a condition block that checks whether it is equal to zero. Connect that condition to an AND gate alongside your entry signal. New entries only fire when the Decay output has returned to zero — meaning at least 5 candles have passed since the last signal. This prevents rapid re-entry during choppy conditions.

2. Recency-Weighted Momentum Filter

Connect a momentum or trend signal to a Decay block with a moderate period (10 to 20 candles). Use the Decay output as a weight in a downstream condition: a high output means a trend signal fired recently, while a low output means momentum is stale. Only allow entries when the Decay output is above a threshold — say, 0.5 — ensuring you act on fresh momentum rather than signals that fired many candles ago.

3. Post-Loss Pause

Connect the output of a loss detection block — a condition that fires when a trade closes at a loss — to a Decay block set to a longer period (10 to 20 candles). While the Decay output is above zero, suppress new entries via a NOT gate or a zero-equality check in an AND gate. This builds a built-in recovery pause into the strategy: after a losing trade, the strategy waits for the Decay to clear before entering again. This reduces the risk of entering into consecutive losses during an adverse market period.

What Mistakes Do Traders Make With Decay?

Setting the period too short for the timeframe: A 3-candle Decay on a 1-minute chart creates a 3-minute cooldown. That may be appropriate for scalping but far too short for a 4-hour strategy. Match the Decay period to the typical time between meaningful setups on your chosen timeframe.

Forgetting that repeated signals reset the decay: If your entry signal fires on consecutive candles — common in strong trending conditions — the Decay output resets each time and never reaches zero. A cooldown built on Decay will not function in this scenario. Consider using a Sum block alongside Decay to count recent signal frequency, and gate entries only when signal frequency is low.

Using Decay where a fixed candle counter is more appropriate: Decay produces a gradually declining output. If you simply want to block entries for exactly N candles after a signal — regardless of the decay curve — a Sum block counting recent signals is more precise. Use Decay when you want gradual attenuation, not a hard binary block.

Not accounting for the reset in backtesting: When reviewing backtest results that use Decay for cooldowns, check whether the cooldown is functioning as intended by examining signal frequency. If signals appear too frequently, the Decay is resetting before reaching zero — indicating the input fires more often than the period allows for genuine cooldown.

How to Add Decay to Arrow Algo Strategies

Decay integrates cleanly into any existing Arrow Algo strategy as a post-signal filter. No code is required — connect the signal output to the Decay input, set the period, and wire the Decay output into your entry gate.

A standard cooldown setup:

  1. Identify your entry signal block — the Crossover, RSI condition, or other block that outputs 1 at a valid entry.
  2. Connect that output to a Decay block. Set the period to your desired cooldown length in candles.
  3. Add a condition block: Decay output equals zero (or is less than a small threshold). This outputs 1 only when the cooldown has expired.
  4. Connect both the original entry signal and the zero-check condition to an AND gate. The AND gate only passes when a new entry signal fires AND the previous signal’s decay has fully cleared.
  5. Connect the AND gate output to your position entry block.
  6. Run a backtest and compare signal frequency before and after adding the Decay filter. In choppy conditions, Decay should reduce trade count meaningfully while preserving entries in cleaner trending setups.

For the exponential version of this block — where the decay curve drops faster initially and more slowly as it approaches zero — see the companion guide on Exponential Decay (Edecay). For related signal logic blocks, explore the Arrow Algo indicator block documentation.

What Are the Key Takeaways?

  • The Decay block reduces any input value linearly toward zero over a defined number of periods
  • It is most commonly used for entry cooldowns, recency weighting, and post-loss pause logic
  • When the input fires again before Decay reaches zero, the output resets and begins decaying from the new value
  • Frequent signals that reset Decay before it clears can prevent cooldown logic from functioning — pair with a Sum block to detect this
  • Match the Decay period to your strategy’s timeframe — 3 candles on a 4-hour chart is a very different cooldown from 3 candles on a 1-minute chart
  • For a hard binary block of exactly N candles, a Sum counter is more precise; use Decay when gradual attenuation is the goal
  • In Arrow Algo, Decay connects to any signal output on the canvas with no code required

Disclaimer: This content is for educational purposes only and does not constitute financial advice. Trading involves significant risk and you should only trade with capital you can afford to lose. Past performance is not indicative of future results. Always conduct your own research before making any trading decisions.

Ready to build your own automated trading strategies without writing a single line of code? Start for free at Arrow Algo and join thousands of traders who’ve made the switch to systematic trading.

About the Author

Author Bio