Apakah uda ada yg meng-copy afl yg dibawah? Tlg dicoba n diperbaiki kalo jelek ya... Btw,sy tmbh dikit: Buy = slope>0 and r2 > 80; Sell = slope <0 an r2 > 80; \\hanya dipakai buat screening aja. Nah yg periode,sy masi manual carinya... Hehehe Ntar sy share bagian afl nya lg.
Best Regards, Christopher Tahir MSN : chris_ta...@hotmail.com YM : chris_ta...@ymail.com FB : chris.ta...@yahoo.com Blog : ez-stock.blogspot.com -----Original Message----- From: Christopher Tahir Sent: 27/07/2010 9:56:34 PM Subject: [Komunitas AmiBroker] R-Squared Modified!!! Nah Bang Hok1, Stlh dapetin R2 yg uda dimodifikasi abang.... Nah skrg sy share modifikasinya sy.... OK???? Kalo commentnya salah, tlg di komentari yah.,... Seharuwsnya sihg uda OK, ternyata stlh terjun di dunia AFL, sy bs ndak makan seharian belajar oprekan AFL & ternyata sngt seru... Plus buat sy maknyus dlm coding2an... Hahhahhaha Berikut hasil R-Squared Modifikasi sy.... Sblm copy, tlg ingat yah, jgn diperjual belikan hasil oprekan ini.... Kalo don't mind, sekalian cantumkan jg copyright nya ye... Jadi ndak di perjual belikan.... Thanks sblmnya.... Btw, sy pemula dlm AFL< kalo ada yg kurang bagus, tlg perbaiki yah... ***Start*** _SECTION_BEGIN("R-Squared"); P = Param("Periods",20,2,500,1); R2 = Correlation(Cum( 1 ),C,P)*Correlation(Cum( 1 ),C,P); slope = LinRegSlope(C,P); Rdm = 100%-R2; R2Color = ParamColor("R-Squared Color",colorBlack); R2Style = ParamStyle("R-Squared Style",styleLine); SlpStyle = ParamStyle("Slope Style"); PSlpColor = ParamColor("+ Slope Color",5); NSlpColor = ParamColor("-Slope Color",colorRed); CritColor = ParamColor("Critical Value Color",colorRed); CritStyle = ParamStyle("Critical Value Style",styleLine|styleDashed); Crit=IIf(P<=5,.77, IIf(P<=10,.40, IIf(P<=14,.27, IIf(P<=20,.20, IIf(P<=25,.16, IIf(P<=30,.13, IIf(P<=50,.08, IIf(P<=60,.06, IIf(P<=120,.03,0))))))))); Plot(R2*100,"R-Squared "+ "("+P+")",R2Color,styleLine | R2Style); Plot(Rdm,"Random",R2Color,styleHidden); Plot(slope,"Slope",IIf(slope<0,NSlpColor,PSlpColor),styleHistogram|styleOwnScale|SlpStyle); Plot(Crit*100,"Critical Value",CritColor,CritStyle); Variable = WriteIf(slope>0,"Bullish","Bearish"); Power = WriteIf(R2*100>80,"Strong", WriteIf(R2*100>20 AND R2*100<80,"Mild","Weak")); GfxSetBkMode(2); GfxSetBkColor(colorWhite); GfxSelectFont("Arial",10,400); GfxTextOut("Comment : ",4,15); GfxSelectFont("Arial",10,600,True,True); GfxSetTextColor(colorBlack); GfxTextOut(Power+" "+Variable,75,15); _SECTION_END(); SetChartOptions(0,0,0); Z=Param("RGB",225,0,230,1); GfxSetTextAlign(6|24); GfxSelectFont("Tahoma", Status("pxheight")/12 ); GfxSetBkMode(0); GfxSetTextColor( ColorRGB(Z,Z,Z)); GfxTextOut("© 2010"+" - "+"Christopher Tahir",Status("pxwidth")/2, Status("pxheight")/2 ); ***End*** Best Regards, Christopher Tahir ez-stock.blogspot.com MSN: chris_ta...@hotmail.com YM: chris_ta...@ymail.com