如要處理指數商品類波動的不確定性, 以及雜訊問題

適應性控制可估測系統模式的參數,並據此計算控制指令

 

 

 

 

 

程式碼

Parameters: Period(10), Smooth("Y")
IF UpperStr(Smooth) = "Y" Then
Draw1(LinearRegValue(AMA(Period), Period, 0), "Smooth AMA")
Else
Draw2(AMA(Period), "Adaptive MA")
End if

------------------------------------------------------------------------------------

Parameters: Period(10), Pcnt(0.15)
Vars: AMAVal(0), AMAFVal(0), AMALs(0), AMAHs(0)
AMAVal = AMA(Period)
AMAFVAl = AMAF(Period, Pcnt)
IF CurrentBar = 1 Then
AMALs = AMAVal
AMAHs = AMAVal
Else IF AMAVal < AMAVal[1] Then
AMALs = AMAVal
End if
IF AMAVal > AMAVal[1] Then
AMAHs = AMAVal
End if
IF AMAVal - AMALs > AMAFVal Then
Draw1(AMAFVal, "Buy")
End if
IF AMAHs - AMAVal > AMAFVal Then
Draw2(AMAFVal, "Sell")
End if
Draw3(AMAFVal, "AMAFilter")
End if

文章標籤
創作者介紹

日盛期貨 營業員 秉暉- HTS,STS 程式交易 API,條件單,閃電下單,觸及市價

日盛期貨秉暉 發表在 痞客邦 留言(0) 人氣()