Welcome Features News Download Registration Support FAQ Wish list Links
Advanced stock charting and analysis program

AFL Library

This is read-only version of AFL library entry. Ability to add user formulas and comment is only available from members-only area.

Details:

Formula name: plot tomorrows pivots on an intraday database
Author/Uploader: patrickdoherty - (email hidden)
Date/Time added: 2008-03-30 00:57:26
Origin: Amibroker forums
Keywords: plot tomorrow pivots
Level: medium
Flags: indicator

DISCLAIMER: Most formulas present in AFL on-line library are submitted by the users and are provided here on an "as is" and "as available" basis. AmiBroker.com makes no representations or warranties of any kind to the contents or the operation of material presented here. We do not maintain nor provide technical support for 3rd party formulas.
Description:

I had been struggling with the code to plot todays pivots from yesterdays price when using an intraday database. There were none available in the Amibroker library which plotted correctly the pivots for tomorrow on a intraday database. I checked the Amibroker forum and found the following. Thank you goes to sdebu_2k. If you wish to go to the forum search for "plotting tomorrow pivots". This routine provides todays quotes in the title bar and holds the todays pivots constant in the title bar as well. The plotted pivots moves to the next day when entering into the next day. Absolutely brilliant! Thank you.

Formula:

SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g,
Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +"
{{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));

Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle |
ParamStyle("Style") | GetPriceStyle() );

H1=SelectedValue( TimeFrameGetPrice( "H", inDaily, -1 ));
L1=SelectedValue(TimeFrameGetPrice( "L", inDaily, -1 ));
C1=SelectedValue(TimeFrameGetPrice( "C", inDaily, -1 ));

/*PIVOT Calculation*/
p = ( H1+ L1 + C1 )/3;
s1 = (2*p)-H1;
r1 = (2*p)-L1;
s2 = p -(H1 - L1);
s3 = S1 - (H1-L1);
r2 = p +(H1 - L1);
r3 = R1 +(H1-L1);

Plot (p,"Pivot",25,1);
Plot (r1,"R1",12,1);
Plot (r2,"R2",12,1);
Plot (r3,"R3",12,1);
Plot (s1,"S1",3,1);
Plot (s2,"S2",3,1);
Plot (s3,"S3",3,1);

Comments:

Debdulal Bhattacharyya
write2debu [at] gmail.com
2008-04-04 14:50:16
Thax for your appreciation.
Happy trading.
Bill

2008-05-07 00:39:59
Many thanks for your generosity. Well done.


About | Privacy | Terms of Use | Contact information
Copyright © 2001 AMIBROKER.COM