Originally Posted By: jcl
An alternative would be to just generate Renko bars by script, like an indicator. You could run that system with 1-minute time frame, generate an array of Renko bars from the past 2 weeks or so, and evaluate trade signals not on any bar, but any time when the last Renko bar is closed.


I also made first moves in this direction yesterday (actually, yesternight :D). This will be a tough nut to crack, if not impossible at all.

The problem is that I need renko bars to be the first class citizen in Zorro (read: a series) so that I can easily apply other Zorro indicators and heavy machinery to it. But all my attempts so far (read: dirty hacks) failed horribly because series like to tick at the exact BarPeriod * TimeFrame clock just as the documentation clearly states. So I wasn't able to push renko data in a series data type after some hours of experimenting.

Actually, now that I digged a little bit deeper in Zorro internals I see that I still don't understand quite a lot of underlying technology. For example, a series look a lot like the classic C array. But then how do you add new data in front of the array (at index 0)? If this was a C language array, you would then need to shift all the other elements one place to the right. With even a relatively long array it would become quite expensive (memory copy of all the arrays data every BarPeriod). So I don't believe it's working like that, but what are you doing, then? Are you playing games with the pointer to the array (maybe doing realloc() all the time to extend the array to the left)? Do you keep series in the reverse order in memory, but present it backwards to the scripts?

Anyway, I got to this point trying to manipulate a series so that I could fill it at a frequency that I control, but as I already said, my current attemps all failed. Lite-C seems to me like a sandbox that is not allowing such low-level alterations to happen.

I would appreciate your help at this point, jcl. Show me the right direction, before I'm lost completely. frown