作者Betalker (Talker)
看板Trading
标题[问题] 请问MAFC函数
时间Sun Aug 31 12:30:35 2008
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 If
MAFC = 0
If Length > 0 Then
MAFC = Summation / Length
End If
===
Parameter: Price(Numeric), Length(Numeric)
Variables: Summation(0), Counter(0)
Summation = 0
For counter = 0 To Length - 1
Summation = Summation + Price[counter]
End For
If Length >= 1 Then
MA = Summation / Length
Else
MA = 0
End if
===
请问要如何把MA和MAFC改成TS可以用的程式码?
因为我改了一阵子,还是改不出来
所以请教各位能替我解答
Thx^^
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 118.161.176.132