龙听期货论坛's Archiver

龙听 发表于 2018-11-30 13:37

已破解的交易策略源码[文华财经公式]

[code]
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;
[/code]

[p=30, 2, left][b]源码解析:[/b][/p][p=30, 2, left]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[/p]

页: [1]