Convert PineScript Strategy to Metatrader 4 Expert Advisor

Tarea técnica

Hello,


I need to convert the Super Trend 2 Strategy from Tradingview Pine Script to Meta Trader 4 EA, so that it can open and close orders on its own.


Supertrend is a strategy by breizh29 using *rajandran.r* Supertrend Indicator, and here is the original code:



strategy("Super Trend 2", overlay=true, default_qty_value=100)

res = input(title="Main SuperTrend Time Frame", type=resolution, defval="120")

Factor=input(1, minval=1,maxval = 100)

Pd=input(1, minval=1,maxval = 100)


tp = input(500,title="Take Profit")

sl = input(400,title="Stop Loss")



Up=hl2-(Factor*atr(Pd))

Dn=hl2+(Factor*atr(Pd))

MUp=security(tickerid,res,hl2-(Factor*atr(Pd)))

MDn=security(tickerid,res,hl2+(Factor*atr(Pd)))


Mclose=security(tickerid,res,close)


TrendUp=close[1]>TrendUp[1]? max(Up,TrendUp[1]) : Up

TrendDown=close[1]<TrendDown[1]? min(Dn,TrendDown[1]) : Dn


MTrendUp=Mclose[1]>MTrendUp[1]? max(MUp,MTrendUp[1]) : MUp

MTrendDown=Mclose[1]<MTrendDown[1]? min(MDn,MTrendDown[1]) : MDn


Trend = close > TrendDown[1] ? 1: close< TrendUp[1]? -1: nz(Trend[1],1)

Tsl = Trend==1? TrendUp: TrendDown


MTrend = Mclose > MTrendDown[1] ? 1: Mclose< MTrendUp[1]? -1: nz(MTrend[1],1)

MTsl = MTrend==1? MTrendUp: MTrendDown


linecolor = Trend == 1 ? green : red

plot(Tsl, color = linecolor , style = line , linewidth = 2,title = "SuperTrend")


Mlinecolor = MTrend == 1 ? blue : orange

plot(MTsl, color = Mlinecolor , style = line , linewidth = 2,title = "Main SuperTrend")


plotshape(cross(close,Tsl) and close>Tsl , "Up Arrow", shape.triangleup,location.belowbar,green,0,0)

plotshape(cross(Tsl,close) and close<Tsl , "Down Arrow", shape.triangledown , location.abovebar, red,0,0)


up = Trend == 1 and Trend[1] == -1 and MTrend == 1 

down = Trend == -1 and Trend[1] == 1 and MTrend == -1 

plotarrow(up ? Trend : na, title="Up Entry Arrow", colorup=lime, maxheight=60, minheight=50, transp=0)

plotarrow(down ? Trend : na, title="Down Entry Arrow", colordown=red, maxheight=60, minheight=50, transp=0)



golong = Trend == 1 and Trend[1] == -1 and MTrend == 1 

goshort = Trend == -1 and Trend[1] == 1 and MTrend == -1 


strategy.entry("Buy", strategy.long,when=golong)

strategy.exit("Close Buy","Buy",profit=tp,loss=sl)

   

   

strategy.entry("Sell", strategy.short,when=goshort)

strategy.exit("Close Sell","Sell",profit=tp,loss=sl)


Han respondido

1
Desarrollador 1
Evaluación
(5)
Proyectos
6
17%
Arbitraje
2
0% / 50%
Caducado
0
Libre
2
Desarrollador 2
Evaluación
(647)
Proyectos
1295
67%
Arbitraje
84
26% / 49%
Caducado
338
26%
Libre
3
Desarrollador 3
Evaluación
(221)
Proyectos
369
66%
Arbitraje
10
50% / 0%
Caducado
46
12%
Libre
4
Desarrollador 4
Evaluación
(564)
Proyectos
933
47%
Arbitraje
302
59% / 25%
Caducado
125
13%
Trabajando
Solicitudes similares
RRB 50 - 400 USD
The overbought zone is determined as candlesticks, at which the indicator value Value > Lmax (Lmax=-20). The oversold zone is determined as candlesticks, at which the indicator value Value < Lmin (Lmin=-80). The values of Lmax and Lmin should be included in indicator parameters. A yellow point should be added at the High point of candlesticks in the overbought zone—it is the H point. A green point should be added at
Hello, I am looking for developer who develops me a renko trading robo with following requirement Time :1 sec Box assignment method : Percentage change LTP Source : Close/OHLC Auto Break-even setup option after certain box Trialling Profit Pips after certain box profit with auto Sl set in PIPs Auto open reverse trade after hitting Sl with given conditions . It is very simple trading tool
At bot 30+ USD
Help me to trade create orders for me and analyze the markets and decide when is a good time to buy or sell. Determine which pairs are best to use to trade with and indicate trading signals to me
I currently have a Forex trading script in .txt format that I want to be converted to a functional/working robot (in .mq4), without altering the strategy of the script. The strategy of the script is already in and shouldn't be changed unless with mutual understanding
Hey greetings, It my pleasure to met you . I need a MT4 develop that can develop an EA based on alert . If you are a professional MT4 programmer you can kindly bid for this project and let proceed
Hi, I would like to create an EA similar to this link: https://www.mql5.com/en/market/product/33508?source=External#description Drawdown 5% Scalping! Ability to avoid big price drop that can hurt capital! stable! bid and ask price different is 0.5
I've use most of code from this script, add some more filter, and added different kind of moving avg instead of rsi input .. please check the source code .. . 70-80% is similar to it. Please check can you convert And are you familiar with backtest.py library? Oky. This library has ML approach to get the optimized backtest parameters right ? included for this but let me know what you think? can you install backtest.py
Project Description : I need an experienced programmer to convert the TradingView indicator "CURRENCY STRANGHT CHART by boitoki" into a MetaTrader 5 (MT5) format. The indicator should function identically to the original and be fully compatible for integration into an Expert Advisor (EA) on MT5. Requirements : Convert "TTD Middle Right Normal" from TradingView to a .mq5 file for MT5. Ensure all indicator features and
Project Description : I need an experienced programmer to convert the TradingView indicator "RSI BARS" into a MetaTrader 5 (MT5) format. The indicator should function identically to the original and be fully compatible for integration into an Expert Advisor (EA) on MT5. Requirements : Convert "TTD Middle Right Normal" from TradingView to a .mq5 file for MT5. Ensure all indicator features and visual signals are
Project Description : I need an experienced programmer to convert the TradingView indicator "TTD Middle Right Normal" into a MetaTrader 5 (MT5) format. The indicator should function identically to the original and be fully compatible for integration into an Expert Advisor (EA) on MT5. Requirements : Convert "TTD Middle Right Normal" from TradingView to a .mq5 file for MT5. Ensure all indicator features and visual

Información sobre el proyecto

Presupuesto
30 - 50 USD
Para el ejecutor
27 - 45 USD
Plazo límite de ejecución
a 7 día(s)