// Ditranskode dari Indikator PineScript (Tren Coral) // Tanggal: 20 Desember 2015 _SECTION_BEGIN("Indikator Tren Coral"); SetChartOptions(0,chartShowArrows|chartShowDates); _N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Buka %g, Tinggi %g, Rendah %g, Tutup %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) )); Plot( C, "Tutup", ParamColor("Warna", colorDefault ), styleNoTitle | ParamStyle("Gaya") | GetPriceStyle() ); sm = Param("Periode Perataan",21,2,40,1); cd = Param("Konstanta D",0.4,0.1,2,0.1); di = (sm - 1.0) / 2.0 + 1.0; c1 = 2 / (di + 1.0); c2 = 1 - c1; c3 = 3.0 * (cd * cd + cd * cd * cd); c4 = -3.0 * (2.0 * cd * cd + cd + cd * cd * cd); c5 = 3.0 * cd + 1.0 + cd * cd * cd + 3.0 * cd * cd; src = Tutup; i1=0; i2=0; i3=0; i4=0; i5=0; i6=0; untuk(i=1;i Ref(bfr,-1),warnaHijau,warnaMerah); Plot(bfr,"Indikator Tren Karang", warna,styleDots|styleNoLine|styleTebal); _SECTION_END();