Fave This

Saturday, 12 June 2010

[Komunitas AmiBroker] Pretty Bollinger

_SECTION_BEGIN("Unnamed 12");
bbh=((C+2*StDev(C,15) - MA(C,15)) / (3*StDev(C,20)))*3 - 2;
Plot(bbh,"",colorYellow,6);
Plot(1.75,"",4,4); //2 is the 2sds away from the the center
Plot(0.5,"",2,styleDashed);
Plot(-1.75,"",43,4);
Plot(-0.5,"",2,styleDashed);
Plot(0,"",colorYellow,styleThick);
_SECTION_END();_SECTION_BEGIN("Bollinger RSI");
// RSI Levels - appplied to Price Chart shows how far
// tomorrow's closing price has to move in order for
// the RSI to cross the 70, 50 & 30 levels.

pd = Param("Periods",13,5,144,1);
pds = 2*pd-1;// (Adjustment for Wilders MA)
aa = Close-Ref(Close,-1);
uu = EMA(Max(0,aa),pds);
dd= EMA((Max(0,0-aa)),pds);

rf = IIf(C>2,1000,10000);

c1 = Param("Upper Level",70,50,90,1);
qq1 =100/(100-c1)-1;
ff1 = qq1*dd-uu;
ff2 = ff1/qq1;
f1 = Max(ff1,ff2);
UL = Close + f1*(pds-1)/2;
UL = IIf(UL>C,floor(UL*rf),ceil(UL*rf))/rf;

c2 = Param("Equilibrium",50,50,50,0);
qq2 =100/(100-c2)-1;// [=1]
ff = dd-uu;
MM = Close + ff*(pds-1)/2;
MM = IIf(MM>C,floor(MM*rf),ceil(MM*rf))/rf;

c3 = Param("Lower Level",30,10,50,1);
qq3 =100/(100-c3)-1;
ff1 = qq3*dd-uu;
ff2 = ff1/qq3;
f3 = Min(ff1,ff2);
LL = Close + f3*(pds-1)/2;
LL = IIf(LL>C,floor(LL*rf),ceil(LL*rf))/rf;

Plot(UL,"",colorRed,1);
Plot(MM,"",colorYellow,32);
Plot(LL,"",colorGreen,1);

Cbr = IIf(UL<C,27,IIf(LL>C,32,IIf(MM>C,11,8)));
PlotOHLC(O,H,L,C,"",cbr,styleCandle);

Title = Name() + " - RSI(" + WriteVal(pd,0.0) + ") - Close=" + WriteVal(Close,0.3) + " UL=" + WriteVal(UL,0.4) + " MM=" + WriteVal(MM,0.4) + " LL=" + WriteVal(LL,0.4);
_SECTION_END();//------------------------------------------------------------------------------
//
// Formula Name: INTRADAY HEIKIN ASHI new
// Author/Uploader: ali
// E-mail: abosliman2005m@hotmail.com
// Date/Time Added: 2006-09-22 19:07:15
// Origin: a
// Keywords: INTRADAY HEIKIN ASHI new
// Level: advanced
// Flags: system
// Formula URL: http://www.amibroker.com/library/formula.php?id=714
// Details URL: http://www.amibroker.com/library/detail.php?id=714
//
//------------------------------------------------------------------------------
//
// INTRADAY HEIKIN ASHI new
//
//------------------------------------------------------------------------------

/*======================================================
ISFANDI INTRADAY HEIKIN ASHI + PIVOT POINTS
======================================================*/

//---- heikin ashi
HaClose = (O+H+L+C)/4;
HaOpen = AMA( Ref( HaClose, -1 ), 0.3 );
HaHigh = Max( H, Max( HaClose, HaOpen ) );
HaLow = Min( L, Min( HaClose, HaOpen ) );
xDiff = (HaHigh - Halow) * IIf(StrFind(Name(),"JPY"),100,10000);
barcolor = IIf(HaClose >= HaOpen,colorGreen,colorRed);
PlotOHLC( HaOpen, HaHigh, HaLow, HaClose, "", barcolor, styleCandle );
// Plot(EMA(HaClose,9),"",colorWhite, styleLine);
// Plot(EMA(HaClose,18),"",colorBlack, styleLine);


