Skip to content

CHANGESINCESIGNAL() Function

By Optuma Team · Updated 2018-10-10

The CHANGESINCESIGNAL() function displays the change in price (percentage by default, but can be changed to price) since a triggered signal (which needs to be a true/false Boolean script).

For example, this script will calculate the price change since the last break of the 22 day lowest low, as defined by Signal1:

Signal1 = LOW() < LOWESTLOW(BARS=22);
CHANGESINCESIGNAL(Signal1)

MRK having changed 32.1% since the 22 day low (red dashed line) was lower on April 3rd:

Capture

Another example, uses the percentage change and will display a result when that value increases by more than 2% (between two bars)

Signal1 = LOW() < LOWESTLOW();
PercentChange1 = CHANGESINCESIGNAL(Signal1);
// find out when the change increases by 2% than the previous percentage change
PercentChange1 - PercentChange1[1] >= 2

On the chart it would looks like this (green highlighted section):

CSS2

Choose which categories of cookies you allow. Strictly-necessary cookies are always on. You can change this any time via the "Cookie Settings" link in the footer.

  • Functional

    Remember preferences like dismissed banners and your dark-mode choice.

  • Analytics

    Help us understand how the site is used so we can improve it.

  • Marketing

    Measure our advertising and help us reach people who may be interested in Optuma.