Re: Already Converted TradingView Indicators to MT4 Indicators

281
Koalala wrote: Fri Mar 24, 2023 8:05 pm Can somebody convert this Centered moving average:
Centered Moving Average by valiant hero
https://it.tradingview.com/script/EaAHVKaD/
I'll be honest, the reason why no one has payed attention to your three requests for this random code to be converted is because your post(s) lack information, an image to catch our eye or even a reason on why our coders would want to convert it.

Without a decent explanation from you ie. what's good/interesting about this code or how you use it etc. these type of low-quality request posts will always be overlooked due to the lack of effort on your behalf.

If you want our coders to take time out of their day to work on a request, you have to do your part and make your post stand out and be worthy of the coder's time. Help us, so we can help you.
These users thanked the author Jimmy for the post (total 6):
andrei-1, moey_dw, ionone, Chickenspicy, Knight, Jedidiah
Are you looking for a Forex broker? FBS cuts spreads by up to 58%. Click here to begin your trading journey, today.
No commissions are earned by Forex-station.


Guide to the "All Averages" Filters (ADXvma, Laguerre etc.) 🆕
Use Fibonacci numbers for indicator settings + How to draw Fibonacci Extensions
An easy trick for drawing Support & Resistance


Re: Already Converted TradingView Indicators to MT4 Indicators

282
Jimmy wrote: Fri Mar 24, 2023 8:17 pm I'll be honest, the reason why no one has payed attention to your three requests for this random code to be converted is because your post(s) lack information, an image to catch our eye or even a reason on why our coders would want to convert it.

Without a decent explanation from you ie. what's good/interesting about this code or how you use it etc. these type of low-quality request posts will always be overlooked due to the lack of effort on your behalf.

If you want our coders to take time out of their day to work on a request, you have to do your part and make your post stand out and be worthy of the coder's time. Help us, so we can help you.
EXACTLY.......... HOW HARD IS IT?? LOL
These users thanked the author moey_dw for the post:
Jedidiah
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 👈

Re: Already Converted TradingView Indicators to MT4 Indicators

283
Koalala wrote: Fri Mar 24, 2023 8:05 pm Can somebody convert this Centered moving average:
Centered Moving Average by valiant hero
https://it.tradingview.com/script/EaAHVKaD/
I'm gonna repeat myself.
it's a repainter because the last few bars won't show the same result as in the past
I think it's not possible to make a centered MA non repaint, due to a thing called causality (something after cannot appear before)
These users thanked the author ionone for the post (total 2):
moey_dw, Jedidiah

Re: Already Converted TradingView Indicators to MT4 Indicators

284
Jimmy wrote: Fri Mar 24, 2023 8:17 pm I'll be honest, the reason why no one has payed attention to your three requests for this random code to be converted is because your post(s) lack information, an image to catch our eye or even a reason on why our coders would want to convert it.

Without a decent explanation from you ie. what's good/interesting about this code or how you use it etc. these type of low-quality request posts will always be overlooked due to the lack of effort on your behalf.

If you want our coders to take time out of their day to work on a request, you have to do your part and make your post stand out and be worthy of the coder's time. Help us, so we can help you.
I think This should be disclaimer somewhere front page ,people dont know what socialization skills are cause covid

They skip small talk, ive done the same
These users thanked the author Chickenspicy for the post:
Jedidiah
0 + 0 = 0
Infinite / Infinite = 1
1 way to Heaven & it matters

Re: Already Converted TradingView Indicators to MT4 Indicators

285
Koalala wrote: Fri Mar 24, 2023 8:01 pm I use something like this, to get out and in trends. when the price stays in the area of the atr it's time to change the position
hello Koalala, all right? Yes, I would use it as an input filter, in this case I think it's more like a stock price bias between cheap/expensive. I quoted about the MTF to be able to measure it on 4H charts but with the weekly barriers.
These users thanked the author RodrigoRT7 for the post:
Jedidiah


DownloadRe: Already Converted TradingView Indicators to MT4 Indicators

287
//@version=4
// gkjch
// Original By: JustUncleL : https://www.tradingview.com/script/Ja29 ... ustUncleL/

study(title="Simple Pivots", shorttitle="Pivots", overlay=true, max_bars_back=50)

ShowPivots = input(true, title="Show Pivot Lines")

