經過了一些時間的摸索與回測, 我終於比較清楚這四個函式 (Function)的差異了, 分享給使用multicharts程式交易的大家!
Price--一般使用"開盤價 (Open), 收盤價 (Close), 最高價 (High), 最低價 (Low), 成交股數(Ticks), 日線成交股數(Volume)....等等。
Length--輸入期間, 如10, 就是以最近10個值來平均
文章標籤
全站熱搜
經過了一些時間的摸索與回測, 我終於比較清楚這四個函式 (Function)的差異了, 分享給使用multicharts程式交易的大家!
Price--一般使用"開盤價 (Open), 收盤價 (Close), 最高價 (High), 最低價 (Low), 成交股數(Ticks), 日線成交股數(Volume)....等等。
Length--輸入期間, 如10, 就是以最近10個值來平均
意外發現醫師有在程式交易 厲害唷^^
小小研究而已!^^
道行還很淺! 持續努力中
新年快樂! SummationFC函數 原始碼如下 inputs: PriceValue( numericseries ), Len( numericsimple ) ; variables: var0( 0 ) ; if CurrentBar = 1 then begin for Value1 = 0 to Len - 1 begin var0 = var0 + PriceValue[Value1] ; end ; end else var0 = var0[1] + PriceValue - PriceValue[Len] ; SummationFC = var0 ; 1. CurrentBar = 1 是甚麼意思? 2. 有 CurrentBar = 0 或其他的嗎?
假設要計算10日平均線,在第9天時, CurrentBar = ? PriceValue[10]=0 嗎?
看您圖表設最大幾根K棒決定, 所以CurrentBar是變動的!