The Hilo Activator Buy Sell Signals strategy is a quantitative trading strategy based on the Hilo Activator indicator. It uses the Hilo indicator to dynamically generate key price thresholds and trigger buy and sell signals when the closing price breaks through these price levels. The strategy supports automated actual trading to establish long and short positions based on rules.
The strategy uses custom variables to set the period, shift, and whether to use exponential moving average for the Hilo Activator indicator. The Hilo indicator contains lines representing key decision price levels for long and short. When the closing price crosses above the Hilo line, a buy signal is generated. When the closing price crosses below the Hilo line, a sell signal is triggered. To clearly visualize the signals, the strategy uses green triangles to mark buy signals and red triangles for sell signals.
The Hilo Activator Buy Sell Signals Strategy has the following advantages:
There are also some risks with this strategy:
The strategy can be optimized from the following aspects:
The Hilo Activator Buy Sell Signals Strategy provides a simple yet reliable quantitative trading framework, identifying key prices to trade based on Hilo indicator thresholds and breakouts. With excellent visual design, adjustable parameters, and automated trading support, further testing and enhancements could make the strategy robust across more instruments and market environments to generate steady excess returns.
/*backtest start: 2024-01-10 00:00:00 end: 2024-01-17 00:00:00 period: 10m basePeriod: 1m exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}] */ //@version=4 strategy("Hilo Activator com Sinais de Compra e Venda", overlay=true) // Entradas personalizadas period = input(8, title="Período") shift = input(1, title="Deslocamento") exp = input(false, title="Média Móvel Exponencial") max = exp ? ema(high[shift], period) : sma(high[shift], period) min = exp ? ema(low[shift], period) : sma(low[shift], period) pos = close > max ? -1 : close < min ? 1 : 0 pos := pos == 0 ? na(pos[1]) ? 0 : pos[1] : pos hilo = pos == 1 ? max : min // Condições para sinais de compra e venda buySignal = crossover(close, hilo) sellSignal = crossunder(close, hilo) plotshape(buySignal, style=shape.triangleup, location=location.belowbar, color=color.green, size=size.small) plotshape(sellSignal, style=shape.triangledown, location=location.abovebar, color=color.red, size=size.small) // plotbar(hilo,hilo,hilo,hilo,color=pos==1?color.red:color.green) strategy.entry("Buy", strategy.long, when = buySignal) strategy.entry("Sell", strategy.short, when = sellSignal)