TJ answered the same question last year: "This function is not for public 
use. Sorry." 
This is an undocumented function.  It may be just for TJ's 
use, or it could have been created for a paying customer on contract.   
If you choose to use it, it is up to you to discover how it works, and it 
may disappear at any point, or the functionality could change.  I would not 
risk it.  However, you can make your own function in AFL based on your own 
specification.
I have played around with it some and I doubt it does anything you can not 
do in AFL.  It probably just runs faster for what it does.  
BR,
Dennis
On Sep 28, 2009, at 2:30 PM, Ton Sieverding wrote:
  
  
  dp = Divergence(TRI, C, 0.75)==1; 
  Something new to me. Is Divergence an AFL function ? And if so, why 
  can't I find it in the AFL reference ?
  Ton.
 
  
    ----- Original Message -----
    
    
    Sent: Sunday, 
    September 27, 2009 9:27 PM
    Subject: [amibroker] HELP: Trend Reversal 
    Index
    
    
    
    I am trying to capture divergences on the TRI. I am 
    sure I am missing something. Can someone please review the 
    code.
     
    ////////////////////////////////////////
    
    pds = Param("Periods", 13, 3, 30, 1);
    Pds1 = round(pds * 0.231);
    TRI = RSI(pds) + MA(RSI(pds1),pds);
    Plot( TRI, "TRI("+pds+","+pds1+")", ParamColor( "Color", colorCycle ), ParamStyle("Style") );
    dp = Divergence(TRI, C, 0.75)==1;  // positive ---
    dn = Divergence(C, tri, 0.75)==-1; //negative --- 
    shape = dp * shapeSmallCircle + dn * shapeSmallCircle ;
    PlotShapes( 
    shape, IIf( dp, colorGreen, colorRed ),0,TRI,0 );
 
    ////////////////////////////////////////
     
     
__________ Information from 
    ESET Smart Security, version of virus signature database 4460 (20090926) 
    __________
The message was checked by ESET Smart Security.
http://www.eset.com