July 26, 2014

Support and resistance AFL for day traders

This AFL will plot support, resistance and pivot levels on intraday charts. For the formula and some theory on this, visit this wikipedia link.

This is the way the indicator looks when plotted on a chart.




And this is the AFL.


AFL in text form...

_SECTION_BEGIN("Support and resistance levels");
//Copyright: Kamalesh Langote http://www.vfmdirect.com Email: kpl@vfmdirect.com

PDH = TimeFrameGetPrice("H", inDaily, -1);  
PDL = TimeFrameGetPrice("L", inDaily, -1);
PDC = TimeFrameGetPrice("C", inDaily, -1);

PV=(PDH+PDL+PDC)/3;
R1=2*Pv-PDL;
R2=PV+PDH-PDL;
S1=2*PV-PDH;
S2=PV-PDH+PDL;

Plot(R1, "R 1",colorRed,styleLine);
Plot(R2, "R 2",colorRed,styleLine);
Plot(PV, "Pivot",colorGreen,styleLine);
Plot(S1, "S 1",colorBlue,styleLine);
Plot(S2, "S 2",colorBlue,styleLine);

_SECTION_END();

No comments:

Post a Comment

Share this...