主图: 中轨,公式:MIDLINE^^MA((H + L + C)/3,LENGTH1); 上轨,公式:UPBAND^^MIDLINE + NATR; 下轨,公式:DOWNBAND^^MIDLINE - NATR;
副图: 波动率,公式:ATR:=MA(TR,LENGTH2);
(*backtest start: 2018-07-01 00:00:00 end: 2018-09-17 00:00:00 period: 1h exchanges: [{"eid":"Futures_CTP","currency":"FUTURES"}] args: [["LENGTH2",30],["LENGTH1",100],["ContractType","rb888",126961]] *) TR:=MAX(MAX((H-L),ABS(REF(C,1)-H)),ABS(REF(C,1)-L)); ATR:=MA(TR,LENGTH2); MIDLINE^^MA((H + L + C)/3,LENGTH1); UPBAND^^MIDLINE + N*ATR; DOWNBAND^^MIDLINE - N*ATR; BKVOL=0 AND C>=UPBAND AND REF(C,1)<REF(UPBAND,1),BPK; SKVOL=0 AND C<=DOWNBAND AND REF(C,1)>REF(DOWNBAND,1),SPK; BKVOL>0 AND C<=MIDLINE,SP(BKVOL); SKVOL>0 AND C>=MIDLINE,BP(SKVOL); AUTOFILTER;template: strategy.tpl:40:21: executing "strategy.tpl" at <.api.GetStrategyListByName>: wrong number of args for GetStrategyListByName: want 7 got 6