請(qǐng)問這個(gè) 這個(gè)指標(biāo)紅色字體錯(cuò)在哪里,應(yīng)該怎么修改?
作者:金字塔 來源:cxh99.com 發(fā)布時(shí)間:2021年01月08日
-
咨詢內(nèi)容:
VARIABLE:status=0,top_line=0,floor_line=0;
{當(dāng)收盤價(jià)上穿top_line的時(shí)候, status=1,top_line=x上1? floor_line只能朝上,不能朝下(即 ref(floor_line,1)<= x下1 取 max(ref(floor_line,1), x下1)}
{當(dāng)收盤價(jià)下穿floor_line的時(shí)候, status=-1,? floor_line=x下1,? top_line只能朝下,不能朝上(即 ref(top_line,1)>= x下1 取 min(ref(top_line,1), x上1)}
x上1:=llv(hhv(h,2),2),LINETHICK1,colorred;
x下1:=hhv(llv(l,2),2),LINETHICK1,colorgreen;
floor_line0:=max(ref(floor_line,1),x下1);
top_line0:=min(ref(top_line,1),x上1);
top_line1:=ref(top_line,1);
floor_line1:=ref(floor_line,1);
if status=0 then begin
top_line:=x上1;
floor_line:=x下1;
end;
if? top_line1>=c and top_line<c? then begin
status:=1;
end;
if floor_line1<=c and floor_line>c then begin
status:=-1;
end;
if?status=1 then begin
top_line:=x上1;
floor_line:=max(floor_line1,x下1);
end;
if status=-1 then begin
top_line:=min(x上1,floor_line1);
floor_line:=x下1;
end;
tt:top_line;
pp:floor_line;
STICKLINE(status=-1 and CLOSE<OPEN ,OPEN,CLOSE,8,0),colorgreen;
STICKLINE(status=-1 and CLOSE>=OPEN ,OPEN,CLOSE,8,1),colorgreen;
STICKLINE(status=-1 , HIGH,MAX(OPEN,CLOSE),0,0),colorgreen;
STICKLINE(status=-1 , MIN(OPEN,CLOSE),LOW,0,0),colorgreen;
STICKLINE(status=1 and CLOSE>=OPEN ,OPEN,CLOSE,8,1),COLORMAGENTA;
STICKLINE(status=1? and CLOSE<OPEN ,OPEN,CLOSE,8,0),COLORMAGENTA;
STICKLINE(status=1 , HIGH,MAX(OPEN,CLOSE),0,0),COLORMAGENTA;
STICKLINE(status=1 , MIN(OPEN,CLOSE),LOW,0,0),COLORMAGENTA;
{
KD:=;? ? ? ? ? //開多條件
PD:=;? ? ? ? ? //平多條件
KK:=;? ? ? ? ? //開空條件
PK:=;? ? ? ? ? //平空條件
平空:SELLSHORT(PK,1,THISCLOSE);? ? ? ? ? ? ? ? ? //平空信號(hào)
開多:BUY(KD AND HOLDING=0,1,THISCLOSE);? ? ? ? ? //開多信號(hào)
平多:SELL(PD,1,THISCLOSE);? ? ? ? ? ? ? ? ? ? ? ?//平多信號(hào)
開空:BUYSHORT(KK AND HOLDING=0,1,THISCLOSE);? ? ?//開空信號(hào)
}
{
信號(hào)語句排列規(guī)則——先平后開
“費(fèi)率設(shè)置”按鈕——用于合理設(shè)置模型“費(fèi)率”,以便在圖形上正確輸出如下帳戶信息:
持倉:holding,linethick0;
資產(chǎn):asset,noaxis;
可用現(xiàn)金:cash(0),linethick0;
您可以在查看菜單->交易系統(tǒng)模板 中設(shè)置自己需要的模板
}
?
-
金字塔客服:
請(qǐng)具體說明你遇到的問題。單獨(dú)的代碼沒法具體分析。