Empty4's "unique" implementation ? A very 'polite' description of Empty4's 'features'!garyfritz » 21 Apr 2013, 15:15 wrote:No, José Luis, I abandoned this indicator long ago. The approach I used would have worked very cleanly with every other trading platform I've ever used, but I could never get it to behave with Empty4's "unique" implementation.
I'm currently working on similar CS concepts. Usually everything works fine if you're NOT going too far back from current bar, about 300 - 500 bars are mostly fine for me on short timeframes (GP Demo). If you're proceeding backwards to go for past values, that 'good old' feature of Empty4 missing bars begins to smash your indicator.
We're used to code indicators using the bar index as the common anchor on the time dimension. For CS indicators, this does not work if bars are missing. If bars were missing equally for all pairs involved it would be ok (more or less). But what if (let's say in M5) pair X carries timestamp T on bar index I, while pair Y carries T + 85 minutes on the same coordinate? Just imagine what this means for your CS calculation!
I wrote a test script for my price history. On M5 I found discrepancies of more than 6 hours after 10000 bars. Every ordinary CS indicator will strictly follow GIGO rules in this case.
All you can do is recode your CS indicators using timestamps as anchor points for your calculations instead of usual bar index. It's a workaround that costs a little coders' sweat and a lot of CPU power at runtime if used uncautiously.
I'm still working on the CPU resource part.