Can we create the class in AFL on new version Amibroker

https://www.mail-archive.com/amibroker@yahoogroups.com/msg17904.html

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++.

so like JScript

if i define a struct in C/C++

strcut stockK {
  int   iHighPoint;
  int   iLowPoint;
  int   iupdown;
};

in pure afl

function StockK( iHigh, iLow, iUpDown) {
  this.iHighPoint = iHigh;
  this.iLowPoint = iLow;
  this.iUpDown = iUpDown;
};

and if I define a function in C/C++ like this

int UpDownDownSub(stockK *sindex, stockK *bar, stockK *obar, int i)
{
   bar->iHigh = obar->iHigh;
...
}

and How can I do like this in AFL

As I wrote, there is no struct because there are NO declarations at all. AFL is dynamically typed language, not statically like C.

ths alot ,

i think , i use array for all the data for this