Dear Nicolas, dear all,
since several weeks I`m testing following indicator from trdv (https://www.tradingview.com/script/CKn6uOk9-Easy-stock/). It is very reliable and generates continous signals.
Please would you take the chance and code it for prorealtime? I would highly appreciate your support.
the orig. code:
study(title = "Easy stock", overlay = true)
tf10 = input("W", title = "Timeframe", type = input.resolution, options = ["1", "5", "15", "30", "60","120", "240","360","720", "D", "W"])
length = input(24, title = "Period", type = input.integer)
shift = input(1, title = "Shift", type = input.integer)
hma(_src, _length)=>
wma((2 * wma(_src, _length / 2)) - wma(_src, _length), round(sqrt(_length)))
hma3(_src, _length)=>
p = length/2
wma(wma(close,p/3)*3 - wma(close,p/2) - wma(close,p),p)
a = security(syminfo.tickerid, tf10, hma(close, length))
b =security(syminfo.tickerid, tf10, hma3(close, length)[shift])
plot(a,color=color.gray)
plot(b,color=color.yellow)
close_price = close[0]
len = input(100)
linear_reg = linreg(close_price, len, 0)
plot(linear_reg, color=color.blue, title="LR", linewidth=3)
buy=crossover(linear_reg, b)
sell=crossunder(linear_reg, b)
plotshape(buy, title="buy", text="Buy", color=color.green, style=shape.labelup, location=location.belowbar, size=size.small, textcolor=color.white, transp=0) //plot for buy icon
plotshape(sell, title="sell", text="Sell", color=color.red, style=shape.labeldown, location=location.abovebar, size=size.small, textcolor=color.white, transp=0) //plot for sell icon
/////// Alerts /////
alertcondition(buy,title="buy")
alertcondition(sell,title="sell")
The above Link shows several examples on how to enter trades.
Thank you very much in advance.
Best Regards,
Micha