I put together a Python script that parses and counts wicks in the .bar history files. A wick is defined as high price > open price or low price < close price.

Here's the output from that script:
Code:
_Asset | 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013
--------------------------------------------------------------------------------
AUDUSD |   66    78    82    89    87    76     0     0     0    93    93    91 
EURUSD |   71    81    84     0     0     0     0     0     0    96    94    92 
EURCHF |    -     -     -     -     -     -     -     -     -    94    78    87 
GBPUSD |   73    80    85    90    91     0     0     0     0    93    92    92 
 GER30 |    -     -     -     -     -     -     -     0     0     0    88    86 
NAS100 |    -     -     -     -     -     -     -     0     0    76    75    74 
NZDUSD |   67    78    83    86    88    76    81    85    87     -    91     - 
SPX500 |    -     -     -     -     -     -     -     0     0    80    77    76 
 UK100 |    -     -     -     -     -     -     -     0     0    88    83    82 
  US30 |    -     -     -     -     -     -     -     0     0    87    85    84 
USDCAD |   67    79    83    88    88    74     0     0     0    91    89    84 
USDCHF |   78    81    82    87    90     0     0     0     0    93    92    91 
USDJPY |   74    80    82    89    89     0     0     0     0    89    88    94 
 USOil |    -     -     -     -     -     -     -     0     0    82    83    80 
XAGUSD |    -     -     -     -     -     -     -     -     0    89    86    87 
XAUUSD |    -     -     -     -     -     -     -     -     0    93    93    93



Entries marked with a dash ("-") are simply missing data (no .bar file found). Tried to download all .bar files found on the download page.
The numbers represent the wick percentage (num wicks / total num of HLOCs).

The wick percentage can of course vary from each asset and year depending on if the asset is trending or not. But what looks peculiar are the zeros. Seems strange these should be zero?

jcl, do you know why this could be?

Then there's the question what effect this has on backtesting, if any. Rarely do you test on the 1-min bar period IMHO.

I included the script I used. Requires a working Python installation. Run from the History folder.
Code:
import sys
from struct import calcsize, unpack_from
from collections import namedtuple

Tick = namedtuple('Tick', ['open', 'close', 'high', 'low', 'time'])
YEARS = range(2002, 2013 + 1)
ASSETS = [
    'AUDUSD', 'EURUSD', 'EURCHF', 'GBPUSD', 'GER30', 'NAS100',
    'NZDUSD', 'SPX500', 'UK100', 'US30', 'USDCAD', 'USDCHF',
    'USDJPY', 'USOil', 'XAGUSD', 'XAUUSD'
]

def parse_bar_file(filename):
    ticks = open(filename, 'rb').read()
    format = '<ffffd'
    format_size = calcsize(format)
    num_ticks = len(ticks) / format_size
    return [Tick(*unpack_from(format, ticks, format_size * i)) for i in xrange(num_ticks)]

def count_wicks(ticks):
    return len([t for t in ticks if t.high > t.open or t.low < t.close])

def print_summary_matrix():
    print "%6s | %s" % ("Asset", "  ".join(map(str, YEARS)))
    print "-" * 80
    for asset in ASSETS:
        wick_percentages = []
        for year in YEARS:
            try:
                ticks = parse_bar_file("%s_%d.bar" % (asset, year))
            except IOError:
                # Some years are missing
                wick_percentages.append("   - ")
                continue

            num_wicks = count_wicks(ticks)
            if len(ticks) == 0:
                # Some files are empty
                prc = wick_percentages.append("   - ")
                continue

            prc = num_wicks / float(len(ticks))
            wick_percentages.append("%4.0f " % (prc * 100))
        
        print "%6s | %s" % (asset, " ".join(wick_percentages))


print_summary_matrix()


Last edited by pipclown; 01/04/14 03:15.