Coral Trend Indicator

Home » News » Coral Trend Indicator
AFL

// Transcoded from PineScript Indicator (Coral Trend) 
// Date : 20th Dec 2015

_SECTION_BEGIN("Coral Trend Indicator");
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", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 


sm = Param("Smoothing Period",21,2,40,1);
cd = Param("Constant 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 = Close;
i1=0;
i2=0;
i3=0;
i4=0;
i5=0;
i6=0;


for(i=1;i<BarCount;i++)
{

i1[i] = c1[i]*src[i] + c2[i]*i1[i-1];
i2[i] = c1[i]*i1[i] + c2[i]*i2[i-1];
i3[i] = c1[i]*i2[i] + c2[i]*i3[i-1];
i4[i] = c1[i]*i3[i] + c2[i]*i4[i-1];
i5[i] = c1[i]*i4[i] + c2[i]*i5[i-1];
i6[i] = c1[i]*i5[i] + c2[i]*i6[i-1];

}

bfr = -cd*cd*cd*i6 + c3*(i5) + c4*(i4) + c5*(i3);

color = IIf(bfr>Ref(bfr,-1),colorGreen,colorRed);

Plot(bfr,"Coral Trend Indicator", color,styleDots|styleNoLine|styleThick);


_SECTION_END();
Read More

Leave a Reply

Your email address will not be published. Required fields are marked *

New Providers
Quotex

1000+ Trading Instruments
The best trading broker in the world.

Stockity

1000+ Trading Instruments
The best trading broker in the world.

New Games
Lies of P

$59.99 Standard Edition
28% Save Discounts
See Top 10 Provider Games

COCOON

$24.99 Standard Edition
28% Save Discounts
See Top 10 Provider Games

New Offers
Commission up to $1850 for active user of affiliate program By Exness

Top Points © Copyright 2023 | By Topoin.com Media LLC.
Topoin.info is a site for reviewing the best and most trusted products, bonus, offers, business service providers and companies of all time.

Discover more from Topoin

Subscribe now to keep reading and get access to the full archive.

Continue reading