_SECTION_BEGIN("Plot BUY SELL");
Q = Param( "% Change", 2, 0.1, 10, 0.1 );
Z = Zig( C , q ) ;
HH = ( ( Z < Ref( Z, -1 ) AND Ref( Z, -1 ) > Ref( Z, -2 ) ) AND (Peak( z, q, 1 ) > Peak( Z, q, 2 ) ) );
LH = ( ( Z < Ref( Z, -1 ) AND Ref( Z, -1 ) > Ref( Z, -2 ) ) AND (Peak( Z, q, 1 ) < Peak( Z, q, 2 ) ) );
HL = ( ( Z > Ref( Z, -1 ) AND Ref( Z, -1 ) < Ref( Z, -2 ) ) AND (Trough( Z, q, 1 ) > Trough( Z, q, 2 ) ) );
LL = ( ( Z > Ref( Z, -1 ) AND Ref( Z, -1 ) < Ref( Z, -2 ) ) AND (Trough( Z, q, 1 ) < Trough( Z, q, 2 ) ) );
GraphXSpace = 5;
dist = 0.25 * ATR( 50 );

for ( i = 0; i < BarCount; i++ )
{
if ( HH[i] )
PlotText( "S", i, H[ i ] + dist[i], colorYellow );

if ( LH[i] )
PlotText( "S", i, H[ i ] + dist[i], colorRed );

if ( HL[i] )
PlotText( "B", i, L[ i ] - dist[i], colorDarkYellow );

if ( LL[i] )
PlotText( "B", i, L[ i ] - dist[i], colorCustom9 );

}
_SECTION_END();

_SECTION_BEGIN("ABKPMOMODots");
/* ABKPMoMo
If TRIGGOSC is greater than 0 and SHORTERMTRADEBIAS is greater than 0 and
MEDIUM is greater than Medium MA, give me a dot underneath the current price
bar. If TRIGGOSC is less than 0 and SHORTERMTRADEBIAS is less than 0 and
MEDIUM is less than Medium MA, give me a dot above the current price bar.


*/
parmMoMoUpColor = ParamColor("MoMo up color", colorWhite);
parmMoMoDnColor = ParamColor("MoMo dn color", colorDarkRed);
parmDetrendPeriod = Param("Detrend period", 8, 1, 20, 1);
parmPlotRibbon = ParamToggle("Plot as ribbon", "No|Yes", 0);
parmRibbonSize = Param("Ribbon Size", 1, 0.5, 10, 0.5);
parmDebug = ParamToggle("Debug", "No|Yes", 0);
SetBarsRequired(350, -1);

