Convert thee (3) TradingView Pine scripts to three (3) mql4 indicators (MT4)

MQL4 Converting

Job finished

Execution time 2 days
Feedback from customer
The communication with this developer is outstanding! He worked through my questions and concerns and delivered the project days before the deadline! I will use this dev again! Thanks agian
Feedback from employee
Thank you!

Specification

Good afternoon,

I am looking to convert the following three (3) separate Pine scripts into three (3) MQL4 indicators who's results can be accessed using the iCustom command on an EA which I will code myself. Please provide the mql4 source, the iCustom syntax, and the executable with each indicator. Thank you in advance!


Here are the Pine scripts: ( please double check the source code with the hyperlink provided for each indicator)

Note: All inputs for the indicator should remain the same and can be changed externally. Basically,  a 1:1 conversion


Indicator 1: Linear Regression Candles by ugurvu

minimum requirements: I am looking for the value of the white plot per bar on value0 and the Linear Regression Candles open, close and color per bar on value1-3

---------------------------------------------------------------------------------------------------------------------------------------

//@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)


------------------------------------------------------



Indicator 2:  UT Bot Alerts by QuantNomad 

minimum requirements:  clear buy and sell signals per bar - could be either two separate values[ vaule0 and vaule1 ] or one value0 with less then 0 for sells ( vaule0 < 0 ) and greater than 0 for buys  ( value0 > 0) 

---------------------------------------------------------------------------------------------------------------------------------------


//@version=4
study(title="UT Bot Alerts", overlay = true)

// Inputs
a = input(1,     title = "Key Vaule. 'This changes the sensitivity'")
c = input(10,    title = "ATR Period")
h = input(false, title = "Signals from Heikin Ashi Candles")

xATR  = atr(c)
nLoss = a * xATR

src = h ? security(heikinashi(syminfo.tickerid), timeframe.period, close, lookahead = false) : close

xATRTrailingStop = 0.0
xATRTrailingStop := iff(src > nz(xATRTrailingStop[1], 0) and src[1] > nz(xATRTrailingStop[1], 0), max(nz(xATRTrailingStop[1]), src - nLoss),
   iff(src < nz(xATRTrailingStop[1], 0) and src[1] < nz(xATRTrailingStop[1], 0), min(nz(xATRTrailingStop[1]), src + nLoss),
   iff(src > nz(xATRTrailingStop[1], 0), src - nLoss, src + nLoss)))
 
pos = 0  
pos :=   iff(src[1] < nz(xATRTrailingStop[1], 0) and src > nz(xATRTrailingStop[1], 0), 1,
   iff(src[1] > nz(xATRTrailingStop[1], 0) and src < nz(xATRTrailingStop[1], 0), -1, nz(pos[1], 0)))
   
xcolor = pos == -1 ? color.red: pos == 1 ? color.green : color.blue

ema   = ema(src,1)
above = crossover(ema, xATRTrailingStop)
below = crossover(xATRTrailingStop, ema)

buy  = src > xATRTrailingStop and above
sell = src < xATRTrailingStop and below

barbuy  = src > xATRTrailingStop
barsell = src < xATRTrailingStop

plotshape(buy,  title = "Buy",  text = 'Buy',  style = shape.labelup,   location = location.belowbar, color= color.green, textcolor = color.white, transp = 0, size = size.tiny)
plotshape(sell, title = "Sell", text = 'Sell', style = shape.labeldown, location = location.abovebar, color= color.red,   textcolor = color.white, transp = 0, size = size.tiny)

barcolor(barbuy  ? color.green : na)
barcolor(barsell ? color.red   : na)

alertcondition(buy,  "UT Long",  "UT Long")
alertcondition(sell, "UT Short", "UT Short")



------------------------------------------------------



Indicator 3:  STC Indicator - A Better MACD [SHK] by shayankm

minimum requirements:  the color of the indicator [red/green] could be either two separate values[ vaule0 and vaule1 ] or one value0 with less then 0 for red ( vaule0 < 0 ) and greater than 0 for green ( value0 > 0) 

---------------------------------------------------------------------------------------------------------------------------------------

//@version=5
//[SHK] STC colored indicator
//

indicator(title='[SHK] Schaff Trend Cycle (STC)', shorttitle='STC', overlay=false)
EEEEEE = input(12, 'Length')
BBBB = input(26, 'FastLength')
BBBBB = input(50, 'SlowLength')

AAAA(BBB, BBBB, BBBBB) =>
    fastMA = ta.ema(BBB, BBBB)
    slowMA = ta.ema(BBB, BBBBB)
    AAAA = fastMA - slowMA
    AAAA

AAAAA(EEEEEE, BBBB, BBBBB) =>
    AAA = input(0.5)
    var CCCCC = 0.0
    var DDD = 0.0
    var DDDDDD = 0.0
    var EEEEE = 0.0
    BBBBBB = AAAA(close, BBBB, BBBBB)
    CCC = ta.lowest(BBBBBB, EEEEEE)
    CCCC = ta.highest(BBBBBB, EEEEEE) - CCC
    CCCCC := CCCC > 0 ? (BBBBBB - CCC) / CCCC * 100 : nz(CCCCC[1])
    DDD := na(DDD[1]) ? CCCCC : DDD[1] + AAA * (CCCCC - DDD[1])
    DDDD = ta.lowest(DDD, EEEEEE)
    DDDDD = ta.highest(DDD, EEEEEE) - DDDD
    DDDDDD := DDDDD > 0 ? (DDD - DDDD) / DDDDD * 100 : nz(DDDDDD[1])
    EEEEE := na(EEEEE[1]) ? DDDDDD : EEEEE[1] + AAA * (DDDDDD - EEEEE[1])
    EEEEE

mAAAAA = AAAAA(EEEEEE, BBBB, BBBBB)
mColor = mAAAAA > mAAAAA[1] ? color.new(color.green, 20) : color.new(color.red, 20)



if mAAAAA[3] <= mAAAAA[2] and mAAAAA[2] > mAAAAA[1] and mAAAAA > 75
    alert("Red", alert.freq_once_per_bar)
if mAAAAA[3] >= mAAAAA[2] and mAAAAA[2] < mAAAAA[1] and mAAAAA < 25
    alert("Green", alert.freq_once_per_bar)


plot(mAAAAA, color=mColor, title='STC', linewidth=2)

ul = plot(25, color=color.new(color.gray, 70))
ll = plot(75, color=color.new(color.gray, 70))
fill(ul, ll, color=color.new(color.gray, 96))

------------------------------------------------------



Please ask any questions.


Thanks again

Lele99












































Responded

1
Developer 1
Rating
(258)
Projects
585
35%
Arbitration
64
20% / 58%
Overdue
147
25%
Free
Published: 1 article, 22 codes
2
Developer 2
Rating
(572)
Projects
943
47%
Arbitration
303
59% / 25%
Overdue
125
13%
Working
3
Developer 3
Rating
(70)
Projects
90
26%
Arbitration
24
21% / 50%
Overdue
24
27%
Free
4
Developer 4
Rating
(516)
Projects
784
63%
Arbitration
33
27% / 45%
Overdue
23
3%
Free
Published: 1 code
5
Developer 5
Rating
(132)
Projects
178
39%
Arbitration
4
25% / 50%
Overdue
14
8%
Free
6
Developer 6
Rating
(30)
Projects
55
22%
Arbitration
12
67% / 8%
Overdue
2
4%
Free

Project information

Budget
100+ USD
For the developer
90 USD
Deadline
to 6 day(s)