How to code support resistance in AFL?


 

Is there any one who can help me for identifying the logic behind support and resistance in above chart. I want to code it in AFL, If any body have its AFL please provide.

Hi Niranjanjena,

This is basically a plot of recent swing high and low in daily time frame. Please find the AFL attached for the same. Please change the Barperiod in the AFL to suit your requirement. Please use daily time frame to have the recent swing high and low's displayed.

_SECTION_BEGIN("Swing_high_low");
//-------------------------------------------------------------------------------------------
//
//  Formula Name:    Swing High and Swing lows
//  Author/Uploader: Neotrade Analytics Pvt Ltd 
//  E-mail:          [email protected]
//  Website          www.neotradeanalytics.com
//
//This is an attempt to provide a basic trading system AFL. The system is purely imaginary
//AND NOT provided as one that would make money. This is just to provide a guide to learners
//on the common components of writing AFL.
//
//-------------------------Summary of AFL---------------------------------------------------
//This AFL produces results of plot of recent swing high and low.
/*-------------------------------------------------------------------------------------------
	Initialize
	Bar period to check recent swing high's and low's
--------------------------------------------------------------------------------------------*/
SetChartOptions( 0, chartShowDates | chartShowArrows | chartLogarithmic | chartWrapTitle );
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, C %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));

Barperiod =15;

hhvbar = HHV(high,Barperiod);
llvbar = LLV(low,Barperiod);

Plot(C, " Close Price", colorGrey50, stylecandle);

Plot(hhvbar,"", colorGreen,styleBar); 
Plot(llvbar,"", colorDarkRed,styleBar);

_SECTION_END();

** current Bar period which is used is 15day period.

Regards

Vivith

www.neotradeanalytics.com

(Authorized realtime data vendor of NSE and BSE supporting realtime data feeds to various charting platforms like Amibroker,Metastock,Ninjatrader, Multicharts, Neuroshell trader, elwave and custom programming languages like C,C#,perl, python, C++, R)

Can someone help me add this indicator in zerodha pi?