文華里面的ma,sma,ema對應(yīng)mc里面什么函數(shù) [MC]
-
MC用戶求助:
文華的MA和EMA分別對應(yīng)MC中的average和xaverage
?
文華中的sma是擴(kuò)展指數(shù)加權(quán)移動平均函數(shù),代碼如下:
?
//sma
inputs:?
PriceValue( numericseries ),?
Len( numericsimple ) ,?
waite(numericsimple);? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
variables:?
var0( waite/ ( Len) ) ;
if CurrentBar = 1 then
sma = PriceValue
else
sma = sma[1] + var0 * ( PriceValue - sma[1] ) ;
?
-
MC回復(fù)討論一:
文華的MA和EMA分別對應(yīng)MC中的average和xaverage
?
文華中的sma是擴(kuò)展指數(shù)加權(quán)移動平均函數(shù),代碼如下:
?
//sma
inputs:?
PriceValue( numericseries ),?
Len( numericsimple ) ,?
waite(numericsimple);? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
variables:?
var0( waite/ ( Len) ) ;
if CurrentBar = 1 then
sma = PriceValue
else
sma = sma[1] + var0 * ( PriceValue - sma[1] ) ;
有思路,想編寫各種指標(biāo)公式,程序化交易模型,選股公式,預(yù)警公式的朋友
可聯(lián)系技術(shù)人員 QQ: 511411198 進(jìn)行 有償 編寫!(不貴!點擊查看價格!)
相關(guān)文章
-
沒有相關(guān)內(nèi)容