Posted By: alun
Wrapping my head around series - 08/31/22 15:09
Zorro has this poweful concept of series:
Just decomposing it in plain C:
`priceC()` returns `double` and series just delegates to some other function `series0` which I can't find in sources.
I'd like to understand what C black magic transforms the double val parameter into a series of values with the respect to actual function passed into `series` argument?
This could help to build a better intuition around that call.
Would appreciate if someone could explain it.
Thanks,
Alex
Code
vars Closes = series(priceC());
Just decomposing it in plain C:
Code
double* Closes = series(priceC());
`priceC()` returns `double` and series just delegates to some other function `series0` which I can't find in sources.
Code
inline vars series(var val=0,int size=0) { return series0(val,size); }
I'd like to understand what C black magic transforms the double val parameter into a series of values with the respect to actual function passed into `series` argument?
This could help to build a better intuition around that call.
Would appreciate if someone could explain it.
Thanks,
Alex