Pivot Point Calculators
Every pivot method reduces to the same shape: a central pivot with three resistances above it and three supports below. Where they disagree is how wide that ladder should be, and that disagreement is not cosmetic - it comes from what each method was built to trade. Classic is the floor-trader original that the other four are variations of. Fibonacci keeps the same pivot but spaces the ladder with Fibonacci ratios of the prior range instead of whole multiples. Camarilla was built specifically for intraday mean reversion: its R3/S3 sit close to the pivot on the theory that price reverts inside them most sessions, which makes it the wrong choice if you are using it to time breakouts. Woodie weights the close twice, so it reacts faster to recent price action on choppy days. Demark is the odd one out - it has no fixed formula at all. It picks one of three depending on whether the period closed above, below, or level with its open, and only ONE side (resistance or support) is ever meaningful for a given bar. This header mirrors the pivot into the unused side rather than leaving it at zero, so a caller who forgets to check which side is live does not get a false level to trade against. All five functions take the PRIOR period's high, low and close (Demark also needs the open). Feeding in the currently forming bar produces a pivot that moves under your feet as the bar develops - a helper, PriorDailyOHLC, is included to fetch shift-1 D1 data correctly and returns false rather than a wrong number when the terminal has not downloaded that history yet. The header is self-contained. No dependencies, no DLLs, no classes - plain functions and a single shared PivotLevels struct. Notes and limitations - These are static support/resistance projections from the prior bar, not a trading signal. Price crossing a level is not by itself an entry or exit rule - that judgement belongs to the caller. - Always pass a CLOSED bar (shift 1 or later). Passing shift 0 recalculates the pivot every tick as the running bar's high/low/close change, which looks like a bug in whatever is built on top of it. - PriorDailyOHLC returns false rather than zeros when D1 history is short. Check the return value - do not assume the OHLC arguments were filled. - Demark's unused side is mirrored to the pivot value, not zero, specifically so a caller who forgets to check which side is live plots a flat line instead of a misleading level at price 0. - No thread or state concerns: every function is pure and touches only the OHLC values passed in (PriorDailyOHLC is the only one that reads the chart, and only for history, never for trading).
Script · MT5 · v1.0 · Free
About Pivot Point Calculators
Pivot Point Calculators is a script for MetaTrader 5. It has 5 settings, such as Use manual ohlc, Manual open and Manual high. MQL source code included.
Files in the download: PivotPoints.mq5.mqh, PivotPoints.txt, PivotPointsDemo.ex5, PivotPointsDemo.mq5.
Settings
| Setting | Default | What it does |
|---|---|---|
| Use manual ohlc | false | Ignore the chart and use the values below instead |
| Manual open | 1.1000 | Manual open, used only when InpUseManualOHLC = true |
| Manual high | 1.1050 | Manual high |
| Manual low | 1.0950 | Manual low |
| Manual close | 1.1020 | Manual close |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Scripts.
- Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
- Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the script onto a chart to run it once.
Tags: Fibonacci · Pivot Points · MT5 Script · MQL5 Source Code