left = input(8, minval=1, title="Pivot Lookback Left Hand Side")
right = input(8, minval=1, title="Pivot lookback Right Hand Side")

ExtendCurrentPivots = input(defval = true, title = "Draw lines extending from most recent pivots forward")
ShowPivotPrice = input(defval = false, title = "Place price of prior pivots on chart")

Shunt = input(1, minval=0, maxval=1, type=input.integer, title="When to start Printing Pivot (0 = no wait, 1 = wait for candle close)")
maxLvlLen = input(0, minval=0, title="Maximum Level Extension Length - 0 indicates no maximum")


// Get High and Low Pivot Points
pvthi_ = pivothigh(high, left, right)
pvtlo_ = pivotlow(low, left, right)

// Force Pivot completion before plotting.
pvthi = pvthi_[Shunt]
pvtlo = pvtlo_[Shunt]

//Count How many candles for current Pivot Level, If new reset.
counthi = 0
countlo = 0
counthi := na(pvthi) ? nz(counthi[1]) + 1 : 0
countlo := na(pvtlo) ? nz(countlo[1]) + 1 : 0

pvthis = 0.0
pvtlos = 0.0
pvthis := na(pvthi) ? pvthis[1] : high[right + Shunt]
pvtlos := na(pvtlo) ? pvtlos[1] : low[right + Shunt]

// Colors for Lines
hipc = pvthis != pvthis[1] ? na : color.green
lopc = pvtlos != pvtlos[1] ? na : color.red

// Draw historical levels, "line" objects are limited in history.
plot(ShowPivots and (maxLvlLen == 0 or counthi < maxLvlLen) ? pvthis : na, color=hipc, linewidth=1, offset=-right - Shunt, title="Top Levels")
plot(ShowPivots and (maxLvlLen == 0 or countlo < maxLvlLen) ? pvtlos : na, color=lopc, linewidth=1, offset=-right - Shunt, title="Bottom Levels")

drawLabel(_offset, _pivot, _style, _yloc, _color, _text, _size) =>
if not na(_pivot)
label.new(bar_index[_offset], _pivot, text = _text+tostring(_pivot, format.mintick)+"]", style=_style, yloc=_yloc, color=_color, textcolor=_color, size = _size)

drawLabel(right+Shunt, ShowPivotPrice and counthi < counthi[1] and pvthis != pvthis[1] ? pvthis : na, label.style_none, yloc.abovebar, color.green, "[", size.normal)
drawLabel(right+Shunt, ShowPivotPrice and countlo < countlo[1] and pvtlos != pvtlos[1] ? pvtlos : na, label.style_none, yloc.belowbar, color.red, "[", size.normal)

LineFunction(ShowLine, startLine, stopLine, levelLine, colorLine, lineStyle, lineWidth, lastLine) =>
line.delete(lastLine)
ShowLine?
line.new(
x1 = startLine,
x2 = stopLine,
y1 = levelLine,
y2 = levelLine,
xloc = xloc.bar_index,
extend = extend.right,
color = colorLine,
style = lineStyle,
width = lineWidth): na

var line HiPivot = na
var line LoPivot = na
HiPivot := LineFunction(ExtendCurrentPivots, counthi > counthi[1] ? bar_index-right-Shunt : na, bar_index, pvthis, color.green, close > pvthis ? line.style_solid : line.style_dotted, 1, HiPivot[1])
LoPivot := LineFunction(ExtendCurrentPivots, countlo > countlo[1] ? bar_index-right-Shunt : na, bar_index, pvtlos, color.red, close < pvtlos ? line.style_solid : line.style_dotted, 1, LoPivot[1])



Can masters adapt this pivot indicator mt4?
Attachments

Re: Already Converted TradingView Indicators to MT4 Indicators

288
;) HI, masters! Is it possible to convert this indicator to MT4?
Linear Regression Candles
//@version=4
study(title="Humble LinReg Candles", shorttitle="LinReg Candles", format=format.price, precision=4, overlay=true)

signal_length = input(title="Signal Smoothing", type=input.integer, minval = 1, maxval = 200, defval = 11)
sma_signal = input(title="Simple MA (Signal Line)", type=input.bool, defval=true)

lin_reg = input(title="Lin Reg", type=input.bool, defval=true)
linreg_length = input(title="Linear Regression Length", type=input.integer, minval = 1, maxval = 200, defval = 11)

