# NEOTICKER DATA BEGIN ScriptType=Indicator Description=Better PivotPoints Daily Name=better_pivotpoints_daily Language=Formula Links=1 MinBars=0 TimerInterval=100 EarlyBinding=0 MetaStyle=Normal ValueRange=Same as Source Placement=Smart Multiplot_num_plots=5 Multiplot_color_0=33587290 Multiplot_style_0=Line Multiplot_width_0=1 Multiplot_enabled_0=1 Multiplot_name_0=PivotPoint Multiplot_breakstyle_0=2 Multiplot_color_1=255 Multiplot_style_1=Line Multiplot_width_1=1 Multiplot_enabled_1=1 Multiplot_name_1=R1 Multiplot_breakstyle_1=2 Multiplot_color_2=50266112 Multiplot_style_2=Line Multiplot_width_2=1 Multiplot_enabled_2=1 Multiplot_name_2=S1 Multiplot_breakstyle_2=2 Multiplot_color_3=50266367 Multiplot_style_3=Line Multiplot_width_3=1 Multiplot_enabled_3=1 Multiplot_name_3=R2 Multiplot_breakstyle_3=2 Multiplot_color_4=50312193 Multiplot_style_4=Line Multiplot_width_4=1 Multiplot_enabled_4=1 Multiplot_name_4=S2 Multiplot_breakstyle_4=2 UpdateByTick=1 TradingSystemUI=0 PrimaryLinkOnly=0 NotifyOnRemoval=0 Param_count=2 Param_name_0=Average Range Period Param_inuse_0=1 Param_type_0=integer.gt.0 Param_default_0=20 Param_name_1=Sensitivity Param_inuse_1=1 Param_type_1=real Param_default_1=10 Explanation_Lines=1 Explanation0=PivotPoints Daily is a visual indicator that displays the daytrading support resistance price levels based on the built-in PreviousDay indicator series. A line is plotted if the bar close is within the range defined by the Sensitivity parameter. PivotPoints Daily works on series with minute or tick time frame. It requires one series (Link 1). # NEOTICKER DATA END ' Better PivotPoints Daily ' Written by Lawrence Chan ' Copyright © 2006 by TickQuest Inc. ' All rights reserved ' simply using the built-in indicators compressseries (mydaily, data1, ppDaily, 1); makeindicator (myavgrange, avgrange, mydaily, param1); makeindicator (mymidpt, fml, mydaily, "(h + l) / 2"); makeindicator (avg, average, mymidpt, param1); $avg := avg (1); $r1 := avg (1) + myavgrange (1) / 2; $s1 := avg (1) + myavgrange (1); $r2 := avg (1) - myavgrange (1) / 2; $s2 := avg (1) - myavgrange (1); ' assign them to the plots plot1 := $avg; plot2 := $r1; plot3 := $s1; plot4 := $r2; plot5 := $s2; ' figure out if a line is within user defined range $avg_inrange := absvalue (c - $avg) <= param2; $r1_inrange := absvalue (c - $r1) <= param2; $s1_inrange := absvalue (c - $s1) <= param2; $r2_inrange := absvalue (c - $r2) <= param2; $s2_inrange := absvalue (c - $s2) <= param2; ' each line's value is valid only when ' it is the 2nd day onward in the chart, or, ' the values are within user defined range $date_changed := if (date (1) <> 0 and date <> date (1), 1, 0); $after_first_day := if ($date_changed, 1, $after_first_day); success1 := $after_first_day <> 0 and $avg_inrange <> 0; success2 := $after_first_day <> 0 and $r1_inrange <> 0; success3 := $after_first_day <> 0 and $s1_inrange <> 0; success4 := $after_first_day <> 0 and $r2_inrange <> 0; success5 := $after_first_day <> 0 and $s2_inrange <> 0; ' we'll break the continuation of each line ' when it is a new day or when the lines are not within user defined range visualbreak1 := $date_changed <> 0 or $avg_inrange = 0 or success1 (1) = 0; visualbreak2 := $date_changed <> 0 or $r1_inrange = 0 or success2 (1) = 0; visualbreak3 := $date_changed <> 0 or $s1_inrange = 0 or success3 (1) = 0; visualbreak4 := $date_changed <> 0 or $r2_inrange = 0 or success4 (1) = 0; visualbreak5 := $date_changed <> 0 or $s2_inrange = 0 or success5 (1) = 0;