LowY (Function)
The LowY series function allows you to reference the yearly Low of a previous year in an intraday chart (minute or tick-based) or a daily, weekly, monthly, or yearly chart. LowY is one of a family of functions that allows historical references across various data intervals.
Usage
LowY(PeriodsAgo)
Returns (Double)
The yearly Low price from num years ago. If there is not enough data, the function will return –1.
Parameters
Name |
Type |
Description |
PeriodsAgo |
NumericSimple |
The number of years back to reference a previous year’s Low price. (0 = This year’s current Low) |
Remarks
You must have enough intraday data in the chart in order to look back and reference any previous yearly low. For example, if you want to look back at the low of 5 years ago on a daily chart, you must have at least 6 full years of daily bars in the chart.
The value for the PeriodsAgo input parameter should always be a positive whole number greater than or equal to 0. Setting PeriodsAgo to 0 returns this year’s current Low.
Example
In order to place a buy limit order at the Low of the previous year you would write:
Buy Next Bar at LowY(1) Limit;