咨詢內容:
求指標!!!
求新三值的指標,又名:三線反轉圖 我找到了公式但是添加不進去 函數括號等等的問題
求四度空間的指標
?
博易技術人員:
您好,您可以先把您的目前的公式提供一下嗎?
input:m(2,2,9999);//參數M定位,第1根TBL柱線對應K線的序號
ifm<2thenexit;
up:=c>ref(c,1);
down:=c
fc:=close;
fo:=open;
a:=setlbound(up,1);
up:=fc>fo;
n:=m-1;
ifupthenbegin
B4:=fc;
B1:=fo;
b3:=B1;
B2:=B1;
tbl:=1;
endelsebegin
B4:=fo;
B1:=fc;
B2:=B4;
B3:=B4;
tbl:=0;
end;
tblcount:=1;
////////////////////////////////////
fori=n+1todatacountdobegin
iftbl=1thenbegin
ifupthenbegin
iffc>B4thenbegin
tblcount:=tblcount+1;
tblc:=fc;
tblo:=B4;
iftblcount>2thenbegin
tblcount:=3;
B1:=B2;
B2:=B3;
end;
B3:=B4;
B4:=fc;
end;
end
elseifdownthenbegin
iffc
tblcount:=1;
tblc:=fc;
tblo:=B3;
B1:=fc;
B2:=B3;
tbl:=0;
end;
end;
endelsebegin
ifdownthenbegin
iffc
tblcount:=tblcount+1;
tblc:=fc;
tblo:=B1;
iftblcount>2thenbegin
tblcount:=3;
B4:=B3;
b3:=B2;
end;
B2:=B1;
B1:=fc;
end;
end
elseifupthenbegin
iffc>B4thenbegin
tblcount:=1;
tblc:=fc;
tblo:=B2;
B4:=fc;
B3:=B2;
tbl:=1;
end;
end;
end;
end;
stickline(tblc<>0andup,tblc,tblo,7,1)colorred;
stickline(tblc<>0anddown,tblc,tblo,7,0),colorcyan;
ts:=barslast(tblc);
stickline(tblc=0andref(up,ts),ref(tblc,ts),ref(tblc,ts),3,1),colormagenta;
stickline(tblc=0andref(down,ts),ref(tblc,ts),ref(tblc,ts),3,1),colorblue;
cc:tblc,linethick0;
oo:tblo,linethick0;