文华财经-期货程序化交易-高频模型2 DIFF := EMA(CLOSE,12)- EMA(CLOSE,26); DEA := EMA(DIFF,9); MACD:=2*(DIFF-DEA);//定义MACD指标 A:=L2_BIDVOL1+L2_BIDVOL2+L2_BIDVOL3; B:=L2_ASKVOL1+L2_ASKVOL2+L2_ASKVOL3; D:A-B;//买盘前3档量大于卖盘前3档量 MACD<0&&EVERY(MACD>REF(MACD,1),3)&&D>0&&TIME<=145800,BK;//MACD小于0,但是绿柱线不断变短且买盘量大于卖盘量时,开多仓; MACD>0&&EVERY(MACD<REF(MACD,1),3)&&D<0&&TIME<=145800,SK;//MACD大于0,但是红柱线不断变短且卖盘量大于买盘量时,开空仓; (MACD<0&&EVERY(MACD>REF(MACD,1),3))||TIME>=145800,BP;//MACD小于0但是绿柱线不断变短时或者在14点58分以后,买平仓; (MACD>0&&EVERY(MACD>REF(MACD,1),3))||TIME>=145800,SP;//MACD大于0但是红柱线不断变短时或者在14点58分以后,卖平仓; AUTOFILTER; 路路发智能交易:欢迎您的到来,我们将竭诚为您服务!!!
|