求診斷 [金字塔]
- 咨詢內(nèi)容:
我寫個(gè)小程序,其中關(guān)于成交量的句子v1,我讓其顯示出來,但是信號和程序表達(dá)不一致,我在注釋中標(biāo)出,我查了很久沒查出原因,請高手們幫我看一下,多謝。
VARIABLE:buy1=2,cross1=2;
T1:TIME>OPENTIME(1)+500 AND TIME<=OPENTIME(1)+2000;
T2:TIME>OPENTIME(1)+2000 and time<closetime(0)-4000-1500;多:=(c-l)/c*1000;
空:=(h-c)/c*1000;
方向0:=多-空;
方向:ma(方向0,3);vol2:=vol;
vol3:=ma(vol,10);
voll:=(vol2/vol3-1)*100-5;
v1:voll;
//這句的v1>100,好像不起作用?請幫我看一下;
if v1>100 and 方向>0 and t1 then begin
buy1:=1;
end;
if v1>100 and 方向>0 and t2 then begin
buy2:=1;
end;
//這句的v1>100,好像不起作用?請幫我看一下;
if v1>100 and 方向<0 and t1 then begin
buy1:=0;
end;
if v1>100 and 方向<0 and t2 then begin
buy2:=0;
end;
// if cross(ma(c,5),ma(c,10)) then
// cross1:=1;
// if cross(ma(c,10),ma(c,5)) then
// cross1:=0;
b1:buy1;
c1:cross1;
sell(holding>0 and time=closetime(0),0,thisclose);
sellshort(holding<0 and time=closetime(0),0,thisclose);
sell(buy2=0 and holding>0 and t2,0,thisclose);
sellshort(buy2=1 and holding<0 and t2,0,thisclose);
/買1:buy(buy1 and holding=0 and t1,20%,thisclose);
買2:buy(buy2 and holding=0 and t2,20%,thisclose);
buyshort(buy1=0 and holding=0 and t1,20%,thisclose);
buyshort(buy2=0 and holding=0 and t2,20%,thisclose); - 金字塔客服:
不起作用是從哪里判斷出來的?
- 用戶回復(fù):
比如我加在PTA5分鐘K線,雖然我設(shè)定v1>100時(shí),buy1=1,但實(shí)際是v1<100時(shí),buy1卻可能變成1了?謝謝
- 網(wǎng)友回復(fù):
v1<100,你在哪里進(jìn)行判斷了,賦值語句在哪里?
有思路,想編寫各種指標(biāo)公式,程序化交易模型,選股公式,預(yù)警公式的朋友
可聯(lián)系技術(shù)人員 QQ: 1145508240 進(jìn)行 有償 編寫!(不貴!點(diǎn)擊查看價(jià)格!)
相關(guān)文章
-
沒有相關(guān)內(nèi)容