Stock Portfolio Organizer

The ultimate porfolio management solution.

Shares, Margin, CFD's, Futures and Forex
EOD and Realtime
Dividends and Trust Distributions
And Much More ....
Find Out More Here

WiseTrader Toolbox

#1 Selling Amibroker Plugin featuring:

Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
Find Out More Here

Profitunity for Amibroker (AFL)

Rating:
3 / 5 (Votes 4)
Tags:
ambroker

Contoh Sistem Profitunity (Buaya) dari Bill William
yang berasal dari Buku Trading Chaos 2nd Edition.
Sinyal Entry yang digunakan adalah Wiseman 2 dan Wiseman 3
Sinyal Exit Wiseman 2
Sinyal Exit Wiseman 3 adalah Buaya Merah
Menggunakan Parameter Toggle yang bisa meanmpilkan dan menghilangkan
semua garis dan Sinyal Buy dan Sell

Kecuali Entry Wiseman3 yang memakai data RealTime ,
Sinyal Entry dan Exit lainnya memakai data EOD ,menunggu hingga pasar tutup

Menggunakan konsep Valid-Hit
Buy dan Sell Wiseman2
Sell Wiseman3

Indicator / Formula

Copy & Paste Friendly
_SECTION_BEGIN("Price");
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 
_N(Title = StrFormat("P r o f i t u n i t y  V-H : {{NAME}} - {{INTERVAL}} {{DATE}} O %g, H %g, L %g, C %g (%.1f%%)  " +  " {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));
_SECTION_END();

_SECTION_BEGIN("Fractal");

UpFractal= ValueWhen(
  (Ref(H,-2) > Ref(H, -4)) AND
  (Ref(H,-2) > Ref(H, -3)) AND
  (Ref(H,-2) > Ref(H, -1)) AND
  (Ref(H,-2) > H), Ref(H,-2));

DownFractal= ValueWhen(
  (Ref(L,-2) <= Ref(L, -4)) AND
  (Ref(L,-2) <=  Ref(L, -3)) AND
  (Ref(L,-2) <=  Ref(L, -1)) AND
  (Ref(L,-2) <=  L), Ref(L,-2));


// Menampilkan garis Fractal Up dan Fractal Down

PlotFractalUp=ParamToggle("Plot Fractal Up ?","Tidak|Ya",1);
if ( PlotFractalUp )
{
Plot(UpFractal, "UF", ParamColor("Up Fractal Color",colorBlue),
ParamStyle("Up Fractal Style", styleThick|styleDashed));
}

PlotFractalDown=ParamToggle("Plot Fractal Down ?","Tidak|Ya",1);
if ( PlotFractalDown )
{
Plot(DownFractal, "DF",ParamColor("Down Fractal
Color",colorRed), ParamStyle("Down Fractal Style", styleThick|styleDashed));
}

UF=UpFractal;
DF=DownFractal;

_SECTION_END();


_SECTION_BEGIN("Alligator ");

// Menentukan Alligator

AlligatorBlue = Ref(Wilders(Avg,13),-8);
AlligatorRed = Ref(Wilders(Avg,8),-5);
AlligatorGreen = Ref(Wilders(Avg,5),-3);

// Mem-plot 3 garis Alligator
PlotAlligator=ParamToggle("Plot Alligator ?","Tidak|Ya",1);
if ( PlotAlligator )
{
Plot(AlligatorBlue, "Jaw", colorBlue, styleLine | styleThick);
Plot(AlligatorRed, "Teeth", colorRed, styleLine | styleThick);
Plot(AlligatorGreen, "Leeps", colorGreen, styleLine | styleThick);
}
// Syarat Entry WS3 : Open > Alligator Merah
AlligatorEntry = O > AlligatorRed ;
_SECTION_END();


_SECTION_BEGIN("Tick ");
/*Aturan Tick Khusus untuk BEI*/
Tick=IIf(C<=200,1,
	IIf(C>200 AND C<=500,5,
	IIf(C>500 AND C<=2000,10,
	IIf(C>2000 AND C<=5000,25,
	IIf(C>5000,50,0)))));

_SECTION_END();

// Fungsi menghitung 
function BuyValCalc (input)
		{ buyval=ValueWhen(input, H+tick);
		return buyval; }

function BuyHitCalc (buyval)
		{ (buyhit=buyval>=L AND buyval<=H AND C>=O) OR (L>=Ref(H,-1) AND O>buyval); // + gap up
  		   buyhit=ExRem(buyhit,buyval != Ref(buyval,-1)); // remove excess signals
		return buyhit;  }

function SellValCalc (input)
		{ sellval=ValueWhen(input,L-tick);
		return sellval; }

function SellHitCalc (sellval)
		{ (sellhit=sellval>=L AND sellval<=H) OR (H<=Ref(L,-1) AND O<sellval); // + gap down
		sellhit=ExRem(sellhit,sellval != Ref(sellval,-1)); // remove excess signal
		return sellhit; }

// Definisi Value
AvgPrice=(O+H+L+C)/4;
DV=AvgPrice*V*500;
DVMil = DV / 1000000000;
MADV20 = MA( DV, 20 );
MADV20Mil = MADV20 / 1000000000;
FValue = DVMil / MADV20Mil ;

// Pilih saham yg likuid ,yaitu Value > Rp. 1 Milyar,
// MA 20 (Val) > Rp. 1 Mil. , Value / MA20 > 1
Likuid = DVMil > 1.0 AND MADV20Mil > 1 AND FValue > 1 ;


// Menghitung AO
Tengah = (H+L)/2 ;
var1 = MA( Tengah , 34);
var2 = MA( Tengah,5);
diff = var2-var1;
 
// Menentukan UpBar dan DownBar
UpBar   = diff > Ref(diff,-1); 
DownBar = diff < Ref(diff,-1);

// Menentukan Super AO (WM2)  Buy dan Sell --> Valid dan Hit
BuyAO  = Ref(DownBar, -3) AND Ref(UpBar, -2) AND Ref(UpBar, -1) AND UpBar AND LIKUID;
BuyAOval = BuyValCalc(BuyAO);
BuyAOHit = BuyHitCalc(BuyAOval);

SellAO = Ref(UpBar, -3) AND Ref(DownBar, -2) AND Ref(DownBar, -1) AND DownBar;
SellAOVal = SellValCalc(SellAO);
SellAOHit = SellHitCalc(SellAOval);

BuyWM2 = BuyAO; 
BuyWM2Val = ValueWhen(BuyAO,BuyAOval); 
BuyWM2Hit = BuyAOhit;

SellWM2 = SellAO; 
SellWM2Val = ValueWhen(SellAO,SellAOval); 
SellWM2Hit=SellAOHit;


// Meentukan Sinyal Single / Multi Entry untuk WS2
PlotWS2SE=ParamToggle("Single Entry WS2 ?","Tidak|Ya",0);
if ( PlotWS2SE )
{
BuyWM2=ExRem(BuyWM2,SellWM2);
}

// Sinyal Single Entry untuk WM2
SellWM2=ExRem(SellWM2,BuyWM2);

// Menampilkan Sinyal Buy dan Sell WM2 --> Segitita kosong
PlotWM2=ParamToggle("Plot WS2 ?","Tidak|Ya",1);
if ( PlotWM2 )
{
PlotShapes( IIf(BuyAO,shapeSmallUpTriangle,0) ,colorBlue, 0, L,- 15);
PlotShapes(IIf(BuyWM2Hit,shapeDigit2,shapeNone),colorDarkBlue,0,L,-15);
PlotShapes( IIf(SellAO,shapeSmallDownTriangle,0) ,colorOrange, 0, H,-15);
PlotShapes(IIf(SellWM2Hit,shapeDigit2,shapeNone),colorOrange,0,H,15);
}

// Syarat Buy WS3
BuyWS3 = O < UF AND C > UF AND H>=(UF+Tick) AND Ref(H,-1)<=UF AND AlligatorEntry AND Likuid ; 
BuyWS3Price = UF + Tick ;

// Syarat Sell WS3 C < AlligatorRed
AlRed = AlligatorRed;
//SellWS3 = C < AlRed ; 
//SellWS3 = Ref(H,-1) > Ref(AlRed,-1) AND C < AlRed AND H > AlRed ; 
SellWS3 = Ref(H,-1) > Ref(AlRed,-1) AND C < AlRed AND ( Ref(C,-1) > AlRed AND ( Ref(C,-2) > AlRed) AND ( Ref(C,-3) > AlRed)) ; 
SellWS3Price=  AlRed; 

SellAl = SellWS3 ;
SellAlVal = SellValCalc(SellAl);
SellAlHit = SellHitCalc(SellAlval);

SellWM3 = SellAl; 
SellWM3Val = ValueWhen(SellAl,SellAlVal); 
SellWM3Hit = SellAlHit ; //AND (SellWM3Val > SellAlVal);


// Meentukan Sinyal Single / Multi Entry untuk WS3
PlotWS3SE=ParamToggle("Single Entry ?","Tidak|Ya",0);
if ( PlotWS3SE )
{
BuyWS3=ExRem(BuyWS3,SellWS3);
}

// Sinyal Single Entry untuk WS3
SellWS3=ExRem(SellWS3,BuyWS3);
SellWM3Hit=ExRem(SellWM3Hit,BuyWS3);

// Menampilkan Sinyal Buy dan Sell WS3 --> Segitita
PlotWS3=ParamToggle("Plot WS3 ?","Tidak|Ya",1);
if ( PlotWS3 )
{
PlotShapes(IIf(BuyWS3,shapeSmallUpTriangle,Null), colorGreen, 0, L, -30);
PlotShapes(IIf(SellWS3,shapeSmallDownTriangle,Null), colorRed , 0, H, -30);
PlotShapes(IIf(SellWM3Hit,shapeDigit3,shapeNone),colorRed,0,H,30);

}

// Tittle untuk menampilkan Sinyal Valid dan Hit

_N(Title=Title+EncodeColor(colorDarkGreen)+WriteIf(BuyWM2,"\n\n"+"Buy WM2 = "+H,"")
	+EncodeColor(colorDarkGreen)+WriteIf(BuyWM2Hit,"\n\n"+"Buy WM2 Hit = "+BuyWM2val,""));	

_N(Title=Title+EncodeColor(colorRed)+WriteIf(SellAO,"\n\n"+"Sell WM2 = "+L,"")
	+EncodeColor(colorRed)+WriteIf(SellWM2Hit,"\n\n"+"Sell WM2 Hit = "+SellWM2Val,""));	

_N(Title=Title+EncodeColor(colorDarkGreen)+WriteIf(BuyWS3 ,"\n\n"+"Buy WM3 Hit = "+BuyWS3Price,""));

_N(Title=Title+EncodeColor(colorRed)+WriteIf(SellWM3,"\n\n"+"Sell WM3 = "+L,"")
	+EncodeColor(colorRed)+WriteIf(SellWM3Hit,"\n\n"+"Sell WM3 Hit = "+SellWM3Val,""));	

3 comments

1. ppaskawati

Good indicator for buy/sell signal. Thank you.

2. poriaunited5

thanks you and best site for me

3. administrator

Your welcome. Glad you like it.

Leave Comment

Please login here to leave a comment.

Back