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%
仕事中
類似した注文
Ctrader bot 30 - 45 USD
Hello! I need a cTrader bot that can receive trading signals from tradingview via webhook URL, read the syntax from the tradingview message and place the trades on cTrader. Is that something you can do? Under which of your gigs would this fall under? Thank you! This is how we expect the trade syntax to work: https://www.loom.com/share/089e783466a64d3d99214e1dbb548b4c?sid=39125f96-3b47-4446-8d75-3706dceda3c4 -
Hello! I need a cTrader bot that can receive trading signals from tradingview via webhook URL, read the syntax from the tradingview message and place the trades on cTrader. Is that something you can do? Under which of your gigs would this fall under? Thank you! This is how we expect the trade syntax to work: https://www.loom.com/share/089e783466a64d3d99214e1dbb548b4c?sid=39125f96-3b47-4446-8d75-3706dceda3c4 - Please
I need a mt5 robot which: -Trades executed during London and NY session only -Limits canceled + positions derisked if upcoming high impact news - Use entire range order blocks - Use closes to ensure displacement -3R minimum -No breakeven stops if trade under 5R. If trade is above -5R, trim 30% at 3R to de-risk 1% risk per trade CONDITIONS 1. Draw Weekly + Daily Structure with premium/discount, Order Blocks and
Expert sales 999999+ USD
This expert trader only buys in the forex market. I decide to sell this expert. This expert has had great results on Bitcoin and gold. I have put the backtest results on these two symbols in the context. My suggested price for this expert is 1 million dollars and I will auction it if necessary. And you can contact me with the Telegram ID below. https://t.me/Developer_1996
My sample pack 30+ USD
Try good luck have fun enjoy 👍 I hope I'm doing it right after losing so much. If anyone can help out, it would be much appreciated. I really need this to work this time 🙏 👍
Project Description: I have a Pine Script indicator used for trading any forex and/or stock instrument based on various time frames. I need to convert this indicator into an Expert Advisor for MetaTrader 4 or MetaTrader 5. The EA should replicate the functionality and logic of the Pine Script indicator, including all the parameters, conditions, and alerts. Below is the detailed description of the Pine Script code and
1.Green Line (20 Moving Average): This line shows the average price over the last 20 periods. 2.Red Line (50 Moving Average): This line shows the average price over the last 50 periods. Buy Signal: - When the green line crosses above the red line, it's a signal to buy. - Place the stop loss below the red line (50 moving average). - The target is when the green line crosses below the red line again. Sell Signal: -
I am seeking an EA that can be attached to any 1 random charts out of 20 different charts and detects/limits the number of open trades. I do manual trading and would like to have a limiter to ensure i do not over trade. The checking algorithm should always check based on the Terminal and thus, attaching to any chart should not pose any issues. Specifications - At any given point in time, there can only be a MAX
Please make a new pending order software and add it to the each of the Ea's that I would send the source codes. If any of the settings of the usual pattern of the Ea's have there in the EA's are not clear to you, then I will explain that part
So the new indicator will be done by modifying a mq4 file which is called “ chaos zone exit ” this is a indicator mirror by the “ choas visual average ” so you will need both indicators to use the “chaos zone exit”. Now there are two lines on the “chaos zone exit” one with super smoother period 96 and Super smoother period 14 . Now the changes I would like is for when the super smoother period line 96 is above

プロジェクト情報

予算
30+ USD
開発者用
27 USD
締め切り
最低 1 最高 2 日