主图:
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;template: strategy.tpl:40:21: executing "strategy.tpl" at <.api.GetStrategyListByName>: wrong number of args for GetStrategyListByName: want 7 got 6