Prior period levels
The 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 |
Outputs
| Name | Type | Required | Description |
|---|---|---|---|
| prev_open | value | Optional | color theme.neutral, dash dot, style step, width 1 |
| prev_high | value | Optional | color theme.down, style step, width 1 |
| prev_low | value | Optional | color theme.up, style step, width 1 |
| prev_close | value | Optional | color theme.neutral, dash dash, style step, width 1 |
- Warm-up
- 0 bars (0 at the defaults)
- Repaints
- No
- Parity
- None
Formula
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.