|SPX with sdi_open price for 9:30 bar.|
#hint: Shows the opening price as a dotted price level on an intraday chart. rev:1.0.1
#rev 1.0.1 8sep2011 refactored sidebar to sideline
# source: smallDogInvestor.blogspot.com
# author: allen everhart
# date: 27Aug2011
# copylefts reserved. This is free software. That means you are free
# to use or modify it for your own usage but not for resale.
# Help me get the word out about my blog by keeping this header
# in place.
declare upper ;
#hint openTime: Time of the cash market open in your locality. Format:HHMM.
input openTime = 0930 ;
#hint sideline: Yes to show open price level in right extension area. No to show open price level overlaying main chart.
input sideline = no;
def elapseSecs = secondsFromTime(openTime);
def aggSecs = getAggregationPeriod()/1000;
rec openPrice =
if elapseSecs<0 && -elapseSecs < aggsecs then
else if elapseSecs == 0 then
#plot es = elapseSecs ;
def agHide = if getAggregationPeriod() >= aggregationPeriod.DAY then
plot op =
if sideline && !IsNaN(close) then
else if !sideline && isnaN(close) then
else if openprice == 0 then