I just had an epiphany about it and I think its valid. I might be able to make this program just as professional programs are (of course I would have to start from scratch which I will not do now) without a single flaw or difference, and I think I know how Amibroker its calculating so fast, by working directly in the paths. No arrays, no strings, no nothing except paths. Directly working inside path data which is a direct holding container of the drawings which are visible on the chart. Zooming is done like that in this program and its fast as hell but I did not think to calculate everything directly in the paths and right now the calculations are made on arrays which contain the data and then are added to the paths. The functions that I used to zoom the data are able to instantly transform thousands of data points somehow, I don`t know those functions work as they access some dll`s but whatever the point is I might be able to use those functions to directly calculate in the paths, or maybe not since the calculations are very complex for those functions, but I`m sure that is how Amibroker manages to instantly perform calculations by using functions like those I used for zooming. Of course the programming language I used to make this program is a general scripting language and it might not have the special functions I would require as calculating an exponential moving average for example is more complex than simply multiplying/dividing/adding or subtracting  a path data points...Yep that is it, that`s how they did it. 

    You see this one with brain squeezing is a very dependable thing, the result of you or me or anyone squeezing the brain to find some solution to a problem depends on multiple variables, like the amount of knowledge on the subject, the complexity of the subject, the state in which the work is and maybe some others. Did I said I squeezed my brain and did not find a solution, I was wrong I squeezed a bit more and I found the solution but for the moment I do not know if its possible by using this scripting language I must study the available functions and what they do in the paths much more. I will not do that now I will finish this program as is, its good enough. I mean programs like Metastock costs 1000 bucks and this one is close enough to it and its free...lacks a data feed but other than that I`m quite sure many would choose to use this program before buying Metastock if this program would have a data feed and I would polish it a bit more...

    Just some thoughts I had this morning 

Comments