
A principal ideia da estratégia é determinar a direção do preço futuro, traçando uma linha de extensão de preço futuro, e combinando a relação do preço atual com essa linha. Quando o preço está acima ou abaixo da linha de extensão, pode-se fazer mais ou menos.
As linhas de demarcação de preços futuros (FLD) representam o preço médio, o preço mais alto ou o preço mais baixo em um determinado período futuro. A estratégia usa o FLD para determinar o movimento futuro dos preços.
As principais vantagens desta estratégia são:
Os principais riscos desta estratégia são:
A estratégia pode ser melhorada em:
A estratégia é uma estratégia típica de acompanhamento de tendências, comparando o preço com a extensão futura do preço após o deslocamento. A lógica geral é clara e fácil de entender, e o risco de implementação é menor.
/*backtest
start: 2023-01-29 00:00:00
end: 2024-02-04 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=2
////////////////////////////////////////////////////////////////////
// Copyright by HPotter v1.0 15/02/2017
// An FLD is a line that is plotted on the same scale as the price and is in fact the
// price itself displaced to the right (into the future) by (approximately) half the
// wavelength of the cycle for which the FLD is plotted. There are three FLD's that can be
// plotted for each cycle:
// An FLD based on the median price.
// An FLD based on the high price.
// An FLD based on the low price.
///////////////////////////////////////////////////////////////////
strategy(title="FLD's - Future Lines of Demarcation", overlay=true)
Period = input(title="Period", defval=40)
src = input(title="Source", defval=hl2)
reverse = input(false, title="Trade reverse")
FLD = src
pos = iff(FLD[Period] < close , 1,
iff(FLD[Period] > close, -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(FLD, title="FLD", style=line, linewidth=1, color=black, offset = Period)