Documentation/AlgoCode/Function reference
previous-day-high
Prior completed calendar day's high (also low / open / close).
previous day high
Returns the OHLC of the last fully completed calendar day, week, or month in the script timezone. Weeks start on Monday. A day is midnight to the next midnight in that zone, not a rolling 24 hours. Chart Run uses Asia/Kolkata when the script sets no zone. Variants: previous day/week/month open|high|low|close. Developing levels: today high, week high, month high. on 1D, on 1W, and on 1M use this same calendar and still return the last closed bar.
Return value
Series (na until a previous period exists)
Note
- The same script timezone used by sessions, opening range, on 1D / on 1W / on 1M, and max daily loss.
- today high updates as the day develops using only bars up to the current bar.
Example
pdh = previous day high when close crosses above pdh buy