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

Required US Government Disclaimer & CTFC Rule 4.41

Futures trading contains substantial risk and is not suitable for every investor. An investor could potentially lose all or more than the initial investment. Risk capital is money that can be lost without jeopardizing ones financial security or lifestyle. Only consider risk capital that should be used for trading and only those with sufficient risk capital should consider trading. Past performance is not necessarily indicative of future results. CTFC RULE 4.41 – HYPOTHETICAL OR SIMULATED PERFORMANCE RESULTS HAVE CERTAIN LIMITATIONS. UNLIKE AN ACTUAL PERFORMANCE RECORD, SIMULATED RESULTS DO NOT REPRESENT ACTUAL TRADING. ALSO, SINCE THE TRADES HAVE NOT BEEN EXECUTED, THE RESULTS MAY HAVE UNDER-OR-OVER COMPENSATED FOR THE IMPACT, IF ANY, OF CERTAIN MARKET FACTORS SUCH AS LIQUIDITY. SIMULATED TRADING PROGRAMS IN GENERAL ARE ALSO SUBJECT TO THE FACT THAT THEY ARE DESIGNED WITH THE BENEFIT OF HINDSIGHT. NO REPRESENTATION IS BEING MADE THAT ANY ACCOUNT WILL OR IS LIKELY TO ACHIEVE PROFIT OR LOSSES SIMILAR TO THOSE SHOWN. All trades, patterns, charts, systems, etc., discussed in this website or advertisement are for illustrative purposes only and not construed as specific advisory recommendations. All ideas and materials presented herein are for information and educational purposes only. No system or trading methodology has ever been developed that can guarantee profits or prevent losses. The testimonials and examples used herein are exceptional results which do not apply to average people and are not intended to represent or guarantee that anyone will achieve the same or similar results. Trades placed on the reliance of Trend Methods systems are taken at your own risk for your own account. This is not an offer to buy or sell futures interests.