他老提示:语句末尾缺少分号 ,大哥大姐们帮忙看看哪里有问题,谢谢。
DIFF:=EMA(CLOSE,26) - EMA(CLOSE,12);
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA);
EXMA:=EMA(CLOSE,20);
VARIABLE:yin6:=6;
VARIABLE:yin15:=10;
VARIABLE:yin20=20;
VARIABLE:yin30:=30;
VARIABLE:ying50=50;
VARIABLE:yin100=100;
duotou:LAST(CROSS(MACD,0),5,1) AND RANGE(CLOSE,EXMA+2.4,EXMA+4);
kongtou:LAST(CROSS(0,MACD),5,1)AND RANGE(EXMA,CLOSE+2.4,CLOSE+4);
IF duotou THEN
BEGIN
BUY(duotou,30%,market ,market+0.2 );
END
SELL( kongtou,0,market ,marke+0.2 );
win:=0;
win6:=0;
win15:=0;
win20:=0;
win30:=0;
win50:=0;
win100:=0;
if holding > 0 and enterbars > 0 then
BEGIN
win:=close-enterprice
if win >= yin6 then
yin6:=win;
win6:=(yin6-win)/yin6*100;
if win >= yin15 then yin15:=win; win15:=(yin15-win)/yin15*100;
if win >= yin20 then yin15:=win; win20:=(yin15-win)/yin20*100;
if win >= yin30 then yin15:=win; win30:=(yin15-win)/yin30*100;
if win >= yin50 then yin15:=win; win50:=(yin15-win)/yin50*100;
if win >= yin100 then yin15:=win; win100:=(yin15-win)/yin100*100;
end
止损:SELL(win<=-6,0);
止赢1:SELL(win6 >= 80 and openprofit > 0, 0);
止赢2:SELL(win15 >= 40 and openprofit > 0, 0);
止赢3:SELL(win20 >= 35 and openprofit > 0, 0);
止赢4:SELL(win30 >= 30 and openprofit > 0, 0);
止赢5:SELL(win50 >= 25 and openprofit > 0, 0);
止赢6:SELL(win100 >= 20 and openprofit > 0, 0);
DIFF:=EMA(CLOSE,26) - EMA(CLOSE,12);
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA);
EXMA:=EMA(CLOSE,20);
VARIABLE:yin6=6;
VARIABLE:yin15=10;
VARIABLE:yin20=20;
VARIABLE:yin30=30;
VARIABLE:yin50=50;
VARIABLE:yin100=100;
duotou:=LAST(CROSS(MACD,0),5,1) AND RANGE(CLOSE,EXMA+2.4,EXMA+4);
kongtou:=LAST(CROSS(0,MACD),5,1)AND RANGE(EXMA,CLOSE+2.4,CLOSE+4);
IF duotou THEN BEGIN
BUY(duotou,30%,market ,market+0.2 );
END
SELL( kongtou,0,market ,markeT+0.2 );
win:=0;
win6:=0;
win15:=0;
win20:=0;
win30:=0;
win50:=0;
win100:=0;
if holding > 0 and enterbars > 0 then BEGIN
win:=close-enterprice;
if win >= yin6 then BEGIN
yin6:=win;
win6:=(yin6-win)/yin6*100;
END
if win >= yin15 then BEGIN
yin15:=win;
win15:=(yin15-win)/yin15*100;
END
if win >= yin20 then BEGIN
yin15:=win;
win20:=(yin15-win)/yin20*100;
END
if win >= yin30 then BEGIN
yin15:=win;
win30:=(yin15-win)/yin30*100;
END
if win >= yin50 then BEGIN
yin15:=win;
win50:=(yin15-win)/yin50*100;
END
if win >= yin100 then BEGIN
yin15:=win;
win100:=(yin15-win)/yin100*100;
END
end
止损:SELL(win<=-6,0);
止赢1:SELL(win6 >= 80 and openprofit > 0, 0);
止赢2:SELL(win15 >= 40 and openprofit > 0, 0);
止赢3:SELL(win20 >= 35 and openprofit > 0, 0);
止赢4:SELL(win30 >= 30 and openprofit > 0, 0);
止赢5:SELL(win50 >= 25 and openprofit > 0, 0);
止赢6:SELL(win100 >= 20 and openprofit > 0, 0);
楼主书写代码仔细一点,全都是写少个等号 多个字母之类的错误
另外定义全局变量直接用= 而不是用:=
IF then 里运行多个语句的时候 要用begin end 包含起来
程序化提示错误,提示:语句末尾缺少分号 ;无法运行程序化。我现在自己找不出问题啊。
if holding > 0 and enterbars > 0 then
BEGIN
win:=close-enterprice
;//这里你缺少了一个分号
if win >= yin6 then
yin6:=win;
请问一下,蓝长官,为什么我测试的话,会没有反应的呢?