--- In [email protected], "progster01" <[EMAIL PROTECTED]> wrote: > > My quick impression is that the original code here was written with > the implicit assumption that "the platform" would be executing it "on > every bar". > > This is the mental paradigm one develops after working with, say, > EasyLanguage, for a long period of time. However, it is not the right > mindset for AFL (at least, that's my opinion at this point) > Yes, I'm pretty certain Rick's project is a good example of how array processing can produce a result quickly and easily compared to other methods.
I'm just about to post a possible solution for Rick's consideration. > When working with AFL, I would suggest thinking of "all these arrays" > just sitting there in memory, and a program that will execute just > once (not on every bar). Is this actually correct? I don't know, and > I have yet to find documentation on the actual execution model that > AFL operates under. > > What I can say is that my ability to get AFL to do what I intended > quickly improved once I adjusted my thinking in this fashion. > It's an interesting point. That is how it is presented. I'm comfortable working with arrays but I haven't developed a feel for the 'just once' execution (I find that part hard to imagine). It doesn't affect the way I work but I am curious about it. Maybe the some of the codesters can explain that part to us. Others who arrive with a programming background have said in the past that they had to work at adjusting to array programming (some of them don't seem to get it for a while). I definitely visualize rows in a spreadsheet when I am trying to do something and that works for me (my only prior experience, that has any relevance to AFL, was mid-level Excel - lucky for me it turned out quite handy and compensates for a non-programming background). Bar by bar execution is the exception (to reference bars use array subscript operators [0] [1] etc where 0 and 1 are the barindex number). I always set out to work in arrays so flow control and looping are also exceptions for me (use only when forced to). Cheers, brian_z
