Convert TradingView indicator to MT4

MQL4 指标 转化中 外汇

工作已完成

执行时间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
等级
(67)
项目
102
54%
仲裁
3
0% / 67%
逾期
9
9%
工作中
相似订单
### Strategy Description for Developer: **Objective**: Develop a profitable Inner Circle Trader (ICT) strategy for the 1-minute and 5-minute time frames. **Components**: 1. **Market Structure**: Identify market structure using swing highs and lows. 2. **Order Blocks**: Utilize bullish and bearish order blocks for potential entry points. 3. **Fair Value Gaps**: Use Fair Value Gaps (FVG) as alternative or complementary
Hello, I am looking for a partner who can create an Expert Advisor in MQL5 to trade my own range breakout strategy. In the attached file you will find the strategy and the functions that the EA must cover. Thank you
Looking for a profitable universal scalping custom indicator. Needs to have SL and TP with high win rate with notifications for ENTRY, SL and TP. Preferably to work with all pairs. Please don't sell me widely available indicators from tradingview. Needs to be custom indicator or a personal indicator
I have this cracked EA I got online but I want the EA to have a feature on it that will cut loss once the drawdown on the account is getting too much, the feature could be in % or certain amount. For instance, let’s say we have close to 20% drawdown, I want to bot to cut loss and continue again another after some hours
Hello, Recently I lost the MQL4 code of my built profitable expert advisor (the work of 2 years). I paid an expert to decompile it, but the code is no longer very readable. I need an experienced programmer that can rewrite the code from scratch based on my mql4 source code, with the required coding optimization and variable naming. The execution has to be fast and efficient. Thanks in advance
NEED SOMEONE WHO FULLY UNDERSTANDS THE SMART MONEY CONCEPT. I HAVE INCLUDED IMAGES OF HOW THE EA WOULD LOOK LIKE AFTER COMPLETION I have the source code to an EA already meaning the below, need it to be re-adjusted to my preferred strategy. Look to add a Break of Structure and Change of Character to the EA.EA uses the below: Key Features: 1. Liquidity Zones: Utilizes PDH/PDL, PWH/PWL, PMH, PML, and sessions as
MetaTrader MT4 to MT5 Conversion I'm on the lookout for a skilled developer proficient in MetaTrader who can assist me in converting my custom indicators and Expert Advisors (EAs) from MT4 to MT5. The primary goal of this project is to ensure that my tools are seamlessly compatible with both platforms. Key Requirements: - Proven experience in MetaTrader programming - A deep understanding of the differences between
NEED SOMEONE WHO FULLY UNDERSTANDS THE SMART MONEY CONCEPT. I HAVE INCLUDED IMAGES OF HOW THE EA WOULD LOOK LIKE AFTER COMPLETION I have the source code to an EA already meaning the below, need it to be re-adjusted to my preferred strategy. Look to add a Break of Structure and Change of Character to the EA.EA uses the below: Key Features: 1. Liquidity Zones: Utilizes PDH/PDL, PWH/PWL, PMH, PML, and sessions as
Hi there, I'm looking for someone to build a fairly easy straight forward grid robot for me. This will be used on FX pairs but mostly DAX, NASDAQ and DOW. Attached are the inputs I need and a description of what is required for each one, but if anything is not clear or needs further information please message me. Many thanks, Nic
Need an EA to be developed based on moving averages and the awesome oscillator. To long an fx pair when the AO flips positive and closes the position when the AO flips negative. Similarly, take a short position when the AO flips negative and closes the short when the AO flips positive. This would be for MT5

项目信息

预算
30+ USD
开发人员
27 USD
截止日期
 1  2 天