Cond1=CCI(14)< 0;

dt=60;

n1=Sum(Cond1,dt);

pr=100*(n1/dt);

Filter=1;

AddColumn(pr,"%",1.2);

paste in new formula window....

this is for output in AA window...



Anthony

  ----- Original Message ----- 
  From: Robert Lu 
  To: [email protected] 
  Sent: Sunday, March 02, 2008 10:31 AM
  Subject: [amibroker] AFL Programming Help Needed


  Hi everyone,

  I am wondering if anyone can help me figure out the following 
  question, which I have tried many times but still fail.

  Here is my question:

  How can we calculate the percentage of time that CCI(14) is trading 
  below 0 in the past 60 bars? (The percentage should be ranging from 
  0% to 100%.) The higher the percentage, the more bullish the stock is.

  Thanks in advance for any help.

  Best regards,

  Robert


   


------------------------------------------------------------------------------


  No virus found in this incoming message.
  Checked by AVG Free Edition. 
  Version: 7.5.516 / Virus Database: 269.21.3/1306 - Release Date: 3/1/2008 
5:41 PM

Reply via email to