bopen = lin_reg ? linreg(open, linreg_length, 0) : open
bhigh = lin_reg ? linreg(high, linreg_length, 0) : high
blow = lin_reg ? linreg(low, linreg_length, 0) : low
bclose = lin_reg ? linreg(close, linreg_length, 0) : close

r = bopen < bclose

signal = sma_signal ? sma(bclose, signal_length) : ema(bclose, signal_length)

plotcandle(r ? bopen : na, r ? bhigh : na, r ? blow: na, r ? bclose : na, title="LinReg Candles", color= color.green, wickcolor=color.green, bordercolor=color.green, editable= true)
plotcandle(r ? na : bopen, r ? na : bhigh, r ? na : blow, r ? na : bclose, title="LinReg Candles", color=color.red, wickcolor=color.red, bordercolor=color.red, editable= true)

plot(signal, color=color.white)
Attachments
Who knows others is wise
Who knows himself is enlightened

Re: Already Converted TradingView Indicators to MT4 Indicators

289
;) HI, masters! Is it possible to convert this indicator to MT4?
Bollinger Bands Scalper + VWAP

//@version=5
indicator(shorttitle="bbs", title="Bollinger Bands Scalper + VWAP", overlay=true, timeframe="", timeframe_gaps=true)

//trendicator

length = input.int(20, minval=1, title='Trendicator Length', group="Trendicator Settings")
src2 = input(close, title='Trendicator Source', group="Trendicator Settings")
matype = input.int(1, minval=1, maxval=5, title='Trendicator Type: 1=SMA, 2=EMA, 3=HMA, 4=WMA, 5=VWMA', group="Trendicator Settings")

SMA = ta.sma(src2, length)
EMA = ta.ema(src2, length)
HMA = ta.wma(2 * ta.wma(src2, length / 2) - ta.wma(src2, length), math.round(math.sqrt(length)))
WMA = ta.wma(src2, length)
VWMA = ta.vwma(src2, length)


