The more I have thought about static arrays for my AFL needs, the more I see that what I am looking for is a quite limited implementation.
Static arrays would have low overhead and give the speed needed just like regular arrays. The primary need is to avoid re-computing complex things all the time that only need to be computed under certain conditions or perhaps once per new bar. This allows far richer AFLs to be developed for real time trading, while improving the responsiveness of the UI interaction under heavy compute conditions. The life of a static array is fleeting.
Static arrays are not permanent like ATC, and do not have the big overhead. Static arrays as I envision them, would have to be updated via the user AFL program whenever a change in environment caused the data to become invalid --like changing the symbol or the timeframe --or even adding a new bar (which changes the array size). Having static arrays like this would allow breaking the AFL into two parts --the fast part that needs to run for every second, and the part that needs to run once per compressed timeframe, volume, or range bar.
I am sure there are technical issues involved, or TJ would have already provided them since they are so useful for speeding up AFL. First rule of making programs fast is pre-compute everything possible and not inside a loop. AFL is one big loop.
Perhaps what I am looking for are not technically "static" arrays in the normal sense. Maybe I need to call them by a different name for the suggestion box. Perhaps there is an even easier way to address this need with a new AFL syntax: keep(myArray);
Comments anyone?
Dennis Brown