Quote from OptionScreen:
Are you saying AFL can do things that EL can't do? give an example, because i don't think so?
TS8.1 & EL doesn't appear to support backtesting (someone correct me if I'm mistaken, as I've only been on TS & digging into EL for a few weeks now).
By backtesting I mean some sort of tick/bar/whatever replay (as in eSignal) or going back intraday or historically on a chart bar/tick data. This is a big feature in AB (eSignal has tick "replay") you write some AFL with some conditions and AB goes back over the bar/tick data in an interval you specify (3-min, 10-min, 1-day, etc) and generates buy/sell (and any user created column as well).
Note that I was using the Real Time version of AB with eSignal as the data feed.
There are some portfolio management functions as well to "manage" your profit/loss, etc. I see that EasyLang has this but all EL functions return "real account info", exactly your dollar cents in your brokerage account. So AB you can easily create an test account, fund it, and see your results against past historical data.
Any condition would "fill" with RT data (say, 3-min bars) back as far as AB has defined, say 8000 bars.
Nutshell AFL example:
Buy=Cross(MACD(fast,slow),Signal(fast,slow));
The Automatic Analysis window (the "backtest" window) will populate rows with the date and time that the condition was met with the current symbol or complete list (stocks here) Then stick some code in there to buy 100 shares at xx in your "test" account, and so on.
These links will explain better:
http://www.amibroker.com/docs/ab401.html
http://amibroker.com/newsletter/01-2005.html
EL can't write to a disk file, as far as I know. Thus I am resigned to attach a VB script to do this and execute it in EL. Why would I care? I'd like to write a balance in $$ in a "test" account to disk file so I can re-read the number/data the next time I execute that AFL script, or another script. AB allows you to export csv data from results, but if you're doing it over and over, why not write/append to a text file.
FH = fopen("c:\\temp\ABTest.txt", "a");
fputs(minuteTime +Name() +WriteVal(rtLast, 1.2) +WriteVal(rtChange, 1.2) +WriteVal(rtChangePct, 1.1) +WriteVal(rtTotVol, 1.0) +n, FH);