avgval = matype == 1 ? SMA : matype == 2 ? EMA : matype == 3 ? HMA : matype == 4 ? WMA : matype == 5 ? VWMA : na
Pcolor = avgval > avgval[1] ? color.new(#3179f5, 0) : color.new(#ec407a, 0)

plot(avgval, title='trendicator (ie: color changing moving average)', color=Pcolor, linewidth=2, style=plot.style_circles)

//praise be lady VVWAP!

var cumVol = 0.
cumVol += nz(volume)
if barstate.islast and cumVol == 0
runtime.error("No volume is provided by the data vendor.")

computeVWAP(src, isNewPeriod) =>
var float sumSrcVol = na
var float sumVol = na
var float sumSrcSrcVol = na

sumSrcVol := isNewPeriod ? src * volume : src * volume + sumSrcVol[1]
sumVol := isNewPeriod ? volume : volume + sumVol[1]
// sumSrcSrcVol calculates the dividend of the equation that is later used to calculate the standard deviation
sumSrcSrcVol := isNewPeriod ? volume * math.pow(src, 2) : volume * math.pow(src, 2) + sumSrcSrcVol[1]

_vwap = sumSrcVol / sumVol
variance = sumSrcSrcVol / sumVol - math.pow(_vwap, 2)
variance := variance < 0 ? 0 : variance
stDev = math.sqrt(variance)

[_vwap, stDev]

computeStdevBands(value, stdev, bandMult) =>
float upperBand = value + stdev * bandMult
float lowerBand = value - stdev * bandMult
[upperBand, lowerBand]

hideonDWM = input(false, title="Hide VWAP on 1D or Above", group="VWAP Settings: Praise Be Lady VWAP")
var anchor = input.string(defval = "Session", title="VWAP Anchor Period",
options=["Session", "Week", "Month", "Quarter", "Year", "Decade", "Century", "Earnings", "Dividends", "Splits"], group="VWAP Settings: Praise Be Lady VWAP")
src = input(title = "VWAP Source", defval = hlc3, group="VWAP Settings: Praise Be Lady VWAP")
offset = input(0, title="VWAP Offset", group="VWAP Settings: Praise Be Lady VWAP")

showBand_1 = input(true, title="", group="VWAP Settings: Praise Be Lady VWAP", inline="band_1")
stdevMult_1 = input(1.0, title="VWAP Bands Multiplier #1", group="VWAP Settings: Praise Be Lady VWAP", inline="band_1")
showBand_2 = input(true, title="", group="VWAP Settings: Praise Be Lady VWAP", inline="band_2")
stdevMult_2 = input(2.0, title="VWAP Bands Multiplier #2", group="VWAP Settings: Praise Be Lady VWAP", inline="band_2")
showBand_3 = input(true, title="", group="VWAP Settings: Praise Be Lady VWAP", inline="band_3")
stdevMult_3 = input(3.0, title="VWAP Bands Multiplier #3", group="VWAP Settings: Praise Be Lady VWAP", inline="band_3")

timeChange(period) =>
ta.change(time(period))

new_earnings = request.earnings(syminfo.tickerid, earnings.actual, barmerge.gaps_on, barmerge.lookahead_on, ignore_invalid_symbol=true)
new_dividends = request.dividends(syminfo.tickerid, dividends.gross, barmerge.gaps_on, barmerge.lookahead_on, ignore_invalid_symbol=true)
new_split = request.splits(syminfo.tickerid, splits.denominator, barmerge.gaps_on, barmerge.lookahead_on, ignore_invalid_symbol=true)

isNewPeriod = switch anchor
"Earnings" => not na(new_earnings)
"Dividends" => not na(new_dividends)
"Splits" => not na(new_split)
"Session" => timeChange("D")
"Week" => timeChange("W")
"Month" => timeChange("M")
"Quarter" => timeChange("3M")
"Year" => timeChange("12M")
"Decade" => timeChange("12M") and year % 10 == 0
"Century" => timeChange("12M") and year % 100 == 0
=> false

isEsdAnchor = anchor == "Earnings" or anchor == "Dividends" or anchor == "Splits"
if na(src[1]) and not isEsdAnchor
isNewPeriod := true

float vwapValue = na
float stdev = na
float upperBandValue1 = na
float lowerBandValue1 = na
float upperBandValue2 = na
float lowerBandValue2 = na
float upperBandValue3 = na
float lowerBandValue3 = na

if not (hideonDWM and timeframe.isdwm)
[_vwap, _stdev] = computeVWAP(src, isNewPeriod)
vwapValue := _vwap
stdev := _stdev
[upBV1, loBV1] = computeStdevBands(vwapValue, stdev, stdevMult_1)
upperBandValue1 := showBand_1 ? upBV1 : na
lowerBandValue1 := showBand_1 ? loBV1 : na
[upBV2, loBV2] = computeStdevBands(vwapValue, stdev, stdevMult_2)
upperBandValue2 := showBand_2 ? upBV2 : na
lowerBandValue2 := showBand_2 ? loBV2 : na
[upBV3, loBV3] = computeStdevBands(vwapValue, stdev, stdevMult_3)
upperBandValue3 := showBand_3 ? upBV3 : na
lowerBandValue3 := showBand_3 ? loBV3 : na

plot(vwapValue, title="VWAP", color=#00bcd4, offset=offset)

upperBand_1 = plot(upperBandValue1, title="VWAP Upper Band #1", color= color.new(#006064, 67), offset=offset, display = display.none)
lowerBand_1 = plot(lowerBandValue1, title="VWAP Lower Band #1", color= color.new(#006064, 67), offset=offset, display = display.none)
fill(upperBand_1, lowerBand_1, title="VWAP Bands Fill #1", color= color.new(#512da8, 90), display = display.none)

upperBand_2 = plot(upperBandValue2, title="VWAP Upper Band #2", color= color.new(#006064, 67), offset=offset, display = display.none)
lowerBand_2 = plot(lowerBandValue2, title="VWAP Lower Band #2", color= color.new(#006064, 67), offset=offset, display = display.none)
fill(upperBand_2, lowerBand_2, title="VWAP Bands Fill #2", color= color.new(#512da8, 90), display = display.none)

upperBand_3 = plot(upperBandValue3, title="VWAP Upper Band #3", color= color.new(#006064, 67), offset=offset,display = display.none)
lowerBand_3 = plot(lowerBandValue3, title="VWAP Lower Band #3", color= color.new(#006064, 67), offset=offset,display = display.none)
fill(upperBand_3, lowerBand_3, title="VWAP Bands Fill #3", color= color.new(#512da8, 90), display = display.none)



//bollinger bands 1 (BB1)

BB1_Length = input.int(20, minval=1, group="Bollinger Bands 1 Settings")
src_BB1 = input(close, title="BB1 Source", group="Bollinger Bands 1 Settings")
mult_BB1 = input.float(1.0, minval=0.001, maxval=50, title="BB1 StdDev", group="Bollinger Bands 1 Settings")
basis_BB1 = ta.sma(src_BB1, BB1_Length)
dev_BB1 = mult_BB1 * ta.stdev(src_BB1, BB1_Length)
upper_BB1 = basis_BB1 + dev_BB1
lower_BB1 = basis_BB1 - dev_BB1
offset_BB1 = input.int(0, "BB1 Offset", minval = -500, maxval = 500, group="Bollinger Bands 1 Settings")
plot(basis_BB1, "BB1 Basis", color = color.new(#ff9800, 100), offset = offset_BB1, display = display.none)
p1_BB1 = plot(upper_BB1, "BB1 Upper", color= color.new(#006064, 67), offset = offset_BB1)
p2_BB1 = plot(lower_BB1, "BB1 Lower", color= color.new(#006064, 67), offset = offset_BB1)
fill(p1_BB1, p2_BB1, title = "BB1 Background", color= color.new(#512da8, 87))

//bollinger bands 2 (BB2)
BB2_Length = input.int(20, minval=1, group="Bollinger Bands 2 Settings")
src_BB2 = input(close, title="BB2 Source", group="Bollinger Bands 2 Settings")
mult_BB2 = input.float(2.0, minval=0.001, maxval=50, title="BB2 StdDev", group="Bollinger Bands 2 Settings")
basis_BB2 = ta.sma(src_BB2, BB2_Length)
dev_BB2 = mult_BB2 * ta.stdev(src_BB2, BB2_Length)
upper_BB2 = basis_BB2 + dev_BB2
lower_BB2 = basis_BB2 - dev_BB2
offset_BB2 = input.int(0, "BB2 Offset", minval = -500, maxval = 500, group="Bollinger Bands 2 Settings")
plot(basis_BB2, "BB2 Basis", color = color.new(#ff9800, 100), offset = offset_BB2, display = display.none)
p1_BB2 = plot(upper_BB2, "BB2 Upper", color= color.new(#006064, 67), offset = offset_BB2)
p2_BB2 = plot(lower_BB2, "BB2 Lower", color= color.new(#006064, 67), offset = offset_BB2)
fill(p1_BB2, p2_BB2, title = "BB2 Background", color= color.new(#512da8, 87))

//bollinger bands 3 (BB3)
BB3_Length = input.int(20, minval=1, group="Bollinger Bands 3 Settings")
src_BB3 = input(close, title="BB3 Source", group="Bollinger Bands 3 Settings")
mult_BB3 = input.float(3.0, minval=0.001, maxval=50, title="BB3 StdDev", group="Bollinger Bands 3 Settings")
basis_BB3 = ta.sma(src_BB3, BB3_Length)
dev_BB3 = mult_BB3 * ta.stdev(src_BB3, BB3_Length)
upper_BB3 = basis_BB3 + dev_BB3
lower_BB3 = basis_BB3 - dev_BB3
offset_BB3 = input.int(0, "BB3 Offset", minval = -500, maxval = 500, group="Bollinger Bands 3 Settings")
plot(basis_BB3, "BB3 Basis", color = color.new(#ff9800, 100), offset = offset_BB3, display = display.none)
p1_BB3 = plot(upper_BB3, "BB3 Upper", color= color.new(#006064, 67), offset = offset_BB3)
p2_BB3 = plot(lower_BB3, "BB3 Lower", color= color.new(#006064, 67), offset = offset_BB3)
fill(p1_BB3, p2_BB3, title = "BB3 Background", color= color.new(#512da8, 87))
Attachments
Who knows others is wise
Who knows himself is enlightened


Who is online

Users browsing this forum: Abdi, adriano.ecker, ChatGPT [Bot], Jimmy, kvak, MTSW, purin69, ROI, Ruby [Bot], TheJurgFX, Xxcoincoin, Yandex [Bot] and 115 guests