​文​华​财​经​公​式&#82

[复制链接]
查看237 | 回复0 | 2021-8-22 16:27:09 | 显示全部楼层 |阅读模式

以下是​文​华​财​经​公​式​已​破​解​的​交​易​策​略​源​码​(无源码的请下载附件导入)

已破解的交易策略源码:

DIRECTION:=CLOSE-REF(CLOSE,10);
 VOLATILITY:=SUM(ABS((CLOSE-REF(CLOSE,1))),10);
 ER:=ABS(DIRECTION/VOLATILITY);
 FASTSC:=2/(2 + 1);
 SLOWSC:=2/(30 + 1);
 SSC:=ER*(FASTSC-SLOWSC)+SLOWSC;
 cxh99.com:c,nodraw;
 CONSTANT:=SSC*SSC;
 AMAHIGH:=REF(EMA(HIGH,100),1)+CONSTANT*(HIGH- EMA(HIGH,100));
 AMACLOSE:=REF(EMA(CLOSE,100),1)+CONSTANT*(CLOSE- REF(EMA(CLOSE,100),1));
 AMALOW:=REF(EMA(LOW,100),1)+CONSTANT*(LOW- EMA(LOW,100));
 REF(LOW>AMAHIGH,1),BK;
 REF(CLOSE<AMACLOSE OR CLOSE<=0.995*BKPRICE,1),SP;
 REF(HIGH<AMALOW,1),SK;
 REF(CLOSE>AMACLOSE OR CLOSE>=1.005*SKPRICE,1),BP;
 AUTOFILTER;


源码解析:
DIRECTION赋值:收盘价-10日前的收盘价
VOLATILITY赋值:(收盘价-昨收)的绝对值的10日累和
ER赋值:DIRECTION/VOLATILITY的绝对值
FASTSC赋值:2/(2 + 1)
 SLOWSC赋值:2/(30 + 1)
 SSC赋值:ER*(FASTSC-SLOWSC)+SLOWSC
输出CXH99.COM:收盘价,NODRAW
 CONSTANT赋值:SSC*SSC
 AMAHIGH赋值:昨日最高价的100日指数移动平均+CONSTANT*(最高价- 最高价的100日指数移动平均)
AMACLOSE赋值:昨日收盘价的100日指数移动平均+CONSTANT*(收盘价- 昨日收盘价的100日指数移动平均)
AMALOW赋值:昨日最低价的100日指数移动平均+CONSTANT*(最低价- 最低价的100日指数移动平均)
昨日最低价>AMAHIGH,BK
昨日收盘价<AMACLOSEORCLOSE<=0.995*BKPRICE,SP
昨日最高价<AMALOW,SK
昨日收盘价>AMACLOSEORCLOSE>=1.005*SKPRICE,BP
 AUTOFILTER
 

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则