Fave This

Thursday, 30 December 2010

[Komunitas AmiBroker] Re: Belajar Backtest Project Bargain Hunter - Wisnu

mas Eco, bagaimana dgn yg ini, cobo di BT dulu, lalu bandingkan hasilnya ???? siapa tahu hasilnya mungkin tdk mengecewakan.

problemnya adalah pada real tradingnya. kalau mau ikuti pola BT berarti harus pick semua stock dlm range BT, bukan hal yg gampang dlm pelaksanaannya, kecuali memang BTnya terintegrasi ke automatic trading system yg dimiliki para broker, sehingga BUY/SELL bisa running secara otomatis. disamping itu perlu modal besar, agar bisa mengcover semua stock yg di pick dlm range BT.

rgds
hb

_SECTION_BEGIN("IchimokuBrian20080624");
/*
ICHIMOKU CHART

A bullish signal occurs when the Tenkan-Sen (RED line) crosses the Kijun-Sen (BLUE line) from below.
Conversely, a bearish Signal is issued when the Tenkan-Sen crosses the Kijun-Sen from above.

Support and resistance levels are shown as Kumo (or clouds). The Kumo can also be used to help identify
the prevailing trend of the market. If the price line is above the Kumo, the prevailing trend is said to be up,
while if the price is below the Kumo, the prevailing trend is said to be down. The default colour here for the clouds is
light blue - but the hue, etc, parameters can be adjusted to suit the user's display.

The theory is that the bullish signals are strong when the TL,SL cross occurs above the cloud; it is medium within the
cloud, and weak if it occurs below the cloud. These are shown here as green solid up arrows, green up triangles and hollow
indigo up arrows respectiveley.
Conversely, the bearish signals are said to be strong when the cross is below the cloud and weak when above. These signals
are plotted as down red arrows or triangles, or brown hollw down arrows.

As an attempt at clarity on a cluttered plot, all signal arrows, etc are plotted within the clouds (rather than near the
candles as is normal). The user can also toggle between a candle plot or a line plot of the close price, to reduce
the clutter somewhat.

A final feature of the Ichimoku chart is the VIOLET line, or Chikou Span (or Lagging Span). It is said that this line
indicates the strength of the buy or sell signal. If the Chikou Span is below the closing price and a sell signal occurs,
then the strength is with sellers, otherwise it is a weak sell signal. Conversely, if a buy signal occurs and the Chikou
Span is above the price, then there is strength to the upside. These considerations could be coupled with the other
signals, if desired, but this has not been done here.

Final Comment: This program produces quite a pretty graph - but I have not so far been impressed with the signals!
I have seen many weak signals followed by strong moves and strong signals followed by weak moves. Typical of technical
analysis I guess. If anyone finds the Ichimoku approach useful I would be keen to hear about it.
*/

SL = ( HHV( H, 26 ) + LLV( L, 26) )/2;// standard, base, or kijun-sen line
TL = ( HHV( H, 9 ) + LLV( L, 9 ) )/2;// turning, conversion, or tenkan-sen line
DL = Ref( C, 25 ); // delayed close price, or chikou span
Span1 = Ref( ( SL + TL )/2, -25 ); //Span1 and Span2 define the clouds
Span2 = Ref( (HHV( H, 52) + LLV(L, 52))/2, -25);

CStyle = ParamToggle("Showcandles?","N|Y");//Choose Candle or Line for Price plot
hue = Param("Hue",140,0,255,1);
sat = Param("Sat",100,0,255,1);
bri = Param("bri",220,0,255,1);

MaxGraph = 8;
Refline = (Span1 + Span2)/2;
Graph0 = Refline;
Graph0Style = 16;//No line plotted, used as a reference line for arrows etc.
if(Cstyle )
Plot(C,"Price",colorBlack,styleCandle);
else
Plot(Close,"Close",colorBlack,styleThick);
Plot(SL,"SL",colorBlue,styleThick);
Plot(TL,"TL",colorRed,styleThick);
Plot(DL,"DL",colorLime,styleThick);
PlotOHLC(Span1,Span1,Span2,Span2,"Cloud",ColorHSB( Hue,sat,bri),styleCloud);

