PriorLevels
forge.taclassSince Forge API 1
Signaturepython
forge.ta.PriorLevels(**inputs: Any) -> NoneThe previous day, week or month open, high, low and close (PDH, PDL), carried forward.
Inputs
| Name | Type | Default |
|---|---|---|
| period | choice | D |
| day_boundary | text | 17:00 America/New_York |
Indicator: Prior period levels
A trading day starts at day_boundary. With period D each trading day is one period; with W a week starts on the first trading day of its ISO week (Monday); with M a month starts on its first trading day.
prev_open, prev_high, prev_low and prev_close are the first open, the highest high, the lowest low and the last close of the previous period.
A value appears on the first bar of a period and stays for the whole period, so it is known before that bar closes. A period already under way at the first bar of the data is not used. A period holding a missing bar has no levels.