
Esta estratégia baseia-se no índice de flutuação do tesouro, um sistema de negociação de linha curta projetado principalmente para capturar as flutuações de linha curta no mercado. A principal idéia da estratégia é comprar ou vender quando o índice de flutuação do tesouro atravessa ou despenca o limiar especificado.
O índice de flutuabilidade do Caixinha é uma medida quantitativa da flutuabilidade, calculada através do cálculo do intervalo entre os preços mais altos e mais baixos dos títulos. Quando o diferencial entre os preços mais altos e mais baixos se expande, a flutuabilidade aumenta.
A lógica da estratégia é a seguinte:
A estratégia tem as seguintes vantagens:
A estratégia também apresenta alguns riscos:
A solução para o risco é a seguinte:
Esta estratégia pode ser melhorada em:
O conceito geral da estratégia é claro e simples, com características de manipulação de linhas curtas. A configuração de parâmetros é flexível e pode ser ajustada conforme necessário.
/*backtest
start: 2023-11-20 00:00:00
end: 2023-12-04 00:00:00
period: 3h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version = 2
////////////////////////////////////////////////////////////
// Copyright by HPotter v1.0 01/12/2016
// Chaikin's Volatility indicator compares the spread between a security's
// high and low prices. It quantifies volatility as a widening of the range
// between the high and the low price.
// You can use in the xPrice1 and xPrice2 any series: Open, High, Low, Close, HL2,
// HLC3, OHLC4 and ect...
// You can change long to short in the Input Settings
// Please, use it only for learning or paper trading. Do not for real trading.
///////////////////////////////////////////////////////////
strategy(title="Chaikin Volatility Strategy Backtest")
Length = input(10, minval=1)
ROCLength = input(12, minval=1)
Trigger = input(0, minval=1)
reverse = input(false, title="Trade reverse")
hline(0, color=purple, linestyle=line)
hline(Trigger, color=red, linestyle=line)
xPrice1 = high
xPrice2 = low
xPrice = xPrice1 - xPrice2
xROC_EMA = roc(ema(xPrice, Length), ROCLength)
pos = iff(xROC_EMA < Trigger, 1,
iff(xROC_EMA > Trigger, -1, nz(pos[1], 0)))
possig = iff(reverse and pos == 1, -1,
iff(reverse and pos == -1, 1, pos))
if (possig == 1)
strategy.entry("Long", strategy.long)
if (possig == -1)
strategy.entry("Short", strategy.short)
barcolor(pos == -1 ? red: pos == 1 ? green : blue )
plot(xROC_EMA, color=blue, title="Chaikin Volatility Strategy")