# NEOTICKER DATA BEGIN ScriptType=Indicator Description=PrevYear High Name=prevYHigh Language=DelphiScript Links=1 MinBars=0 TimerInterval=100 MetaStyle=Normal ValueRange=Same as Source Placement=Smart Multiplot_num_plots=1 Multiplot_color_0=255 Multiplot_style_0=Dot Multiplot_width_0=1 Multiplot_enabled_0=1 Multiplot_breakstyle_0=0 UpdateByTick=1 TradingSystemUI=0 PrimaryLinkOnly=0 NotifyOnRemoval=0 Param_count=0 Explanation_Lines=1 Explanation0=Similar to Previous Year Close, this indicator plots the previous years high in a series of dots on daily and weekly charts. Previous Year High requires one series (Link 1). # NEOTICKER DATA END // Part of NeoTicker program // written by Lawrence Chan, January 2001 // Copyright by TickQuest, Inc. // All rights reserved // revised July 2001 const HighID = 0; CurrHigh = 1; PrevDate = 2; FirstSwitch = 3; function prevYHigh : double; begin if not data1.valid [0] then begin itself.success := false; exit; end; if heap.size = 0 then begin with heap do begin allocate (4); value [HighID] := data1.high [0]; value [CurrHigh] := 0; value [PrevDate] := data1.datetime [0]; value [FirstSwitch] := 0; end; itself.success := false; exit; end; if data1.year [0] <> tq_year (heap.value [PrevDate]) then begin heap.value [firstswitch] := 1; heap.value [CurrHigh] := heap.value [HighID]; heap.value [HighID] := data1.high[0]; end else begin if heap.value [HighID] < data1.high[0] then heap.value [HighID] := data1.high[0]; end; if heap.value [firstswitch] = 0 then itself.success := false else result := heap.value [CurrHigh]; heap.value [PrevDate] := data1.datetime [0]; end;