Convert TradingView Pine Script to Metatrader 5 Expert Advisor

Tâche terminée

Temps d'exécution 2 jours
Commentaires du client
Fast and honest.

Spécifications

Hi,

I need to convert the Super Trend 2 Strategy from Tradingview Pine Script to Meta Trader5 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)


 



Répondu

1
Développeur 1
Évaluation
(229)
Projets
339
49%
Arbitrage
21
5% / 33%
En retard
24
7%
Gratuit
2
Développeur 2
Évaluation
(414)
Projets
670
33%
Arbitrage
60
17% / 32%
En retard
113
17%
Travail
3
Développeur 3
Évaluation
(1235)
Projets
2820
80%
Arbitrage
156
22% / 43%
En retard
487
17%
Gratuit
4
Développeur 4
Évaluation
(195)
Projets
395
28%
Arbitrage
155
20% / 52%
En retard
112
28%
Gratuit
5
Développeur 5
Évaluation
(144)
Projets
285
42%
Arbitrage
19
63% / 5%
En retard
29
10%
Gratuit
Publié : 2 codes
Commandes similaires
PAIR : EURUSD ONLY TIMEFRAME: M1 SESSION:LONDON SESSION ONLY(CONFIGURABLE START / END TIME) TREND FILTER: - USE VWAP AS MAIN TREND FILTER - BUY ONLY WHEN PRICE IS ABOVE VWAP - SELL ONLY WHEN PRICEIS IS BELLOW VWAP STRUCTURE CONDITION : - TRADE ONLY AFTER A VALID BOS (BREAK OF STRUCTURE) - BOS MUST BE IN THE SAME DIRECTION AS VWAP TREND -IGNORE COUNTER-TREND BOS ENTERY CONDITION (ORDER BLOCK ): - AFTER BOS , WAIT FOR
I am looking for an experienced developer to create an automated trading bot on the Quantower platform based on my trading rules. The bot should execute trades automatically. Kindly bid for it if it is what you can code for me
MT5 Expert Advisor – XAUUSD Opening Range Breakout I am looking for an experienced MQL5 developer to build a robust MT5 Expert Advisor. STRATEGY DETAILS • Instrument: XAUUSD • Timeframe: M30 • Broker: Pepperstone (Spread Betting) • Trading days: Monday–Friday only OPENING RANGE • Opening range candle: 07:00 – 07:30 UK time • EA must automatically convert UK time to broker server time • Record OR High and OR Low from
EA should trade Gann indicator arrows filtered by Autotrendline indicator. Two orders per trade and when first level of Gann indicator is reached SL of second order should be moved to breakeven
Hello, I have a strategy written in Pine Script (TradingView) that used to send signals to MetaTrader 5 via PineConnector. Now I want a native MT5 Expert Advisor (EA) written in MQL5, so I can do full backtesting and trading inside MetaTrader without any external bridge. I will provide: - Full Pine Script code - Entry and exit rules (based on BOS and OB logic) - SL/TP and dynamic risk management (R:R) - Breakeven
EA for Gold 30+ USD
I am looking for a good EA robot for gold that will be taking trades on 1 min chart and takes profits on 1$ move on gold. that can take as many entries as possible in a day. example: ENTRY ON 3000.00 AND TAKE PROFIT AT 3001.00. The robot will have all the trading knowledge and strategy with a high win rate
Existing indicator compiles but does not want to attach to chart anymore, worked previously Requirements: Debugging of code so indicator attaches to chart Original values required to work as they previously worked, no adjustments Testing of indicator to make sure it attaches to a chart properly
Hi, I am looking for a good Forex programmer that could build a EA robot , It will have to be built base on fibonachi retracement, 0 , 0.236, 0.382 , 0,5 , 0.618 , 0.786, 1, 1.618 , 2.618, and 3.618, the robot should be able to make me input the fibo numbers myself. stop Loss, T.P
PROJECT DESCRIPTION I am using a Telegram → MetaTrader trade copier (currently TWP Copier 1.08) which receives trade signals correctly but does NOT consistently execute trades on MT4, despite: Signals being received and logged AutoTrading enabled Live trading allowed Correct symbol names (no suffix/prefix issues) Manual trades working perfectly No trade conflicts or filters blocking execution CURRENT ISSUE Telegram
Hello, I’m reaching out because I’m interested in hiring you to develop a custom trading bot for me. The bot should trade only XAUUSD (Gold) and be designed for long-term account growth using my own trading account size. Here are the core requirements: - Account size: $300 - Asset: XAUUSD only - Risk management: Strict and properly controlled - Risk-to-reward ratio: Clearly defined and consistently applied -

Informations sur le projet

Budget
30 - 50 USD
Délais
à 7 jour(s)