May 102011
 

You know Pivot Points?
If not checkout babypips.com -> School -> Pivot Points.

I’ve written this Pivot Points Indicator to use PP’s in MetaTrader4 Charts or in Expert Advisors.

Parameters

iMode – Choose the calculation mode. Default: 0

0 => Standard

The calculation for a pivot point is shown below:
Pivot point (PP) = (High + Low + Close) / 3
Support and resistance levels are then calculated off the pivot point like so:
First level support and resistance:
First resistance (R1) = (2 x PP) - Low
First support (S1) = (2 x PP) - High
Second level of support and resistance:
Second resistance (R2) = PP + (High - Low)
Second support (S2) = PP - (High - Low)
Third level of support and resistance:
Third resistance (R3) = High + 2(PP - Low)
Third support (S3) = Low - 2(High - PP)

1 => Woodie

R2 = PP + H - L
R1 = (2 X PP) - Low
PP = (H + L + 2C) / 4
S1 = (2 X PP) - High
S2 = PP - High + Low

2 => Camarilla

R4 = C + ((H-L) x 1.5000)
R3 = C + ((H-L) x 1.2500)
R2 = C + ((H-L) x 1.1666)
R1 = C + ((H-L) x 1.0833)
PP = (H + L + C) / 3
S1 = C - ((H-L) x 1.0833)
S2 = C - ((H-L) x 1.1666)
S3 = C - ((H-L) x 1.2500)
S4 = C - ((H-L) x 1.5000)

3 => Fibonacci

R3 = PP + ((H - L) x 1.000)
R2 = PP + ((H - L) x .618)
R1 = PP + ((H - L) x .382)
PP = (H + L + C) / 3
S1 = PP - ((H - L) x .382)
S2 = PP - ((H - L) x .618)
S3 = PP - ((H - L) x 1.000)

iBasePeriod – Choose the Base Period (TimeFrame). Default: 1440 (H1)

With this parameter you can apply the H1 Pivot Points for example to a M5 chart.
You are selecting the Base Period for the Pivot Points. If you like to see the Weekly Pivot Points enter 10080.
More about TimeFrames you can find at MQL4 Reference -> Standard constants -> Timeframes.

iShift – Choose the indicator shifting. Default: 1

Normally PP where calculated with the prices of the day before. Changing iShift to 2 will
use current day-2 for calculation.

Example

Scratchs Pivot Points - Daily Pivot Points in a H1 chart

Scratchs Pivot Points - Daily Pivot Points in a H1 chart

Download
Scratchs_PivotPoints.mq4 (Creative Commons License This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Germany License.)

  One Response to “MetaTrader4 – Custom Indicator – Pivot Points”

  1. [...] at the FXCM – Trading Championship June 2011 on myfxbook. I traded manually and used my pivot point indicator, released some posts before. There were some really good entrys and I ended up at rank #78 what I [...]

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>