Nicolas

Fibonacci pivot points

Category: Indicators By: Nicolas Created: March 9, 2016, 4:28 PM
March 9, 2016, 4:28 PM
Indicators
23 Comments
Fibonacci pivot points

The Fibonacci pivot points indicator is made of 38.2% and 61.8% extension of the main pivot line, for the support (S1,S2) and resistance (R1, R2) ones. This indicator show only the pivot points on the current day from the previous OHLC day values.

Coded by member request on forum.

if Today[0] = Date[0] then
  dh = DHigh(1)
  dl = DLow(1)

  P = (dh + dl + DClose(1))/3
  S1 = P - .382 * (dh-dl)
  S2 = P - .618 * (dh-dl)
  S3 = P -  1 * (dh-dl)
  R1 = P +  .382 * (dh-dl)
  RR2 = P +  .618 * (dh-dl)
  R3 = P + 1 * (dh-dl)
endif

RETURN P as "pivot", S1 as "S1", S2 as "S2", S3 as "S3", R1 as "R1", RR2 as "R2", R3 as "R3"

 

Download
Filename: Pivot-points-Fibonacci-Nicolas.itf
Downloads: 435
Nicolas
Nicolas Legend
I created ProRealCode because I believe in the power of shared knowledge. I spend my time coding new tools and helping members solve complex problems. If you are stuck on a code or need a fresh perspective on a strategy, I am always willing to help. Welcome to the community!
Author’s Profile

Comments

Frankiesc
7 years ago
#

Thanks

Eloi
8 years ago
#

MERCI

Eloi
8 years ago
#

Bonjour Nicolas, Pourquoi mon graph se mets en tout petit lorsque j'applique l'indicateur ?

Nicolas
8 years ago
#

Dans l'onglet prix, choisir d'appliquer l'échelle qu'au prix uniquement.

Ciccio
9 years ago
#

I didn't see it, and that's what I needed Thanks a lot man

Ciccio
9 years ago
#

DRAWTEXT("P",X,Y,Dialog,Bold,20) coloured(0,0,0,255) what has to be X= ? and Y=?

Nicolas
9 years ago
#

There are plenty of examples on the website... Anyway, let me take your hand and put you right in front of an example .. https://www.prorealcode.com/prorealtime-indicators/fibonacci-pivots-points-4-hours-daily-weekly-monthly/

Ciccio
9 years ago
#

Can you give me a helping hand just to write the first one on the Pivot line? I cannot devise how to determine (and write into the parenthesis) what is the X position and the Y position...

Ciccio
9 years ago
#

Sorry for another question What's the way to add a description on each horizontal line (at the beginning or at the end)? I mean P, S1, S2, R1, R2

Nicolas
9 years ago
#

Use DRAWTEXT.

Ciccio
9 years ago
#

Is it possible to avoid to have that (bad) vertical line at the beginning?

Ciccio
9 years ago
#

OK Thanks

Nicolas
9 years ago
#

at the beginning of the code, add: p = undefined S1 = undefined etc. and repeat this kind of statement of each of the variables in the RETURN instruction.

robdav
9 years ago
#

Perfect, thank you.

robdav
9 years ago
#

Hi Nicolas, I love these pivot points but most of the time I add it to chart, it messes up the scale and it's very hard to get it back to normal without removing it again. I can't see what is wrong with the code but was hoping you might be able to re-test it and see if you can re-produce the issue? Many thanks Rob

Nicolas
9 years ago
#

This is not an issue, use "vertical autoscaling" to use price only (in price settings).

supertiti
10 years ago
#

J'ai ce code de Gilles Santacruz de Boursikoter.com qui fonctionne en daily par exemple, j'utilise aussi celui de tradingview en journalier(une boite noire).
Initialement je voulais juste faire ressortir la ou les dernieres valeurs du point pivot Fibo pour ne pas charger le graphe des prix

A la question de remonter des images ici ce n'est pas possible ?

Voici le code Gilles :
Codage prorealtime de ikiu91 » Mer 29 Sep 2010 23:41


//////////////////////////////////////////////////////////////////////////////////////////
Pivot=(Close[1]+High[1]+Low[1])/3
FR3 = Pivot + 1.000 * (High[1]-Low[1])
FR2 = Pivot + 0.618 * (High[1]-Low[1])
FR1 = Pivot + 0.382 * (High[1]-Low[1])
FS1 = Pivot - 0.382 * (High[1]-Low[1])
FS2 = Pivot - 0.618 * (High[1]-Low[1])
FS3 = Pivot - 1.000 * (High[1]-Low[1])

return Pivot as "pivot", FR3 as "Resistance 1",FR2 as "Resistance 2",FR1 as "Resistance 3",FS1 as "Support 1",FS2 as "Support 2",FS3 as "Support 3"

///////////////////////////////////////////////////////////////////////////

 

supertiti
10 years ago
#

une ligne de code m'aiderait bien car là je n'arrive à rien de concret !  pour moi dh et dl sont les valeurs en clôture,

Nicolas
10 years ago
#

C'est déjà le cas, ce sont les valeurs en clôture de la journée qui précède. Dans le cas présent, dh=le plus haut et dl=le plus bas. C'est en effet un indicateur qui fonctionne en intraday, si tu veux voir quelque-chose dans un timeframe supérieur à partir du daily, tu ne verras rien, puisque ces valeurs changent chaque jour et donc à chaque bougie journalière.

supertiti
10 years ago
#

Bonjour Nicolas

Comment fait on pour ajouter une image dans cette rubrique pour illustrer mon propos?

Le code ci dessus me donne une belle ligne droite horizontale avec un décrochement vers le haut sur le dernier jour.

nota : je n'utilise pas l'intraday

Nicolas
10 years ago
#

Il te suffit de remplacer les valeurs de dh et de dl avec les prix que tu souhaites utiliser pour calculer les retracements de Fibonacci.

supertiti
10 years ago
#

Bonjour à tous,

Ne peut-on avoir un code des points pivots de Fibonacci qui fonctionne en "end of day" ?

merci

Nicolas
10 years ago
#

Bonjour supertiti, j'ai peur de ne pas comprendre ce que tu souhaites ?

ProRealCode ProRealCode
Loading...