# NEOTICKER DATA BEGIN ScriptType=Indicator Description=DiNapoli MACD Name=DiNapoliMACD Language=Formula Links=1 MinBars=0 TimerInterval=100 MetaStyle=Normal ValueRange=Other Placement=Smart Multiplot_num_plots=2 Multiplot_color_0=255 Multiplot_style_0=Line Multiplot_width_0=1 Multiplot_enabled_0=1 Multiplot_breakstyle_0=0 Multiplot_color_1=33587200 Multiplot_style_1=Line Multiplot_width_1=1 Multiplot_enabled_1=1 Multiplot_breakstyle_1=0 UpdateByTick=1 TradingSystemUI=0 PrimaryLinkOnly=0 NotifyOnRemoval=0 Param_count=0 Explanation_Lines=1 Explanation0=DiNapoli MACD returns the DiNapoli Moving Average Convergence and Divergence value. DiNapoli MACD requires one specified series (Link 1). # NEOTICKER DATA END $sf1 := 0.213; $sf2 := 0.108; $sf3 := 0.199; $length1 := 8; $length2 := 18; $length3 := 9; $ready := barsnum >= $length2; ema1 := choose ( $ready <= 0, 0, barsnum = $length2, average (c, $length1), c * $sf1 + (1 - $sf1) * ema1 (1)); ema2 := choose ( $ready <= 0, 0, barsnum = $length2, average (c, $length2), c * $sf2 + (1 - $sf2) * ema2 (1)); macd1 := ema1 - ema2; plot1 := macd1 * $sf3 + (1 - $sf3) * plot1 (1); success1 := $ready; plot2 := macd1 * $sf3 + (1 - $sf3) * macd1 (1); success2 := $ready;