Would someone please convert the "Path" indicator from Tradingview to MT4?
Thank you.
Re: Already Converted TradingView Indicators to MT4 Indicators
292What is the post bro?rcbarlow wrote: Sun Mar 26, 2023 6:18 am Would someone please convert the "Path" indicator from Tradingview to MT4?
Thank you.
if you are asking for free work, be a little better and do the work why the indicator should be converted and its benefits. If the code is available, upload it. No one will do the work for you and look things up for you......
- These users thanked the author kvak for the post (total 8):
- Greg82, sylvester21, BeatlemaniaSA, RodrigoRT7, Jimmy, moey_dw, Jedidiah, boytoy
Re: Already Converted TradingView Indicators to MT4 Indicators
293not even by name to know what it is about...rcbarlow wrote: Sun Mar 26, 2023 6:18 am Would someone please convert the "Path" indicator from Tradingview to MT4?
Thank you.
Re: Already Converted TradingView Indicators to MT4 Indicators
294rcbarlow wrote: Sun Mar 26, 2023 6:18 am Would someone please convert the "Path" indicator from Tradingview to MT4?
Thank you.
Official Forex-station GIF animator at your service
See a GIF with Forex-station.com on it? I probably made it
The best divergence indicator in the world.
Real news exists: Infowars.com
See a GIF with Forex-station.com on it? I probably made it
The best divergence indicator in the world.
Real news exists: Infowars.com
Re: Already Converted TradingView Indicators to MT4 Indicators
295This post is rubbish. You've given us nothing to work with.rcbarlow wrote: Sun Mar 26, 2023 6:18 am Would someone please convert the "Path" indicator from Tradingview to MT4?
Thank you.
And there I was thinking this post was shit... but along comes this ultra-lazy guy who completely tops it off with zero anything.
Topic has now been cleaned - especially the other 3 x posts that had no text - just a YouTube video slapped in & a wink emoji.
Christ...
Come on guys.
Re: Already Converted TradingView Indicators to MT4 Indicators
296Of all the indicators I've tested on tradingview. This is my favorite because even if its wrong in identifying the trend. It will take you out with a very small loss or even a gain. It also is great for a filter or confirmation paired with other indicators. Attached is a couple of pictures with the name and what it looks like on the chart. Ill also include the source code. I got a strategy coded and the results very promising but it was coded in the pinescript version 2 and when I try to convert it to the latest version of tradingview code language I ran into issues. I was hoping that one the great coders here can help me convert this into a metatrader 4 indicator. The indicator code has a youtube link in it that describes one of the strategies used with the indicator but Im sure it can be coded without that link to youtube.
//@version=2
study("TrendAlert", overlay=false)
// Trend and direction determination Step 1 en Step 2 method conform ZoneRecovery from 4x-dat.com Joseph Nemeth
//
// step 1 LongTerm timefram/resolution (LT) determine general direction
//• color last Heikenahsi bar gives is the general direction
// step 2 MidTerm timeframe/resolution determine trend
//• color last Heikenahsi bar must match Direction step 1 and
//• slope of 20EMA in direction step 1 and
//• price relation to EMA20: above = up, below=down
// Step 1 AND step 2 => TrendAlert (-1 for Short, 1 for Long, 0 for No trend)
//Heiken Ashi Candles
data = heikenashi(tickerid)
resLT = input(title="Res LT", type=resolution, defval="D")
resMT = input(title="Res MT", type=resolution, defval="240")
LTo = security(data, resLT, open)
LTc = security(data, resLT, close)
MTo = security(data, resMT, open)
MTc = security(data, resMT, close)
LTlong = LTc > LTo
LTshort = LTc < LTo
MTema20 = ema(MTc,20)
MTema20delta= change(MTema20)
MTlong = MTc > MTo and MTc > MTema20 and MTema20delta > 0
MTshort = MTc < MTo and MTc < MTema20 and MTema20delta < 0
Long = MTlong and LTlong
Short = MTshort and LTshort
plot(Long ? 1 : Short ? -1: 0, title="TrendAlert", color= Long ? lime : Short ? red : gray, style=columns )
//@version=2
study("TrendAlert", overlay=false)
// Trend and direction determination Step 1 en Step 2 method conform ZoneRecovery from 4x-dat.com Joseph Nemeth
//
// step 1 LongTerm timefram/resolution (LT) determine general direction
//• color last Heikenahsi bar gives is the general direction
// step 2 MidTerm timeframe/resolution determine trend
//• color last Heikenahsi bar must match Direction step 1 and
//• slope of 20EMA in direction step 1 and
//• price relation to EMA20: above = up, below=down
// Step 1 AND step 2 => TrendAlert (-1 for Short, 1 for Long, 0 for No trend)
//Heiken Ashi Candles
data = heikenashi(tickerid)
resLT = input(title="Res LT", type=resolution, defval="D")
resMT = input(title="Res MT", type=resolution, defval="240")
LTo = security(data, resLT, open)
LTc = security(data, resLT, close)
MTo = security(data, resMT, open)
MTc = security(data, resMT, close)
LTlong = LTc > LTo
LTshort = LTc < LTo
MTema20 = ema(MTc,20)
MTema20delta= change(MTema20)
MTlong = MTc > MTo and MTc > MTema20 and MTema20delta > 0
MTshort = MTc < MTo and MTc < MTema20 and MTema20delta < 0
Long = MTlong and LTlong
Short = MTshort and LTshort
plot(Long ? 1 : Short ? -1: 0, title="TrendAlert", color= Long ? lime : Short ? red : gray, style=columns )
Re: Already Converted TradingView Indicators to MT4 Indicators
297hello everybody!! i was reading some posts about this indicator and it looks like a member has it converted to MT4. If anyone can help me with this conversion I would be very grateful.RodrigoRT7 wrote: Tue Feb 07, 2023 9:21 am Hello my friends! all good? Sorry to go back to this topic about this indicator, but it's the ones I liked the most that are not available for MT4, if anyone has the expertise to convert from Tradingview to MT4, I would be deeply grateful.
Thanks a lot, in advance. s2
NOTE: I am referring to cora wave
thank you very much in advance
obs: or if anyone has it and can send it or send it to me via private chat, I also really appreciate it.
Re: Already Converted TradingView Indicators to MT4 Indicators
298louisforex wrote: Thu Mar 30, 2023 1:55 am Of all the indicators I've tested on tradingview. This is my favorite because even if its wrong in identifying the trend. It will take you out with a very small loss or even a gain. It also is great for a filter or confirmation paired with other indicators. Attached is a couple of pictures with the name and what it looks like on the chart. Ill also include the source code. I got a strategy coded and the results very promising but it was coded in the pinescript version 2 and when I try to convert it to the latest version of tradingview code language I ran into issues. I was hoping that one the great coders here can help me convert this into a metatrader 4 indicator. The indicator code has a youtube link in it that describes one of the strategies used with the indicator but Im sure it can be coded without that link to youtube.
//@version=2
study("TrendAlert", overlay=false)
// Trend and direction determination Step 1 en Step 2 method conform ZoneRecovery from 4x-dat.com Joseph Nemeth
//
// step 1 LongTerm timefram/resolution (LT) determine general direction
//• color last Heikenahsi bar gives is the general direction
// step 2 MidTerm timeframe/resolution determine trend
//• color last Heikenahsi bar must match Direction step 1 and
//• slope of 20EMA in direction step 1 and
//• price relation to EMA20: above = up, below=down
// Step 1 AND step 2 => TrendAlert (-1 for Short, 1 for Long, 0 for No trend)
//Heiken Ashi Candles
data = heikenashi(tickerid)
resLT = input(title="Res LT", type=resolution, defval="D")
resMT = input(title="Res MT", type=resolution, defval="240")
LTo = security(data, resLT, open)
LTc = security(data, resLT, close)
MTo = security(data, resMT, open)
MTc = security(data, resMT, close)
LTlong = LTc > LTo
LTshort = LTc < LTo
MTema20 = ema(MTc,20)
MTema20delta= change(MTema20)
MTlong = MTc > MTo and MTc > MTema20 and MTema20delta > 0
MTshort = MTc < MTo and MTc < MTema20 and MTema20delta < 0
Long = MTlong and LTlong
Short = MTshort and LTshort
plot(Long ? 1 : Short ? -1: 0, title="TrendAlert", color= Long ? lime : Short ? red : gray, style=columns )
Attachments
- These users thanked the author ffsss for the post (total 2):
- RodrigoRT7, Akela
Re: Already Converted TradingView Indicators to MT4 Indicators
299I haven’t seen a standalone Fair value gap indicator here yet. This one of my favorites in TradingView was wondering if someone could convert it to MT4
//@version=5
indicator('muh fokkin gap!', shorttitle='〓', overlay = true, max_lines_count = 500, max_boxes_count=500)
tf = input.timeframe("", "",inline='1')
//Input Bool
BullX = input.int(1, '', inline='1')
pp_test0 = input.bool(false, 'delete mitigated', inline ='2')
exb = input.bool(false, "extend current", inline ='3')
tts = input.bool(true, "true to size", inline = '4')
//Input Color
pp_test1 = input.bool(true,'', group = 'Bull FVG', inline='1')
pp_test3 = input.bool(false, '', group ='Bull FVG', inline='2')
BullLineC = input.color( color.aqua, "", group='Bull FVG', inline='1')
arbullc2 = input.color(#00ff83, "", group='Bull FVG', inline='1')
arbullc1 = input.color(#00ff83, "", group='Bull FVG', inline='2')
arbullc = input.color(#00ff83, "", group='Bull FVG', inline='2')
//
pp_test2 = input.bool(true, '', group = 'Bear FVG', inline='2')
pp_test4 = input.bool(false, '', group ='Bear FVG', inline='1')
arbearc1 = input.color(#c90000, "", group='Bear FVG', inline='1')
arbearc = input.color(#c90000, "", group='Bear FVG', inline='1')
BearLineC = input.color( #c2185b, "", group='Bear FVG', inline='2')
arbearc2 = input.color(#c90000, "", group='Bear FVG', inline='2')
pp_test5 = input.bool(true,'', group = 'text', inline ='2')
textc1 = input.color(#ffffff, '', group='text', inline='2')
textc2 = input.color(#ffffff, '', group='text', inline='2')
exbc = exb ? extend.right : extend.none
//Data
L1 = request.security(syminfo.tickerid, tf, low, barmerge.gaps_on, barmerge.lookahead_on)
H3 = request.security(syminfo.tickerid, tf, high[2], barmerge.gaps_on, barmerge.lookahead_on)
H1 = request.security(syminfo.tickerid, tf, high, barmerge.gaps_on, barmerge.lookahead_on)
L3 = request.security(syminfo.tickerid, tf, low[2], barmerge.gaps_on, barmerge.lookahead_on)
//Calc
//Jesus converter big thanks to kodify and the manual
MTFstring = str.tostring(tf)
tfInMinutes(simple string tf = "") =>
float chartTf =
timeframe.multiplier * (
timeframe.isseconds ? 1. / 60 :
timeframe.isminutes ? 1. :
timeframe.isdaily ? 60. * 24 :
timeframe.isweekly ? 60. * 24 * 7 :
timeframe.ismonthly ? 60. * 24 * 30.4375 : na)
float result = tf == "" ? chartTf : request.security(syminfo.tickerid, tf, chartTf)
float chartTFInMinutes = tfInMinutes()
float inputTFInMinutes = tfInMinutes(tf)
n_bar_multiplier = 3
n_bars = 1 ? 2*inputTFInMinutes/chartTFInMinutes: inputTFInMinutes/chartTFInMinutes
// ? w ?
FVGUp = H3 < L1
bullbot = H3
bulltop = L1
FVGDown = L3 > H1
beartop = L3
bearbot = H1
//Lines
var l_bullbot = array.new_line(1)
var l_bulltop = array.new_line(1)
var box2 = array.new_box(1)
if array.size(l_bulltop) > 500
array.shift(l_bulltop)
if array.size(l_bullbot) > 500
array.shift(l_bullbot)
if array.size(box2) > 500
array.shift(box2)
k = 0
for i = 0 to array.size(l_bullbot) - 1
line_price1 = line.get_y1(array.get(l_bullbot, i - k))
if low < line_price1
line.delete(pp_test0 ? array.get(l_bullbot, i - k):na)
array.remove(l_bullbot, i - k)
line.delete(pp_test0 ? array.get(l_bulltop, i - k):na)
array.remove(l_bulltop, i - k)
box.delete(pp_test0 ? array.get(box2, i - k):na)
box.set_bgcolor(pp_test3 ? array.get(box2, i - k):na, arbullc)
array.remove(box2, i - k)
k := k + 1
k := 0
// revisit
for i = 0 to array.size(l_bulltop) - 1
line_price4 = line.get_y1(array.get(l_bulltop, i))
a_b2 = array.get(box2, i)
if low < line_price4
line.set_color(pp_test3 ? array.get(l_bulltop, i):na, arbullc1)
box.set_bgcolor(pp_test3 ? a_b2:na, pp_test0 ? color.new(color.black, 100): arbullc)
box.set_extend(a_b2, extend.none)
box.set_text(a_b2, pp_test5 ? " " + MTFstring + " | BULL | " + str.tostring(line_price4):na)
box.set_text_color(a_b2, textc1)
line.set_extend(array.get(l_bulltop, i), extend.none)
line.set_color(pp_test3 ? array.get(l_bullbot, i):na, pp_test0 ? color.new(color.black, 100): BullLineC)
if FVGUp and pp_test1
array.push(l_bulltop, line.new(bar_index[tts ? n_bars: BullX], bulltop, bar_index, bulltop, xloc.bar_index, exbc, BullLineC, width =2))
array.push(l_bullbot, line.new(bar_index[tts ? n_bars: BullX], bullbot, bar_index, bullbot, color = color.new(color.white, 100), width =2))
array.push(box2, box.new(bar_index[tts ? n_bars: BullX], bulltop, bar_index, bullbot, color.new(color.white, 100), 0, line.style_solid, exbc, xloc.bar_index, arbullc2,pp_test5 ? " " + MTFstring + " | BULL | " + str.tostring(bulltop): na, size.auto, textc1, text.align_right))
var l_bearbot = array.new_line(1)
var l_beartop = array.new_line(1)
var box1 = array.new_box(1)
if array.size(l_beartop) > 500
array.shift(l_beartop)
if array.size(l_bearbot) > 500
array.shift(l_bearbot)
if array.size(box1) > 500
array.shift(box1)
for i = 0 to array.size(l_beartop) - 1
line_price2 = line.get_y1(array.get(l_beartop, i - k))
if high > line_price2
line.delete(pp_test0 ? array.get(l_bearbot, i - k):na)
array.remove(l_bearbot, i - k)
line.delete(pp_test0 ? array.get(l_beartop, i - k):na)
array.remove(l_beartop, i - k)
box.set_bgcolor(pp_test4 ? array.get(box1, i - k):na, arbearc)
box.delete(pp_test0 ? array.get(box1, i - k):na)
array.remove(box1, i - k)
k := k + 1
k := 0
for i = 0 to array.size(l_bearbot) - 1
line_price3 = line.get_y1(array.get(l_bearbot, i))
a_b1 = array.get(box1, i)
if high > line_price3
line.set_color(pp_test4 ? array.get(l_bearbot, i):na, arbearc1)
box.set_bgcolor(pp_test4 ? a_b1:na, pp_test0 ? color.new(color.black, 100): arbearc)
box.set_extend(a_b1, extend.none)
box.set_text(a_b1, pp_test5 ?" " + MTFstring + " | BEAR | " + str.tostring(line_price3): na)
box.set_text_color(a_b1, textc2)
line.set_extend(array.get(l_bearbot, i), extend.none)
line.set_color(pp_test4 ? array.get(l_beartop, i):na,pp_test0 ? color.new(color.black, 100): BearLineC)
if FVGDown and pp_test2
array.push(l_beartop, line.new(bar_index[tts ? n_bars: BullX], beartop, bar_index, beartop, color= color.new(color.white, 100), width =2))
array.push(l_bearbot, line.new(bar_index[tts ? n_bars: BullX], bearbot, bar_index, bearbot, xloc.bar_index, exbc, color = BearLineC, width =2))
array.push(box1, box.new(bar_index[tts ? n_bars: BullX], beartop, bar_index, bearbot, color.new(color.white, 100), 0, line.style_solid, exbc, xloc.bar_index, arbearc2, pp_test5 ? " " + MTFstring + " | BEAR | " + str.tostring(bearbot): na, size.auto, textc2 , text.align_right))
//Boxes
//@version=5
indicator('muh fokkin gap!', shorttitle='〓', overlay = true, max_lines_count = 500, max_boxes_count=500)
tf = input.timeframe("", "",inline='1')
//Input Bool
BullX = input.int(1, '', inline='1')
pp_test0 = input.bool(false, 'delete mitigated', inline ='2')
exb = input.bool(false, "extend current", inline ='3')
tts = input.bool(true, "true to size", inline = '4')
//Input Color
pp_test1 = input.bool(true,'', group = 'Bull FVG', inline='1')
pp_test3 = input.bool(false, '', group ='Bull FVG', inline='2')
BullLineC = input.color( color.aqua, "", group='Bull FVG', inline='1')
arbullc2 = input.color(#00ff83, "", group='Bull FVG', inline='1')
arbullc1 = input.color(#00ff83, "", group='Bull FVG', inline='2')
arbullc = input.color(#00ff83, "", group='Bull FVG', inline='2')
//
pp_test2 = input.bool(true, '', group = 'Bear FVG', inline='2')
pp_test4 = input.bool(false, '', group ='Bear FVG', inline='1')
arbearc1 = input.color(#c90000, "", group='Bear FVG', inline='1')
arbearc = input.color(#c90000, "", group='Bear FVG', inline='1')
BearLineC = input.color( #c2185b, "", group='Bear FVG', inline='2')
arbearc2 = input.color(#c90000, "", group='Bear FVG', inline='2')
pp_test5 = input.bool(true,'', group = 'text', inline ='2')
textc1 = input.color(#ffffff, '', group='text', inline='2')
textc2 = input.color(#ffffff, '', group='text', inline='2')
exbc = exb ? extend.right : extend.none
//Data
L1 = request.security(syminfo.tickerid, tf, low, barmerge.gaps_on, barmerge.lookahead_on)
H3 = request.security(syminfo.tickerid, tf, high[2], barmerge.gaps_on, barmerge.lookahead_on)
H1 = request.security(syminfo.tickerid, tf, high, barmerge.gaps_on, barmerge.lookahead_on)
L3 = request.security(syminfo.tickerid, tf, low[2], barmerge.gaps_on, barmerge.lookahead_on)
//Calc
//Jesus converter big thanks to kodify and the manual
MTFstring = str.tostring(tf)
tfInMinutes(simple string tf = "") =>
float chartTf =
timeframe.multiplier * (
timeframe.isseconds ? 1. / 60 :
timeframe.isminutes ? 1. :
timeframe.isdaily ? 60. * 24 :
timeframe.isweekly ? 60. * 24 * 7 :
timeframe.ismonthly ? 60. * 24 * 30.4375 : na)
float result = tf == "" ? chartTf : request.security(syminfo.tickerid, tf, chartTf)
float chartTFInMinutes = tfInMinutes()
float inputTFInMinutes = tfInMinutes(tf)
n_bar_multiplier = 3
n_bars = 1 ? 2*inputTFInMinutes/chartTFInMinutes: inputTFInMinutes/chartTFInMinutes
// ? w ?
FVGUp = H3 < L1
bullbot = H3
bulltop = L1
FVGDown = L3 > H1
beartop = L3
bearbot = H1
//Lines
var l_bullbot = array.new_line(1)
var l_bulltop = array.new_line(1)
var box2 = array.new_box(1)
if array.size(l_bulltop) > 500
array.shift(l_bulltop)
if array.size(l_bullbot) > 500
array.shift(l_bullbot)
if array.size(box2) > 500
array.shift(box2)
k = 0
for i = 0 to array.size(l_bullbot) - 1
line_price1 = line.get_y1(array.get(l_bullbot, i - k))
if low < line_price1
line.delete(pp_test0 ? array.get(l_bullbot, i - k):na)
array.remove(l_bullbot, i - k)
line.delete(pp_test0 ? array.get(l_bulltop, i - k):na)
array.remove(l_bulltop, i - k)
box.delete(pp_test0 ? array.get(box2, i - k):na)
box.set_bgcolor(pp_test3 ? array.get(box2, i - k):na, arbullc)
array.remove(box2, i - k)
k := k + 1
k := 0
// revisit
for i = 0 to array.size(l_bulltop) - 1
line_price4 = line.get_y1(array.get(l_bulltop, i))
a_b2 = array.get(box2, i)
if low < line_price4
line.set_color(pp_test3 ? array.get(l_bulltop, i):na, arbullc1)
box.set_bgcolor(pp_test3 ? a_b2:na, pp_test0 ? color.new(color.black, 100): arbullc)
box.set_extend(a_b2, extend.none)
box.set_text(a_b2, pp_test5 ? " " + MTFstring + " | BULL | " + str.tostring(line_price4):na)
box.set_text_color(a_b2, textc1)
line.set_extend(array.get(l_bulltop, i), extend.none)
line.set_color(pp_test3 ? array.get(l_bullbot, i):na, pp_test0 ? color.new(color.black, 100): BullLineC)
if FVGUp and pp_test1
array.push(l_bulltop, line.new(bar_index[tts ? n_bars: BullX], bulltop, bar_index, bulltop, xloc.bar_index, exbc, BullLineC, width =2))
array.push(l_bullbot, line.new(bar_index[tts ? n_bars: BullX], bullbot, bar_index, bullbot, color = color.new(color.white, 100), width =2))
array.push(box2, box.new(bar_index[tts ? n_bars: BullX], bulltop, bar_index, bullbot, color.new(color.white, 100), 0, line.style_solid, exbc, xloc.bar_index, arbullc2,pp_test5 ? " " + MTFstring + " | BULL | " + str.tostring(bulltop): na, size.auto, textc1, text.align_right))
var l_bearbot = array.new_line(1)
var l_beartop = array.new_line(1)
var box1 = array.new_box(1)
if array.size(l_beartop) > 500
array.shift(l_beartop)
if array.size(l_bearbot) > 500
array.shift(l_bearbot)
if array.size(box1) > 500
array.shift(box1)
for i = 0 to array.size(l_beartop) - 1
line_price2 = line.get_y1(array.get(l_beartop, i - k))
if high > line_price2
line.delete(pp_test0 ? array.get(l_bearbot, i - k):na)
array.remove(l_bearbot, i - k)
line.delete(pp_test0 ? array.get(l_beartop, i - k):na)
array.remove(l_beartop, i - k)
box.set_bgcolor(pp_test4 ? array.get(box1, i - k):na, arbearc)
box.delete(pp_test0 ? array.get(box1, i - k):na)
array.remove(box1, i - k)
k := k + 1
k := 0
for i = 0 to array.size(l_bearbot) - 1
line_price3 = line.get_y1(array.get(l_bearbot, i))
a_b1 = array.get(box1, i)
if high > line_price3
line.set_color(pp_test4 ? array.get(l_bearbot, i):na, arbearc1)
box.set_bgcolor(pp_test4 ? a_b1:na, pp_test0 ? color.new(color.black, 100): arbearc)
box.set_extend(a_b1, extend.none)
box.set_text(a_b1, pp_test5 ?" " + MTFstring + " | BEAR | " + str.tostring(line_price3): na)
box.set_text_color(a_b1, textc2)
line.set_extend(array.get(l_bearbot, i), extend.none)
line.set_color(pp_test4 ? array.get(l_beartop, i):na,pp_test0 ? color.new(color.black, 100): BearLineC)
if FVGDown and pp_test2
array.push(l_beartop, line.new(bar_index[tts ? n_bars: BullX], beartop, bar_index, beartop, color= color.new(color.white, 100), width =2))
array.push(l_bearbot, line.new(bar_index[tts ? n_bars: BullX], bearbot, bar_index, bearbot, xloc.bar_index, exbc, color = BearLineC, width =2))
array.push(box1, box.new(bar_index[tts ? n_bars: BullX], beartop, bar_index, bearbot, color.new(color.white, 100), 0, line.style_solid, exbc, xloc.bar_index, arbearc2, pp_test5 ? " " + MTFstring + " | BEAR | " + str.tostring(bearbot): na, size.auto, textc2 , text.align_right))
//Boxes
Re: Already Converted TradingView Indicators to MT4 Indicators
300ST ANY INDICATOR BY WBBURGIN
Hello coders, is it possible to get an mt5 version of this indictor from trading view with alerts when new signals are printed.
This indicator will generate a supertrend of your chosen configuration on any of the following indicators:
RSI
MFI
Accum/ Dist
Momentum
On Balance Volume
CCI
There is also a RANGE FILTER built into the scripts so that you can smooth the indicators for the supertrend. This is an optional configuration in the settings. Also, you can change the oversold/overbought bounds in the settings (they are removed entirely for indicators without bounds).
this is the code...
Hoping to get some feedback on this. Thanks.
Hello coders, is it possible to get an mt5 version of this indictor from trading view with alerts when new signals are printed.
This indicator will generate a supertrend of your chosen configuration on any of the following indicators:
RSI
MFI
Accum/ Dist
Momentum
On Balance Volume
CCI
There is also a RANGE FILTER built into the scripts so that you can smooth the indicators for the supertrend. This is an optional configuration in the settings. Also, you can change the oversold/overbought bounds in the settings (they are removed entirely for indicators without bounds).
this is the code...
Code: Select all
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © wbburgin
import wbburgin/wbburgin_utils/1 as e
//@version=5
indicator("Supertrend ANY INDICATOR (RSI, MFI, CCI, etc.) + Range Filter",shorttitle="ST ANY INDICATOR [wbburgin]",overlay=false)
// This indicator will generate a supertrend of your chosen configuration on any of the following indicators:
// RSI
// MFI
// ACCUMULATION / DISTRIBUTION
// MOMENTUM
// ON BALANCE VOLUME
// CCI
// Stochastic
// If you find this indicator useful, please boost it and follow! I am open to suggestions for adding new indicators
// to this script, it's very simple to add new ones, just suggest them in the comments.
// INPUTS ______________________________________________________________________________________________________________
sel = input.string("RSI","Indicator for Supertrend",
options=["RSI","MFI","Accum/Dist","Momentum","OB Volume","CCI","Stochastic"],
group="Main Settings")
indicator_length = input.int(14, "Indicator Length (if applicable)",group="Main Settings",
tooltip = "Ignore if indicator does not have length inputs (i.e. Accum/Dist, OBV)")
atr_length = input.int(10, "Supertrend ATR Length",group="Main Settings")
atr_mult = input.float(3.0,"Supertrend ATR Mult",step=0.5,group="Main Settings")
use_range = input.bool(false,"Use Range Filter of Indicator",
tooltip = "Use a range filter of the indicator instead of the indicator itself for calculations (for smoothing)",
group="Range Filter")
sampling_period = input.int(50,"Range Filter Sampling Period (if applicable)",group="Range Filter")
range_mult = input.float(3,"Range Filter Multiple (if applicable)",group="Range Filter")
labels = input.bool(true,"Show Labels",group="Display")
highlighting = input.bool(true,"Display Highlighting",group="Display")
oversold = input.int(30,"Oversold Level (if applicable)",group="Display")
overbought = input.int(70,"Overbought Level (if applicable)",group="Display")
// CALCULATIONS ________________________________________________________________________________________________________
filt(source,sampling_period,range_mult) =>
e.rngfilt(source,e.smoothrng(source,sampling_period,range_mult))
rsi = switch
use_range == false => ta.rsi(close,indicator_length)
=> filt(ta.rsi(close,indicator_length),sampling_period,range_mult)
mfi = switch
use_range == false => ta.mfi(close,indicator_length)
=> filt(ta.mfi(close,indicator_length),sampling_period,range_mult)
accdist = switch
use_range == false => ta.accdist
=> filt(ta.accdist,sampling_period,range_mult)
mom = switch
use_range == false => ta.mom(close,indicator_length)
=> filt(ta.mom(close,indicator_length),sampling_period,range_mult)
obv = switch
use_range == false => ta.obv
=> filt(ta.obv,sampling_period,range_mult)
cci = switch
use_range == false => ta.cci(close,indicator_length)
=> filt(ta.cci(close,indicator_length),sampling_period,range_mult)
stoch = switch
use_range == false => ta.stoch(close,high,low,indicator_length)
=> filt(ta.stoch(close,high,low,indicator_length),sampling_period,range_mult)
indicator = switch
sel == "RSI" => rsi
sel == "MFI" => mfi
sel == "Accum/Dist" => accdist
sel == "Momentum" => mom
sel == "OB Volume" => obv
sel == "CCI" => cci
sel == "Stochastic" => stoch
not_bound = indicator==accdist or indicator==obv
[supertrend,dir] = e.supertrend_anysource(indicator,atr_mult,atr_length)
supertrend_up = dir == -1 ? supertrend : na
supertrend_dn = dir == 1 ? supertrend : na
supertrend_up_start = dir == -1 and dir[1] == 1 ? supertrend : na
supertrend_dn_start = dir == 1 and dir[1] == -1 ? supertrend : na
linecolor = dir == -1 ? color.green : color.red
fillcolor = dir == -1 ? color.new(color.green,88) : color.new(color.red,88)
sup = plot(supertrend_up,title="Up Supertrend",color=linecolor,style=plot.style_linebr,linewidth=2)
sdn = plot(supertrend_dn,title="Down Supertrend",color=linecolor,style=plot.style_linebr,linewidth=2)
mid=plot(indicator,color=color.white)
plotshape(supertrend_up_start,title="Supertrend Up Start",style=shape.circle,location=location.absolute,
color=color.green, size=size.tiny)
plotshape(supertrend_dn_start,title="Supertrend Down Start",style=shape.circle,location=location.absolute,
color=color.red, size=size.tiny)
plotshape(labels==false?na:supertrend_up_start,title="Supertrend Buy Label",style=shape.labelup,location=location.absolute,
color=color.green,textcolor=color.white,text = "Buy")
plotshape(labels==false?na:supertrend_dn_start,title="Supertrend Sell Label",style=shape.labeldown,location=location.absolute,
color=color.red,textcolor=color.white,text = "Sell")
fill(sup,mid,highlighting==true ? fillcolor : na)
fill(sdn,mid,highlighting==true ? fillcolor : na)
hiPlot=plot(not_bound ? na : oversold,title="Oversold Level",color=color.new(color.white,75),style=plot.style_circles)
loPlot=plot(not_bound ? na : overbought,title="Overbought Level",color=color.new(color.white,75),style=plot.style_circles)
fill(hiPlot,loPlot,color=highlighting==true ? color.new(color.purple,95):na)
alertcondition(supertrend_up_start,"Supertrend Any Indicator Buy")
alertcondition(supertrend_dn_start,"Supertrend Any Indicator Sell")
- These users thanked the author keringet for the post:
- RodrigoRT7