Convert TradingView indicator to MT4

MQL4 Indicators Converting Forex

Job finished

Execution time 8 minutes
Feedback from employee
fast approval!
Feedback from customer
good and faster to close job

Specification

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")

Responded

1
Developer 1
Rating
(67)
Projects
102
54%
Arbitration
3
0% / 67%
Overdue
9
9%
Working
Similar orders
I want to lock my indicators and my EAs in the data folder with a password because i am going to give my pc to a trader , the real names of the indicators also should be changed or covered on the screen so no one should go and find them online
I am seeking an experienced developer for a project that involves two main tasks: Pine Script Conversion: I have a trading script written in Pine Script that is currently operational. I need this script converted to MQL4/MQL5 for use on the MetaTrader platform. Licensing System Development: I need a system to manage the distribution of my trading bot. This system should allow me to sell the bot and control access
I am looking for a skilled developer to assist me with a project involving the following tasks: Convert Pine Script to MQL4/MQL5: I have an existing script written in Pine Script that is already functioning well. I need it converted to MQL4 or MQL5 for use on MetaTrader. Licensing System Implementation: I require a system where I can sell my trading bot and manage access through licenses. This system should allow me
Trade Entry Rule : 1 . New Arrow Higher or Lower Appear : Entry . (Range/Period: {Input}) After Entry Trailing Stop Trails { Trail Step (Input) } 2 . Lot Size { Input } 3 . Take Profit { Input } 4 . Max Number of Trades { Input } 5 . Total Number of Trades per Entry { Input } ---------------------------------------------------------------------------- 6 . Spread Filter { Input }
Placing of order and opening up position. And management of trading position/orders, cancellation of orders and closing of position order lot calculation processing trading errors and environmental state signal lifetime what the programme cannot do for you
Hi i want to create a mt5 ea with 2 indicators. No hedging, grid or martingale only with proper risk managment with tp/sl. Pa Adaptive Hull Parabolic Psar Ea inputs: Ea start and stop time with minutes Inputs of 2 indicators % risk balance for auto lot size (% X,XX like % 0,24 and if stop loss hit i will lose % 0,24 of my balance) Risk/reward ratio for stop and tp(1/x,xx like 1/1,75) Lot size : auto or fix, if auto
I hope this message finds you well. I am currently seeking an experienced MQL developer to work on a project that involves modifying an existing trading robot and creating a new version with specific enhancements and customizations. I have the source code of a trading robot that I would like to modify. Requirements: Experience with MQL4 and MetaTrader 4 platform. Strong understanding of trading algorithms and
I want someone who is really skilled at making zigzag indicators,because I want a zigzag that does not ignore any zigzag that occurs. Please, if you are a beginner, do not offer me an offer. I want someone skilled in zigzag indicators. Very important: I do not want the dull methods that beginners use to draw zigzags
I want someone who is really skilled at making zigzag indicators,because I want a zigzag that does not ignore any zigzag that occurs. Please, if you are a beginner, do not offer me an offer. I want someone skilled in zigzag indicators. Very important: I do not want the dull methods that beginners use to draw zigzags
I need someone to help me convert my tradingview pinescript to mt4, my budget for this project is $20 and I need this done fast in two days, Also, I am going to need you to be able to build a new indicator because that's the nest project, But I need to know if you can do this first , Thank you

Project information

Budget
30+ USD
For the developer
27 USD
Deadline
from 1 to 2 day(s)