Mind the Gap – and watch your profits soar
Gaps are said to be filled when price quickly runs out of steam and retraces back to fill the prices that were skipped by the gap.
- Breakaway: usually occur at the start of a trend
- Runaway / Measuring: occur in the middle of a strong trend, allowing for price projection
- Exhaustion: occur at the end of a trend
- Opening: when the open of a bar is outside the range of the previous bar
Before, the way to show gaps was by using a simple script in a watchlist or chart using a simple formula:
Gap Up: LOW() > HIGH();
Gap Down: HIGH() < LOW()
In this example, two green breakaway gaps last November identified the start of a new trend in CSCO, which filled three previous gaps down (in red), the first of which occurred back in July 2019:
Using the Gap Finder in Scripting
The GAP() function in scripting has four output values, allowing you to search for any conditions:
GapAbove – Price of the beginning of the next gap zone above.
GapBelow – Price of the beginning of the next gap below.
GapAboveSize – the width of the zone above (in $).
GapBelowSize – the width of the zone below (in $).
For example, to show how far in percent the current price action is above a gap below – based on a 0.5% gap – you would use this:
(CLOSE() - G1.GapBelow) / G1.GapBelow *100
Microsoft is currently 4.1% above the partially-filled recent gap, and moving away:
Darren Hawkins, MSTA
Senior Software Specialist at Optuma
Darren is the senior Software Specialist at Optuma. He joined the company in 2009 after attending an introductory technical analysis course. Darren now instructs users all over the world, from experienced Wall Street traders and professional money managers to individual traders drawing their first trendlines.
Darren grew up in the UK and attended college in the USA where he earned a BA in Economics from St Mary's College of Maryland. He went on to spend a few years working at the Nasdaq Stock Market in Washington DC. Going on to live and work in Australia, the US and currently the UK, Darren has a broad understanding of the individual needs of traders, portfolio managers and investors utilising a wide range of methodologies.
In 2014 Darren passed the UK-based Society of Technical Analysts diploma course, and when not looking at charts he keeps a keen eye on England's cricket team - especially if they are playing against Australia. He lives in the Essex countryside in England, with wife Wendy and their labrador, Gabba.