0
Follow
0
Followers
以双均线交叉为例,回测btc数据,每次开单金额都是固定的1000,我想每次开单都是1倍,不管有多少余额,请问这个怎么解决?
(*backtest
period: 1h
exchanges: [{"eid":"Futures_BitMEX","currency":"XBT_USD"}]
args: [["TradeAmount",all,126961],["SlideTick",10,126961],["ContractType","XBTUSD",126961]]
*)
M5H^^MA(H,5);
M5L^^MA(L,5);
C>M5H,BPK;
C<M5L,SPK;
C<MA(C,5),SP;
C>MA(C,5),BP;
AUTOFILTER;
Related Recommendations
How to Specify Different Versions of Data for the Rented Strategy by Its Rental Code MetadataAdvanced Tutorial for FMZ Quant platform Strategy WritingElementary Tutorial for FMZ Quant platform Strategy WritingGet Started with FMZ Quant PlatformSECURITY BUGI keep getting error: Exchange_GetAccount: Invalid ContractTypeWe have an incredibly profitable market making algorithm for sideways markets on Bitmex - but need expert to help eliminate wait times during downward volatility in the marketError with deribitLimitations of the backtesting engineHow to install ta-lib on linux docker?
Comment
All comments (6)
(*backtest
start: 2021-07-05 09:00:00
end: 2021-08-03 15:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_CTP","currency":"FUTURES"}]
*)
MA1:MA(CLOSE,5);
MA2:MA(CLOSE,20);
CROSSUP(MA1,MA2),BK;
CROSSDOWN(MA1,MA2),SK;
L<=BKPRICE * 0.97,SP;
H>=SKPRICE * 1.03,BP;
AUTOFILTER;
会触发止损,有可能先触发了平仓
5 years ago
- 1
