請問"!" Hts 語碼怎麼改成MC 的MAFC函數(shù)
作者:MultiCharts MC 來源:cxh99.com 發(fā)布時間:2012年06月22日
- 咨詢內(nèi)容: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