
A estratégia de negociação de indicadores de otimismo de oscilação é uma estratégia de negociação quantitativa desenvolvida com base nas recomendações de Bill Williams em seu livro The New Trading Dimension Array. A estratégia utiliza o diferencial de médias móveis rápidas e médias móveis lentas para construir indicadores de oscilação, e é exibida na forma de gráficos em coluna, emitindo sinais de negociação através da mudança de cor do gráfico em coluna.
O indicador central da estratégia é o indicador de excelência de oscilação de tremor (Awesome Oscillator, AO), cuja fórmula de cálculo é:
AO = SMA(Median Price, Fast Length) - SMA(Median Price, Slow Length)
Dentre eles, o preço médio toma a média entre o preço alto e o preço baixo; o comprimento rápido representa o comprimento do ciclo da média móvel rápida; o comprimento lento representa o comprimento do ciclo da média móvel lenta.
O indicador AO reflete a oscilação dos preços de mercado em diferentes escalas de tempo através da diferença entre as médias móveis rápidas e lentas. Quando a média móvel rápida é maior do que a média móvel lenta, representa uma força de preço de curto prazo mais forte do que a força de preço de longo prazo, como um sinal de compra; Quando a média móvel rápida é menor do que a média móvel lenta, representa uma força de preço de curto prazo mais fraca do que a força de preço de longo prazo, como um sinal de venda.
A estratégia usa o valor atual do indicador AO com o diferencial do período anterior para determinar o estado de vazio do período atual e é marcada por cores diferentes no gráfico em coluna: o valor atual do AO maior que o período anterior é marcado em azul, indicando a compra; o AO menor que o período anterior é marcado em vermelho, indicando a venda.
A estratégia tem as seguintes vantagens:
A estratégia também traz alguns riscos:
Para reduzir os riscos acima, pode-se otimizar a configuração dos parâmetros, ajustar a construção dos indicadores e verificar com outros indicadores.
A estratégia pode ser melhorada em vários aspectos:
Em suma, a estratégia de negociação de indicadores de otimização de oscilação de oscilação usa o diferencial de média móvel rápida e lenta para determinar a mudança de tendência de preços e detectar efetivamente oportunidades de reversão em curto prazo. A estratégia é clara e fácil de implementar, e espera-se obter melhores resultados de negociação por meio de otimização de parâmetros e combinação com outros indicadores.
/*backtest
start: 2022-12-12 00:00:00
end: 2023-12-18 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=2
////////////////////////////////////////////////////////////
// Copyright by HPotter v1.0 29/12/2016
// This indicator is based on Bill Williams` recommendations from his book
// "New Trading Dimensions". We recommend this book to you as most useful reading.
// The wisdom, technical expertise, and skillful teaching style of Williams make
// it a truly revolutionary-level source. A must-have new book for stock and
// commodity traders.
// The 1st 2 chapters are somewhat of ramble where the author describes the
// "metaphysics" of trading. Still some good ideas are offered. The book references
// chaos theory, and leaves it up to the reader to believe whether "supercomputers"
// were used in formulating the various trading methods (the author wants to come across
// as an applied mathemetician, but he sure looks like a stock trader). There isn't any
// obvious connection with Chaos Theory - despite of the weak link between the title and
// content, the trading methodologies do work. Most readers think the author's systems to
// be a perfect filter and trigger for a short term trading system. He states a goal of
// 10%/month, but when these filters & axioms are correctly combined with a good momentum
// system, much more is a probable result.
// There's better written & more informative books out there for less money, but this author
// does have the "Holy Grail" of stock trading. A set of filters, axioms, and methods which are
// the "missing link" for any trading system which is based upon conventional indicators.
// This indicator plots the oscillator as a histogram where periods fit for buying are marked
// as blue, and periods fit for selling as red. If the current value of AC (Awesome Oscillator)
// is over the previous, the period is deemed fit for buying and the indicator is marked blue.
// If the AC values is not over the previous, the period is deemed fir for selling and the indicator
// is marked red.
//
// 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("Bill Williams. Awesome Oscillator (AO)")
nLengthSlow = input(34, minval=1, title="Length Slow")
nLengthFast = input(5, minval=1, title="Length Fast")
reverse = input(false, title="Trade reverse")
xSMA1_hl2 = sma(hl2, nLengthFast)
xSMA2_hl2 = sma(hl2, nLengthSlow)
xSMA1_SMA2 = xSMA1_hl2 - xSMA2_hl2
cClr = xSMA1_SMA2 > xSMA1_SMA2[1] ? blue : red
pos = iff(xSMA1_SMA2 > xSMA1_SMA2[1], 1,
iff(xSMA1_SMA2 < xSMA1_SMA2[1], -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(possig == -1 ? red: possig == 1 ? green : blue )
plot(xSMA1_SMA2, style=histogram, linewidth=1, color=cClr)