How it is calculated
Periods turn as for pivot points: days start at 17:00 New York (daylight saving included) or, as Day starts chooses, at 00:00 UTC; weeks with Monday's day, months with the 1st. At the first bar of a new period the running period's open, high, low and last close become the previous ones; the running open, high and low then start from that bar. The previous values are empty until the first period in the data has ended.
Reference: Prior day, week and month high, low, open and close, on the trading day pivot points use
How to read it
Yesterday's high and low are levels many traders watch: a break above the previous high or a rejection from it. With the default 17:00 New York day a forex Sunday evening already belongs to Monday, so Monday's previous day is Friday. A gap of several periods makes the last period with bars the previous one.
In a strategy
A breakout of yesterday's range: with p = ctx.ind("prior_levels", period="day") go long when the close crosses above p.prev_high and short when it crosses below p.prev_low, the stop at the other side.
Inputs
| Input | Type | Default | Range or choices |
|---|---|---|---|
Periodperiod | Choice | "day" | Day, Week, Month |
Day startssession | Choice | "ny" | 17:00 New York, 00:00 UTC |
What it draws
| Line | Drawn as |
|---|---|
| Previous high | Steps |
| Previous low | Steps |
| Previous close | Steps |
| Previous open | Steps |
| High so far | Steps |
| Low so far | Steps |
| Open | Steps |
Used in
No strategy template reads it yet.