buy = iif( line > ref( line, -1 ) , 1, 0 );
short = iif( line < ref( line, -1 ), 1, 0 );

Bill
  ----- Original Message ----- 
  From: Bob Waits 
  To: [email protected] 
  Sent: March 16, 2010 8:24 PM
  Subject: [amibroker] CCT Kaleidoscope





  I came across the formula below. Any suggestions on how to write a "BUY" and 
"SELL" signal if the indicator crosses zero. Thanks.

  /* CCT Kaleidoscope
  **
  ** Originally developed by Steve Karnish 
  ** http://www.cedarcreektrading.com
  **
  ** AFL translation by Tomasz Janeczko
  **
  ** Set scaling: Automatic
  ** Grid: Middle
  */

  Graph0=LinRegSlope(C,13) 
  + 100 * ( EMA( EMA( C - Ref( C, -1 ) ,34 ) ,21) 
  / EMA( EMA( abs( C - Ref( C, -1) ),34 ), 21 ) ) 
  +100 * ( EMA( EMA( C - (0.5 * ( HHV(H,13) + LLV(L,13))),21),3) 
  / (0.5 * EMA( EMA( HHV(H,13) - LLV(L,13),21),3 ) ) );






  

Reply via email to