[技术指标]排序模板[金字塔模型]
相关标签:
序列排序:
runmode:1;
bkname:=\'连续合约\';
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:=\'连续合约\';
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:=\'连续合约\';
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:=\'连续合约\';
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;
{别忘了将本网告诉您身边的朋友,向朋友传达有用资料,也是一种人情,你朋友会感谢你的。}
有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友
可联系技术人员 QQ: 1145508240 进行 有偿 编写!(不贵!点击查看价格!)
相关文章
-
没有相关内容