//為什么我的后臺(tái)止贏不好用,是哪里寫錯(cuò)了?
//如果持倉(cāng)盈利大于50點(diǎn)則開(kāi)始移動(dòng)止贏
持倉(cāng):=holding;
持倉(cāng)1:=THOLDING2;
VARIABLE:biaoji=0;
VARIABLE:zuigao=0;
VARIABLE:zuidi=0;
if h-tenterprice>50 and tbuyholding(0)>0 and biaoji=0 then begin
zuigao:=HIGH;
biaoji:=1;
end
if HIGH>zuigao and tbuyholding(0)>0 then zuigoa:=HIGH;
if LOW<zuigao-1 and tbuyholding(0)>0 then begin
tsell(1,0,mkt);
biaoji:=0;
end
if tenterprice-l>50 and TSELLHOLDING(0)>0 and biaoji=0 then begin
zuidi:=LOW;
biaoji:=1;
end
if LOW<zuidi and TSELLHOLDING(0)>0 then zhuidi:=LOW;
if HIGH>zuidi-1 and tbuyholding(0)>0 then begin
tsellshort(1,0,mkt);
biaoji=0;
end
后臺(tái)不要用圖表全局變量variable
后臺(tái)的全局變量是用extgbdataset或者GLOBALVARIABLE
GLOBALVARIABLE用法和variable一樣,extgbdataset用法看函數(shù)說(shuō)明,比GLOBALVARIABLE復(fù)雜一點(diǎn)
好的,我具體研究一下
謝謝!