I am new to Amibroker language, and not in touch with programming in
general for some time now. I read about %C indicator in "Futures &
Options Trader" magazine (issue Oct. 2008) Here is what is says:

=====================================
The %C indicator uses true range
to measure trend strength, as follows:

1. Add each bar's true range in the 14-bar look-back period.

2. Divide this running total by the largest one-day true range 
value of that look-back period.

3. Calculate the logarithm of the raw value from step 2.

4. Divide the result by the logarithm of the look-back 
period (14, in this case).

5. Multiply by 100.

The following example uses 15-minute bars on the E-Mini Russell 2000
futures. On Sept. 12 at noon, the running total of the E-Mini Russell
2000 futures' 14-bar true range was 47.3,and the largest one-bar
true-range of the past 14 bars was 5. The %C reading would be:

1. 47.3/5 = 9.46.
2. log(9.46) = 0.9758.
3. log(14) = 1.1461
4. 0.9758/1.1461 = .8514
5. 0.8514*100 = 85.14

Therefore, the %C indicator's value is 85.14. Logarithms are used
calculation to make sure the extreme levels range from one to 99.
==============================================================

Can someone help to code this?

Thanks in advance,

- SRJ

Reply via email to