Loading ...

标定值或均线交叉策略

Author: cyberking, Date: 2020-03-01 16:15:06
Tags:

MA(10)<MA(30)则卖出; 中坚点< btc 6725 || MA(10)>MA(30)则买入; Stoploss为8 , 8%止损点. 周期按日线.回测数据还可以;低于日线周期回测数据不好. 本策略是用的趋势指标. *取10000和6725的理由是根据江恩的思路. img img


(*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;

More

cyberking 回测日志 - 进度: 100.0 % - 耗时(秒): 4.339 秒 - 日志总数: 46 - 交易次数: 21 - 已完成 (Tick 683.42 KB) 0.0000 账户信息 名称 定价货币 交易品种 手续费 预估收益 Huobi USDT BTC USDT: 389.673 11364.345 /upload/asset/149338fe3f9011badc20c.png /upload/asset/14947231d56707e5f7e8c.png