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.
_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[(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[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();