![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKGLjtDK7xzmGbsaBhzgIp3aHGsXD52vtvxvUzcHQZNFG5WTH3-TmdfrDjxjsuEXntg6a8rozjDuaLplcPfaGv5O_6BGwVyyJ96jhx65oOUa4vjvMKkbB2QzNGwYI1BIAgVXqwKupV_4I/s640/C.png)
_SECTION_BEGIN("IBL");
SetChartOptions(0,chartShowArrows|chartShowDates);
ScanLookBack = Param("Scan Lookback", 2, 1, 25 );
fraction= IIf(StrRight(Name(),3) == "", 3.2, 3.2);
_SECTION_END();
_SECTION_BEGIN("Price");
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, _DEFAULT_NAME(), colorBlack , styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();
_SECTION_BEGIN("Up Trend Line");
UTValue1=LastValue(Trough(L,0.5,2));
UTValue2=LastValue(Trough(L,0.5,1));
UTBar1=BarCount - 1 - LastValue(TroughBars(L,0.5 ,2));
UTBar2=BarCount - 1 - LastValue(TroughBars(L,0.5 ,1));
UpTrendLine = LineArray( UTBar1, UTValue1, UTBar2,UTValue2, 1 );
UTLine = LineArray( UTBar1, UTValue1, UTBar2,UTValue2, 0 );
Plot( UpTrendLine , _DEFAULT_NAME(), colorGreen,styleLine | styleNoTitle | styleNoLabel);
Plot( UTLine , _DEFAULT_NAME(), colorGreen,styleLine | styleNoTitle | styleNoLabel);
_SECTION_END();
_SECTION_BEGIN("Down Trend Line");
DTValue1=LastValue(Peak(H,0.5 ,2));
DTValue2=LastValue(Peak(H,0.5 ,1));
DTBar1=BarCount - 1 - LastValue(PeakBars(H,0.5 ,2));
DTBar2=BarCount - 1 - LastValue(PeakBars(H,0.5 ,1));
DownTrendLine = LineArray( DTBar1, DTValue1, DTBar2,DTValue2, 1 );
DTLine = LineArray( DTBar1, DTValue1, DTBar2,DTValue2, 0 );
Plot( DownTrendLine ,_DEFAULT_NAME(), colorRed,styleLine | styleNoTitle | styleNoLabel);
Plot( DTLine ,_DEFAULT_NAME(), colorRed,styleLine | styleNoTitle | styleNoLabel);
PlotText("PV = " + WriteVal(DTValue2 ,fraction), LastValue(BarIndex())+2, (DTValue2 ), colorRed);
PlotText("TV = " + WriteVal(UTValue2,fraction), LastValue(BarIndex())+2, UTValue2, colorGreen);
PlotOHLC( UpTrendLine , UpTrendLine , DownTrendLine , DownTrendLine , "", colorYellow, styleCloud | styleNoRescale);
Plot(LineArray( DTBar2, DTValue2, BarCount,DTValue2, 0 ),"",colorRed);
Plot(LineArray( UTBar2, UTValue2, BarCount,UTValue2, 0 ),"",colorGreen);
_SECTION_END();
_SECTION_BEGIN("Pivot");
YH = TimeFrameGetPrice("H", inDaily, -1); // yesterdays high
YL = TimeFrameGetPrice("L", inDaily, -1); // low
YC = TimeFrameGetPrice("C", inDaily, -1); // close
TO = TimeFrameGetPrice("O", inDaily); // current day open
//Normal Pivot
PP = (YH + YL + YC) / 3;
R1 = (2 * PP) - YL;
R2 = PP + (YH - YL);
R3 = YH + 2*(PP-YL);
S1 = (2 * PP) - YH;
S2 = PP - (YH - YL);
S3 = YL - 2*(YH - PP) ;
_SECTION_END();
_SECTION_BEGIN("Title");
Title = EncodeColor(colorBlack)+ Date() + " Close = " + EncodeColor(colorRed) +Close +
EncodeColor(colorBlack) + " Open = " + EncodeColor(colorBlack) + O +
EncodeColor(colorBlack) + " High = " + EncodeColor(5) + H +
EncodeColor(colorBlack) + " Low = " + EncodeColor(colorRed) + L +
EncodeColor(colorBlack) + " Volume = " + EncodeColor(colorOrange) + V + "\n\n"+
EncodeColor(colorBlack) + "Pivot Point= " + EncodeColor(colorBlack) + PP +
EncodeColor(colorBlack) + " Day's Open= " + EncodeColor(colorBlack) + TO +"\n\n"+
EncodeColor(colorGreen) + "If days open is greater than Pivot Point, market is in uptrend and \n"+EncodeColor(colorRed)+"if days Open is less than Pivot Point, market is in downtrend" +"\n\n"+
EncodeColor(colorRed) + "R1= " + EncodeColor(colorBlack) + R1 +
EncodeColor(colorRed) + " R2= " + EncodeColor(colorBlack) + R2 +
EncodeColor(colorRed) + " R3= " + EncodeColor(colorBlack) + R3 +"\n"+
EncodeColor(colorGreen) + "S1= " + EncodeColor(colorBlack) + S1 +
EncodeColor(colorGreen) + " S2= " + EncodeColor(colorBlack) + S2 +
EncodeColor(colorGreen) + " S3= " + EncodeColor(colorBlack) + S3 +"\n"+
EncodeColor( colorBlack) +"____ _____ _______ _______ _______"+"\n";
_SECTION_END();
_SECTION_BEGIN("Target");
CBuy = Cross(C,DownTrendLine);
CSell = Cross(UpTrendLine ,C);
baratbuy = ValueWhen(CBuy ,BarIndex()) ;
baratsell = ValueWhen(CSell ,BarIndex()) ;
PlotShapes(shapeUpTriangle* CBuy ,colorBlue,O,L);
PlotShapes(shapeDownTriangle * CSell ,colorRed,O,H);
_SECTION_END();
_SECTION_BEGIN("Magnified Market Price");
FS=Param("Font Size",30,30,100,1);
GfxSelectFont("Arial", FS, 700, italic = False, underline = False, True );
GfxSetBkMode( colorBlack );
GfxSetTextColor( ParamColor("Color",colorYellow) );
Hor=Param("Horizontal Position",750,800,800,800);
Ver=Param("Vertical Position",27,27,27,27);
GfxTextOut(""+C,Hor , Ver );
YC=TimeFrameGetPrice("C",inDaily,-1);
DD=Prec(C-YC,2);
xx=Prec((DD/YC)*100,2);
GfxSelectFont("Arial", 12, 700, italic = False, underline = False, True );
GfxSetBkMode( colorBlack );
GfxSetTextColor(ParamColor("Color",colorYellow) );
GfxTextOut(""+DD+" ("+xx+"%)", Hor+5, Ver+45 );
_SECTION_END();
Sir AFL for this is missing.
ReplyDeletedear sir share it AFL
ReplyDeletethank you
advance