//KP indicators
sw = E_TSKPUPSELL(Open,High,Low,Close,Volume);
KPTriggerLine = tskp_triggerline;
dummy = E_TSKPSHORTTERMTRADEBIAS(High,Low,Close);
KPSTTB = tskp_sttb1;
dummya = E_TSKPMEDIUM(Close);
KPMediumUp = tskp_mediumup;
KPMediumDn = tskp_mediumdown;
KPMediumMA = tskp_mediumma;
if(parmDebug == 1)
{
printf("KBTriggerLine: %g%\nKPSTTB: %g%\nKPMediumUp: %g%\nKPMediumDn: %g%\nKPMediumMa: %g%\n", KPTriggerLine, KPSTTB, KPMediumUp, KPMediumDn, KPMediumMa);
}
// calculations
//Detrend = KPTriggerLine - MA(KPTriggerLine, parmDetrendPeriod); //Detrend KPTriggerLine
Detrend = KPTriggerLine - Ref( MA( KPTriggerLine, parmDetrendPeriod ), -( 1 + parmDetrendPeriod/2 ) );
MedianPrice = (H + L) /2;
AvgValue = Ref(MA(C, 2), -1);
UpSignal = Detrend >= 0 AND KPSTTB >= 0 AND (KPMediumUp > KPMediumMa OR KPMediumDn > KPMediumMa) AND MedianPrice > AvgValue;
DnSignal = Detrend < 0 AND KPSTTB < 0 AND (KPMediumUp < KPMediumMA OR KPMediumDn < KPMediumMA) AND MedianPrice < AvgValue;
if(parmDebug == 1)
{
printf("Detrend: %g%\nMedian Price: %g%\nAvgValue: %g%\n", Detrend, MedianPrice, AvgValue);
printf(WriteIf(UpSignal, "UpSignal: True", "UpSignal: False") + WriteIf(DnSignal, " DnSignal: True\n", " DnSignal: False\n") );

}
//plots
if(parmPlotRibbon == 0)
{
PlotShapes(IIf(UpSignal, shapeSmallCircle, shapeNone), parmMoMoUpColor, 0, L, -10);
PlotShapes(IIf(DnSignal, shapeSmallCircle, shapeNone), parmMoMoDnColor, 0, H, 10);
}
else
{
Plot(parmRibbonSize, "", IIf(UpSignal, parmMoMoUpColor, IIf(DnSignal, parmMoMoDnColor, Null )), styleArea | styleNoLabel | styleOwnScale , 0, 10);

}
_SECTION_END();

_SECTION_BEGIN("FIBONACCI AND GANN PROJECTIONS");
Change = 5;
GannIncrement = 0.0625;

procedure PlotShapeAt( x, y, shape, shift )
{
PlotShapes( IIf( BarIndex() == x, shape, 0 ), colorRed, 0, y, shift );
}

procedure PlotBlueDot( x, y )
{
PlotShapes( IIf( BarIndex() == x, shapeSmallCircle, 0 ), colorBlue, 0, y, 0 );

for( i = -2; i <= 2; i++ )
{
if( i != 0 )
{
yGann = ( sqrt( y ) + i * GannIncrement ) ^ 2;
PlotShapes( IIf( BarIndex() == x, shapeSmallCircle, 0 ), colorOrange, 0, yGann, 0 );
}
}
}

bi = BarIndex();

sbi = SelectedValue( bi );

GraphXSpace = 2;

Plot( Zig( C, Change ), "Zigzag", colorGreen, styleThick );
Plot( C, "Price", IIf( bi > sbi, colorLightGrey, colorBlack ), styleBar );

upshift = 15;
if( SelectedValue( PeakBars( C, Change ) < TroughBars( C, Change ) ) )
{
pt1 = PeakBars( C, Change, 1 ) == 0 ;
pt2 = TroughBars( C, Change, 1 ) == 0 ;
}
else
{
pt1 = TroughBars( C, Change, 1 ) == 0 ;
pt2 = PeakBars( C, Change, 1 ) == 0 ;
upshift = -upshift;
}

bpt1 = SelectedValue( ValueWhen( pt1, bi ) );
bpt2 = SelectedValue( ValueWhen( pt2, bi ) );
bpt3 = SelectedValue( ValueWhen( pt1, bi, 2 ) );
bpt4 = SelectedValue( ValueWhen( pt2, bi, 2 ) );
bpt5 = SelectedValue( ValueWhen( pt1, bi, 3 ) );
bpt6 = SelectedValue( ValueWhen( pt2, bi, 3 ) );

PlotShapeAt( bpt1, C, shapeDigit1, upshift );
PlotShapeAt( bpt2, C, shapeDigit2, -upshift );
PlotShapeAt( bpt3, C, shapeDigit3, upshift );
PlotShapeAt( bpt4, C, shapeDigit4, -upshift );
PlotShapeAt( bpt5, C, shapeDigit5, upshift );
PlotShapeAt( bpt6, C, shapeDigit6, -upshift );

Level = SelectedValue( ValueWhen( pt1, C ) );

