168.问:
转:"变色MACD三死叉见顶解盘"FXJ5.0用源码 ,求帮忙
《Line 4: C1035 :未定义的变量 ShoRT
Line 4: C1035 :未定义的变量 long
Line 5: C1035 :未定义的变量 m>>
{变色MACD三死叉见顶 SHORT,12,5,400 LONG,26,20,100 m,9,2,60}{FXJ5.0用}
DIFF
EMA(CLOSE,SHORT) - EMA(CLOSE,LONG)),linethick2,colorgreen;
DEA :EMA(DIFF,M),colorcyan;
MACD:2*(DIFF-DEA), COLORSTICK;
tj:=(diff>dea);
tj1:=(diff>0);
PARTLINE(diff,tj),colormagenta,linethick2;
partline(diff,tj1 and tj),colorred,linethick2;
tj2:=diff<-1 and diff<dea and macd<-1;
partline(diff,tj2),colorblue,linethick2;
B1:=LLV(MACD,999999);
B2:=HHV(MACD,999999);
B3:=(B2-B1);
C1:=LLV(low,999999);
C2:=HHV(high,999999);
C3:=(C2-C1);
D:=B3/C3;
W1:=C<=MA(C,5) AND C<=MA(C,10) ;
W2:=O>MA(C,5) AND O>MA(C,10) ;
W3:=MA(V,5)<=MA(V,10);
W4:=diff<=dea;
TIPTEXT(W1 AND W2,0 ,'断头铡刀:向下的趋势,不是洗盘就是将下跌,卖出'),colorgreen;
TIPTEXT(W1 ,0 ,'5日均线死叉10均线,短线空头势力强大,卖出'),coloryellow;
TIPTEXT(W3 ,0,'5日均量死叉10日均量,做多能量枯竭,卖出'),colorred;
TIPTEXT(W4 ,0,'DIFF下穿DEA,空头形成,卖出'),colorff00ff;
TIPTEXT(W1 AND W2 AND W3 AND W4 ,0 ,'三死叉见顶,卖出'),coloryellow;
TIPTEXT(W1 AND W3 AND W4 ,0,'多方溃败,空方强大,向下彻底形成,卖出'),colorgreen;
VERTLINE(W1 AND W2 AND W3 AND W4,0),colorgreen;
答(待雨游晴):
只是未定义变量,试下这样
{变色MACD三死叉见顶 SHORT,12,5,400 LONG,26,20,100 m,9,2,60}{FXJ5.0用}
short:=12;long:=26;m:=9;
DIFF
EMA(CLOSE,SHORT) - EMA(CLOSE,LONG)),linethick2,colorgreen;
DEA :EMA(DIFF,M),colorcyan;
MACD:2*(DIFF-DEA), COLORSTICK;
tj:=(diff>dea);
tj1:=(diff>0);
PARTLINE(diff,tj),colormagenta,linethick2;
partline(diff,tj1 and tj),colorred,linethick2;
tj2:=diff<-1 and diff<dea and macd<-1;
partline(diff,tj2),colorblue,linethick2;
B1:=LLV(MACD,999999);
B2:=HHV(MACD,999999);
B3:=(B2-B1);
C1:=LLV(low,999999);
C2:=HHV(high,999999);
C3:=(C2-C1);
D:=B3/C3;
W1:=C<=MA(C,5) AND C<=MA(C,10) ;
W2:=O>MA(C,5) AND O>MA(C,10) ;
W3:=MA(V,5)<=MA(V,10);
W4:=diff<=dea;
TIPTEXT(W1 AND W2,0 ,'断头铡刀:向下的趋势,不是洗盘就是将下跌,卖出'),colorgreen;
TIPTEXT(W1 ,0 ,'5日均线死叉10均线,短线空头势力强大,卖出'),coloryellow;
TIPTEXT(W3 ,0,'5日均量死叉10日均量,做多能量枯竭,卖出'),colorred;
TIPTEXT(W4 ,0,'DIFF下穿DEA,空头形成,卖出'),colorff00ff;
TIPTEXT(W1 AND W2 AND W3 AND W4 ,0 ,'三死叉见顶,卖出'),coloryellow;
TIPTEXT(W1 AND W3 AND W4 ,0,'多方溃败,空方强大,向下彻底形成,卖出'),colorgreen;
VERTLINE(W1 AND W2 AND W3 AND W4,0),colorgreen;