Convert PineScript Strategy to Metatrader 4 Expert Advisor

Termos de Referência

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)


Respondido

1
Desenvolvedor 1
Classificação
(5)
Projetos
6
17%
Arbitragem
2
0% / 50%
Expirado
0
Livre
2
Desenvolvedor 2
Classificação
(646)
Projetos
1294
67%
Arbitragem
84
26% / 49%
Expirado
338
26%
Livre
3
Desenvolvedor 3
Classificação
(221)
Projetos
369
66%
Arbitragem
10
50% / 0%
Expirado
46
12%
Livre
4
Desenvolvedor 4
Classificação
(555)
Projetos
922
48%
Arbitragem
300
59% / 25%
Expirado
123
13%
Trabalhando
Pedidos semelhantes
Hi there Here is a video of the logic: its based on market structure and swings using validated highs and lows based on candle closure. Just in case you would like to take a look at the code/indicator here is the link: https://youtu.be/igj0OaQoM7o?si=7nigL8OU2Nt1Zxkx Let me know if you can help
Create MT5 deriv EA 30 - 35 USD
Hello . Am in need of a developer that can Create deriv EA .I need to create a Deriv Bot with Martingale 1 min candles 30 martingale plus I can change the amount of martigale with the option of 1 min up or down . Kindly bid and let discuss about the project
"Hello, I'm looking for a developer who can connect tradingview signal to cTrader. If you have experience with API integration and are familiar with both cTrader and TradingView, please reach out. This project involves connecting the two platforms to enable detect signals and trigger cTrader . Looking forward to collaborating with someone who can help me with the project Thanks
MT4 TRADE COPIER EA 30 - 35 USD
Hello , how are you doing? Am in need of MT4 developer that can help me to develop trade copier EA for MT4 account Kindly bid for the project if it is what you can do for me thanks
Nt8 30+ USD
I trade in NT8 and would like to code an Elliott wave measurment tool, which is very easy because I have the major Script for that.We need only to add some aspects into it. If you are interested,if you can do this do well to bid on it
"Seeking an adept developer to help realize my custom NT8 strategy. Your expertise is integral to achieving success in this project. Are you interested in teaming up for a productive collaboration? Let's discuss the details together. Thank you!"
"Looking for a proficient developer to bring my custom NT8 strategy to life. Your expertise is pivotal for the project's success. Interested in joining forces for a fruitful collaboration? Let's delve into the specifics together. Appreciate it!"
"Seeking a skilled developer to code my custom NT8 strategy. Your expertise is crucial for this project's success. If interested, let's discuss further details and ensure a mutually beneficial collaboration. Thank you!"
I need smart, professional, and fast programmer for doing this project quickly, that have experience in EA with minimum 500 projects finish, and have good review and reputation from their client Share your link review, if you not qualified, dont apply! I will bidding the programmer from experience, review, reputation, price, and days working My EA using Moving Average, Average True Range, and using consecutives
Hi, I need an Indicator for my EA based on the VWAP and Standard deviation bands. Best if you have it already ready / working. It can look like this: https://ninjatrader.com/futures/blogs/what-is-volume-weighted-average-price-vwap/ https://www.sr-analyst.com/page_studydetail.php?prod=TV0015 It would need to have 2 modes: 1- Anchored one (in between some given hours) - reseting each day. 2- Continous

Informações sobre o projeto

Orçamento
30 - 50 USD
Desenvolvedor
27 - 45 USD
Prazo
para 7 dias