請(qǐng)老師幫忙看一下這個(gè)怎么計(jì)算 [開拓者 TB]
-
咨詢內(nèi)容:
源碼如下,利用兩條均線金叉后的最高點(diǎn)和死叉后的最低點(diǎn)畫轉(zhuǎn)折線,幫忙看一下怎么求取圖中轉(zhuǎn)折點(diǎn)的位置和價(jià)格:
//------------------------------------------------------------------------
Params
Numeric N1(5);
Numeric N2(20);
Vars
Series<Numeric> Line1;
Series<Numeric> Line2;
Series<Numeric> exhl;
Series<Numeric> hhbar;
Series<Numeric> llbar;
Events
OnBar(ArrayRef<Integer> indexs)
{
Line1 = XAverage(c,n1);
Line2 = XAverage(c,n2);
if(line1<line2)
{
exhl=Min(l,exhl);
}
if(line1>line2)
{
exhl=max(h,exhl);
}
hhbar=NthCon(h==exhl,1);
llbar=NthCon(l==exhl,1);
//PlotNumeric("Line1",Line1);
//PlotNumeric("Line2",Line2);
if(h==exhl)
{
if(hhbar[1]>llbar[1])
{Unplot("exhl",llbar+1);
PlotNumeric("exhl",exhl);
}else if(hhbar[1]<llbar[1])
{Unplot("exhl",hhbar[1]+1);
PlotNumeric("exhl",exhl);
}
}
if(l==exhl)
{
if(hhbar[1]<llbar[1])
{
Unplot("exhl",hhbar+1);
PlotNumeric("exhl",exhl);
}else if (hhbar[1]>llbar[1])
{
Unplot("exhl",llbar[1]+1);
PlotNumeric("exhl",exhl);
}
}
}
//------------------------------------------------------------------------
// 編譯版本 GS2015.12.25
有思路,想編寫各種指標(biāo)公式,交易模型,選股公式,還原公式的朋友
可聯(lián)系技術(shù)人員 QQ: 262069696 或微信號(hào):cxh99cxh99 進(jìn)行 有償收費(fèi) 編寫!
(怎么收費(fèi),代編流程等詳情請(qǐng)點(diǎn)擊閱讀!)
(注:由于人數(shù)限制,QQ或微信請(qǐng)選擇方便的一個(gè)聯(lián)系我們就行,加好友時(shí)請(qǐng)簡(jiǎn)單備注下您的需求,否則無法通過。謝謝您!)
相關(guān)文章
-
沒有相關(guān)內(nèi)容