Like This?

Cond1 = CCI(14);
Cond2 = IIf(Cond1 < 0.00,1,0);
Cond3 = (Sum(Cond2,60)/60)*100;
//Plot(Cond2,"CCI Below Zero",6,1);
Plot(Cond3,"% CCI Below 0",5,1);

  -----Original Message-----
  From: [email protected] [mailto:[EMAIL PROTECTED]
Behalf Of Robert Lu
  Sent: Sunday, March 02, 2008 8:31 AM
  To: [email protected]
  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


  

Reply via email to