龙听期货论坛's Archiver

龙听 发表于 2022-11-1 11:14

【ADXCustomClassic】

[code]Inputs: HPriceValue(NumericSeries), LPriceValue(NumericSeries), CPriceValue(NumericSeries), Len(NumericSimple);
Variables: var0(0), var1(0), var2(0);

var2 = 0;

condition1 = CurrentBar >= 1 AND Len > 0 ;
If condition1 Then Begin
        var1 = 0;
        For var0 = 0 To Len - 1 Begin
                var1 = var1 + DMICustom(HPriceValue, LPriceValue, CPriceValue, Len)[var0];
        End;
        var2 = var1 / Len;
End;

ADXCustomClassic = IntPortion(var2) ;
[/code]

页: [1]