likuiditas for Amibroker (AFL)
tiono over 13 years ago Amibroker (AFL)
This indicator is use for know the likuid stock.
Indicator / Formula
Copy & Paste Friendly
// Menampilkan Price
_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() );
_SECTION_END();
// Menampilkan Pita Trending
_SECTION_BEGIN("Pita Trend");
uptrend = PDI()>MDI()AND Signal()<MACD();
downtrend = MDI()>PDI()AND Signal()>MACD();
Plot ( 2, "Pita", IIf ( uptrend, colorGreen, IIf( downtrend, colorRed, 0 )), styleOwnScale|styleArea|styleNoLabel, -0.5, 100 );
_SECTION_END() ;
// Parameter EMA Short
_SECTION_BEGIN("EMA1");
P = ParamField("Price field",-1);
Perioda1 = Param("Perioda 1", 5, 2, 30, 1 );
EMA1 = EMA (P, Perioda1);
Plot( EMA1," EMA 1 ", ParamColor( "Warna EMA1", colorCycle ), ParamStyle("Style") );
_SECTION_END();
// Parameter EMA Long
_SECTION_BEGIN("EMA2");
P = ParamField("Price field",-1);
Perioda2 = Param("Perioda 2", 15, 10, 100, 1 );
EMA2 = EMA (P, Perioda2);
Plot( EMA2," EMA 2 ", ParamColor( "Warna EMA2", colorCycle ), ParamStyle("Style") );
_SECTION_END();
// Definisi Value
AvgPrice=(O+H+L+C)/4;
DV=AvgPrice*V*500;
DVMil = DV / 1000000000;
MADV20 = MA( DV, 20 );
MADV20Mil = MADV20 / 1000000000;
// Parameter Likuid / Value
_SECTION_BEGIN("Value Minimal Rp. Milyar");
ValueH = Param("Value Harian ", 1, 0.2 , 10, 0.1 );
ValueMA = Param("MA Value 20 hari ", 1.5 , 0.2 , 10, 0.1 );
// Syarat Likuid
// Nilai default ValueH Rp 1 Milyar dan ValueMA Rp. 1,5 M
Likuid = (DVMil > ValueH ) AND (MADV20Mil > ValueMA ) ;
// Syarat BUY dan SELL
Buy =
( RSI( 14 ) > Ref( RSI( 14 ) , -1 )
AND RSI( 14 ) > 50
AND Cross (EMA1, EMA2) )
AND Likuid
OR
( Cross ( RSI (14) , 50 ) AND (EMA1 > EMA2) ) AND Likuid ;
Sell = ( RSI( 14 ) < Ref ( RSI (14 ) , -1 )
AND RSI( 14 ) < 50
AND Cross (EMA2 , EMA1))
OR ( Cross ( 50 , RSI (14)) AND (EMA2 > EMA1) );
// Single Entry dan Single Exit
Buy=ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);
// Menampilkan Sinyal Buy dan Sell
shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorGreen, 0,L, Offset=-15);
PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorRed, 0,H, Offset=-15);1 comments
Leave Comment
Please login here to leave a comment.
thanks nice effort