Convert TradingView Pine Script to Metatrader 4 Expert Advisor

MQL4 Converting

Specification


Hi,

I need to convert the following  Strategy from Tradingview Pine Script to Meta Trader4 EA, so that it can open and close orders on its own.


//@version=2

strategy("[RichG] Easy MTF Strategy v1.1", overlay=false)

TF_1_time = input("D", "Timeframe 1")
TF_2_time = input("10D", "Timeframe 2")
TF_3_time = input("15D", "Timeframe 3")
TF_4_time = input("30D", "Timeframe 4")
lengthKC=input(20, title="KC Length")
multKC = input(1.5, title="KC MultFactor")
lengthBB=input(20, title="BB Length")
transaction_size = input(100, "Contract/Share Amount")

src = close, len = 20


out = sma(src, len)
width = 5
upcolor = green
downcolor = red
neutralcolor = blue
linestyle = line


kc() =>
    ma = sma(close, lengthKC)
    range = tr
    rangema = sma(range, lengthKC)
    upperKC = ma + rangema * multKC
    lowerKC = ma - rangema * multKC
    [lowerKC, upperKC] 

 
bb() =>
    source = close 
    basis = sma(source, lengthBB)
    dev = multKC * stdev(source, lengthBB)
    upperBB = basis + dev
    lowerBB = basis - dev
    [upperBB, lowerBB]

TF_1 = security(tickerid, TF_1_time, open) < security(tickerid, TF_1_time, close) ? true:false
TF_1_color = TF_1 ? upcolor:downcolor

TF_2 = security(tickerid, TF_2_time, open) < security(tickerid, TF_2_time, close) ? true:false
TF_2_color = TF_2 ? upcolor:downcolor

TF_3 = security(tickerid, TF_3_time, open) < security(tickerid, TF_3_time, close) ? true:false
TF_3_color = TF_3 ? upcolor:downcolor


TF_4 = security(tickerid, TF_4_time, open) < security(tickerid, TF_4_time, close) ? true:false
TF_4_color = TF_4 ? upcolor:downcolor

TF_global = TF_1 and TF_2 and TF_3 and TF_4 
TF_global_bear = TF_1 == false and TF_2 == false and TF_3 == false and TF_4 == false
TF_global_color = TF_global ? green : TF_global_bear ? red : white
TF_trigger_width = TF_global ? 6 : width

plot(1, style=linestyle, linewidth=width, color=TF_1_color)
plot(5, style=linestyle, linewidth=width, color=TF_2_color)
plot(10, style=linestyle, linewidth=width, color=TF_3_color)
plot(15, style=linestyle, linewidth=width, color=TF_4_color)
plot(25, style=linestyle, linewidth=4, color=TF_global_color)    

exitCondition_Long = TF_global_bear 
exitCondition_Short = TF_global

longCondition = TF_global
if (longCondition)
    strategy.entry("MTF_Long", strategy.long, qty=transaction_size)

shortCondition = TF_global_bear
if (shortCondition)
    strategy.entry("MTF_Short", strategy.short, qty=transaction_size)

[kc_lower,kc_upper] = kc()

strategy.close("MTF_Long", when=close < kc_upper)
strategy.close("MTF_Short", when=close > kc_lower)

Responded

1
Developer 1
Rating
(362)
Projects
502
40%
Arbitration
145
17% / 73%
Overdue
98
20%
Busy
2
Developer 2
Rating
(50)
Projects
80
39%
Arbitration
4
50% / 25%
Overdue
0
Free
Similar orders
i mean i have this indicator(it's made for tradingview) but i would like to be using it in mt5, that's to change from pinescript code to mql5 code so that i can install it in mt5. and i want it be working in mt5 exactly the way its working in tradingview
Hello there, I have a script on tradingview pinescript that I need to get it converted to mql5 and add trailing loss, the script is very simple and not too complex. I will share the script with you once you bid. Thanks
This is a Ready Made grid Automatic EA 1. need some bug fixing and little modifcation this ea has some bug like -Takeing Random Trade after Mt4 Restart . also not flow set grid distance. like if i set 300pips grid distance, some time it place trade at 400 pips distance . fix this bug 2. Add one more anti-martingle Engine , LIKE Engine1-for martingle and Engine 2- Anti-martingle bot Engine place trade at the same time
Looking for a skilled developer to turn a pinescript into an MT5 indicator & EA I then want it to place buy and sell trades accordingly with close on opposite signal. // @version=1 indicator ( "Supply and Demand johann]" , overlay = true , max_boxes_count = 500 , max_bars_back = 500 ) //------------------------------------------------------------------------------ //Settings
Hello, I need to convert and indicator from pindescript to a bot in mt5 with a specific strategy. the pinescript is simple and is basicly modified moving average crossover with atr channel
Hi, I have one indicator for MT4 and it is working fine as I need. Now I want to convert it into MT5 version. The basic idea is that I put a starting date in one box, symbol in second box, number of lots in 3 box, per point value in 4th box. Indicator generate a virtual equity from starting minute till current date and time and shows it in 5th box and before this, it shows the starting price also, which I set by date
The developer needs to convert the attached ZZ semafor indicator from MQL4/MT4 platform to Pine Script, ensuring it includes alerts. hoping to get this done within a day. This involves translating the indicator's logic, including its ZigZag calculations and plotting logic, into Pine Script's syntax. Additionally, the script should generate alerts based on specific conditions or events within the indicator's behavior
Hello I have Order Flow Chart & Software Depends on Ninjatrader I want to EA a trading robot that works on different platforms via API Expert NinjaTrader Programmer for Cross-Platform Trading Robot I'm in need of a skilled NinjaTrader programmer to develop a cutting-edge trading robot that seamlessly operates across various platforms via API integration? I want a customized Expert Advisors (EAs) tailored to your
Hey there, I need to convert an indicator from ninja to mt4 I will attach the ninjatrader indicator script to be converted into mt4 If you can do this kindly bid and let's discuss about the project Thanks
Hello, I need a developper to convert my Pine Script strategy to MQL5 because I need to do grid search backtesting It's a quite simple strategy, 2 ema, and depending on the position of the curve relative to those 2 ema (a percentage over or under) it selects a branch in which a red 1mn candle closing price settled at a certain percentage triggers a sell and a green 1mn candle triggers a buy, always 100% equity, easy

Project information

Budget
30+ USD
For the developer
27 USD