The http://www.amibroker.com/guide/a_userfunctions.html provides some info on variable scope within functions.
Are there any articles or AFL documentation that discuss and provide examples for an AFL formula variable’s scope?
For example, are variables “private” to an AFL formula in situations like:
a. Two chart windows (same formula used on each of the two chart windows (in a chart pane))
b. One chart window with one chart pane. The chart pane has two formulas that use the same variable name.
c. One chart window with 2 chart panes. Each chart pane has a different formula, and but use several variables that have the same name.
I am asking about regular AFL variable names.
In other words, is there a global or local scoping that can be provided within a formula to guarantee that the variables in a formula remain private, or can optionally be made global and shareable across chart panes, chart windows, or a session?