老师,请写个kd指标背离的指标 [文华财经]
-
咨询内容:
老师,请写个kd指标背离的指标
顶背离和底背离,时请报警发出声音提醒,并且标注底背和顶背
来源:程序化99
-
文华技术人员:
参考:
RSV:=(CLOSE-LLV(LOW,10))/(HHV(HIGH,10)-LLV(LOW,10))*100;//收盘价与N周期最低值做差,N周期最高值与N周期最低值做差,两差之间做比值。 K:=SMA(RSV,3,1);//RSV的移动平均值 D:=SMA(K,3,1);//K的移动平均值 N:=BARSLAST(CROSS(K,REF(K,1)))+1; M:=BARSLAST(CROSSDOWN(K,REF(K,1)))+1; LL1:=VALUEWHEN(CROSS(K,REF(K,1)),LLV(L,M)); LK1:=VALUEWHEN(CROSS(K,REF(K,1)),LLV(K,M)); LL2:=VALUEWHEN(CROSS(K,REF(K,1)),REF(LL1,1)); LK2:=VALUEWHEN(CROSS(K,REF(K,1)),REF(LK1,1)); HH1:=VALUEWHEN(CROSSDOWN(K,REF(K,1)),HHV(H,N)); HK1:=VALUEWHEN(CROSSDOWN(K,REF(K,1)),HHV(K,N)); HH2:=VALUEWHEN(CROSSDOWN(K,REF(K,1)),REF(HH1,1)); HK2:=VALUEWHEN(CROSSDOWN(K,REF(K,1)),REF(HK1,1)); DRAWTEXT(CROSS(LL1<LL2&&LK1>LK2,0.5),L,'底背离'),VALIGN0;//底背离 DRAWTEXT(CROSS(HH1>HH2&&HK1<HK2,0.5),H,'顶背离');//顶背离 PLAYSOUND(CROSS(LL1<LL2&&LK1>LK2,0.5)||CROSS(HH1>HH2&&HK1<HK2,0.5),'A');来源: WWW.CXH99.COM
-
文华客服:
文件名:111.jpg
请查看下状态 -
网友回复:
上面的指标是需要加载为K线附属指标的,您是想加载到副图上显示?这样改下
RSV:=(CLOSE-LLV(LOW,10))/(HHV(HIGH,10)-LLV(LOW,10))*100;//收盘价与N周期最低值做差,N周期最高值与N周期最低值做差,两差之间做比值。 K:SMA(RSV,3,1);//RSV的移动平均值 D:SMA(K,3,1);//K的移动平均值 N:=BARSLAST(CROSS(K,REF(K,1)))+1; M:=BARSLAST(CROSSDOWN(K,REF(K,1)))+1; LL1:=VALUEWHEN(CROSS(K,REF(K,1)),LLV(L,M)); LK1:=VALUEWHEN(CROSS(K,REF(K,1)),LLV(K,M)); LL2:=VALUEWHEN(CROSS(K,REF(K,1)),REF(LL1,1)); LK2:=VALUEWHEN(CROSS(K,REF(K,1)),REF(LK1,1)); HH1:=VALUEWHEN(CROSSDOWN(K,REF(K,1)),HHV(H,N)); HK1:=VALUEWHEN(CROSSDOWN(K,REF(K,1)),HHV(K,N)); HH2:=VALUEWHEN(CROSSDOWN(K,REF(K,1)),REF(HH1,1)); HK2:=VALUEWHEN(CROSSDOWN(K,REF(K,1)),REF(HK1,1)); DRAWTEXT(CROSS(LL1<LL2&&LK1>LK2,0.5),K,'背离',VALIGN0;//底背离 DRAWTEXT(CROSS(HH1>HH2&&HK1<HK2,0.5),K,'背离';//顶背离 PLAYSOUND(CROSS(LL1<LL2&&LK1>LK2,0.5)||CROSS(HH1>HH2&&HK1<HK2,0.5),'';
有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友
可联系技术人员 QQ: 511411198 或微信:cxhjy888 进行 有偿 编写!(不贵!点击查看价格!)
相关文章
-
没有相关内容