use of foreign/setforeign()

#1
Hi,

I came to realize that to do basic stuff, AFL is quite good. working on a single security is not too problematic.

I am now trying to do some thing a bit more complex (which in Excel is not so complex but in AFL looks pretty difficult for me)

In short: I have 4 ETFs, depending on what happens in a formula between ETF1 and ETF2 (a MA() or the ratio between the 2), then Buy ETF.A or ETF.B.

Is there a good/easy tutorial somewhere on how to use setforeign() and foreign()? Amibroker's ones are not very clear...

Thanks