Don’t Renko; Wicko!

WickoViewerThere are countless ways to chart price movement (interval or tick-count-based candlesticks, range-bars, Kagi, etc.) but my hands down favorite is Renko. Well, not Renko, per-se, but rather a Renko variant I like to call “Wicko.”  Renkos track fixed price movements irrespective of time, which is super useful if you want to filter out noise.  Unfortunately, a traditional Renko only includes Open and Close prices; not High’s and Low’s.

As to why I bothered to create my own Wicko feed (or to use the QuantConnect term: consolidator), I couldn’t find a single bug-free C# implementation even though I spent something like four hours looking.  There are plenty of contenders, of course—the internet is rife, after all, with iffy code!—but each and every implementation had one or more obvious bugs.  The rounding errors and lack of edge-case handling were the least of it, but the deal-breaker was the marked ignorance of gap handling.

Dare I say, my own implementation handles things beautifully, proved out by a bunch of unit tests.  You can download the source from my GitHub repository.

BTW, the name Renko come from the Japanese term for bricks: renga.  I’ve always liked the notion of laying down bricks on a chart, so that’s another reason to love ’em.