主图:
Y线,公式:Y^^SMA(REF(HL,N3),N4,1);
YRG最大,公式:MAX_YRG^^MAX(MAX(Y,R),G);
YRG最小,公式:MIN_YRG^^MIN(MIN(Y,R),G);
TOP_FRACTAL,公式:TOP_FRACTAL^^VALUEWHEN(H>=MAX_YRG,TOP);
BOTTOM_FRACTAL,公式:BOTTOM_FRACTAL^^VALUEWHEN(L<=MIN_YRG,BOTTOM);
(*backtest start: 2021-05-31 00:00:00 end: 2022-05-30 23:59:00 period: 1h basePeriod: 15m exchanges: [{"eid":"Futures_CTP","currency":"FUTURES"}] *) N3:=N1+N2; N4:=N2+N3; HL:=(H+L)/2; Y^^SMA(REF(HL,N3),N4,1); R:=SMA(REF(HL,N2),N3,1); G:=SMA(REF(HL,N1),N2,1); TOP_N:=BARSLAST(REF(H,2)=HHV(H,5))+2; BOTTOM_N:=BARSLAST(REF(L,2)=LLV(L,5))+2; TOP:=REF(H,TOP_N); BOTTOM:=REF(L,BOTTOM_N); MAX_YRG^^MAX(MAX(Y,R),G); MIN_YRG^^MIN(MIN(Y,R),G); TOP_FRACTAL^^VALUEWHEN(H>=MAX_YRG,TOP); BOTTOM_FRACTAL^^VALUEWHEN(L<=MIN_YRG,BOTTOM); BKVOL=0 AND C>=TOP_FRACTAL AND TOP_FRACTAL>MAX_YRG,BPK; SKVOL=0 AND C<=BOTTOM_FRACTAL AND BOTTOM_FRACTAL<MIN_YRG,SPK; C<Y,SP(BKVOL); C>Y,BP(SKVOL);template: strategy.tpl:40:21: executing "strategy.tpl" at <.api.GetStrategyListByName>: wrong number of args for GetStrategyListByName: want 7 got 6