I found this article on the Internet, saying that afl can't build class but it can be used, but this article was in 2007 and it has been 10 years ago. I wonder if the current AB AFL has improved this point.
From other post:
"How Can i use the class or struct and data pointer like C/C++ language in Amibroker"
That is not entirely accurate. Even back in 2007 it was possible to create class as AFL since "always" supported COM. So you can create COM class / object and use it as you use other objects like IBController, custom backtester (backtester object, trade, signal, and stats classes), and so on. http://www.amibroker.com/guide/a_aflcom.html
Also look at the Osaka plugin source code. It actually implements "table" object that is referenced by pointer.
I think this is a little misunderstood. What I call a "create class" should be "define class", like c/c++.
, we can use "struct" to define the data collection, "class" to define the objects, then create them, use them
And what I want to ask is whether you can do this in simple afl.
The example you gave is that we need to establish the AFL Data Plugin with other programming languages first, and then use these Plugin objects in AFL.
I am sorry for my English is not very good, causing misunderstandings,
There is no struct because in AFL you don't need declarations at all and type is devised from data and variable type can change in runtime. Conceptually it is more similar to JScript, not C/C++.