Trend candles sniper

If you need an Indicator or Signal developed or translated from other language, please post all Indicator development REQUESTS to this section here.

Moderator: admin

Trend candles sniper

Postby yolerap » Wed Nov 18, 2020 8:48 pm

Hey,

Please, could you translate this little Pine code indicator to the MT5 ?

Thank you,
-----------------------------------------------------------------------------------------------------------------------------------

study("Trend Sniper", shorttitle="Trend Sniper", precision=0)

showExtra = input(true, title="Show Higher Timeframe", type=bool)
higherTime = input(title="Extra Timeframe:", defval="15", type=resolution)
std = input(false, title="Line chart")
candles = input(true, title="Candle chart")
wicks = input(true, title="Wicks")
src_close = close
src_open = open
src_high = high
src_low = low

len = input(14, minval=1, title="Current Length")
len2 = input(14, minval=1, title="Extra Timeframe Length")

src = input(close, title="Source", type=source)
rsiExtra = security(ticker,higherTime,rsi(src,len2))

norm_close = avg(src_close,src_close[1])
gain_loss_close = change(src_close)/norm_close
RSI_close = 50+50*rma(gain_loss_close, len)/rma(abs(gain_loss_close), len)

norm_open = if wicks==true
avg(src_open,src_open[1])
else
avg(src_close,src_close[1])
gain_loss_open = change(src_open)/norm_open
RSI_open = 50+50*rma(gain_loss_open, len)/rma(abs(gain_loss_open), len)

norm_high = if wicks==true
avg(src_high,src_high[1])
else
avg(src_close,src_close[1])
gain_loss_high = change(src_high)/norm_high
RSI_high = 50+50*rma(gain_loss_high, len)/rma(abs(gain_loss_high), len)

norm_low = if wicks==true
avg(src_low,src_low[1])
else
avg(src_close,src_close[1])
gain_loss_low = change(src_low)/norm_low
RSI_low = 50+50*rma(gain_loss_low, len)/rma(abs(gain_loss_low), len)

plotcandle(candles?RSI_open:na, candles?RSI_high:na, candles?RSI_low:na, candles?RSI_close:na, title='Candles', color = RSI_close > RSI_close[1] ? #5d606b : #5d606b)
plot(std ? RSI_close : na, color=#a64d79ff, title="Line", join=true)
plot(showExtra ? rsiExtra : na, color= not ismonthly ? #004aaf : na, title="Higher Timeframe")
b1 = hline(30, color=#222222, linestyle=dotted, title = "Low")
b2 = hline(70, color=#222222, linestyle=dotted, title = "High")
b3 = hline(20, color=#333333, linestyle=dotted, title = "Lower Low")
b4 = hline(80, color=#333333, linestyle=dotted, title = "Higher High")
b5 = hline(50, color=#222222, linestyle=dotted, title = "middle")

-----------------------------------------------------------------------------------------------------------------------------------
yolerap
FXCodeBase: Initiate
 
Posts: 103
Joined: Sat Aug 17, 2019 9:44 pm

Re: Trend candles sniper

Postby Apprentice » Thu Nov 19, 2020 2:49 pm

Your request is added to the development list.
Development reference 2333.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36437
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia



Return to Indicator and Signal Requests

Who is online

Users browsing this forum: No registered users and 13 guests