TrendSpider User Guide: How to Use Offsets in Your Alerts or Backtests | TrendSpider Blog Skip to Main Content

TrendSpider User Guide: How to Use Offsets in Your Alerts or Backtests

|
Share on social media

TrendSpider now supports offsets in alert and backtest templates. This post will explain how offsets work and when you should use them.

What are offsets?

Offsets allow you to compare events that occurred in the past or in a sequence. This is useful with lagging indicators such as the Ichimoku Cloud’s Chikou Span line which is set back by 26 candles. Without an offset option, you would not be able to create an accurate signal from this indicator because you would be comparing a past value against a present value.

Offsets also allow you to compare events that occurred in sequence and compare conditions that may have been met at different times, together in one alert.

How to Use Offsets With Lagging Indicators

Here’s a picture featuring 2 indicators: SMA(20) [red] and SMA(20, offset = -10) [blue]. The latter has negative offset, thus we’re calling it “lagging”. You can see the circles marking respective offsets.

Using offsets with lagging indicators in TrendSpider.

From this picture above, you can see that in case you seek for a “red SMA is greater than blue SMA” kind of condition, then you need to code it like “red SMA (10 candles ago) > blue SMA”.

Using the Ichimoku Cloud example, to create an alert when the Chikou Span line crosses up through the Tenkan Sen line, you would create the condition as normal.

Creating an alert for a lagging or offset indicator.

A warning will appear to inform you that one of the conditions you are using is a lagging or offset indicator.

In order to make your comparison accurate here, you would need to then offset the comparison indicator by the same value. You can see in the above example, we have entered 26 in the ‘candles ago’ field for the Tenkan-Sen line.

Using Offsets to Detect Series of Events

Offsets can also be used to identify events that occur in a sequence. In the following example, we are looking for 3 red candles in a row, with each candle having closed lower than the one before it. By using offsets, we are able to create a simple set of conditions that will detect this pattern for any backtest or alert. You can see that the offsets are escalated to set back each set of candle parameters in order to create a sequence condition that will fire only when three candles, in a row, are red, and close below the close of the previous one.

Stay up-to-date: Subscribe to posts like this!

Receive automated updates from the TrendSpider User Guide category
This site is protected by reCAPTCHA and the Google Privacy Policy and Google Terms of Service apply. Don't worry, we hate spam, too! See TrendSpider Privacy Policy for details.

Latest posts

|

Western Digital Stock Crushes Q1 FY27 Estimates With Record EPS as AI Demand Surges

Western Digital Corporation (WDC) stock reported Q1 FY2027 results after the close on October 22, 2026, delivering a sweeping beat on both earnings and revenue as AI-driven storage demand accelerated. Adjusted EPS came in at $4.64, a 14.3% beat versus the $4.06 consensus, on revenue of $4.4B that topped estimates by 5.7%. The company also […]
|

Bloom Energy Stock Drops Post-Earnings as “Sell the News” Overshadows Q3 Beat

Bloom Energy Cooperation (BE) stock delivered a landmark Q3 2026 earnings report after the bell on Thursday, posting adj. EPS of $0.94 (vs. $0.68 est., a 38% beat) and revenue of $1.24B (vs. $1.05B est.), representing 138% year-over-year growth. The company also raised its full-year revenue guidance for the third time this year, lifting the […]
|

Tesla Stock Drops Post-Earnings as SpaceX Merger Speculation Takes Center Stage

Tesla (TSLA) stock reported Q3 2026 results after the close today, posting adjusted EPS of $0.48 versus the $0.43 consensus estimate and revenue of $28.05B against a $27.88B forecast. Despite the double beat, shares sold off in the after-hours session as investors digested mixed margin signals, muted FSD monetization detail, and noise from the bombshell […]
|

Meta Stock Surges on Blowout Q3 Earnings Beat, 2-for-1 Split & Class C Stock

Meta Platforms (META) stock delivered a blockbuster Q3 2026 report, posting revenue of $64.6B and EPS of $7.40 — crushing estimates by nearly 29% on the bottom line. Shares jumped after hours before reversing sharply as investors digested a massive capital expenditure outlook and a record negative free cash flow print. The company also announced […]