Pivot Points Six Types with Level Alerts MT4
- Indicators
-
Kazuma Uezono
MQL5 / MQL4 / Pine Script v6 developer and active trader.
Seller on the MQL5 Market (indicators for MT4/MT5).
Services:
- TradingView Pine Script to MT5/MT4 conversion (bar-by-bar matching, with tester report)
- MT4 to MT5 migration - Version: 1.1
Pivot Points Six Types with Level Alerts MT4 brings TV-compatible pivot points to MetaTrader 4. If you also chart on TradingView, you know its built-in "Pivot Points Standard". This MT4 indicator reproduces it: the same six calculation methods, the same period choices from one day to ten years, and the same look - an orange (#FB8C00) line for each level, starting at the beginning of each period, labelled like "S2 (1.08345)".
WHICH LEVELS EACH METHOD GIVES
Method | Levels drawn | Note
Traditional | P, R1-R5, S1-S5 |
Fibonacci | P, R1-R3, S1-S3 | 0.382 / 0.618 / 1.000 of the previous range
Woodie | P, R1-R4, S1-S4 | includes the open of the current period
Classic | P, R1-R4, S1-S4 |
DM (DeMark) | P, R1, S1 | uses the previous open and close
Camarilla | P, R1-R5, S1-S5 | R5 = high / low x close
All methods use the previous period's prices. The level values of a period are fixed once the period has started; old periods are never recalculated.
CHOOSING THE PERIOD
- Auto: M1, M5 and M15 charts get daily pivots, M30 to H4 get weekly pivots, D1 gets monthly pivots, W1 and MN1 get yearly pivots.
- Fixed choices: Daily, Weekly, Monthly, Quarterly, Yearly, 2, 3, 5 or 10 years. The multi-year blocks begin in the same calendar years as on TradingView.
- Number of Pivots Back = 15 (1 to 200).
- Use Daily-based Values = true takes the prices from D1 bars, so an M5 chart and an H1 chart show the same levels. Set it to false to use the chart's own bars.
- You can attach it more than once, e.g. daily pivots in orange and monthly pivots in blue on the same chart.
MT4 SETUP NOTES - PLEASE READ
1. Colors come from the inputs. The lines and labels are chart objects, so their colors and width are set in the Inputs tab (P color, R1 color ... Line Width). The Colors tab is not used.
2. History. Daily-based values need D1 history. For the 5 and 10-year periods, open a D1 chart of the symbol once and scroll back, or raise "Max bars in history" in Tools > Options > Charts. If the history is too short, the chart shows a short "not enough data" message in the lower-left corner.
3. Inputs have no group headings in MT4; they are listed in the order shown at the bottom of this page.
4. Messages on the chart are kept short because MT4 cuts long object texts.
ALERTS
Off by default. When "Alert: close crosses a shown level" is true:
- a finished bar whose close moved from at or below a shown level to above it (or from at or above to below it) raises one alert;
- each bar is checked once, after it has closed; the forming bar is never used;
- bars that closed before the indicator was loaded are skipped, so a restart does not repeat old alerts;
- the text includes symbol, timeframe, pivot method and period, level name and price, e.g. "Pivot TV USDJPY M1 (DM 1D): close crossed above P 157.930", so alerts from several copies can be told apart;
- pop-up, sound and push (MetaQuotes ID required) can be combined; alert texts follow the Language input.
An alert tells you that the close crossed a line, nothing more. It is not a trade recommendation, and price does not necessarily react at pivot levels.
HOW CLOSE IT IS TO TRADINGVIEW
We checked the formulas of all six methods against TradingView's own indicator using identical prices: no difference. The 2/3/5/10-year period starts also matched. What will differ is the input data: your broker's feed and TradingView's feed have slightly different highs, lows and closes. In one weekly EURUSD check the pivot was 1.11801 on our test terminal and 1.11816 on TradingView (1.5 pips) for exactly this reason.
KNOWN DIFFERENCES AND LIMITS
- Days, weeks and months are cut by your MT4 server's clock, not by your local time.
- On 24-hour symbols (crypto and similar), TradingView cuts days and weeks at 00:00 UTC, so with a server in another time zone the daily and weekly periods start a few hours earlier or later, and their levels can differ.
- A short Sunday session without Saturday bars is added to Monday by default (Sunday bars = Auto); you can choose "merge" or "separate" instead.
- Up to 200 periods are drawn.
- A pivot period shorter than the chart timeframe (daily pivots on W1, for example) is not drawn; a message asks you to pick a longer one.
- With alerts on, a W1 or MN1 chart opened over the weekend may give one alert for the last bar on Monday.
- No alerts and no objects in the Strategy Tester.
- No DLLs, no files, no internet access.
- This is an analysis tool. It does not place trades, and no trading result is promised.
iCUSTOM BUFFERS
11 buffers, not drawn: 0 P, 1 R1, 2 S1, 3 R2, 4 S2, 5 R3, 6 S3, 7 R4, 8 S4, 9 R5, 10 S5. EMPTY_VALUE where a method has no such level. Same order as the MT5 edition.
When an EA calls it through iCustom, the pivot lines may also appear on the EA's chart for a while; they are removed some time after the EA stops using it.
INPUTS (MT4 ORDER)
Type = Traditional; Pivots Timeframe = Auto; Number of Pivots Back = 15; Use Daily-based Values = true; Sunday bars = Auto; Show Labels = true; Show Prices = true; Labels Position = Left; Label font size = 8 (6-20); Line Width = 1 (1-10); Show P / P color ... Show S5 / S5 color (all on, #FB8C00); Alert: close crosses a shown level = false; Alert by pop-up = true; Alert by sound = false; Alert by push notification = false; Language = Auto (terminal language), English or Japanese.
Out-of-range values stop the indicator from loading, with the reason in the Experts log.
SUPPORT
Help with installation, settings and bug reports via MQL5 messages. I do not answer questions about market direction or specific trades.
An MT5 edition of this indicator is also available (a separate product). Other tools by the same author are listed on my seller profile.
TradingView is a trademark of TradingView, Inc. This product is not affiliated with, sponsored by or endorsed by TradingView, Inc.
