gurple

Lazy Long Term Signals

ema
This little indicator displays the ratio between the series close and the (default 45) exponential moving average .

The idea is to consider buying when the signal is above 1 and sell, or short if aggressive, when the signal crosses below 1. It strikes me as useful when used in conjunction with the MACD and UCSgears' Linear Regression Slope indicator.

Using such a simple strategy as I outlined above is probably only useful (if it even works) and beneficial in long term or tax deferred accounts like 401Ks, IRAs, ROTH IRAs, etc. Otherwise the taxation would probably destroy the appreciation. Who wants that?
Remove from Favorite Scripts Add to Favorite Scripts
// Buy when the signal croses above 1 (signal goes green).
// Sell, or short if aggressive, when the signal crosses below 1 (signal goes red).
// NOTE: Taking this stategy is probably only beneficial in Long Term accounts (401k, ROTH IRA, etc.).
// NOTE: Otherwise the capital gains taxing could destroy any appreciation.

study(title="Lazy Long Term Signals", shorttitle="LLTS", overlay=false)
src = close, len=input(45, minval=1, title="Length")
out = ema(src, len)
data = src/out

buy = data > 1
sell = data < 1

scolor = buy ? green : sell ? red : blue

plot(1, color = orange)
plot(data, color = scolor, title ="LLTS", style = line, linewidth = 1, trackprice = true)
Considering the light interest in this little oscillator of mine I thought good that I provide the updated version of this script as it has changed lightly in the intervening years. All that's really changed is that I've abandoned the 45 EMA in favor of a 90 EMA.
==========START Script ==========
// Buy when the signal croses above 1 (signal goes green).
// Sell, or short if aggressive, when the signal crosses below 1 (signal goes red).
// NOTE: Taking this stategy is probably only beneficial in Long Term accounts (401k, ROTH IRA, etc.).
// NOTE: Otherwise the capital gains taxing could destroy any appreciation.

study(title="Lazy Long Term Signals", shorttitle="LzyLngTrmSig", overlay=false)
lltssrc = close
shrt_ema_len=input(90, minval=1, defval=90, title="Short EMA Length")
lng_ema_len=input(90, minval=1, defval=90, title="Long EMA Length")

shrt_ema = ema(lltssrc, shrt_ema_len)
rltv_strngth_data = lltssrc/shrt_ema

ema_of_rltv_strngth_data = ema(rltv_strngth_data, lng_ema_len)

buy = rltv_strngth_data > 1
sell = rltv_strngth_data < 1
lltscolor = buy ? green : sell ? red : blue

//plot(shrt_ema, color= green)
//plot(rltv_strngth_data, color= red)

plot(1, color = orange, transp=85)
plot(rltv_strngth_data, color = lltscolor, title ="LLTS", style = line, linewidth = 1, trackprice = true)
plot(ema_of_rltv_strngth_data, color = fuchsia, title ="EMA of LLTS", style = line, linewidth = 1, trackprice = false)
========== END Script ==========
Reply
Another nice tool arrived in my park of useful oscillators. I liked this one.
Reply
United States
United Kingdom
India
Deutschland
España
France
Việt Nam
Italia
Polska