[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] AFL request



PureBytes Links

Trading Reference Links

Hi,

No, Dima I am not going to write a C compiler, sorry :-)
So called "switch" in AFL will be direct replacement for multiple nested
IIF() so you will be able to write something like that:

variable = ISWITCH( cond1, value1,
cond2, value2,
cond3, value3,
otherwise_value );

ISWITCH function will accept variable number of arguments

Hope it helps,
Tomasz

PS: As for C-like syntax: I like it very much and I write AmiBroker using Visual C++
but AFL must be simpler :-) 


----- Original Message ----- 
From: "Dima Rasnitsyn" <rasnitsyn@xxxx>
To: <amibroker@xxxx>
Sent: Monday, January 22, 2001 01:24
Subject: RE: [amibroker] AFL request


Hello Tomasz,

Will the new switch statement allow doing the following?

switch (name()) {
case "SBH1":
case "SB2":
case "SBV1:
coef1 = 1;
coef2 = 2;
break;

case "CTH1":
case "CTV1":
coef1 = 3;
coef2 = 4;
break;

default:
coef1 = coef2 = 0;
break;
}

Thank you,
Dima.


-----Original Message-----
From: Tomasz Janeczko [mailto:tj@x...]
Sent: Sunday, January 21, 2001 3:37 PM
To: AmiBroker Mailing List
Subject: [amibroker] AFL request

Hello Everyone,

I would like to ask you to tell me about your ideas of new functions in AFL.
Already planned are:
- candlestick pattern recognition functions
- Switch statement (replacing multiple nested IIFs)
- FlipFlop function (suitable for filtering out consecutive buys/sells)
- Foreign() function for referencing other stock data in the formula
- Study() for referencing hand-drawn studies

Best regards,
Tomasz Janeczko
===============
AmiBroker - the comprehensive share manager.
http://www.amibroker.com