Skip to content

Free MT5 indicator

Previous Period Levels

Draws the previous day, week and month high, low and close on MT5 as labelled lines, with optional alerts on closed-bar crosses.

Levelsv1.0MetaTrader 5 (MQL5) Compiles with 0 errors Non-repainting signals Alerts

What it does

The previous day's high and low are some of the most watched levels in trading. Many traders also track the previous week and month. This indicator draws those highs, lows and (optionally) closes as horizontal lines that start at the open of the current period and extend to the right, each with a short label such as "PDH 1.08520". It removes everything it draws when you take it off the chart.

How it works

  • For each enabled period (day, week, month) the indicator reads the high, low and close of the most recent completed bar of that timeframe from the broker's D1, W1 and MN1 history.
  • It draws a line from the start of the current period at each price, with the label to the right of the latest bar.
  • Labels use the prefixes PD (previous day), PW (previous week) and PM (previous month), followed by H, L or C.
  • Lines are refreshed once per new chart bar, so they roll over automatically when a new day, week or month begins.
  • Alerts check the last closed bar: if its close moved above a previous high or below a previous low that the prior bar had not crossed, one alert is sent for that bar.

All periods follow the broker's server time.

How to use it

Previous highs and lows mark where buyers and sellers last stopped the market, so they are natural candidates for support and resistance. Typical approaches include:

  • Breakout: a close above the previous day high can show the market accepting higher prices.
  • Rejection: a quick move through the level followed by a close back inside the range can suggest a failed breakout or a liquidity sweep.
  • Targets: an open trade heading toward the previous week high or low has an obvious reference for a take-profit.

The previous close is useful as a gauge of whether the current session is trading above or below where the last one settled. The tool is built for intraday charts from M1 to H4.

Settings

InputDefaultWhat it changes
Show previous day / week / monthtrue / true / falseWhich periods are drawn
Include the previous closetrueAdds the dotted close line for each period
Day / week / month colourblue / orange / orchidColour per period
Line width1Thickness of the lines
Label font size8Size of the text labels
Popup alert / Push notificationfalseAlerts once per bar on a cross of a previous high or low

Limitations

  • Only the current set of levels is drawn; older periods are not shown in history.
  • Server time defines the day, so levels differ between brokers, and short Sunday sessions can create a small "previous day".
  • Levels are refreshed on new bars; if daily data is still loading when attached, they appear on the next tick.
  • Previous levels are reference points, not predictions; strong trends often pass straight through them.

Key inputs

Key inputs of Previous Period Levels
InputDefaultDescription
Show previous day levelstrueDraws PDH, PDL and PDC.
Show previous week levelstrueDraws PWH, PWL and PWC.
Show previous month levelsfalseDraws PMH, PML and PMC.
Include the previous closetrueAdds a dotted line at the previous period's close.
Line width1Thickness of the level lines.
Popup alert when a closed bar crosses a high/lowfalseShows an MT5 alert once per bar when a close crosses a previous high or low.

Educational tools, not advice. Indicators and Expert Advisors describe price; they do not predict it, and past behaviour does not guarantee future results. Test everything on a demo account first and never risk money you cannot afford to lose. See our disclaimer.

Keep exploring

Related mt5 indicators