Pages

Tuesday, May 23, 2017

AFL To Automatically Identify Pivot Points

Automatic Pivot Point Levels in Amibroker.The AFL is being provided as is written by the author of the AFL.

Also See: Pivot Points AFL Version 2.0

AFL for Automatic Pivot Point Identification as seen in Amibroker after applying. The image shown is of an Intraday Hourly chart.

Read Also: Top 10 Amibroker AFL for Trading

 The AFL will plot the Pivot Points for the day on an Intraday Chart. Very useful from Intraday Trading perspective.

For those who are not very much aware with AFL usage by Copy/Paste method here is a small description.

1. Open the Formula Editor in the Analysis Window of amibroker.

2. Copy & Paste this formula in the Formula Editor window.

3. Give it a name ,in this case it will be automatic pivot points .

4. Save the AFL. It will be saved in the Customs folder of the Amibroker.

5. Usage of the AFL can be made later through Customs Folder in Amibroker.

________________________________________________________

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);

__________________________________________________________

2 comments:

  1. Replies
    1. Hi Atul,

      Search for Pivot Points in Google. You will get ample information about them. The mathematical formula has been coded in the AFL . Also get a better version of this code here at the below link

      https://tradecatcher.blogspot.com/2017/05/pivot-points-amibroker-afl.html

      Delete