LowD (Function)
The LowDseries function allows you to reference the daily Low of a previous day in an intraday chart (minute
Syntax
LowD(PeriodsAgo)
Returns (Double)
The daily Low price from num days ago. If there is not enough data, the function will return –1.
Parameters
Name |
Type |
Description |
PeriodsAgo |
Numeric |
The number of days/periods back to reference a previous day’s low price. (0 = Today’s current Low) |
Remarks
You must have enough intraday data in the chart in order to look back and reference any previous daily low. For example, if you want to look back at the low of 25 days ago on a 5-minute chart, you must have at least 26 full days of 5-minute 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 today’s current Low.
This function considers the transition between one day and the next to occur at midnight, when the date changes. If you're using a symbol that trades overnight and would prefer to use the end of a session to transition to a new "day," consider using the LowSession function.
If you're calling this function in a study that will be applied to RadarScreen, be sure to set the "Load additional bars" setting. This setting should be set so as to ensure that it exceeds the number of intra-day bars in the PeriodsAgo. For example, if your code looks back 5 days (that is, PeriodsAgo is set to 5), then at least 6 days of intra-day bars should be loaded using the "Load additional bars" setting. On hourly bars for a symbol that trades 24 hours a day, this would be approximately 144 bars (6 x 24). For more detail on the "Load additional bars" setting, see Customize Study Properties.
Example
In order to place a buy limit order at the Low of the previous day you would write:
Buy Next Bar at LowD(1) Limit;