_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", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();
//KAMA
LBPeriods = Param( "LB Periods", 10, 1, 200, 1 );
FSCPeriods = Param( "FSC Periods", 2, 1, 200, 1 );
SSCPeriods = Param( "SSC Periods", 30, 1, 200, 1 );
FastSmoothConst = 2 / ( FSCPeriods + 1 );
SlowSmoothConst = 2 / ( SSCPeriods + 1 );
Direction = abs( Close - Ref( Close, -LBPeriods ) );
Volatility = Sum( abs( Close - Ref( Close, -1 ) ), LBPeriods );
EfficiencyRatio = Direction / Volatility;
SC = ( EfficiencyRatio * ( FastSmoothConst - SlowSmoothConst ) +
SlowSmoothConst ) ^ 2;
KAMA = AMA( Close, SC );
Plot( KAMA, "KAMA",colorAqua,styleDots+styleNoRescale );
_SECTION_BEGIN("MA");
P = ParamField("Price field",-1);
Periods = Param("Periods", 54, 2, 300, 1, 10 );
Plot( MA( P, Periods ), _DEFAULT_NAME(), colorLightblue,styleThick+styleNoRescale );
_SECTION_END();
//TIME FRAME CALCULATION
H1 = TimeFrameGetPrice("H", inDaily, -1); // yesterdays high
L1 = TimeFrameGetPrice("L", inDaily, -1); // low
C1= TimeFrameGetPrice("C", inDaily, -1); // close
DayO = TimeFrameGetPrice("O", inDaily); // current day open
Plot(H1, "",colorBrightGreen,styleDots+styleNoRescale);
Plot(L1, "",colorRed,styleDots+styleNoRescale);
Plot(C1, "",colorLightgrey,styleDots+styleNoRescale);