【CCIClassic】
[code]Inputs: Len(NumericSimple);Variables: var0(0),var1(0),var2(0),var3(0), var4(0);
If Len > 0 Then Begin
var4 = (High + Low + Close) / 3;
var3 = Average(var4 , Len);
var2 = 0;
for var1 = 0 to Len - 1 Begin
var2 = var2 + AbsValue(var4[var1] - var3);
End;
var2 = var2 / Len;
If var2 = 0 Then
CCIClassic = 0
Else
CCIClassic = (var4 - var3) / (0.015 * var2);
End
Else
CCIClassic = 0;
[/code]
页:
[1]