MA(10)<MA(30)则卖出; 中坚点< btc 6725 || MA(10)>MA(30)则买入; Stoploss为8 , 8%止损点. 周期按日线.回测数据还可以;低于日线周期回测数据不好. 本策略是用的趋势指标. *取10000和6725的理由是根据江恩的思路.
(*backtest start: 2019-01-05 00:00:00 end: 2020-02-29 00:00:00 period: 1d exchanges: [{"eid":"Huobi","currency":"BTC_USDT"}] *) // MA10:=MA(C,10); MA30:=MA(C,30); 买入开仓价:=VALUEWHEN(BARSBK=1,O); 卖出开仓价:=VALUEWHEN(BARSSK=1,O); //开仓条件 BUYCONDITION:=REF(C,1) < MMD OR CROSSUP(MA10,MA30); SELLCONDITION:=REF(C,1) > HGH OR CROSSDOWN(MA10,MA30); BKVOL=0 AND BUYCONDITION,BK; SKVOL=0 AND SELLCONDITION,SK; //离场条件 BKVOL>0 AND SELLCONDITION,SP; SKVOL>0 AND BUYCONDITION,BP; // 启动止损 SKVOL>0 AND HIGH>=卖出开仓价*(1+STOPLOSS*0.01),BP; BKVOL>0 AND LOW<=买入开仓价*(1-STOPLOSS*0.01),SP; AUTOFILTER;template: strategy.tpl:40:21: executing "strategy.tpl" at <.api.GetStrategyListByName>: wrong number of args for GetStrategyListByName: want 7 got 6