Convert PineScript Strategy to Metatrader 4 Expert Advisor

Trabalho concluído

Tempo de execução 246 dias

Termos de Referência

Hello,


I need to convert the Super Trend 2 Strategy from Tradingview Pine Script to MetaTrader 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
(298)
Projetos
427
26%
Arbitragem
18
61% / 33%
Expirado
26
6%
Livre
2
Desenvolvedor 2
Classificação
(54)
Projetos
53
17%
Arbitragem
7
0% / 100%
Expirado
5
9%
Livre
3
Desenvolvedor 3
Classificação
(231)
Projetos
433
27%
Arbitragem
122
21% / 57%
Expirado
96
22%
Trabalhando
4
Desenvolvedor 4
Classificação
(221)
Projetos
369
66%
Arbitragem
10
50% / 0%
Expirado
46
12%
Livre
5
Desenvolvedor 5
Classificação
(145)
Projetos
162
41%
Arbitragem
5
0% / 80%
Expirado
8
5%
Livre
6
Desenvolvedor 6
Classificação
(336)
Projetos
620
38%
Arbitragem
39
23% / 64%
Expirado
93
15%
Livre
7
Desenvolvedor 7
Classificação
(555)
Projetos
922
48%
Arbitragem
300
59% / 25%
Expirado
123
13%
Carregado
Pedidos semelhantes
I want to develop an EA where trader will enter some preset order buy/sell (like pending order) on a specific pair with specific value. when the market touch the preset order line and close the andle above/below according to order buy/sell then EA execute the order. all preset/pending function will be handles from the dashboard similar picture like below; The dashboard must be good looking. additional details will
I would like to make a SMC EA for MT5 based on multi timeframes analyzing the price action. and make it more details with more user input added.'' source code needed'' First of all here's a video which helped me for this: https://www.youtube.com/watch?v=vEXji2ClXMc The ea should find a entry signal that based on the SMC concept below and each entry trigger can be turned on and off. Based on the Multi timeframe of
I need smart, professional, and fast programmer for doing this project quickly, that have experience in EA with minimum 300 projects finish and without arbitration, 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
Hello I'm in possesion of a straightforward MT% Expert AdvisorThat I want to convert into DXTrade. Are you able to do this conversion? Kindly let me know if the fil atached will be enough
I need modifications done to my expert advisor so I can input the number of trades it should open at any point in time. A side EA that has that functionality and can be attached to existing EAs is also welcomed
Hello, I need a quote for developing a bot for my renko based trading system on ctrader platform and based on the attached specification your expertise is highly needed for this project Thanks
i want an EA that enters based on the form of a candle if the lower wick is bigger then the rest of the candle i want buy and if the upperwick is bigger then the rest of the candle i want a sell single, i want it to enter with the sl 1 tick lower or higher then the lower or upperwick depening on buy or sell trade. then the stoploos needs to move when the trade goes to 0,5% sl too break even, when trad eis on 1% sl to
Hello to all developers, I need someone that can help me with my ea project. I want to do ea Only reverse engineering (writing from scratch by analyzing the algorithm), without decompilation Here are the files https://drive.google.com/folderview?id=1A9uJNbvFM1pvYHRLTIDf5ThgeJu88eJp
Fix my ea and add reverse trade feature plus has Make ea with trailing stop, once trade is closed in loss open in opposite, close in win open in same position. The ea must trail from 0 ( from the start)
Hello, please let me know if any of these strategies can be turned into a bot (automation) and run 24/7 on a vps. Also note that they might not use the latest versions of indicators, if this matters, then please check for the latest versions. Thank you! Dan https://1drv.ms/f/s!Alr17W7ddJLYgYgiFKZYluOfokbfQg

Informações sobre o projeto

Orçamento
30 - 50 USD
Desenvolvedor
27 - 45 USD