您现在的位置:程序化交易>> 期货公式>> (MC)multicharts>> MC知识>>正文内容

请问"!" Hts 语码怎麽改成MC 的MAFC函数 [MultiCharts MC]

  • 咨询内容:HTS 的MAFC 请问如何改成MC版? 感谢  !  Parameter: Price(Numeric), Length(Numeric)
    Variables: Summation(0), Counter(0), LoopCount(1), Initialized(False)If !Initialized Then
    //If CurrentBar = 1 Then
     Summation = Price[0]
     LoopCount = 0
     For counter = 1 To Length - 1
      Summation = Summation + Price[counter]
      LoopCount += 1
     End For
     If LoopCount = Length Then
      Initialized = True
     End If
    Else
     Summation = Summation + Price - Price[Length]
    End IfMAFC = 0
    If Length > 0 Then
     MAFC = Summation / Length
    End If

     

  • MC技术部:If !Initialized Then
    改成
    If Initialized = false Then

【字体: 】【打印文章】【查看评论

相关文章

    没有相关内容