Convert PineScript Strategy to Metatrader 4 Expert Advisor

指定

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)


応答済み

1
開発者 1
評価
(5)
プロジェクト
6
17%
仲裁
2
0% / 50%
期限切れ
0
2
開発者 2
評価
(647)
プロジェクト
1295
67%
仲裁
84
26% / 49%
期限切れ
338
26%
3
開発者 3
評価
(221)
プロジェクト
369
66%
仲裁
10
50% / 0%
期限切れ
46
12%
4
開発者 4
評価
(564)
プロジェクト
933
47%
仲裁
302
59% / 25%
期限切れ
125
13%
取り込み中
類似した注文
I want to deal in triangular forex arbitrage trading. I want an automated trading robot for the same. It is also expected that the developer advises me about the setting up the operations. I live in India, so he/she must know the ethical way to do it, be it international broker account or whatever. I just need to start this sooner but in the efficient way. The developer is expected to have some experience and should
I want a Telegram bot to be linked to my account. To enter a trade, I want to type out the trade details on Telegram chat, and have the bot automatically place that trade in my MT5. I also want to manage trades (move stop levels and close orders) via the Telegram bot. I want for the Telegram bot to automatically disable trade executions sent to MT5 once a specified number of trades have already been placed on that
hello here am looking for someone that can assist me in removing validation form my demo file and if anyone is interested dm the for more details i will be waiting to get any reply by some on that can assist me with this
Hey developers! It is my pleasure to meet you. I am looking for a developer to help meet build and develop a simple EA robot that works based on EMAs. If you are a professional and expierenced MT4 programmer looking to work on this project, do bid for this project so that we can proceed and work on it. Thank you
A green point should be added at the Low point of candlesticks in the oversold zone—it is the L point. If there is at least one L point between two H points, search for a LL point in the interval between two H points. The candlestick with the lowest Low price will be the LL point. Generally, the LL point is not necessarily an L point. Search for candlesticks with the lowest Low price. If there is at least one H point
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

プロジェクト情報

予算
30 - 50 USD
開発者用
27 - 45 USD
締め切り
最高 7 日