Board logo

标题: 【AverageFC2】 [打印本页]

作者: 龙听    时间: 2022-11-2 14:55     标题: 【AverageFC2】

  1. Inputs:        Price ( numericseries ) ,
  2.                 Length ( numericseries ) ; { this input is assumed to be constant }

  3. Vars:        Sum( 0 ) ;

  4. If Currentbar = 1 then
  5. Begin
  6.         For Value1 = 0 to Length - 1
  7.         begin
  8.                 Sum = Sum + Price[Value1] ;
  9.         end ;
  10. End
  11. Else
  12.         Sum = Sum[1] + Price - Price[Length] ;

  13.         if Length <> 0 then
  14.                 AverageFC2 = Sum / Length
  15.         else
  16.                 AverageFC2 = 0 ;
复制代码





欢迎光临 龙听期货论坛 (http://qhlt.club/) Powered by Discuz! 7.2