- UID
- 2
- 积分
- 2893117
- 威望
- 1396590 布
- 龙e币
- 1496527 刀
- 在线时间
- 13326 小时
- 注册时间
- 2009-12-3
- 最后登录
- 2024-12-26
|
[文华源码] 股指期货1分钟周期均价线+MACD双结合交易模型源码[文华财经公式]
源码内容:
用在IF主力合约,K线周期为1分钟。
- DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26);
- DEA:=EMA(DIFF,9);
- MACD:=2*(DIFF-DEA);//MACD
- F:=REF(AVPRICE,BARSBK); //调用买开那根K的线的均线价格
- G:=REF(AVPRICE,BARSSK);
- BK1:=MACD>REF(MACD,1) AND REF(MACD,1)>REF(MACD,2);
- BK2:=MACD<=-0.5 AND REF(MACD,2)<=LLV(MACD,10);
- BK1 AND BK2,BK;
- SP1:=L<=BKPRICE-5;//买开后,最低价低于买开价5个点以上止损
- SP2:=MACD>=0.5 AND REF(MACD,1)>=HHV(MACD,10) AND MACD<=REF(MACD,1);
- SP1 OR SP2,SP;
- SK1:=MACD<REF(MACD,1) AND REF(MACD,1)<REF(MACD,2);
- SK2:=MACD>=0.5 AND REF(MACD,2)>=HHV(MACD,10);
- SK1 AND SK2,SK;
- BP1:=C>=G+5;
- BP2:=MACD<=-0.5 AND REF(MACD,1)<=LLV(MACD,10) AND MACD>=REF(MACD,1);
- BP1 OR BP2,BP;
- AUTOFILTER;
复制代码 |
论坛官方微信、群(期货热点、量化探讨、开户与绑定实盘)
|