# Previous Day High Low Indicator (PDH PDL) for MT4

> Draws the previous day high, low and close and the previous week high and low as labelled lines that refresh automatically at each new day.

## At a glance

- What it is: A free Indicator for MetaTrader 4, written in MQL4.
- What it does: Draws the previous day high, low and close and the previous week high and low as labelled lines that refresh automatically at each new day.
- Shared by: Alex
- Licence: MIT
- Version: 1.0 (1 Dec 2026)
- Settings: 12 inputs
- Lab check: Compiled with MetaEditor build 2425 for MT4 on 1 Dec 2026: 0 errors, 0 warnings.
- Price: Free to download
- Page: https://hub.fxnook.com/previous-day-high-low-indicator-pdh-pdl-for-mt4
- Download (compiled): https://hub.fxnook.com/download/2b4637ef-31c7-4307-b8a4-1a2276ae5060/compiled
- Download (source): https://hub.fxnook.com/download/2b4637ef-31c7-4307-b8a4-1a2276ae5060/source

## About

Previous Day Levels draws the most watched reference levels of intraday trading: yesterday's high (PDH), low (PDL) and close (PDC), plus last week's high (PWH) and low (PWL). Each level is a labelled line with its price, and all of them refresh by themselves when a new day starts, so there is nothing to redraw by hand each morning.

## How it works

- **PDH, PDL, PDC** are the high, low and close of the previous daily bar on your broker's server time.
- **PWH, PWL** are the high and low of the previous weekly bar.
- Daily lines run from the start to the end of the current day; weekly lines from the start to the end of the current week. With Extend right on, every line continues to the right edge of the chart instead.
- The levels are drawn once and only redrawn when a new day starts, so the indicator uses almost no processing time. If daily or weekly history is still loading, it retries on the next few ticks.

## Inputs

| Input | Default | What it does |
|---|---|---|
| Show day high/low | true | Draws PDH and PDL. |
| Show day close | true | Draws PDC. |
| Show week high/low | true | Draws PWH and PWL. |
| Extend right | false | Extends every line to the right edge of the chart. |
| Day colour | Royal blue | Colour of PDH and PDL (solid). |
| Close colour | Gray | Colour of PDC (dotted). |
| Week colour | Dark orange | Colour of PWH and PWL (dashed). |
| Line width | 1 | Width of the solid lines (1-5); dotted and dashed lines stay at 1. |
| Show labels | true | Shows the level name and price at the start of each line. |
| Label font size | 8 | Size of the label text. |

## How to use it

1. In MetaTrader choose **File > Open Data Folder**.
2. MT4: copy `FXN_PreviousDayLevels.mq4` into `MQL4/Indicators`. MT5: copy `FXN_PreviousDayLevels.mq5` into `MQL5/Indicators`.
3. Restart the terminal, or right-click **Indicators** in the Navigator and choose **Refresh**. If the indicator does not appear, open the file in MetaEditor and press F7 to compile it.
4. Drag the indicator onto a chart, adjust the inputs and press OK.

Use it on M1 to H1 charts. Common ways traders read these levels: a break and hold above PDH as a sign of strength, a failed break back inside the previous range as a possible reversal area, and PWH or PWL as larger targets during the week.

## Good to know

- Levels follow your broker's server day. If your broker opens a short Sunday bar, Monday's previous day levels come from that Sunday bar.
- The levels are fixed for the whole day; they do not repaint.
- These are reference levels, not trade signals. Price may react at them, pass straight through, or ignore them.
- On H4 and higher charts the lines are short; the indicator is meant for intraday charts.
- All objects use the prefix `FXN_PDL_` and are removed with the indicator. It does not trade.

Trading carries risk. Test on a demo account first; past results do not predict future results.

## Settings (inputs)

| Input | Type | Default | Note |
|---|---|---|---|
| InpGroup1 | string | === Levels === | ---- Levels ---- |
| InpShowDayHL | bool | true | Show previous day high and low |
| InpShowDayClose | bool | true | Show previous day close |
| InpShowWeekHL | bool | true | Show previous week high and low |
| InpExtendRight | bool | false | Extend lines to the right edge instead of ending with the period |
| InpGroup2 | string | === Display === | ---- Display ---- |
| InpDayColor | color | clrRoyalBlue | Previous day high/low colour |
| InpCloseColor | color | clrGray | Previous day close colour |
| InpWeekColor | color | clrDarkOrange | Previous week high/low colour |
| InpLineWidth | int | 1 | Line width (1-5, dotted and dashed lines use 1) |
| InpShowLabels | bool | true | Show level names and prices |
| InpFontSize | int | 8 | Label font size |

Tags: previous-day-high-low, pdh, pdl, support-resistance, weekly-levels, indicator

Shared code is the author's work, not financial advice. Test on a demo account first.
