Name
标定值或均线交叉策略
Author
cyberking
Strategy Description
标定值 高点> btc 10000 || MA(10)<MA(30)则卖出; 中坚点< btc 6725 || MA(10)>MA(30)则买入; Stoploss为8 , 8%止损点. 周期按日线.回测数据还可以;低于日线周期回测数据不好. 本策略是用的趋势指标. *取10000和6725的理由是根据江恩的思路.
Strategy Arguments
Argument | Default | Description |
---|---|---|
HGH | 10000 | 高点 |
MMD | 6725 | 中坚点 |
STOPLOSS | 8 | 止损数 |
Source (MyLanguage)
(*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;
Detail
https://www.fmz.com/strategy/187874
Last Modified
2020-03-02 11:22:35