Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _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("Background Color");
- BKswitch = ParamToggle("Background Color","On,Off");
- OUTcolor = ParamColor("Outer Panel Color",colorLightBlue);
- INUPcolor = ParamColor("Inner Panel Upper",colorPink);
- INDNcolor = ParamColor("Inner Panel Lower",colorWhite);
- TitleColor = ParamColor("Title Color ",colorBlack);
- if (NOT BKswitch)
- {
- SetChartBkColor(OUTcolor); // color of outer border
- SetChartBkGradientFill(INUPcolor,INDNcolor,TitleColor); // color of inner panel
- }
- _SECTION_END();
- _SECTION_BEGIN("KPL Swing1");
- //Copyright Kamalesh Langote. Email:kpl@vfmdirect.com. More details at http://www.vfmdirect.com/kplswing
- //Save indicator as "kplswing.afl" in C: program files > Amibroker > Formulas > Custom folder and then drap and drop on price chart
- no=Param( "Swing", 10, 1, 55 );
- tsl_col=ParamColor( "Color", colorCycle );
- res=HHV(H,no);
- sup=LLV(L,no);
- avd=IIf(C>Ref(res,-1),1,IIf(C<Ref(sup,-1),-1,0));
- avn=ValueWhen(avd!=0,avd,1);
- tsl=IIf(avn==1,sup,res);
- Plot(tsl, _DEFAULT_NAME(), tsl_col, styleStaircase); // or styleaArea
- Buy=Cross(C,tsl);
- Sell=Cross(tsl,C);
- shape=Buy*shapeUpArrow + Sell*shapeDownArrow;
- PlotShapes(shape,IIf(Buy,tsl_col,tsl_col),0,IIf(Buy,Low,High));
- _SECTION_END();
- _SECTION_BEGIN("LEVELS");
- PO=TimeFrameGetPrice( "O", inDaily, -1 );
- PL=TimeFrameGetPrice( "L", inDaily, -1 );
- PH=TimeFrameGetPrice( "H", inDaily, -1 );
- PC=TimeFrameGetPrice( "C", inDaily, -1 );
- TO= TimeFrameGetPrice( "O", inDaily, 0 );
- TH= TimeFrameGetPrice( "H", inDaily, 0 );
- TL= TimeFrameGetPrice( "L", inDaily, 0 );
- TC= TimeFrameGetPrice( "C", inDaily, 0 );
- PC1= TimeFrameGetPrice( "C", inDaily, -2 );
- P=((PH+PL+PC)/3);
- R1=((2*P)-PL);
- S1=((2*P)-PH);
- R2=((P-S1)+R1);
- S2=(P-(R1-S1));
- R3=PH+(2*(P-PL));
- S3=PL-(2*(PH-P));
- R=TH-TL;
- PP=(TH+TL+TO+TO)/4;
- RR1=PP+(R*0.38);
- RR2=PP+(R*0.62);
- SS1=PP-(R*0.38);
- SS2=PP-(R*0.62);
- PPP=(TH+TL+TO+TO)/4;
- RRR1=((2*PPP)-TL);
- SSS1=((2*PPP)-TH);
- RRR2=((PPP-SSS1)+RRR1);
- SSS2=(PPP-(RRR1-SSS1));
- Pchange=PC-PC1;
- PPerChange=(Pchange/PC1)*100;
- Tchange=TC-PC;
- TPerChange=(Tchange/TC)*100;
- Title=Name()+
- "\nPrevious - O :-"+PO+" H :-"+PH+" L :-"+PL+" C :-"+PC+" Change:- "+Pchange+" %ge:- "+WriteVal(PPerChange,1.2)+
- "\nTodays - O :-"+TO+" H :-"+TH+" L :-"+TL+" C :-"+TC+" Change:- "+Tchange+" %ge:- "+WriteVal(TPerChange,1.2)+
- "\n"+
- "\n"+
- "\nLevels"+
- "\nEOD Pivot :-"+WriteVal(P,1.2)+
- "\nS-1 :-"+WriteVal(S1,1.2)+" - R-1 :-"+WriteVal(R1,1.2)+
- "\nS-2 :-"+WriteVal(S2,1.2)+" - R-2 :-"+WriteVal(R2,1.2)+
- "\nS-3 :-"+WriteVal(S3,1.2)+" - R-3 :-"+WriteVal(R3,1.2)+
- "\n"+
- "\nIntraday Pivot :-"+WriteVal(PP,1.2)+
- "\nS-1 :-"+WriteVal(SSS1,1.2)+" - R-1 :-"+WriteVal(RRR1,1.2)+
- "\nS-2 :-"+WriteVal(SSS2,1.2)+" - R-2 :-"+WriteVal(RRR2,1.2)+
- "\n"+
- "\nIntraday Retracement Levels"+
- "\nS-1 :-"+WriteVal(SS1,1.2)+" - R-1:-"+WriteVal(RR1,1.2)+
- "\nS-2 :-"+WriteVal(SS2,1.2)+" - R-2:-"+WriteVal(RR2,1.2);
- _SECTION_END();
- //------------------------------------------------------------------------------
- _SECTION_BEGIN("Moving Average");
- x=Param("EMA 1",20,1,200,1);
- y=Param("EMA 2", 50,1,200,1);
- z=Param("EMA 3",100,1,200,1);
- zz=Param("EMA 4",200,1,200,1);
- EMA20= EMA(C,x);
- EMA50=EMA(C,y);
- EMA100= EMA(C,z);
- EMA200=EMA(C,zz);
- SUT=EMA(C,5)>EMA20;
- SDT=EMA20>EMA(C,5);
- mut= EMA20>EMA50;
- mdt=EMA20<EMA50;
- _SECTION_END();
- _SECTION_BEGIN("Mid Term Price Trend");
- MPT = IIf( mut, colorGreen, IIf( mdt, colorRed, colorYellow));
- Plot( 3, "", MPT, styleArea|styleOwnScale|styleNoLabel, 0, 100);
- _SECTION_END();
- _SECTION_BEGIN("Short Term Price Trend");
- SPT = IIf( EMA(C,5)>EMA20, colorBrightGreen, IIf( EMA20>EMA(C,5), colorPink, colorYellow));
- Plot( 6, "", SPT, styleArea|styleOwnScale|styleNoLabel, 0, 100);
- _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( colorGreen );
- GfxSetTextColor( ParamColor("Color",colorGreen) );
- Hor=Param("Horizontal Position",350,800,800,800);
- Ver=Param("Vertical Position",50,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( colorGreen );
- GfxSetTextColor(ParamColor("Color",colorGreen) );
- GfxTextOut(""+DD+" ("+xx+"%)", Hor+5, Ver+45 );
- _SECTION_END();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement