Skip to main content

Woodies Pivot for Amibroker (AFL)

Divyesh almost 14 years ago Amibroker (AFL)

  • Rating:
    3 / 5 (Votes 2)
  • Tags:
    amibroker, pivot

I dont know weather this AFL availble or not…

this is Purley Woodies Pivot Point…!

Read somewhere on net about Woodies Pivot Point and tried to work on this….!

Indicator / Formula

Copy & Paste Friendly
//Original Woodies Pivot Formula//
//Pivot (P) = (H+L+2×C)/4
//Resistance (R1) = (2×P)-L
//R2 = P+H-L
//Support (S1) = (2×P)-H
//S2 = P-H+L 
_SECTION_BEGIN("Chart");
Col_cci = IIf(CCI(20) > 100, colorBrightGreen,IIf(CCI(20) <-100,colorRed,IIf(CCI(20) > Ref(CCI(20),-1),colorBlue,colorDarkRed)));
Plot(Close,"Price",Col_cci,styleCandle+styleThick| styleNoLabel);
_SECTION_END();
// Calculate the daily Pivot and S/R //
TimeFrameSet(inDaily);
WoodiesPivot = (H + L +(2* C))/4;
WoodiesR1 = (WoodiesPivot * 2) - L;
WoodiesR2 = WoodiesPivot + H - L;
WoodiesS1 = (2 * WoodiesPivot) - H;
WoodiesS2 = WoodiesPivot - H + L;
TimeFrameRestore();
// Plot the Pivot Point //
Plot(TimeFrameExpand(WoodiesPivot,inDaily,expandLast), "WoodiesPivot", colorLightBlue, styleThick);
// Plot the Resistance Level Clouds and Line //
Plot(TimeFrameExpand(WoodiesR1,inDaily,expandLast), "R1", colorGreen, styleThick);
Plot(TimeFrameExpand(WoodiesR2,inDaily,expandLast), "R2", colorGreen, styleThick);
// Plot the Support Levels Clouds and Lines //
Plot(TimeFrameExpand(WoodiesS1,inDaily,expandLast), "S1", colorRed, styleThick);
Plot(TimeFrameExpand(WoodiesS2,inDaily,expandLast), "S2", colorRed, styleThick);
_SECTION_BEGIN("Title");

DODay = TimeFrameGetPrice("O", inDaily);
DHiDay = TimeFrameGetPrice("H", inDaily); 
DLoDay = TimeFrameGetPrice("L", inDaily); 

Title = EncodeColor(colorWhite)+"* SAI STOCK BROKING 09825340778 *  "+EncodeColor(colorWhite)+ Name() + ", " + Interval(2) + ", " + Date() + 
EncodeColor(colorWhite)   +  "\nO " + EncodeColor(colorWhite) + O + 

 ",   H :  "   + H + 
 ",   L  :  " + L + 
 ",   C  :  "  + C +
EncodeColor(colorWhite)+ "\n Day-Open : " +DODay + "  Day-High : " +DHiDay + "  Day-Low : " + DLoDay+

//EncodeColor(colorLime)+
//WriteIf (Buy , " GO LONG / Reverse Signal at "+C+"  ","")+
//WriteIf (Sell , " EXIT LONG / Reverse Signal at "+C+"  ","")+"\n"+EncodeColor(colorYellow)+
//WriteIf(Sell , "Total Profit/Loss for the Last Trade Rs."+(C-BuyPrice)+"","")+
//WriteIf(Buy  , "Total Profit/Loss for the Last trade Rs."+(SellPrice-C)+"","");

_SECTION_BEGIN("Background text");
C13=Param("fonts",20,10,30,1 );
C14=Param("left-right",2.1,1.0,5.0,0.1 );
C15=Param("up-down",12,1,20,1 );
Miny = Status("axisminy");
Maxy = Status("axismaxy");
lvb = Status("lastvisiblebar");
fvb = Status("firstvisiblebar");
pxwidth = Status("pxwidth");
pxheight = Status("pxheight");
SetChartBkColor(colorBlack);
GfxSetBkMode(transparent=-1);
GfxSetOverlayMode(1);
GfxSelectFont("Candara", Status("pxheight")/C13 );
GfxSetTextAlign( 6 );
GfxSetTextColor( ColorRGB (217,217,213));
GfxTextOut( Name(), Status("pxwidth")/C14, Status("pxheight")/C15 );
GfxSelectFont("Tahoma", Status("pxheight")/C13*0.5 );
GfxSetTextColor( ColorRGB (217,217,213));
GfxTextOut( "By", Status("pxwidth")/C14, Status("pxheight")/C15*2.5 );
GfxSelectFont("Candara", Status("pxheight")/C13*0.5 );
GfxSetTextColor( ColorRGB (217,217,213));
GfxTextOut( "Sai Stock Broking 09825340778", Status("pxwidth")/C14, Status("pxheight")/C15*4 );
GfxSelectFont("MS Sans Serif", 10, 500, False, False, 0);
_SECTION_END();
_SECTION_BEGIN("Price Line");
PriceLineColor=ParamColor("PriceLineColor",ColorRGB(82,82,82));
PriceLevel = ParamField("PriceField", field = 3 ); 

Daysback = Param("Bars Back",500,10,900,1); 
FirstBar = BarCount - DaysBack; 
YY = IIf(BarIndex() >= Firstbar,EndValue(PriceLevel),Null); 

Plot(YY,"Current Price",PriceLineColor,ParamStyle("LineStyle",styleLine|styleDashed|styleNoTitle|styleNoLabel|styleThick,maskAll)); 

side = Param("side",1,0,1000,1);

dist = 0; 

for( i = 0; i < BarCount; i++ ) 
{ 
if(i+side== BarCount) PlotText( "\n " + PriceLevel[ i ], i, YY[ i ]-dist[i], colorAqua ); 
} 

_SECTION_END();

5 comments

1. Divyesh
almost 14 years ago

@Admin…
if i want to take permission from our members to use his/her code than what to do…?

3. Divyesh
almost 14 years ago

@Admin…

but i will get answer if they log in to our site and see that page where i asked….!!!

any other way to ask them?

almost 14 years ago

You can ask them for permission for me to email you their email address here in the comments.
Otherwise it is against the privacy policy.

Leave Comment

Please login here to leave a comment.