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

Reversal for Amibroker (AFL)

Rating:
3 / 5 (Votes 3)
Tags:
amibroker, pattern

AFL untuk Mencari Pembalikkan arah Trend

Dipakai untuk short Term

Buy pada waktu muncul bola biru

Sell pada waktu muncul bola merah

Screenshots

Indicator / Formula

Copy & Paste Friendly
// Reversal.afl
_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() ); 

// REVERSAL by Candlestick


C1 = Ref(C,-1);
C2 = Ref(C,-2);
A1 = Ref(Avg,-1);
A2 = Ref(Avg,-2);
A3 = Ref(Avg,-3);
A4 = Ref(Avg,-4);
A5 = Ref(Avg,-5);
O1 = Ref(O,-1);
O2 = Ref(O,-2);

Syarat1 = ((A1 < A2) AND (A2 < A3) AND (A1 < A4)); //AND (A3 < A4) ) ;//OR ( A1 < A3);
Syarat2 = (C1 <= O1) AND (C2 <= O2);
SyaratTurun = Syarat1 AND Syarat2;
Syarat3 = (A1 > A2) AND (A2 > A3) AND (A1 > A4) ;
Syarat4 = (C1 >= O1) AND (C2 >= O2);
SyaratNaik = Syarat3 AND Syarat4;

DibawahMA20 = C < MA(C,20);
DiatasMA20  = C > MA(C,20);

//HammerItem =
BodyI = O - C;
TailI = C - L;
HammerItem = (O==H) AND (C < O) AND (TailI >= 2*BodyI);

//HammerPutih =
BodyP = C - O;
TailP = O - L;
HammerPutih = (C==H) AND (C > O) AND (TailP >= 2*BodyP);

Hammer = HammerPutih OR HammerItem;// Syarat Candlestick Bullish dan Bearish Reversal
Doji = O == C;
BodiPutih = C > O ;//AND (TailI < BodyI) ;
BodiItem = C < O ;//AND (TailP < BodyP);

BullishReversal = Doji OR BodiPutih OR Hammer;
BearishReversal = Doji OR BodiItem OR Hammer;

SyaratBullishR = SyaratTurun AND BullishReversal ;
SyaratBearishR = SyaratNaik  AND BearishReversal ;

PlotShapes(IIf(SyaratBullishR ,shapeHollowSmallCircle,shapeNone),colorBlue,0,L,-15);
PlotShapes(IIf(SyaratBearishR ,shapeHollowSmallCircle,shapeNone),colorRed,0,H,15);

_SECTION_END();

0 comments

Leave Comment

Please login here to leave a comment.

Back