[技術指標]排序模板[金字塔模型]
相關標簽:
序列排序:
runmode:1;
bkname:=\'連續(xù)合約\';
stks:=stkcount(bkname);
variable:stklabels[stks]=0;
variable:stktrades[stks]=0;
for i=1 to stks do begin
code:=stkfromblk(bkname,i);
stklabels[i]:=strremove(code,0,2);
stktrades[i]:=(callstock(stklabels[i],vthigh,-1,0)-callstock(stklabels[i],vtlow,-1,0))/callstock(stklabels[i],vtopen,-1,0)*100;
end
p:=sortpos(stktrades,1,1,stks);
for i=1 to stks do begin
if stricmp(stklabel,stklabels[stktrades[i]])=0 then
mypos:=i;
end
序列位置:mypos,linethick0;
bkname:=\'連續(xù)合約\';
stks:=stkcount(bkname);
variable:stklabels[stks]=0;
variable:stktrades[stks]=0;
for i=1 to stks do begin
code:=stkfromblk(bkname,i);
stklabels[i]:=strremove(code,0,2);
stktrades[i]:=(callstock(stklabels[i],vthigh,-1,0)-callstock(stklabels[i],vtlow,-1,0))/callstock(stklabels[i],vtopen,-1,0)*100;
end
p:=sortpos(stktrades,1,1,stks);
for i=1 to stks do begin
if stricmp(stklabel,stklabels[stktrades[i]])=0 then
mypos:=i;
end
序列位置:mypos,linethick0;
逐K排序
runmode:0;
bkname:=\'連續(xù)合約\';
stks:=stkcount(bkname);
variable:stklabels[stks]=0;
variable:stktrades[stks]=0;
variable:stkposes[stks]=0;
for i=1 to stks do begin
code:=stkfromblk(bkname,i);
stklabels[i]:=strremove(code,0,2);
stktrades[i]:=(callstock(stklabels[i],vthigh,-1,0)-callstock(stklabels[i],vtlow,-1,0))/callstock(stklabels[i],vtopen,-1,0)*100;
if stktrades[i]>0 then
stktrades[i]:=stktrades[i];
else
stktrades[i]:=0;
stkposes[i]:=i;
end
for i=1 to stks do begin
for j=1 to stks-i do begin
if stktrades[j] then begin
bkname:=\'連續(xù)合約\';
stks:=stkcount(bkname);
variable:stklabels[stks]=0;
variable:stktrades[stks]=0;
variable:stkposes[stks]=0;
for i=1 to stks do begin
code:=stkfromblk(bkname,i);
stklabels[i]:=strremove(code,0,2);
stktrades[i]:=(callstock(stklabels[i],vthigh,-1,0)-callstock(stklabels[i],vtlow,-1,0))/callstock(stklabels[i],vtopen,-1,0)*100;
if stktrades[i]>0 then
stktrades[i]:=stktrades[i];
else
stktrades[i]:=0;
stkposes[i]:=i;
end
for i=1 to stks do begin
for j=1 to stks-i do begin
if stktrades[j]
t1:=stktrades[j];
stktrades[j]:=stktrades[j+1];
stktrades[j+1]:=t1;
t2:=stkposes[j];
stkposes[j]:=stkposes[j+1];
stkposes[j+1]:=t2;
end
end
end
for i=1 to stks do begin
if stricmp(stklabel,stklabels[stkposes[i]])=0 then
mypos:=i;
end
逐K位置:mypos,linethick0;
{別忘了將本網(wǎng)告訴您身邊的朋友,向朋友傳達有用資料,也是一種人情,你朋友會感謝你的。}
有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友
可聯(lián)系技術人員 QQ: 1145508240 進行 有償 編寫!(不貴!點擊查看價格!)
相關文章
-
沒有相關內容