Welcome to the Traders Laboratory Forums.
Technical Analysis The technical discussion forum for traders.

Reply
Old 07-22-2009, 10:57 PM   #1

Join Date: Jun 2009
Location: ca
Posts: 42
Ignore this user

Thanks: 0
Thanked 2 Times in 2 Posts

Gaps Test

Hi,

I'm trying to create a log file that will check the number of filled gaps and non filed gaps. The gap as % from yesterday range.

If anyone can help me with the code, it will be great.

The rational of this method is from Dr. steenberger blog

" Do Opening Gaps Tend to Fill?
The difference between the market's opening price and its previous day's close forms a gap on a bar chart. Does this gap tend to fill in during the next day's price action? That is, when we open with a gap lower or higher, do prices subsequently move back to the prior day's close?

For this investigation, I measured gaps as a function of the previous day's high-low range. This measures the gap relative to the prior day's volatility. Thus, an opening gap of two points that follows a day with a range of six points is measured as a 33% gap. The same opening gap of two points that follows a day with a range of ten points is measured as a 20% gap.

Assessed in this manner, we find that the average opening gap is 27% of the previous day's range going back to May, 2003 (N = 897 trading days) in the S&P 500 Index (SPY). That provides us with a benchmark for defining relatively large and relatively small gaps.

When upside gaps exceed 40% of the prior day's range (N = 99), 46 of them fail to close during the day session. When downside gaps exceed 40% of the previous day's range (N = 81), 40 of them go unfilled. Bottom line: approximately half of all large opening gaps don't fill during that coming day's action."



// Gap Test
// version: beta 0.1
// author: noam
// Date: 20090721
// License: public use
//
// Description: This program screens the gap size as a % from yesterday range and check the % of filled gaps, non filled gaps as a function of the gap size.


input:
start.date(19620102);

var:
YesterdayRange (0),
gapsize (0);

YesterdayRange=high[1]-low[1]
GapSize= Topen-Yclose/YesterdayRange*100




if date > start.date - 19000000 then
begin

if then
print(numtostr(date+19000 000,0) + " gap filled=" + NumToStr(r3,2));



end;
N57H is offline  
Reply With Quote

Reply

Thread Tools
Display Modes Help Others By Rating This Thread
Help Others By Rating This Thread:


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trading The Opening Gaps jasont Technical Analysis 24 08-15-2009 12:38 PM
Gaps in Value area waveslider Market Profile 3 07-25-2007 05:20 PM
Trading GAPS Robert Technical Analysis 0 10-05-2006 05:30 PM
Understanding Gaps: Why do they exist? Soultrader Technical Analysis 3 09-23-2006 09:31 PM
Gaps also act as pivots Soultrader Technical Analysis 0 08-10-2006 10:00 AM

All times are GMT -4. The time now is 08:53 PM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
CS to VB integration by DeskLancer
©2006-2011 Traders Laboratory, All Rights Reserved.