How can I translate this code from tradingview into a mql4 language, So I am able to run this logic as an expert advisor...?

 
//
// @author LazyBear
// If you use this code in its orignal/modified form, do drop me a note.
//
//modified by Kurbelklaus
study("KK_Traders Dynamic Index_Bar Highlighting", shorttitle="KK_TDI_BH")
lengthrsi=input(13)
src=close
lengthband=input(34)
lengthrsipl=input(2)
lengthtradesl=input(7)
lenH = input(5, minval=1, title="PAC Length High")
lenL = input(5, minval=1, title="PAC Length Low")
Ruleset=input(false,title="Use original Ruleset")

r=rsi(src, lengthrsi)
ma=sma(r,lengthband)
offs=(1.6185 * stdev(r, lengthband))
up=ma+offs
dn=ma-offs
mid=(up+dn)/2
mab=sma(r, lengthrsipl)
mbb=sma(r, lengthtradesl)

hline(32)
hline(50)
hline(68)
upl=plot(up, color=blue)
dnl=plot(dn, color=blue)
midl=plot(mid, color=orange, linewidth=2)
fill(upl,midl, red, transp=90)
fill(midl, dnl, green, transp=90)
plot(mab, color=green, linewidth=2)
plot(mbb, color=red, linewidth=2)

// Bar - Highlighting, TDI TS
    // PAC
srcH = high
srcL = low
smmaH = na(smmaH[1]) ? sma(srcH, lenH) : (smmaH[1] * (lenH - 1) + srcH) / lenH
smmaL = na(smmaL[1]) ? sma(srcL, lenL) : (smmaL[1] * (lenL - 1) + srcL) / lenL
    //

long= Ruleset ? mab > mbb and mab > mid and mab > 50 and mab < 68 and close > smmaH and close > open : mab > mbb and mab > mid and mab > 50 and close > smmaH and close > open
short= Ruleset ? mab < mbb and mab < mid and mab < 50 and mab > 32 and close < smmaL and open > close : mab < mbb and mab < mid and mab < 50 and close < smmaL and open > close

barcolor(long ? green : na)
barcolor(short ? red : na)
 
F.Black :

First of all, you must have at least an intermediate level of both languages.

 
It is allowed to pick up a code and post it somewhere without the author's permission??!
 
Ahmet Metin Yilmaz #: First of all, you must have at least an intermediate level of both languages.
  1. MT4: Learn to code it.
    MT5: Begin learning to code it.

    If you don't learn MQL4/5, there is no common language for us to communicate. If we tell you what you need, you can't code it. If we give you the code, you don't know how to integrate it into your code.

  2. Or pay (Freelance) someone to code it. Top of every page is the link Freelance.
              Hiring to write script - General - MQL5 programming forum (2019)

We're not going to code it for you (although it could happen if you are lucky or the problem is interesting.) We are willing to help you when you post your attempt (using CODE button) and state the nature of your problem.
          No free help (2017)

 
William Roeder #:
  1. MT4: Learn to code it.
    MT5: Begin learning to code it.

    If you don't learn MQL4/5, there is no common language for us to communicate. If we tell you what you need, you can't code it. If we give you the code, you don't know how to integrate it into your code.

  2. Or pay (Freelance) someone to code it. Top of every page is the link Freelance.
              Hiring to write script - General - MQL5 programming forum (2019)

We're not going to code it for you (although it could happen if you are lucky or the problem is interesting.) We are willing to help you when you post your attempt (using CODE button) and state the nature of your problem.
          No free help (2017)

but why did you reply my answer? :)

 
_MAHA_ #:
It is allowed to pick up a code and post it somewhere without the author's permission??!
This code is public
Reason: