sure you can do embedded loops with extra scripts, but variables are pain to send around And you may want to try: Value=Ref(Value, -1); throwing an error ...
Trader, I don't want to start academic discussion here. I have seen *very* long threads discussing "language A is better than language B" topics. The point is that with AmiBroker you have full choice of tools you prefer. You can write your code in AFL, JScript, VBScript and in compiled languages including C++ (free development kit for registered users), Delphi, Visual Basic etc. Everyone can choose what she/he feels comfortable with. Writing/reading variables require from / to script is easy (again check http://www.amibroker.com/newsletter/13-2001.html) As for example you have given - this is the same as in any language: if you try to use the symbol that is not defined before you will get an error "unknown identifier". Take for example C compiler and write: a[ i ] = a[ i - 1 ] without declaring 'a' first. The C compiler will complain also. In AFL you don't need to declare but you have to assign initial value. If you write Value = my_initial_value; you may later use Value identifier because it is known and Value = Ref( Value, -1 ); will not throw any error. Reading documentation is wise choice for the beginners.
At eSignal. Charting, quotes, testing, direct connect to IB, and much more...and very good customer support. Worth a look IMHO.