[問題] 請問MAFC函數

看板Trading (金融交易)作者 (Talker)時間17年前 (2008/08/31 12:30), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/3 (看更多)
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
文章代碼(AID): #18kXvk_x (Trading)
文章代碼(AID): #18kXvk_x (Trading)