PlotBlueDot( round( bpt1 + 1.618 * ( bpt1 - bpt2 ) ), Level );
PlotBlueDot( round( bpt1 + 0.382 * ( bpt1 - bpt2 ) ), Level );

PlotBlueDot( round( bpt1 + 0.5 * ( bpt2 - bpt3 ) ), Level );
PlotBlueDot( round( bpt1 + 1.732 * ( bpt2 - bpt3 ) ), Level );

PlotBlueDot( round( bpt1 + 0.618 * ( bpt4 - bpt5 ) ), Level );
PlotBlueDot( round( bpt1 + 2 * ( bpt4 - bpt5 ) ), Level );

PlotBlueDot( round( bpt2 + 0.6707 * ( bpt4 - bpt2 ) ), Level );
PlotBlueDot( round( bpt2 + 2.618 * ( bpt4 - bpt2 ) ), Level );

PlotBlueDot( round( bpt2 + 1 * ( bpt6 - bpt2 ) ), Level );
PlotBlueDot( round( bpt2 + 3 * ( bpt6 - bpt2 ) ), Level );
_SECTION_END();

_SECTION_BEGIN("BB_Double 20_25 and 20_10 HLC/3");




////BOL BAND 18////////////////////////////////////////////////////////

P = ParamField("Price field",-1);
Periods = Param("Periods", 20, 2, 100, 1 );
Width = Param("Width", 2, 0, 10, 0.05 );


P=(H+L+C)/3;

BT2 = BBandTop( P, 20, 2.5 );
BB2 = BBandBot( P, 20, 2.5 );

ColorBand=ColorRGB(35,35,200);
Plot( BT2, "" + _PARAM_VALUES(), ColorBand, styleLine|styleNoLabel);
Plot( BB2, "" + _PARAM_VALUES(), ColorBand, styleLine|styleNoLabel);
BT1 = BBandTop( P, 20, 1 );
BB1 = BBandBot( P, 20, 1 );
Plot( BT1, "" + _PARAM_VALUES(), ColorBand, styleLine|styleNoLabel);
Plot( BB1, "" + _PARAM_VALUES(), ColorBand, styleLine|styleNoLabel);

PlotOHLC( 0, BT2 , BT1 , BT1 , "Cloud", IIf(BT2 > BT1 ,ColorRGB(5,20,30),colorDarkTeal), styleCloud | styleNoLabel);

PlotOHLC( 0, BB1 , BB2 , BB2 , "Cloud", IIf(BB1 > BB2 ,ColorRGB(5,20,30),colorDarkTeal), styleCloud | styleNoLabel);

_SECTION_END();

Dear Pak Timur,

your request has done already, we can share it now with all of our member.
sesuai saran pak anton dgn basic chart heikin ashi + HH LL, dan saya tambahkan signal dot utk konsistensi minor trend pricing. modifikasi bb pake double top/bot dan utk zigzag saya tambahkan pula dr Fibo&Gann spy confirmasi perubahan trend tampak jelas. seluruh penjelasan/saran ada pd pic terlampir. utk tambahan saya sertakan indicator pasangan bb spy bisa jg mengkonfirmasi overbought/sold.

utk afl bb konversi rsi jg sdh sy lapirkan, signal price below or above mid bollinger cukup tampak jelas dr perub warna candle jd gak perlu pake buysell fractal lg. bb rsi jg berfungsi sbg indicator overbought/sold. silahkan pilih mau pake yg mana.

gara2 buaya lucu byk member yg menerima manfaat dr pak timur, pak eko dll, mudah2an ini jd salah satu ganjaranNya buat pak timur. Amin...

so.. happy operating


regards,


isfandi



__._,_.___



Apabila anda membutuhkan software Amibroker, Realtime Data & pelatihan silahkan visit http://www.amibroker-4-bei.org

Berikut adalah beberapa jadwal pelatihan amibroker dalam waktu dekat:

Sabtu, 24 April 2010 : Latihan pengoperasian dasar AmiBroker berikut Technical analysis di Grand Flora Hotel Kemang - Jakarta.





Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

No comments:

Post a Comment