Convert TradingView indicator to MT4

Работа завершена

Время выполнения 8 минут
Отзыв от исполнителя
fast approval!
Отзыв от заказчика
good and faster to close job

Техническое задание

I need to convert a Trading view indicator (Pine Script) to MQL4.

It is a trend indicator. It signals where to place a buy or a sell order.

In the end, both indicator (original and the mql4) should present the same results.


Here is the script from trading view


//@version=3

study(title="ATR Smoothed (By dysrupt)_BuySell version", shorttitle="ATR_SM_BuySell", overlay = true)


//Modifyed by @guikroth

////////////////////////////////////////////////////////////////////////////////INPUTS


nATRPeriod      = input(21, "Period")

nATRMultip      = input(6.3, "Multiplier",type=float, minval=0.5, maxval=1000, step=0.1)




/////////////////////////////////////////////////////////////////////////////////ATR


xATR = atr(nATRPeriod)

nLoss = nATRMultip * xATR

xATRTrailingStop = na

xATRTrailingStop := 

 iff(close > nz(xATRTrailingStop[1], 0) and close[1] > nz(xATRTrailingStop[1], 0), max(nz(xATRTrailingStop[1]), close - nLoss),

  iff(close < nz(xATRTrailingStop[1], 0) and close[1] < nz(xATRTrailingStop[1], 0), min(nz(xATRTrailingStop[1]), close + nLoss), 

   iff(close > nz(xATRTrailingStop[1], 0), close - nLoss, close + nLoss))) 

                       

pos = na 

pos := 

 iff(close[1] < nz(xATRTrailingStop[1], 0) and close > nz(xATRTrailingStop[1], 0), 1, 

  iff(close[1] > nz(xATRTrailingStop[1], 0) and close < nz(xATRTrailingStop[1], 0), -1, nz(pos[1], 0)))

 

color = pos == -1 ? red: pos == 1 ? lime : blue 

//patr=plot(xATRTrailingStop, color=color, linewidth=2, title="ATR Trailing Stop", transp=0)


// Deternine if we are currently LONG

isLong = false

isLong := nz(isLong[1], false)


// Determine if we are currently SHORT

isShort = false

isShort := nz(isShort[1], false)


//Trading

// Buy only if the buy signal is triggered and we are not already long

LONG = not isLong and pos == 1



// Sell only if the sell signal is triggered and we are not already short   

SHORT = not isShort and pos == -1



if (LONG)

    isLong := true

    isShort := false


if (SHORT)

    isLong := false

    isShort := true


barcolor(isLong ? lime : isShort ? red : na)



// Show Break Alerts

plotshape(SHORT, title="Sell", style=shape.labeldown, location=location.abovebar, size=size.normal, text="Sell", transp=0, textcolor = white, color=red, transp=0)

plotshape(LONG, title="Buy", style=shape.labelup, location=location.belowbar, size=size.normal, text="Buy", textcolor = white, color=green, transp=0)



// === /PLOTTING ===

// Send alert to TV alarm sub-system

alertcondition(LONG,title="Sell",message="Sell")

alertcondition(SHORT,title="BuY",message="Buy")

alertcondition(SHORT,title="BuY",message="Buy")

alertcondition(SHORT,title="BuY",message="Buy")


////////////////////////////////////////////////////////////////////////////////VWMA


len2 = input(100, minval=1, title="Smooth")

src = input(close, title="Source")

out = vwma(src, len2)


avg1=avg(out, xATRTrailingStop)

plot(avg1, color=aqua, transp=0, title="ATR")

Откликнулись

1
Разработчик 1
Оценка
(68)
Проекты
103
53%
Арбитраж
3
0% / 67%
Просрочено
9
9%
Работает
Похожие заказы
can anyone here help me with develop a Pine script on TradingView's Pine Editor for a trading strategy based on certain variations of the Morning Star candlestick pattern which I have been noticing from last 2 years
Can you Make ea with mql5 MetaTrader This is ea Find the trends by 3 candles then open one trades counter to the trend and if its not arrive to TP open second currency 0.1 counter to the first trade, If not arrive to TP open new trade with the winner (Biggest win) trade if not arrive to TP open new trade with the winner So in the Max trades we will have one trade in the counter trend and 3 in the trends We find the
hi.. i have a pin script (TV) but some lines in the code needs to be fixed,,, i will attach the file, Also I will be paying $20 for the project cause i just need you to adjust some Minor things in it, i will explain more further in the message side
I have the source file for a FOREX EA that I would like to modify to allow it to trade crypto currencies. It currently gives the error that the currency is not recognized when trying to back test and optimize the EA. Will need the EA to recognize BTC/ETH/SOL pairs and be able to trade crypto currencies
Hello There With new mt4 update my EA by the name "BreakFast In Canada" does not work on the new mt4 version so I need someone to make it work, however it looks like I do not have the source code for it. So I do not know if it is still possible to work on it. I have attached the picture of the specific EA as there many EAs with this name
I want to clarify some points, such as: When entering into a buy deal, he opens three deals, each deal has a different take profit and one stop loss. When you look at the code, you will know that there are three take-profit. It opens one deal, taking one profit and adding risk management as well An information screen on the chart shows all the information, I only have $10 for this now, and also I still have more
Hi Looking for an exisiting bot to create a Expert Advisor, that can pass prop firm Challenges (1 or 2 phases), like FTMO, MFF, TFF etc. Prop Firm EA Bot Using Gold Pairs Need source code Unlimited License NO martingale strategy Need to have nice entries and exits. NO big lots and low risk. Need complied with this restrictions: -Profit 10% -Max Drawdown (DD) 10% -Max Daily Loss 4% -All trades with SL -NO trades
H ello, I have a pinescript from trading view with several self-created indicators. Now I would like to convert these into an mt4/mt5 EA that trades automatically according to my specifications. The bot should also have an integrated news filter and not trade 2 hours before the news . I am looking for someone who can start immediately and deliver high-quality results. If you believe you are the right fit for this
Hello, I have a Pine Script from TradingView that includes several self-created indicators. I am looking for a professional and experienced developer to convert this script into an MT4/MT5 Expert Advisor (EA) that trades automatically according to my specifications. Key Requirements: Conversion of Pine Script to MT4/MT5 EA: Integrate multiple self-created indicators from the Pine Script. Implement specific trading
Hi i am searching for who can makes me Mt4 Robot Analysis Method = Candle + Ichimoku and also i want to attach image with Ea and image will provide from like when i attach my Ea to any type chart the chart image chnages to image which i attached to my Ea Message me for Ea parameters and for more information and only developer message me who is agree with 6days deadline and i will start job with developer on monday

Информация о проекте

Бюджет
30+ USD
Исполнителю
27 USD
Сроки выполнения
от 1 до 2 дн.