# NEOTICKER DATA BEGIN ScriptType=Indicator Description=TASC Nonlinear Ehlers Filters Delphi Script Name=tasc_nef_del Language=DelphiScript Links=1 MinBars=0 TimerInterval=100 EarlyBinding=0 MetaStyle=Normal ValueRange=Same as Source Placement=Smart Multiplot_num_plots=1 Multiplot_color_0=255 Multiplot_style_0=Line Multiplot_width_0=1 Multiplot_enabled_0=1 Multiplot_breakstyle_0=0 UpdateByTick=0 FloatMarker=1 DepthData=0 TradingSystemUI=0 PrimaryLinkOnly=0 NotifyOnRemoval=0 Param_count=2 Param_name_0=Coef Formula Param_inuse_0=1 Param_type_0=formula Param_default_0=absvalue(c-c(5)) Param_name_1=Coef Period Param_inuse_1=1 Param_type_1=integer.gte.1 Param_default_1=15 Explanation_Lines=0 # NEOTICKER DATA END function tasc_nef_del : double; var Coef : variant; nv, Num, SumCoef : double; i, cperiod : integer; begin cperiod := params.items['Coef Period'].int; if itself.firstcall then heap.allocatereallist('NumVal', cperiod); if not data1.valid[0] then begin itself.success := false; exit; end; Coef := itself.makeindicator ('Coef', 'fml', ['1'], [Params.items ['Coef formula'].str]); nv := data1.value[0]*Coef.value[0]; Heap.listpush('NumVal',nv); Num := Heap.listsum('NumVal'); SumCoef := 0; for i := 0 to cperiod-1 do SumCoef := SumCoef+Coef.value[i]; if (data1.barsnum[0] > cperiod) and (SumCoef > 0) then itself.plot[1] := Num/SumCoef else itself.success := false; end;