
Idea utama strategi ini adalah untuk menentukan arah harga masa depan dengan menggambar garis lanjutan harga masa depan, dan menggabungkan hubungan harga semasa dengan garis tersebut. Apabila harga lebih tinggi atau lebih rendah daripada garis lanjutan, anda boleh melakukan lebih banyak atau kurang.
Garis lanjutan harga masa depan (Future Lines of Demarcation, FLD) mewakili harga pertengahan, harga tertinggi atau harga terendah dalam tempoh masa depan tertentu. Strategi ini menggunakan FLD untuk menentukan pergerakan harga masa depan, prinsipnya adalah:
Strategi ini mempunyai kelebihan utama:
Risiko utama strategi ini ialah:
Strategi ini boleh dioptimumkan dengan:
Strategi ini adalah strategi trend-following yang tipikal dengan membandingkan harga dengan garis lanjutan harga masa depan selepas perpindahan, untuk menentukan arah pergerakan harga masa depan. Secara keseluruhan, logiknya jelas dan mudah difahami, pelaksanaan risiko lebih rendah.
/*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)