Strategy Name: PBX Strategy
Data cycle: 15M
Support: Commodity Futures
Main chart:
PBX1,formula:PUBU1^^(EMA(C,N1)+EMA(C,N12)+EMA(C,N14))/3;
PBX2,formula:PUBU2^^(EMA(C,N2)+EMA(C,N22)+EMA(C,N24))/3;
PBX3,formula:PUBU3^^(EMA(C,N3)+EMA(C,N32)+EMA(C,N34))/3;
(*backtest
start: 2018-01-01 00:00:00
end: 2018-01-07 00:00:00
period: 30m
exchanges: [{"eid":"Futures_OKCoin","currency":"BTC_USD"}]
args: [["TradeAmount",10,126961],["ContractType","quarter",126961]]
*)
// index
PUBU1^^(EMA(C,N1)+EMA(C,N1*2)+EMA(C,N1*4))/3;
PUBU2^^(EMA(C,N2)+EMA(C,N2*2)+EMA(C,N2*4))/3;
PUBU3^^(EMA(C,N3)+EMA(C,N3*2)+EMA(C,N3*4))/3;
BKVOL=0 AND BARPOS>N3 AND C>PUBU1 AND PUBU1>PUBU2 AND PUBU2>PUBU3,BPK;
SKVOL=0 AND BARPOS>N3 AND C<PUBU1 AND PUBU1<PUBU2 AND PUBU2<PUBU3,SPK;
C<PUBU3,SP(BKVOL);
C>PUBU3,BP(SKVOL);
C<PUBU2 AND PUBU1<PUBU2 AND C>BKPRICE,SP(BKVOL);
C>PUBU2 AND PUBU1>PUBU2 AND C<SKPRICE,BP(SKVOL);
AUTOFILTER;
Backtest on FMZ Quant to know more
Source Code: https://www.fmz.com/strategy/128420