该策略是一个简单高效的适用于加密货币的短线交易爬坡策略,也可用于中长线趋势交易。其主要组成部分包括价格震荡指标、漩涡指标以及止损止盈的风险管理机制。
该策略的入场条件为: 1. 价格震荡指标为正,表示价格在爬坡; 2. 漩涡指标VIP上穿VIM,表明趋势向上; 3. 当前K线收盘价高于前两根K线的最高价,也意味着价格在向上突破。
当以上三个条件同时满足时做多头入场。
该策略的出场条件为: 1. 价格震荡指标为负,表示价格在回落,做多头出场; 2. 漩涡指标VIP下穿VIM,表明趋势向下,做多头出场; 3. 达到止盈或止损条件。
该策略结合了价格震荡指标和漩涡指标来判断价格趋势和突破信号,能够有效捕捉价格上涨阶段,具有如下优势:
尽管该策略整体来说比较稳定,但也存在一定的风险需要注意:
可通过调整持仓周期、组合更多指标过滤信号、优化参数设置等方式来防范和化解上述风险。
该策略还可从以下几个方向进行优化:
通过上述优化,可以进一步提升策略的胜率、盈利水平、稳定性。
该策略整体较为简洁有效,能够捕捉价格爬坡上涨阶段,在加密货币中具有不错的盈利潜力。虽然仍有进一步优化的空间,但作为一个量化交易的入门策略已经较为出色。总体来说,该策略适合追求高频率盈利的加密货币短线和中线交易者。
/*backtest
start: 2024-01-04 00:00:00
end: 2024-02-03 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © exlux99
//@version=4
strategy(title="Crypto Price Scalper", shorttitle="Scalper Crypto", overlay=true)
inputcc = input(60, title="Number of candles")
low9=lowest(low,inputcc)
high9=highest(high,inputcc)
plotlow = ((close - low9) / low9) * 100
plothigh = ((close - high9) / high9) * 100
plotg = (plotlow +plothigh)/2
center=0.0
period_ = input(14, title="Length VORTEX", minval=2)
VMP = sum( abs( high - low[1]), period_ )
VMM = sum( abs( low - high[1]), period_ )
STR = sum( atr(1), period_ )
VIP = VMP / STR
VIM = VMM / STR
long= crossover(plotg,center) and close > high[2] and crossover(VIP,VIM)
short= crossunder(plotg,center) and crossunder(VIP,VIM)
tplong=input(0.1, title="TP Long", step=0.01)
sllong=input(0.1, title="SL Long", step=0.01)
strategy.entry("long",1,when=long)
strategy.exit("closelong", "long" , profit = close * tplong / syminfo.mintick, loss = close * sllong / syminfo.mintick, alert_message = "closelong")
strategy.close("long",when=short)