DYO: Opening Gap


This example finds the opening gap between the prior session close and today's day session open at the time stamp entered on Line A.   An gap Up is colored with a green band and a gap Down is colored with a red band.

Line A finds the bar Index (position in the data set) for the opening bar and stores the index in GV [1].   Edit the day session open time entered as the number on Line A to adapt this example to other markets.

Line B stores the index for the bar prior to the opening bar.

Line C tests for a Gap Down at the opening bar, and if present the gap between the opening bar's High and the prior bar's Low is drawn in red.   Line D and Line E obtain the two prices for the spread marker.

Line G test for a Gap Up at the opening bar, and if present the gap between the opening bar's Low and the prior bar's High is drawn in green.   Line H and Line I obtain the two prices for the spread marker.

Template:  OpeningGap


Last modified 10/27/08 11:54 AM