指标编写问答33学习的宝藏
166.问:如果同时3日均线10均线是多头排列怎么写?
答(hjg):
ma(c,3)>ref(ma(c,3),1)ANDma(c,10)>ref(ma(c,10),1)ANDcross(c,ma(c,3));
167.问:
求现价同时上穿5日均价线和10均价线,当曰涨幅大于3%,
答(xiyuanzb):
cross(c,ma(c,5)) and cross(c,ma(c,10)) and (c-ref(c,1))/ref(c,1)>0.03
168.问:
转:"变色MACD三死叉见顶解盘"FXJ5.0用源码 ,求帮忙
《Line4:C1035 :未定义的变量ShoRT
Line4:C1035 :未定义的变量 long
Line5:C1035 :未定义的变量m>>
{变色MACD三死叉见顶 SHORT,12,5,400LONG,26,20,100m,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 ANDW2 AND W3 AND W4,0),colorgreen;
答(待雨游晴):
只是未定义变量,试下这样
{变色MACD三死叉见顶 SHORT,12,5,400LONG,26,20,100m,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 ANDW2 AND W3 AND W4,0),colorgreen;
169.问:
帮忙写一大盘分时均线公式
答(懒汉):
可这样
if capital=0 then
sum(c*v,0)/sum(v,0)/100;
else
sum(amount,0)/sum(v,0)/100;
上面的用于分笔
这个可用于N分钟
w:=barslast(hour<ref(hour,1))+1;
if capital=0 then
sum(c*v,w)/sum(v,w)/100;
else
sum(amount,w)/sum(v,w)/100;
170.问:
EM10或EM20现在上行 怎么写
答(远古菡萏):
TYP:=(HIGH + LOW + CLOSE)/3;
CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));
金叉选股:CROSS(EMA(cci,10) ,EMA(cci,20) );
上行:EMA(cci,10)>ref(EMA(cci,10),1);
页:
[1]