看板 Trading 關於我們 聯絡資訊
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