此主题相关图片如下:捕获.png
老师,怎么限定1根K只开1次
if upper-MID<100*mindiff and upper-MID<80*mindiff and c<ma30 then begin
buy(1,1,MARKETR);
end
if MID-LOWER<120*mindiff and upper-MID<100*mindiff and c<ma30 then begin
buy(1,2,MARKETR);
end
if MID-LOWER<120*mindiff and c<ma30 then begin
buy(1,3,MARKETR);
end
if upper-MID<100*mindiff and upper-MID<80*mindiff and c<ma30 and typebar(1,1)>0 then begin
buy(1,1,MARKETR);
end
if MID-LOWER<120*mindiff and upper-MID<100*mindiff and c<ma30 and typebar(1,1)>0 then begin
buy(1,2,MARKETR);
end
if MID-LOWER<120*mindiff and c<ma30 and typebar(1,1)>0 then begin
buy(1,3,MARKETR);
end
if upper-MID<100*mindiff and upper-MID<80*mindiff and c<ma30 and holding=ref(holding,1) then begin
buy(1,1,MARKETR);
end
if MID-LOWER<120*mindiff and upper-MID<100*mindiff and c<ma30 and holding=ref(holding,1) then begin
buy(1,2,MARKETR);
end
if MID-LOWER<120*mindiff and c<ma30 and holding=ref(holding,1) then begin
buy(1,3,MARKETR);
end
如果还不对,请将全部代码贴出
if upper-MID>100*mindiff and upper-MID>80*mindiff and c>ma30 and tholding2=ref(tholding2,1) then begin
tbuyshort(1,1,mkt);
end
if upper-MID>120*mindiff and upper-MID>100*mindiff and c>ma30 and tholding2=ref(tholding2,1) then begin
tbuyshort(1,2,mkt);
end
if upper-MID>120*mindiff and c>ma30 and tholding2=ref(tholding2,1) then begin
tbuyshort(1,3,mkt);
end
if upper-MID<100*mindiff and upper-MID<80*mindiff and c<ma30 and tholding2=ref(tholding2,1) then begin
tbuy(1,1,mkt);
end
if MID-LOWER<120*mindiff and upper-MID<100*mindiff and c<ma30 and tholding2=ref(tholding2,1) then begin
tbuy(1,2,mkt);
end
if MID-LOWER<120*mindiff and c<ma30 and tholding2=ref(tholding2,1) then begin
tbuy(1,3,mkt);
end
后台不能这样用,要这样改:
GLOBALVARIABLE:tt=0;
if upper-MID>100*mindiff and upper-MID>80*mindiff and c>ma30 and tt<>time then begin
tbuyshort(1,1,mkt);
tt:=time;
end
if upper-MID>120*mindiff and upper-MID>100*mindiff and c>ma30 and tt<>time then begin
tbuyshort(1,2,mkt);
tt:=time;
end
if upper-MID>120*mindiff and c>ma30 and tt<>time then begin
tbuyshort(1,3,mkt);
tt:=time;
end
老师,后台还是没有限制住1根K成交1次的问题
if upper-MID>100*mindiff and upper-MID>80*mindiff and c>ma30 and extgbdata('tt')<>time
then begin
tbuyshort(1,1,mkt);
extgbdata('tt')<>time;
end
if upper-MID>120*mindiff and upper-MID>100*mindiff and c>ma30 and extgbdata('tt')<>time then begin
tbuyshort(1,2,mkt);
extgbdata('tt')<>time;
end
if upper-MID>120*mindiff and c>ma30 and extgbdata('tt')<>time
then begin
tbuyshort(1,3,mkt);
extgbdata('tt')<>time;
end
请改成这样的格式