home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Enigma Amiga Life 109
/
EnigmaAmiga109CD.iso
/
software
/
varie
/
amibroker320
/
afl
/
commentaries
/
cci.afl
next >
Wrap
Text File
|
1999-02-28
|
906b
|
34 lines
/* Project: AmiBroker
** File: cci.afl
** Title: CCI Guru Commentary Example (English)
** Requirements: AFL 1.1 (AmiBroker 3.0) or above
** Date: Feb 9th, 1999
** Written by: Tomasz Janeczko
*/
buy=cross( cci(), -100 );
sell = cross( 100, cci() );
"Review of " + fullname() + " (" + name() + ")" + "\nas of " + date();
"\nCurrent Statistics\n";
"Close: " + WriteVal(Close);
"Change: " + WriteVal(Close - Ref( Close, -1 ) ) ;
"CCI Value:" + WriteVal(CCI());
"\nCCI is now in "+
writeif( cci() < -100, "oversold",
writeif( cci() > 100, "overbought", "neutral" )) +
" range";
bsbuy = barssince( buy );
bssell = barssince( sell );
"\nCCI has generated "+
writeif( bsbuy > 5 AND bssell > 5, "no signals during last 5 periods.",
writeif( bsbuy < bssell, "buy signal " + writeval( bsbuy, 3.0 ),
"sell signal " + writeval( bssell, 3.0) ) + " periods ago.");