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

|

Apple Stock Surges on iPhone Duo Launch, AI Upgrades

Apple (AAPL) stock unveiled its first foldable iPhone, the iPhone Duo, at its “Surprise and Shine” event on September 9 under new CEO John Ternus, pricing the device at $1,999 — below the $2,099+ Wall Street had expected. Shares initially wiped out a midday loss to trade near $316 at announcement, and as of this […]
|

Adobe Stock Falls Despite Q3 Beat, Weak Q4 Guidance

Adobe (ADBE) stock reported Q3 FY2026 results after the close on September 10th, posting record revenue of $6.76 billion (up 13% YoY) and non-GAAP EPS of $6.13 versus the $6.09 estimate, while also raising its full-year revenue and EPS guidance. Despite those beats, shares fell on Friday to roughly $248, down from $266 just a […]
|

Oracle Stock Surges 8% on Q1 Beat, Guidance Raise

Oracle Corporation (ORCL) stock shares are trading roughly 8% higher Friday morning after the company reported a blowout Q1 FY2027 results late Thursday, posting adjusted EPS of $1.92 versus the $1.74 consensus estimate and revenue of $19.3 billion against an $19.1 billion estimate. The company simultaneously raised its full-year FY27 adjusted EPS guidance to $8.10 […]
|

Qualcomm Stock Surges on $60B Amazon AI Chip Deal

Qualcomm (QCOM) stock shares jumped sharply on September 8, rising toward the $180 level after the company announced a landmark multi-generation AI chip collaboration with Amazon Web Services, with one analyst labeling it a “net-net huge QCOM win.” The deal includes Qualcomm issuing Amazon warrants for up to 25 million shares at $161.26 per share, […]