So here is my festive contribution to the forum. I know there are renko bits in matlab hanging around already, but they weren't what I wanted so I wrote my own. I used the ES tick data from this site to write the code, and they include "wicks" and proper treatment of "gaps".
The graph one draws a graph, but is only really useful to check the code you've written. I've commented out some moving averages and Donchian channels.
The Data one does the same function as the graph one, except that it produces an HLCO**** matrix so you can backtest easily.
**** check this... for the graph one you might need the financial toolbox because it in effect draws candlesticks with renko data. The candle code in matlab is HLOC. If you don't have the financial toolbox.. err... try and convert it to Octave? Im not into computer stuffz so you get what you see.
(I think when I run it I take out all the redundant ticks in SQL before importing that data into matlab, thats a beast of a task. you might wanna do that too).
As you can tell I'm not a programmer I just crack on until I get what I want, so it can probably be made quicker. but dont ask for any help because im not a programmer, I put it in notepad so you can see what the code is before you run it :-)
Merry Christmas everyone!
The following 4 users say Thank You to cpi65 for this post:
OK, that was my error with Z as input. Which matlab version do you use? It is an adaption of the included Renko in the new version. If receive some errors in my matlab 7.5. but will look and fix the next days.
So my plot is empty.
Causality is the relationship between an event (the cause) and a second event (the effect), where the second event is a consequence of the first.
uBox = the threshold (in ticks, so 0.25 = 1 tick for ES futures) for a new upBox to be printed
dBox = same as above, but for downticks
Note that I run the raw data through SQL before I put it through the code in Matlab and take out all the prints at the same price as before (i.e. no change, so Renko ignores them), this is for the sake of resources. There is the code in there to check for it:
My M-files go through the columns:
Date; Time; Price; Size; Change; Ref (= the number of the print from the original file).
** it could well be that, if you don't have the financial toolbox, the "candle" function isn't there to draw the graph. Have you tried with the Data one? This just produces an M-file with HLCO for each particular renko box.