Price high and low - ROC index strategy

Strategy Name: Price high and low - ROC index strategy

Data cycle: 15M, etc.

Support: Commodity Futures

  • Main chart:
    The highest price of N cycle, formula: HH ^^ HHV (H, N);
    The lowest price of N cycle, formula: LL ^^ LLV (L, N);
  • Secondary chart:
    ARC index, formula: ARC: SMA (RC, M, 1);
(*backtest
start: 2018-03-03 00:00:00
end: 2018-03-31 00:00:00
period: 15m
exchanges: [{"eid":"Futures_CTP","currency":"FUTURES"}]
args: [["ContractType","rb888",126961]]
*)

HH^^HHV(H,N);
LL^^LLV(L,N);
MD:=(HH+LL)/2;

UP:=H>=HH;
DOWN:=L<=LL;

RC:=CLOSE/REF(CLOSE,M);
ARC:SMA(RC,M,1);

BARPOS>N AND BKVOL=0 AND H>=HH AND ARC>1,BPK;
BARPOS>N AND SKVOL=0 AND L<=LL AND ARC<1,SPK;

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

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

Backtest on FMZ Quant to know more

Source Code: https://www.fmz.com/strategy/128417

Add a Comment

Your email address will not be published. Required fields are marked *