Previous Day and Week Levels with Round Numbers
Info
The Previous Day and Week Levels with Round Numbers is a Indicator for MetaTrader 5 that previous day and week levels with round numbers the indicator displays reference levels as horizontal lines on the chart. It uses the high and low of the previous daily and weekly bars, along with a series of round-number levels above and below the current price.
Usage
This tool is typically used for enhancing chart analysis and decision making.
Platform
This Indicator works exclusively on MetaTrader 5 (both build 600+ and newer versions).
Setup
Place the downloaded file in MQL5/Indicators folder via File ? Open Data Folder in MetaTrader 5.
How to Install and Use Previous Day and Week Levels with Round Numbers
1. Installation: Place your file in the MQL/Indicators folder via "Open Data Folder" and restart your terminal.
2. Loading: Find the indicator in the Navigator, drag it onto your chart, and configure the input parameters in the popup window.
3. Customization: Press Ctrl+I to open the indicator list, select your tool, and click "Properties" to change colors, levels, or visual styles.
4. Updating: Replace the old file in the Indicators folder with the new version and restart the platform to apply changes.
Frequently Asked Questions
Q: Why is my indicator not showing? A: Verify the file is in the MQL/Indicators folder, or try right-clicking the "Indicators" tree in the Navigator and clicking "Refresh."
Q: Do custom indicators slow down the platform? A: Too many complex indicators can impact performance; remove unused ones via the "Indicator List" (Ctrl+I).
Q: Can I use MT4 indicators on MT5? A: No, MQL4 and MQL5 are distinct languages; ensure the indicator is compiled specifically for your platform version.
What this tool does
Previous Day and Week Levels with Round Numbers The indicator displays reference levels as horizontal lines on the chart.
Typical Use Case
This Indicator excels in automated trading and technical analysis on MetaTrader 5.
Compatible Platform & Setup
This Indicator works on MetaTrader 5. Place the file in the MQL5/Indicators folder and restart the terminal.
Description & Settings
Related: Previous Day High/Low with First Touch Marker for MT4/MT5 - another powerful indicator for MetaTrader 5 traders.
Previous Day and Week Levels with Round NumbersAlso recommended: Previous Day High, Low, and Close Levels Indicator - similar indicator with strong performance on MetaTrader 5.
The indicator displays reference levels as horizontal lines on the chart. It uses the high and low of the previous daily and weekly bars, along with a series of round-number levels above and below the current price. Daily levels are shown as solid lines, weekly levels as dashed lines, and round numbers as dotted lines.
The spacing for round numbers can be set in price units via the InpRoundStep parameter. If set to 0, the spacing is automatically determined by the number of digits in the symbol: 0.0050 for 5-digit quotes, 0.50 for 3- and 4-digit quotes, and 10.0 for quotes with fewer digits. The grid is anchored to the round level at or just below the current price, with InpRoundCount additional lines drawn on each side.
These lines are updated once per new bar, ensuring minimal load on the terminal. Each line includes a tooltip showing its name and price. Daily and weekly values are sourced from the D1 and W1 history of the chart symbol; levels are skipped if their historical data is not yet available. All objects are removed when the indicator is deleted from the chart.
Input Parameters
InpShowPrevDay
- Displays the high and low of the previous day (default true).
InpDayColor
- Sets the color for the previous-day lines (default DodgerBlue).
InpShowPrevWeek
- Displays the high and low of the previous week (default true).
InpWeekColor
- Sets the color for the previous-week lines (default MediumPurple).
InpShowRound
- Displays the round-number levels (default true).
InpRoundStep
- Sets the spacing of round-number levels in price units; 0 enables automatic selection (default 0).
InpRoundCount
- Determines the number of round-number lines on each side of the current price (default 5).
InpRoundColor
- Sets the color for the round-number lines (default DimGray).
InpLineWidth
- Sets the width for all lines (default 1).
This indicator exclusively draws objects and does not utilize buffers. It does not place or manage trades.
Example visualization: Previous day and week levels with round numbers on EURUSD H1.
You may also like: Previous Day and Week High/Low Levels - excellent alternative for indicator users on MetaTrader 5.
Source Code
#property copyright "RobotFX"
#property link "https://robotfx.org"
#property version "1.10"
#property description "This code is educational. Feel free to use, modify and upgrade as you wish. Visit ROBOTFX.ORG for professional trading tools"
#property indicator_chart_window
#property indicator_plots 0
#property indicator_buffers 0
input bool InpShowPrevDay = true;
input color InpDayColor = clrDodgerBlue;
input bool InpShowPrevWeek = true;
.......
⚠ Limitations & Risk Warning
- This tool is provided for educational and testing purposes only.
- Past performance does not guarantee future results.
- Trading involves substantial risk of loss. Use on a demo account first.
- Results may vary depending on market conditions, broker, and settings.
- We recommend thorough backtesting and forward testing before using with real funds.