請教 [金字塔]
- 咨詢內(nèi)容:
請教各位老師一個(gè)問題,如何將交易開拓者里面的佳慶擺動(dòng)指標(biāo)轉(zhuǎn)為金字塔公式,代碼如下:
If(High > Low)
TmpValue = ((Close - Low) - ( High - Close))/(High - Low)*Vol;
If(CurrentBar==0)
{
ADValue = TmpValue;
}Else
{
ADValue = ADValue[1] + TmpValue;
}
COValue = XAverage(ADValue, FastCo ) - XAverage(ADValue, SlowCo); - 金字塔客服:
currentbar是啥?
- 用戶回復(fù):
if HIGH> LOW then TmpValue := ((Close - Low) - ( High - Close))/(High - Low)*Vol;
if CurrentBar=0 then ADValue := TmpValue;else ADValue := ADValue[1] + TmpValue;
COValue := XAverage(ADValue, FastCo ) - XAverage(ADValue, SlowCo);主要是修改if語句。
XAverage 這個(gè)函數(shù)pel中沒有,如果是要去平均值的話可以使用——AVEDEV(X,N)
你的程序中還有些不符合的地方,程序不能拷過去直接用,如果需要可以直接寫出意圖,讓熱心人士直接完成您的程序功能。
[此貼子已經(jīng)被作者于2011-9-13 13:40:13編輯過] - 網(wǎng)友回復(fù):
主要意圖就是求佳慶值COVALUE,
ADValue = ADValue[1] + TmpValue;這句代碼不知道怎么轉(zhuǎn)到金字塔上來
- 網(wǎng)友回復(fù): 求佳慶值 的方法你最好 列出來,我不太懂怎么算。
相關(guān)文章
-
沒有相關(guān)內(nèi)容