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

[amibroker] Re: AmiBroker 4.31.0 BETA Examples



PureBytes Links

Trading Reference Links

Tomasz,

I think most of us DO understand the benefits of AFL.  It's fast and 
in a lot of cases it somewhat simplifies coding.  However, in it's 
form pre 4.31 one could not do everything one wanted to do inside AFL 
without coding a script and there has always been the danger of using 
future information in AA's which is inherent if the array processing 
methodology used by AFL.  This still exists and is at best somestimes 
a pain to route out.   

--- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko" <amibroker@xxxx> 
wrote:
> Hello,
> 
> About  new if-else
> if-else statement changes flow of execution (opposite to IIF 
function that evaluates all arguments).
> and you can not really write
> 
> if (H >Ref(H,-1))
> 
> because it has no meaning. It would translate to 
> "If high array is higher than high array shifted one bar" (see 
tutorial below)
> flow control statement has to get SINGLE boolean value to make 
decision which
> execution path should be taken. 
> If you write H (or High) it means ARRAY (entire array) 
> if you write H[ i ] - it means i-th element of the array. The 
subscript operator [ ] 
> allows you to access individual array elements.
> 
> Instead you should write:
> 
> for( i = 1; i < BarCount; i++ )
> {
>   if ( H[ i ] > H[ i - 1 ] )
>         x[ i ] = H[ i ];
>   else
>         x[ i ] = L[ i ];
> }
> 
> 
> this will translate to correct one
> "for EVERY BAR 'i'   assign i-th element of high array to the i-th 
element of x array if
>   i-th element of high array is higher than the previous element, 
otherwise assign i-th of
>   low array to the i-th element of x array"
> 
> As you can see in many cases old-style AFL provides much more 
compact
> form. I always tried to explain this advantage of AFL but only a 
few realised that.
> New control statements should be used where it is better to use 
them.
> As I tried to explain during last years in 80% of cases 'old-style' 
AFL provides
> the shortest formula. Only remaining 20% of cases needed script.
> Those 'script-only' cases now can be coded in native AFL thanks to 
new for/while/if-else
> statements. And this is correct usage of them - TO REPLACE SCRIPT 
PARTS.
> 
> Below is a copy of TUTORIAL that explains how array-based functions 
(like IIF) work:
> 
> Tutorial: Understanding how AFL works
> Introduction
> 
> One of most important aspects of AFL is that it is an array 
processing language. It operates on arrays (or rows/vectors) of data. 
This way of operation is quite similar to the way how popular 
spreadsheets work (like Microsoft Excel). Anyone familiar with MS 
Excel should have no trouble quickly picking up AFL. - In fact all 
the examples in this article were all created using MS Excel.
> 
> What is an Array?
> 
> An array is simply a list (or row) of values. In some books it may 
be referred to as a vector. Each numbered row of values in the 
example represents an individual array. Amibroker has stored in its 
database 6 arrays for each stock. One for opening price, one for the 
low price, one for the high price, one for the closing price and one 
for volume (see the rows labelled 1-5 below) and one for open 
interest. These can be referenced in AFL as open, low, high, close, 
volume, openint or o, l, h, c, v, oi.
> 
>      Bar 1 2 3 4 5 6 7 8 9 10 
>       1 Open 1,23 1,24 1,21 1,26 1,24 1,29 1,33 1,32 1,35 1,37 
> 
> Fig 1. Open price array
> 
> Any other array is calculated from these 6 arrays using formulae 
built into AFL. These arrays are not stored in the database but 
calculated where necessary.
> 
> Each individual value in an array has a date associated with it. If 
you have the tool tip option turned on (Preferences -> Miscellaneous 
Tab - > Price data tool tips), when you move your cursor over candle 
on a daily candle chart, a small yellow rectangle appears. AFL then 
looks up the open, low, high, close, volume values in the appropriate 
array and displays them inside the tool tip. 
> 
> Processing arrays - why is AFL so fast?
> 
> Lets see how the following statement is processed:
> 
> MyVariable = ( High + Low )/2;
> 
> When AFL is evaluating statement like this ( High + Low )/2 it does 
not need to re-interpret this code for each bar. Instead it takes the 
High ARRAY and Low ARRAY and adds corresponding array elements in 
single stage. In other words + operator (and other operators too) 
work on arrays at once and it is executed at full compiled-code 
speed, then the resulting array (each element of it) is divided by 2 
also in single stage.
> 
> Let's look into the details - see fig 2.. When AFL engine looks at 
the ( High + Low )/2 it first takes High (1) and Low (2) arrays and 
produces (in single compiled step) the temporary array (3). Then it 
creates the final array (4) by dividing each element of temporary 
array by two. This result is assigned to myVariable
> 
>      Bar 1 2 3 4 5 6 7 8 9 10 
>       1 High (built-in array) 1,24 1,27 1,25 1,29 1,25 1,29 1,35 
1,35 1,37 1,29 
>       2 Low (built-in array) 1,20 1,21 1,19 1,20 1,21 1,24 1,30 
1,28 1,31 1,27 
>       3 High+Low (temporary array created during evaluation) 2,44 
2,48 2,44 2,49 2,46 2,53 2,65 2,63 2,68 2,46 
>       4 ( High+Low ) /2 (gets assigned to MyVariable) 1,22 1,24 
1,22 1,245 1,23 1,265 1,325 1,315 1,34 1,23 
> 
> Fig 2. AFL steps when processing ( High + Low ) /2
> 
> Moving averages, conditional statements
> 
> Let us now consider the following code:
> 
> Cond1 = Close > MA( Close, 3 );
> Cond2 = Volume > Ref( Volume, -1 );
> Buy = Cond1 AND Cond2;
> Sell = High > 1.30;
> 
> This code generates a buy signal when todays close is higher than 3 
day moving average of close AND todays volume is higher than 
yesterday's volume. It also generates a sell signal when today's high 
is higher than 1.30.
> 
> If in your AFL code you need to see if the closing price is greater 
than say a 3 day simple moving average AFL will first run through the 
close array creating a new array called MA(close,3) for the stock 
being analysed. Each cell in the new array can then be compared one 
for one in the close array. In the example an array called Cond1 is 
created this way. For each cell where the closing price is greater 
than the corresponding cell value in MA(close,3) the cell value for 
new array 'Cond1' is set to '1'. If the closing price is not greater 
than the corresponding price in the close array the value in 'Cond1' 
is set to '0'.
> 
> AFL can also look forwards or backwards a number of cells in an 
array using the Ref function (see row 6 where temporary array is 
created holding previous day volume)
> 
> In row 9 a new array called Cond2 has been created by comparing the 
value of each cell in the volume array with its previous cell setting 
the Cond2 cell value to '1' if true and '0' if false.
> 
> Row 10 shows an array called 'Buy' created by comparing the cell 
values in Cond1 with the cell values in Cond2. If the cell in Cond1 
has a '1' AND so does the corresponding cell in Cond2 then a '1' is 
placed in the 'Buy' array cell.
> 
> Row 11 shows an array called 'Sell' created whenever the cell value 
in the close array is greater than $1.30.
> 
>      Day 1 2 3 4 5 6 7 8 9 10 
>       1 Open 1,23 1,24 1,21 1,26 1,24 1,29 1,33 1,32 1,35 1,37 
>       2 High 1,24 1,27 1,25 1,29 1,25 1,29 1,35 1,35 1,37 1,29 
>       3 Low 1,20 1,21 1,19 1,20 1,21 1,24 1,30 1,28 1,31 1,27 
>       4 Close 1,23 1,26 1,24 1,28 1,25 1,25 1,31 1,30 1,32 1,28 
>       5 Volume 8310 3021 5325 2834 1432 5666 7847 555  6749 3456 
>       6 Ref( Volume, -1 ) (temporary array created during eval) 
Null 8310 3021 5325 2834 1432 5666 7847 555  6749 
>       7 MA( Close, 3 ) (temporary array created during eval) Null 
Null 1,243 1,260 1,257 1,260 1,270 1,287 1,310 1,300 
>       8 Cond1 = Close > MA(close,3) (gives 1 (or true) if condition 
met, zero otherwise) Null Null 1 0 1 1 0 0 0 1 
>       9 Cond2 = Volume > Ref(volume,-1) Null 0 1 0 0 1 1 0 1 0 
>       10 Buy = Cond1 AND Cond2 Null  Null 1 0 0 1 0 0 0 0 
>       11 Sell = High > 1.30 0 0 0 0 0 0 1 1 1 0 
> 
> Obviously Buy and Sell are special arrays whose results can be 
displayed in the Analyser window or on screen using a red or green 
value as needed.
> 
> Getting little bit more complex
> 
> The examples above were very simple. Now I will just explain 3 
things that seem to generate some confusion among the users:
> 
>   a.. referencing selected values (SelectedValue, BeginValue, 
EndValue, LastValue) 
>   b.. IIF function 
>   c.. AMA function 
> As written in the Tutorial: Basic charting guide you can select any 
quote from the chart and you can mark From-To range. The bar selected 
by verticall line is called "selected" bar while start and end bars 
of the range are called "begin" and "end" bars. AFL has special 
functions that allow to reference value of the array at selected, 
begin and end bar respectively. These functions are called 
SelectedValue, BeginValue and EndValue. There is one more function 
called LastValue that allows to get the value of the array at the 
very last bar. These four functions take the array element at given 
bar and return SINGLE NUMBER representing the value of the array at 
given point. This allows to calculate some statistics regarding 
selected points. For example:
> 
>   EndValue( Close ) - BeginValue( Close )
> 
> Will give you dollar change between close prices in selected from-
to range.
> 
> When number retrieved by any of these functions is compared to an 
array or any other arithmetic operation involving number and the 
array is performed it works like the number spanned all array 
elements. This is illustrated in the table below (rows 2, 6, 7). 
Green color marks "begin" bar and red color marks "end" bar. Selected 
bar is marked with blue.
> 
>      Day 1 2 3 4 5 6 7 8 9 10 
>       1 Open 1,23 1,24 1,21 1,26 1,24 1,29 1,33 1,32 1,35 1,37 
>       2 BeginValue( Open ) 1,24 1,24 1,24 1,24 1,24 1,24 1,24 1,24 
1,24 1,24 
>       3 EndValue( Open ) 1,32 1,32 1,32 1,32 1,32 1,32 1,32 1,32 
1,32 1,32 
>       4 SelectedValue( Open ) 1,21 1,21 1,21 1,21 1,21 1,21 1,21 
1,21 1,21 1,21 
>       5 LastValue( Open ) 1,37 1,37 1,37 1,37 1,37 1,37 1,37 1,37 
1,37 1,37 
>       6 Close 1,22 1,26 1,23 1,28 1,25 1,25 1,31 1,30 1,32 1,28 
>       7 Close <= BeginValue( Open ) 1 0 1 0 0 0 0 0 0 0 
>       8 result = IIF( Close <= BeginValue( Open ), Close, Open ); 
1,22 1,24 1,23 1,26 1,24 1,29 1,33 1,32 1,35 1,37 
>       9 Period 2 3 4 2 3 5 2 3 4 2 
>       10 Factor = 2/(Period+1) 0,667 0,500 0,400 0,667 0,500 0,333 
0,667 0,500 0,400 0,667 
>       11 1 - Factor 0,333 0,500 0,600 0,333 0,500 0,667 0,333 0,500 
0,600 0,333 
>       12 AMA( Close, Factor ) 0,8125
>      1,0363
>      1,1138
>      1,2234
>      1,2367
>      1,2399
>      1,2853
>      1,2927
>      1,3036
>      1,2866 
> 
> Now the IIF(condition, truepart, falsepart) function. It works that 
it returns the value of second (truepart) or third (falsepart) 
argument depending on condition. As you can see in the table above in 
row 8 the values come from Close array (truepart) for bars when 
condition is true (1) and come from Open array (falsepart) for the 
remaining bars. In that case the array returned by IIF function 
consists of some values from Close and some values from Open array. 
Note that both truepart and falsepart are arrays and they are 
evaluated regardless of the condition (so this is not a regular IF-
THEN-ELSE statement but function that returns array)
> 
> The AMA( array, factor) function seems to cause the most problems 
with understanding it. But in fact it is very simple. It works in 
recursive way. It means that it uses its previous value for the 
calculation of current value. It processes array bar by bar, with 
each step it multiplies given cell of first argument (array) by given 
cell of second argument (factor) and adds it to the previous value of 
AMA multiplied by (1-factor). Lets consider column 3. The value of 
AMA in the column 3 is given by multipling close price from column 3 
(1,23) by factor (0,4). Than we add the previous value of AMA 
(1,0363) multiplied by (1-factor = 0,6). The result (rounded to 4 
places) is 1,23 * 0,4 + 1,0363 * 0,6 = 1,1138.
> 
> If you look at the figures in the row 12 you may notice that these 
values look like a moving average of close. And that's true. We 
actually presented how to calculate variable-period exponential 
moving average using AMA function.
> 
> If you're having trouble coding AFL I suggest you generate the 
arrays in the example in Excel for yourself. If that's a problem get 
some help from a friend - especially if that friend is an accountant.
> 
> Once you've got the hang of it you can code any system from a book 
on trading - or build one yourself.
> 
> 
> 
> 
> 
> 
> 
> 
> Best regards,
> Tomasz Janeczko
> amibroker.com
>   ----- Original Message ----- 
>   From: Jayson 
>   To: amibroker@xxxxxxxxxxxxxxx 
>   Sent: Wednesday, April 16, 2003 7:26 PM
>   Subject: RE: [amibroker] AmiBroker 4.31.0 BETA Examples
> 
> 
>   Anyone, 
> 
>   Ok, a very simple example.....
> 
>   x=IIf (H >Ref(H,-1),H,L);   this would result in a line touching 
either the h or low of each bar based on the condition.
> 
>   if (H >Ref(H,-1))
>   y = H;
>   else
>   y =L;
>   Plot(y,"HL",colorYellow,1);
>   Plot(C,"",4,styleCandle);
> 
>   rather than evaluating the condition on a bar by bar basis this 
looks to lastvalue(h) to determine Y for the whole chart. How would I 
use the if/else syntax to copy IFF?
> 
>   Jayson 
>   -----Original Message-----
>   From: bluesinvestor [mailto:investor@x...]
>   Sent: Wednesday, April 16, 2003 11:00 AM
>   To: amibroker@xxxxxxxxxxxxxxx
>   Subject: RE: [amibroker] AmiBroker 4.31.0 BETA Examples
> 
> 
>   Actually let me clarify something:
> 
>   condition expression= i<barcount;         means do the loop as 
long as i< the current barcount (like cum(1))?? YES
> 
>   this would actually be something like do the loop as long as 
i<barcount where barcount = lastvalue(cum(1))
> 
>    
> 
>   Regards,
> 
>   Peter
> 
>    
> 
>   -----Original Message-----
>   From: bluesinvestor [mailto:investor@x...] 
>   Sent: Wednesday, April 16, 2003 10:51 AM
>   To: amibroker@xxxxxxxxxxxxxxx
>   Subject: RE: [amibroker] AmiBroker 4.31.0 BETA Examples
> 
>    
> 
>   Hello Jayson,
> 
>    
> 
>   myema[ 0 ] = close [0];
> 
>    
> 
>   Amibroker uses zero based arrays meaning that the first record in 
an array is at the 0 position.  Basically this just gives a value to 
the first myema array.  The zero position is the first data record of 
the close array.
> 
>    
> 
>   for ( init-expression ; cond-expression ; loop-expression ) 
statement 
> 
>   init-expression= i=1;          means we start the loop with i=1? 
YES
> 
>   condition expression= i<barcount;         means do the loop as 
long as i< the current barcount (like cum(1))?? YES
> 
>   loop expression= i++     means i+i+i  ??????????  basically this 
just means i = i + 1
> 
>    
> 
>   Hope this helps,
> 
>   Peter
> 
>    
> 
>   -----Original Message-----
>   From: Jayson [mailto:jcasavant@x...] 
>   Sent: Wednesday, April 16, 2003 10:35 AM
>   To: amibroker@xxxxxxxxxxxxxxx
>   Subject: RE: [amibroker] AmiBroker 4.31.0 BETA Examples
> 
>    
> 
>   "All you really need to know about new features in AFL 
> 
>   I described in:
> 
>    
> 
>   http://groups.yahoo.com/group/amibroker/message/37591  "
> 
>    
> 
>    
> 
>   Well, almost all........ 
> 
>    
> 
>   Tomasz or any one smarter than me,
> 
>    
> 
>   Examples certainly help. But I am still a bit lost.... from the 
post....
> 
>    
> 
>    
> 
>   This example illustrates the for statement: 
>    
> 
>   myema[ 0 ] = Close[ 0 ];
> 
>   for( i = 1; i < BarCount; i++ )
>   {
>   myema[ i ] = 0.1 * Close[ i ] + 0.9 * myema[ i - 1 ];
> 
>    
> 
>   myema[ 0 ] = close [0];
> 
>    
> 
>   Do I assume this translates to.....     myema today =close 
today ??  similar to myema=c;??
> 
>    
> 
>   for ( init-expression ; cond-expression ; loop-expression ) 
statement 
> 
>   init-expression= i=1;          means we start the loop with i=1?
> 
>   condition expression= i<barcount;         means do the loop as 
long as i< the current barcount (like cum(1))??
> 
>   loop expression= i++     means i+i+i  ??????????
> 
>   Could someone please convert the expression to english? 
> 
>    
> 
>   Tia,
> 
>    
> 
>   Jayson 
> 
>   -----Original Message-----
>   From: Tomasz Janeczko [mailto:amibroker@x...]
>   Sent: Wednesday, April 16, 2003 5:53 AM
>   To: amibroker@xxxxxxxxxxxxxxx
>   Subject: Re: [amibroker] AmiBroker 4.31.0 BETA Examples
> 
>   Hello,
> 
>    
> 
>   I fully agree. for/while/if-else + array access is covered
> 
>   on 3 or 4 pages of any C/C++ book
> 
>    
> 
>   So this is actually less than 1% of entire C/C++ book.
> 
>    
> 
>   So there is absolutely no need to buy/read C++ book
> 
>    
> 
>   All you really need to know about new features in AFL
> 
>   I described in:
> 
>    
> 
>   http://groups.yahoo.com/group/amibroker/message/37591
> 
>    
> 
>    
> 
>    
> 
>   Best regards,
>   Tomasz Janeczko
>   amibroker.com
> 
>     ----- Original Message ----- 
> 
>     From: uenal.mutlu@xxxx 
> 
>     To: amibroker@xxxxxxxxxxxxxxx 
> 
>     Sent: Wednesday, April 16, 2003 10:39 AM
> 
>     Subject: Re: [amibroker] AmiBroker 4.31.0 BETA Examples
> 
>      
> 
>     Hi Steve,
> 
>     C++ is definitely not required to program in AFL;
> 
>     it would be an overkill! C++ covers maybe 10 times 
> 
>     more stuff than AFL.
> 
>     The new stuff in AFL is easily learnt within 2 hours.
> 
>     Simply ask the people here. 
> 
>     UM
> 
>      
> 
>       ----- Original Message ----- 
> 
>       From: Jayson 
> 
>       To: amibroker@xxxxxxxxxxxxxxx 
> 
>       Sent: Wednesday, April 16, 2003 6:50 AM
> 
>       Subject: RE: [amibroker] AmiBroker 4.31.0 BETA Examples
> 
>        
> 
>       Thank you Steve, I will see if I can locate a copy.
> 
>        
> 
>       Regards,
> 
>        
> 
>       Jayson 
> 
>       -----Original Message-----
>       From: Steve Dugas [mailto:sjdugas@x...]
>       Sent: Tuesday, April 15, 2003 11:22 PM
>       To: amibroker@xxxxxxxxxxxxxxx
>       Subject: Re: [amibroker] AmiBroker 4.31.0 BETA Examples
> 
>       Hi Jayson,
> 
>        
> 
>       Sorry to offer the help and then not be around to follow 
through on it. But, Monday seems to roll around almost every week 
these days, and then its off to work again. Better for you though - 
TJ filled in for me  : - )
> 
>        
> 
>       I'm not sure what kind of book you would like, but since TJ 
seems to follow C++ syntax, I can recommend a C++ book that I found 
to be very good (pretty big though - over 1000 pages). It is very 
thorough and easy to understand - definitely geared for beginners in 
my opinion. It is "C++ Primer Plus" by Stephen Prata. I think you 
could probably just read up on the items you are interested in if you 
aren't interested in learning the whole language. Be careful because 
it seems that there are a couple of other C++ books that call 
themselves "primers", but are definitely NOT for beginners. 
Especially stay away from Stanley Lippman's book, at least until you 
have some experience (take it from me....please!).
> 
>        
> 
>       Steve
> 
>        
> 
>         ----- Original Message ----- 
> 
>         From: Jayson 
> 
>         To: amibroker@xxxxxxxxxxxxxxx 
> 
>         Sent: Monday, April 14, 2003 10:01 AM
> 
>         Subject: RE: [amibroker] AmiBroker 4.31.0 BETA Examples
> 
>          
> 
>         Thank you Tomasz. I have obviously gone from being fairly 
high on the learning curve to Newbie in just one week end :(
> 
>          
> 
>         Could you recommend a beginner level book that may help 
some of us get up to speed with this new upgrade? I might as well be 
reading Japanese , but I don't want to start THAT thread again :))
> 
>          
> 
>         Jayson 
> 
>         -----Original Message-----
>         From: Tomasz Janeczko [mailto:amibroker@x...]
>         Sent: Monday, April 14, 2003 3:54 AM
>         To: amibroker@xxxxxxxxxxxxxxx
>         Subject: Re: [amibroker] AmiBroker 4.31.0 BETA Examples
> 
>         Hello,
> 
>          
> 
>         While IIF works on ARRAY,
> 
>          
> 
>         if/else works on INDIVIDUAL number/boolean (element of the 
array).
> 
>          
> 
>         Therefore you should write either
> 
>          
> 
>         a1 = IIF( C > Ref( C, -1 ), 1, 0 );
> 
>          
> 
>         (or even: a1 = C > Ref( C, -1 );
> 
>          
> 
>         or iterate:
> 
>          
> 
>         for( i = 1; i < BarCount; i++ )
> 
>         {
> 
>            if  ( Close[ i ] > Close[ i - 1 ] )
> 
>                a1[ i ] = 1;
> 
>            else
> 
>                a1[ i ] = 0;
> 
>         }
> 
>          
> 
>          
> 
>         It is important to understand that IIF is a FUNCTION that 
works on arrays,
> 
>         while if/else is control flow STATEMENT.
> 
>         Function just evaluates all arguments and returns value(s)
> 
>         Control flow statement changes program flow.
> 
>          
> 
>         This is fundamental difference.
> 
>          
> 
>         Best regards,
>         Tomasz Janeczko
>         amibroker.com
> 
>           ----- Original Message ----- 
> 
>           From: Jayson 
> 
>           To: amibroker@xxxxxxxxxxxxxxx 
> 
>           Sent: Monday, April 14, 2003 7:55 AM
> 
>           Subject: RE: [amibroker] AmiBroker 4.31.0 BETA Examples
> 
>            
> 
>           Steve,
> 
>           Your example makes sense yet does not seem to work for 
me. Else seems to be ignored . Using the IIF this would simply 
be ......
> 
>           a1=iif(c>ref(c,-1),1,0);  I am certainly missing 
something here.... your input appreciated..
> 
>           jayson
> 
>            
> 
> 
> 
>            
> 
>            
> 
>           Jayson 
> 
>           -----Original Message-----
>           From: Steve Dugas [mailto:sjdugas@x...]
>           Sent: Sunday, April 13, 2003 11:25 AM
>           To: amibroker@xxxxxxxxxxxxxxx
>           Subject: Re: [amibroker] AmiBroker 4.31.0 BETA Examples
> 
>           Hi Ken,
> 
>            
> 
>           I think the concept of loops and if-then-else is the same 
in all languages. I imagine you  could read up on it at many websites 
(e.g. - MSDN scripting site). Once you grasp the concept, it is just 
a matter of using AFL syntax. You would probably use it mostly for 
iterating your arrays if you wanted to do that. Here is a simple 
pseudo-code - try coding it in AFL:
> 
>            
> 
>           For (SecondBar to LastBar)
> 
>             If (Today's Close > Yesterday's Close)
> 
>               MyArray = 1
> 
>             Else
> 
>               MyArray = 0
> 
>           Plot MyArray
> 
>            
> 
>           Of course, please feel free to ask for help!
> 
>            
> 
>           Steve
> 
>            
> 
>           ----- Original Message ----- 
> 
>             From: Tomasz Janeczko 
> 
>             To: amibroker@xxxxxxxxxxxxxxx 
> 
>             Sent: Sunday, April 13, 2003 10:39 AM
> 
>             Subject: Re: [amibroker] AmiBroker 4.31.0 BETA Examples
> 
>              
> 
>             Ken,
> 
>              
> 
>             Very nice story :-)
> 
>              
> 
>             As per your request, attached is a Parabolic SAR 
formula 
> 
>             that I have rewritten from JScript version
> 
>             (http://www.amibroker.com/library/detail.php?id=242)
> 
>              
> 
>              
> 
>             Best regards,
>             Tomasz Janeczko
>             amibroker.com
> 
>             ----- Original Message ----- 
> 
>             From: "Ken Close" <closeks@xxxx>
> 
>             To: <amibroker@xxxxxxxxxxxxxxx>
> 
>             Sent: Sunday, April 13, 2003 4:05 PM
> 
>             Subject: RE: [amibroker] AmiBroker 4.31.0 BETA Examples
> 
>              
> 
>             > Tomasz:
>             > 
>             > As always, you have good sound advice.  However......
>             > 
>             > You say, "Here is a fast sports car, very versatile 
and powerful.  It
>             > has 7 forward gears, but if you are a beginner, do 
not worry....always
>             > stay in maximum of 4th gear. Plenty of nice driving 
is possible in 4th
>             > gear.   Wait until you become more experienced before 
you try gears 5,
>             > 6, and 7."
>             > 
>             > I say, "Thank you for providing such a nimble sports 
car, but I am in a
>             > race, and I do not think I can finish even 10th in 
this race, until I
>             > get out past 4th gear.  If you or others would just 
provide some more
>             > examples of how to use 5th and 6th gear, then I could 
more confidently
>             > try them. Maybe even copy your use of them. Then, 
probably, I will have
>             > enough experience to try 7th gear on my own."
>             > 
>             > More examples is all I am asking for....my objective 
is not to stay in
>             > 4th gear.
>             > 
>             > Thanks,
>             > 
>             > Ken
>             > 
>             > -----Original Message-----
>             > From: Tomasz Janeczko [mailto:amibroker@x...] 
>             > Sent: Sunday, April 13, 2003 9:47 AM
>             > To: amibroker@xxxxxxxxxxxxxxx
>             > Subject: Re: [amibroker] AmiBroker 4.31.0 BETA 
Examples
>             > 
>             > Ken,
>             > 
>             > > First, additional kudos to Tomasz for another step-
jump in capability
>             > of
>             > > Amibroker.
>             > Thank you.
>             > 
>             > > Second, a caution, in marketing terms, of having 
capability that is so
>             > > hard to apply for "non-programmers", beginners, and 
non-technical
>             > types
>             > > that the extra capability is viewed not as an 
advantage or benefit,
>             > but
>             > > just the opposite.
>             > 
>             > The beginners don't really need to jump into deep 
water right from
>             > the start as AFL still supports "old-way" of work.
>             > 
>             > When you write
>             > 
>             > TypicalPrice = (H+L+C) /3;
>             > 
>             > it still operates on H, L, C arrays and produces 
array so no
>             > looping is needed.
>             > 
>             > New features are added as 'extra' stuff and do not
>             > change the way old statements work.
>             > 
>             > > I apologize - but may speak for many hidden 
lurkers - that I have just
>             > > mastered the idea that "every AFL statement only 
executes once", but
>             > now
>             > > I must scramble to reorient my brain for repeated 
iterations thru AFL
>             > > statements.
>             > 
>             > See above - you don't need really to write loops if 
you don't want them.
>             > All previously written code will execute the same way 
as before.
>             > 
>             > Unless you use a while and/or for loop nothing has 
really changed.
>             > 
>             > So, you don't really need to "re-orient your brain" :-
)
>             > 
>             > You can view new features as a replacement of 
JScript/VBScript.
>             > You may use these new features only when you needed 
to use
>             > scripting in previous versions.
>             > 
>             > Best regards,
>             > Tomasz Janeczko
>             > amibroker.com
> 
> 
> 
>     Send BUG REPORTS to bugs@xxxx
>     Send SUGGESTIONS to suggest@xxxx
>     -----------------------------------------
>     Post AmiQuote-related messages ONLY to: 
amiquote@xxxxxxxxxxxxxxx 
>     (Web page: http://groups.yahoo.com/group/amiquote/messages/)
>     --------------------------------------------
>     Check group FAQ at: 
http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
> 
>     Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
Service. 
> 
> 
> 
>   Send BUG REPORTS to bugs@xxxx
>   Send SUGGESTIONS to suggest@xxxx
>   -----------------------------------------
>   Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
>   (Web page: http://groups.yahoo.com/group/amiquote/messages/)
>   --------------------------------------------
>   Check group FAQ at: 
http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
> 
>   Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
Service. 
> 
> 
> 
> 
>   Send BUG REPORTS to bugs@xxxx
>   Send SUGGESTIONS to suggest@xxxx
>   -----------------------------------------
>   Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
>   (Web page: http://groups.yahoo.com/group/amiquote/messages/)
>   --------------------------------------------
>   Check group FAQ at: 
http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
> 
>   Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
Service. 
> 
> 
> 
> 
> 
> 
> 
>   Send BUG REPORTS to bugs@xxxx
>   Send SUGGESTIONS to suggest@xxxx
>   -----------------------------------------
>   Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
>   (Web page: http://groups.yahoo.com/group/amiquote/messages/)
>   --------------------------------------------
>   Check group FAQ at: 
http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
> 
>   Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
Service. 
> 
> 
> 
> 
> 
>   Send BUG REPORTS to bugs@xxxx
>   Send SUGGESTIONS to suggest@xxxx
>   -----------------------------------------
>   Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
>   (Web page: http://groups.yahoo.com/group/amiquote/messages/)
>   --------------------------------------------
>   Check group FAQ at: 
http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
> 
>   Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
Service. 
> 
>         Yahoo! Groups Sponsor 
>        
>        
> 
>   Send BUG REPORTS to bugs@xxxx
>   Send SUGGESTIONS to suggest@xxxx
>   -----------------------------------------
>   Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
>   (Web page: http://groups.yahoo.com/group/amiquote/messages/)
>   --------------------------------------------
>   Check group FAQ at: 
http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
> 
>   Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
Service.


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get a FREE REFINANCE QUOTE - click here!
http://us.click.yahoo.com/2CXtTB/ca0FAA/i5gGAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/