LazyBear

Vervoort Heiken-Ashi LongTerm Candlestick Oscillator [LazyBear]

HACOLT (Heikin Ashi Candles Oscillator Long Term) is a technical indicator designed by Sylvain Vervoort. It is based on Mr.Vervoort's other indicator, HACO (Heikin-Ashi Candles Oscillator - posted here: www.tradingview.com/v/UyhY8FuQ/).

Optimized for long-term trading, HACOLT shows three levels: -1, 0 and 1. These levels suggest "an open short position", "no open position", and "an open long position", respectively. Passing from a certain level to another is viewed as a trading signal:
- Rising from -1 or 0 to 1 suggests a Long Entry and Short exit;
- Falling from 1 to 0 or -1 suggests a Long Exit;
- Falling from 1 or 0 to -1 indicates a Short Entry.

Fits in nicely with any trading setup as a confirmation indicator

More info:
- tlc.thinkorswim.com/...rary/G-L/HACOLT.html
- www.motivewave.com/s...es_oscillator_lt.htm

List of my other indicators:
- GDoc: docs.google.com...ByMEvm5MLo/edit?usp=sharin...
- Chart:

List of my free indicators: bit.ly/1LQaPK8
List of my indicators at Appstore: blog.tradingview.com/?p=970
開源腳本

本著真正的TradingView精神,該腳本的作者將其開源發布,以便交易者可以理解和驗證它。為作者喝彩吧!您可以免費使用它,但在出版物中重複使用此代碼受網站規則的約束。 您可以收藏它以在圖表上使用。

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。

想在圖表上使用此腳本?
//
// @author LazyBear 
// List of all my indicators: 
// https://docs.google.com/document/d/15AGCufJZ8CIUvwFJ9W-IKns88gkWOKBCvByMEvm5MLo/edit?usp=sharing
//
study("Vervoort LongTerm Heiken-Ashi Candlestick Oscillator [LazyBear]", shorttitle="HACOLT_LB")
length = input(defval=55, title="TEMA Period")
emaLength = input(defval=60, title="EMA Period")
candleSizeFactor = input(defval=1.1, title="Candle size factor")
overlayMode=input(false)
calc_tema(src, length) =>
	ema1 = ema(src, length)
	ema2 = ema(ema1, length)
	ema3 = ema(ema2, length)
	3 * (ema1 - ema2) + ema3

haOpen = nz((haOpen[1] + ohlc4) / 2, ohlc4)
haClose = (haOpen + max(high, haOpen) + min(low, haOpen) + ohlc4) / 4
thaClose = calc_tema(haClose, length)
thl2 = calc_tema(hl2, length)
haCloseSmooth = 2 * thaClose - calc_tema(thaClose, length)
hl2Smooth = 2 * thl2 - calc_tema(thl2, length)
shortCandle = abs(close - open) < ((high - low) * candleSizeFactor)
keepn1 = ((haClose >= haOpen) and (haClose[1] >= haOpen[1])) or (close >= haClose) or (high > high[1]) or (low > low[1]) or (hl2Smooth >= haCloseSmooth)
keepall1 = keepn1 or (keepn1[1] and (close >= open) or (close >= close[1]))
keep13 = shortCandle and (high >= low[1])
utr = keepall1 or (keepall1[1] and keep13)
keepn2 = (haClose < haOpen) and (haClose[1] < haOpen[1]) or (hl2Smooth < haCloseSmooth)
keep23 = shortCandle and (low <= high[1])
keepall2 = keepn2 or (keepn2[1] and (close < open) or (close < close[1]))
dtr = keepall2 or (keepall2[1] and keep23)
upw = dtr == 0 and dtr[1] and utr
dnw = utr == 0 and utr[1] and dtr
upwWithOffset = upw != dnw ? upw : nz(upwWithOffset[1])

buySig = upw or (not dnw and (na(upwWithOffset) ? 0 : upwWithOffset))
ltSellSig = close < ema(close, emaLength)
neutralSig = buySig or (ltSellSig ? 0 : nz(neutralSig[1]))
hacolt = buySig ? 1 : neutralSig ? 0 : -1
plot(not overlayMode ? hacolt : na, style=columns, color=hacolt>0?green:hacolt<0?red:blue, title="HACOLT")
barcolor(overlayMode?hacolt>0?green:hacolt<0?red:blue:na)