Skip to content
FXNook HubBeta

Alex / Previous Day High Low Indicator (PDH PDL) for MT5

MetaTrader 5IndicatorMITCompiled · build 6333
AlexFirst version.build 6333v1.06 hours ago1 version
README

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

InputDefaultWhat it does
Show day high/lowtrueDraws PDH and PDL.
Show day closetrueDraws PDC.
Show week high/lowtrueDraws PWH and PWL.
Extend rightfalseExtends every line to the right edge of the chart.
Day colourRoyal blueColour of PDH and PDL (solid).
Close colourGrayColour of PDC (dotted).
Week colourDark orangeColour of PWH and PWL (dashed).
Line width1Width of the solid lines (1-5); dotted and dashed lines stay at 1.
Show labelstrueShows the level name and price at the start of each line.
Label font size8Size 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.

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

InputTypeDefaultNote
InpShowDayHLbooltrueShow previous day high and low
InpShowDayClosebooltrueShow previous day close
InpShowWeekHLbooltrueShow previous week high and low
InpExtendRightboolfalseExtend lines to the right edge instead of ending with the period
InpDayColorcolorclrRoyalBluePrevious day high/low colour
InpCloseColorcolorclrGrayPrevious day close colour
InpWeekColorcolorclrDarkOrangePrevious week high/low colour
InpLineWidthint1Line width (1-5, dotted and dashed lines use 1)
InpShowLabelsbooltrueShow level names and prices
InpFontSizeint8Label font size

How to use it

  1. Download the compiled file (or the source and compile it in MetaEditor).
  2. Put it in MetaTrader: File → Open Data Folder → MQL5 → Indicators, then refresh the Navigator.
  3. Test it on a demo account before any real money.
  4. Want changes? Open a copy in your Lab and ask for them in plain words.