above = IIf(TL>Span1 AND TL>Span2,1,0);
within = IIf(TL>Span1 AND TL<Span2,1,0);
below = IIf(TL<Span1 AND TL<Span2,1,0);
Buy = Cross(TL,SL) AND (DL>Close);
Sell = Cross(SL,TL) AND (DL<SL);
StrongBuy = Buy AND above;
MediumBuy = Buy AND within;
WeakBuy = Buy AND below;
StrongSell = Sell AND below;
MediumSell = Sell AND within;
WeakSell = Sell AND above;

IIf( (StrongBuy),PlotShapes(shapeUpTriangle*StrongBuy,colorGreen),0);
IIf( (MediumBuy),PlotShapes(shapeUpArrow*MediumBuy,colorGreen),0);
IIf( (WeakBuy),PlotShapes(shapeHollowUpArrow*WeakBuy,colorIndigo),0);
IIf( (StrongSell),PlotShapes(shapeDownTriangle*StrongSell,colorRed),0);
IIf( (MediumSell),PlotShapes(shapeDownArrow*MediumSell, colorRed),0);
IIf( (WeakSell),PlotShapes(shapeHollowDownArrow*WeakSelL,colorBrown),0);
_SECTION_END();

--- In amibroker-4-bei@yahoogroups.com, Eco Syariah <esyariah@...> wrote:
>
> Dear Amibroker User,
>
> CATATAN BELAJAR AKHIR TAHUN 2010
>
> Saya coba2 backtest Project Bargain Hunter nya mas Wisnu... hasilnya profit
> 4500.71% khusus backtest pd saham2 yg ada di Indeks JII.
> Performance sistem per bulan atau per tahun, seperti yg terlihat pd
> lampiran...
>
> Lampiran itu juga bisa dipakai untuk melihat pd bulan2 apa system ini
> berfungsi dgn maksimum speed dan pd bulan2 apa dia slowdown bahkan mogok...
>
> Buat teman2 yg blm coba... saya sarankan untuk coba backtest Project Bargain
> Hunter ini, saya yakin anda akan banyak memperoleh pelajaran... saya
> sebutkan satu diantaranya berupa pertanyaan: apakah ada sistem dengan return
> positif pada bulan May 2010 ? Anda tidak akan memperoleh jawabannya jika
> tidak belajar backtest thdp beberapa sistem gacoan anda.
>
> AFL nya mas Wisnu saya copas di bagian bawah email ini.
>
> Thanks again mas Wisnu.
>
> Regards,
> ES
>
> Modal 75,000,000
>
>
> MaxPostSize 4
>
>
> Period 1-Jan-05 23-Dec-10 6 thn
>
>
>
>
> Statistics
> All trades Long trades Short trades
> Initial capital 75000000 75000000 75000000
> Ending capital 3450530170 3450530170 75000000
> Net Profit 3375530170 3375530170 0
> Net Profit % 4500.71% 4500.71% 0.00%
> Exposure % 52.48% 52.48% 0.00%
> Net Risk Adjusted Return % 8576.59% 8576.59% N/A
> Annual Return % 89.85% 89.85% 0.00%
> Risk Adjusted Return % 171.22% 171.22% N/A
>
> //======================
>
>
>
> On Tue, Dec 21, 2010 at 12:57 PM, Wisnu Mobile wrote:
>
>
> Ternyata Wiseman1 lumayan menguntungkan.
>
> 1. 20 years backtested. CAR: 82%! WB kalah tuw.. Problema nya ada di
> MaxSysDD: -52%! Saya belum pernah lihat trader senior yang mampu stomach
> this kind of drawdown. Kalau beginner malah sering lihat.. :) Bisa
> diperbaiki dengan better Exit.
>
> 2. Entry: BULLISH DIVERGENCE BAR, with DISCOUNT as a qualifier (gantinya
> Angulasi). Silahkan diganti dengan kondisi lain yang anda mau. Leave
> variable names intact, supaya bisa dipanggil.
>
> 3. Simple MM: 5 max open positions (optimization capable - untuk yang mau
> belajar optimasi), RSI based position score.
>
> 4. Exit, karena tidak ada inputan - mungkin entry nya sangat profitable
> barangkali, saya pakai REVERSE Divergence Bar... hehe... silahkan diganti
> kalau punya kode yang lebih baik.
>
> 5. Realtime Entry-Exit.
>
> Snapshot and code, attached.
>
> Hari ini sudah masuk pasar lagi... jadinya project ini kudu diselesaikan..
> :) Silahkan dikembangkan sendiri-sendiri ya..
>
> Salam.
>
> Code:
>
> _SECTION_BEGIN("Price");
> SetChartOptions(0,chartShowArrows|chartShowDates|chartLogarithmic);
> _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, "Close", ParamColor("Color", colorBlack ), styleNoTitle |
> ParamStyle("Style") | GetPriceStyle() );
> if( ParamToggle("Tooltip shows", "All Values|Only Prices" ) )
> {
> ToolTip=StrFormat("Open: %g\nHigh: %g\nLow: %g\nClose: %g
> (%.1f%%)\nVolume: "+NumToStr( V, 1 ), O, H, L, C, SelectedValue( ROC( C, 1
> )));
> }
> _SECTION_END();
>
> _SECTION_BEGIN("Trade System");
> GfxSelectFont("Tahoma", 12, 400);
> GfxDrawText("Wiseman1 - BETA", 4, 15, 350, 40);
> SetFormulaName("Wiseman1 - BETA");
>
> SetTradeDelays( 0, 0, 0, 0);
>
> MaxOpenPos=Optimize("MaxOpenPositions", 5, 1, 10, 1);
> SetOption("MaxOpenPositions", MaxOpenPos);
> PositionSize=-100/MaxOpenPos;
>
> PositionScore=100-RSI();
>
> /*Wiseman1*/
> DivBar=(L<Ref(L,-1)) AND (C>(H+L)/2); //DivBar
>
> /*Angulation Replacement - take out and replace if you want, but keep the
> variables name intact.*/
> PriceDisc=1-Param("PriceDisc (%)", 5, 0, 50, 5)/100;
> DBQualifier1=(C<=Ref(C,-Param("LookBack Period", 5, 3, 10, 1))*PriceDisc);
>
> WS1DivBar=DivBar AND DBQualifier1;
> DaySinceDivBar=BarsSince(WS1DivBar);
> WS1BuyCond1=C>Ref(H,-DaySinceDivBar);//Entry if Close higher than DivBar H
>
> Buy=WS1BuyCond1;
> BuyPrice=Ref(H,-DaySinceDivBar);//Realtime Buy Price at DivBar H
>
> RevDivBar=(L>Ref(L,-1)) AND (C<(H+L)/2); // Reverse DivBar Exit
> DaySinceRevDivBar=BarsSince(RevDivBar);
> WS1ExitCond1=C<Ref(L,-DaySinceRevDivBar); //Exit if Close lower than
> RevDivBar L
>
> Sell=WS1ExitCond1;
> SellPrice=Ref(L,-DaySinceRevDivBar);//Realtime Exit Price at RevDivBar L
>
> Buy=ExRem(Buy,WS1DivBar);
> Sell=ExRem(Sell,RevDivBar);
> Sell=ExRem(Sell,Buy);
>
> PlotShapes(IIf(WS1DivBar,shapeSmallUpTriangle,Null), colorBlue, 0, L, -15);
> PlotShapes(IIf(Buy,shapeSmallUpTriangle,Null), colorBrightGreen, 0, L, -10);
> PlotShapes(IIf(RevDivBar,shapeSmallDownTriangle,Null), colorYellow, 0, H,
> -15);
> PlotShapes(IIf(Sell,shapeSmallDownTriangle,Null), colorRed, 0, H, -10);
> _SECTION_END();
>
> _SECTION_BEGIN("Daily Explorer");
> Filter=Buy OR Sell;
>
> AddTextColumn( WriteIf(Buy, "Buy!",
> WriteIf(Sell, "Sell!", "")), "Trade Signal", 1.0);
>
> AddColumn(C, "Close", 1.0);
> _SECTION_END();
>


------------------------------------

Apabila membutuhkan software AmiBroker, Realtime Intraday Data & Pelatihan silahkan kontak : Dendo Valentino | Cell : 08159304868 | e-mail: amibrokerfreak{at}yahoo.co.id | YM id : dendov | http://www.facebook.com/dendo.amibrokerfreak | http://www.amibroker-4-bei.org

Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker-4-bei/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker-4-bei/join
(Yahoo! ID required)

<*> To change settings via email:
amibroker-4-bei-digest@yahoogroups.com
amibroker-4-bei-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
amibroker-4-bei-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/

No comments:

Post a Comment