Skip to main content

Camarilla Pivots Exploration for Amibroker (AFL)

swapnil almost 16 years ago Amibroker (AFL)

  • Rating:
    5 / 5 (Votes 1)
  • Tags:
    amibroker, exploration, pivots

The Camarilla equation calculates eight levels of intra-day support and resistance according to yesterday’s High, Low, Open and Close. There are 5 of these “L” levels below yesterday’s close, and 5 “H” levels above. They are numbered L1, L2, L3, L4 and L5 etc. The most important levels are L3, H3 levels and L4, H4 levels.

You can read more about it here: Link

Indicator / Formula

Copy & Paste Friendly
_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 
_SECTION_END();

_SECTION_BEGIN("Volume At Price");
PlotVAPOverlay( Param("Lines", 300, 100, 1000, 1 ), Param("Width", 5, 1, 100, 1 ), ParamColor("Color", colorCycle ), ParamToggle("Side", "Left|Right" ) | 4*ParamToggle("Z-order", "On top|Behind", 1 ) );
 
_SECTION_END();
_SECTION_BEGIN("Camrilla");

A=Ref(O,0);
B=Ref(H,0);
D=Ref(L,0);
E=Ref(C,0);
F=ATR(2);
G=((100*F)/E);
Pivot=((A+B+D+E)/4);
range=B-D;
H1=C+((range*(1.1*G))/12);
H2=C+((range*(1.1*G))/6);
H3=C+((range*(1.1*G))/4);
H4=C+((range*(1.1*G))/2);
H5=C+((range*(1.1*G))/1);
L1=C-((range*(1.1*G))/12);
L2=C-((range*(1.1*G))/6);
L3=C-((range*(1.1*G))/4);
L4=C-((range*(1.1*G))/2);
L5=C-((range*(1.1*G))/1);
Filter=1;
AddColumn(range,"Range",1.2,colorDefault,colorDefault,-1);
AddColumn(F,"ATR",1.2,colorDefault,colorDefault,-1);
AddColumn(G,"ATR %",1.2,colorDefault,colorDefault,-1);
AddColumn(E,"Close",1.2,colorDefault,colorGold,-1);
AddColumn(Pivot,"Pivot",1.2,colorGold,colorBlue,-1);
AddColumn(H5,"H5",1.2,colorDefault,colorDefault,-1);
AddColumn(H4,"H4",1.2,colorGold,colorBlue,-1);
AddColumn(H3,"H3",1.2,colorGold,colorRed,-1);
AddColumn(H2,"H2",1.2,colorDefault,colorDefault,-1);
AddColumn(H1,"H1",1.2,colorDefault,colorDefault,-1);
AddColumn(L1,"L1",1.2,colorDefault,colorDefault,-1);
AddColumn(L2,"L2",1.2,colorDefault,colorDefault,-1);
AddColumn(L3,"L3",1.2,colorGold,colorBlue,-1);
AddColumn(L4,"L4",1.2,colorGold,colorRed,-1);
AddColumn(L5,"L5",1.2,colorDefault,colorDefault,-1);


_SECTION_END();

2 comments

almost 16 years ago

Except for plain candles, nothing is displaying. i am using amibroker 5.3o professional edition.

almost 16 years ago

It is only an exploration. If you want the pivots displayed you need to use another formula.

Leave Comment

Please login here to leave a comment.