资源加载中... loading...

价格高低点与一目均线双重趋势策略

Author: 扫地僧, Date: 2021-11-05 10:28:23
Tags: 商品期货趋势My语言

  • 策略名称:价格高低点与一目均线双重趋势策略
  • 数据周期:15M等
  • 支持:商品期货
  • 官方网站:www.quantinfo.com

img

  • 主图:

    LINE1指标线,公式:LINE1^^(HHV(H,N1)+LLV(L,N1))*0.5;

    LINE2指标线,公式:LINE2^^(HHV(H,N2)+LLV(L,N2))*0.5;


(*backtest
start: 2018-07-01 00:00:00
end: 2018-08-16 00:00:00
period: 15m
exchanges: [{"eid":"Futures_CTP","currency":"FUTURES"}]
args: [["N1",90],["N2",150]]
*)

LINE1^^(HHV(H,N1)+LLV(L,N1))*0.5;
LINE2^^(HHV(H,N2)+LLV(L,N2))*0.5;

BKVOL=0 AND BARPOS>N2 AND REF(LINE1,1)<REF(LINE2,1) AND LINE1>=LINE2,BPK;
SKVOL=0 AND BARPOS>N2 AND REF(LINE1,1)>REF(LINE2,1) AND LINE1<=LINE2,SPK;

BKVOL=0 AND H>=HHV(H,N1),BK;
SKVOL=0 AND L<=LLV(L,N1),SK;

C<BKPRICE*(1-SLOSS*0.01),SP(BKVOL);
C>SKPRICE*(1+SLOSS*0.01),BP(SKVOL);
AUTOFILTER;

相关内容

更多内容