Rss & SiteMap

金字塔客服中心 - 专业程序化交易软件提供商 http://www.weistock.com/bbs/

专业程序化软件提供商
共2 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:请老师帮忙下面代码成金字塔预警代码

1楼
lgxyp 发表于:2020/6/4 14:51:14
DIFF1: EMA(C,12) - EMA(C,26),COLOR0000FF,LINETHICK2;
DEA1: EMA(DIFF1,9),COLORC08000,LINETHICK2;
MDIFF : EMA(CLOSE,12) - EMA(CLOSE,26),COLOR0000BD,LINETHICK2;

 
MACD :2*(DIFF1-DEA1), COLORSTICK;

 
A11:=REF(DIFF1,N)=HHV(DIFF1,2*N+1);
B21:=FILTER(A11,N);
C11:=BACKSET(B21,N+1);
D11:=FILTER(C11,N);
T线:REF(DIFF1,BARSLAST(D11)),COLORFF00FF,NODRAW;
STICKLINE(C<0,T线,T线,6,0),COLOR00FFFF;
STICKLINE(C>0,T线,T线,6,0),COLOR00FFFF0;
A12:=REF(DIFF1,N)=LLV(DIFF1,2*N+1);
B22:=FILTER(A12,N);
C12:=BACKSET(B22,N+1);
D12:=FILTER(C12,N);
T1线:REF(DIFF1,BARSLAST(D12)),COLORFF00FF,NODRAW;
STICKLINE(C<0,T1线,T1线,6,0),COLORMAGENTA;
STICKLINE(C>0,T1线,T1线,6,0),COLORMAGENTA;  
STICKLINE(MACD>REF(MACD,1) AND MACD>0,0,MACD,5,0),COLORD500D5;
STICKLINE(MACD>REF(MACD,1) AND MACD<0,0,MACD,0,0),COLORAA5500;
DIFF1上穿T线及DIFF1下穿T1线发出预警
2楼
FireScript 发表于:2020/6/4 15:22:56
预警一般是用后台程序化预警,触发条件时候会自动出弹窗。如果不用后台只能在图表的K线图上输出一些信号之类的。或者做个标记的这种。
以后台预警为例子:

只需要加2句代码
cd1:cross(diff1,T1线);//上穿
cd2:cross(T1线,diff1);//下穿

后台程序化里面把cd1或者cd2设成预警条件即可。

或者直接新建2个后台预警,一个以cd1作为预警条件 一个以cd2作为预警条件。

关于后台程序化:
http://www.weistock.com/WeisoftHelp/kaishihoutaichengshihuajiaoyi.htm
共2 条记录, 每页显示 10 条, 页签: [1]


Powered By Dvbbs Version 8.3.0
Processed in .06641 s, 3 queries.