PureBytes Links
Trading Reference Links
|
Hi Tiziano,
On Thu, 21 Jun 2001 at 14:23:59, Tiziano Fogliata <fogliata@xxxx>
wrote about [amibroker] Pivot Point:
I've written my first indicator using AFL. It draws the pivot point,
the first and second level of support and resistance. Does someone see
some mistakes in this formula ?
Thank you for posting your indicator. Interestingly I was also dabbling
with the Pivot Price formula, but as a Commentary - hadn't thought of
plotting it as a graph. My knowledge of Pivot Price is limited so I
would appreciate any contribution you could make.
I notice you posted a correction to your formula for the S2 variable. I
was wondering your reasons for changing this - your original formula was
the same as mine, which I obtained from a website (that I cannot
remember offhand), but I cannot vouch for its accuracy.
If its any use to you, I post my commentary below. It's still at its
most basic, open to further improvements and some code may need
adjusting as it was obtained from general newsgroup discussions.
/* Forecasts using Pivot Price
by Peter Carr v0.2 30 May 01
*/
"PIVOT PRICE FORECASTS : "+ fullname() + " [" + name() + "] " +
date();
Avg = ( High + Low + Close ) / 3 ;
"Average Price = " + WriteVal( Avg ) ;
YLow = REF( Low, -1 ) ;
"Yesterdays Low = " + WriteVal ( YLow ) ;
Diff = Avg - YLow ;
THigh = Diff + Avg ;
"\nForecast High : " + WriteVal( THigh, 3.0 );
Diff = High - Avg ;
TLow = Avg - Diff ;
"Forecast Low : " + WriteVal( TLow, 3.0 ) ;
/* Formula for Pivot Point & Daily Support/Resistance
Pivot point = P = (H + L + C)/3
First area of resistance = R1 = 2P - L
First area of support = S1 = 2P - H
Second area of resistance = R2 = (P -S1) + R1
Second area of support = S2 = P - (R2 - S1)
*/
P = ( H + L + C ) / 3 ;
R1 = 2 * P - L ;
S1 = 2 * P - H ;
R2 = ( P - S1 ) + R1 ;
S2 = P - ( R2 - S1 ) ;
"\n2nd Area of Resistance " + WriteVal( R2, 1.1 ) ;
"1st Area of Resistance " + WriteVal( R1, 1.1 ) ;
"Pivot Point " + WriteVal( P, 1.1 ) ;
"1st Area of Support " + WriteVal( S1, 1.1 ) ;
"2nd Area of Support " + WriteVal( S2, 1.1 );
Peter
--
======================================================================
Peter Carr
Email: pcarr@xxxx ICQ: 22586379
======================================================================
|