Overview
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.
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
- In MetaTrader choose File > Open Data Folder.
- MT4: copy
FXN_PreviousDayLevels.mq4intoMQL4/Indicators. MT5: copyFXN_PreviousDayLevels.mq5intoMQL5/Indicators. - 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.
- 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.
At a glance
- What it is
- A free Indicator for MetaTrader 5, written in MQL5.
- 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
- 10 inputs
- Lab check
- Compiled with MetaEditor build 6333 for MT5 on 1 Dec 2026: 0 errors, 0 warnings.
- Price
- Free to download
Settings read from the code
| Input | Type | Default | Note |
|---|---|---|---|
| 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 |
| 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 |
How to use it
- Download the compiled file (or the source and compile it in MetaEditor).
- Put it in MetaTrader: File → Open Data Folder → MQL5 → Indicators, then refresh the Navigator.
- Test it on a demo account before any real money.
- Want changes? Open a copy in your Lab and ask for them in plain words.