Convert simple Tradingview PineScript v2 Strategy into MQL4 Expert

MQL4 Converting

Job finished

Execution time 1 day
Feedback from employee
Good project and great customer Thanks :)

Specification

Hello,

I have a simple pine script that needs to be converted into an EA.


//@version=2

strategy(title = "RSI versus SMA", shorttitle = "RSI vs SMA", overlay = false, pyramiding = 0, default_qty_type = contracts, default_qty_value = 1, currency = currency.EUR)

// Description:
//  - It's RSI versus a Simple Moving Average.. Not sure it really needs much more description.
//  - Should not repaint - Automatically offsets by 1 bar if anything other than "open" selected as RSI source.

// === INPUTS ===
// rsi
rsiSource   = input(defval = open, title = "RSI Source")
rsiLength   = input(defval = 8, title = "RSI Length", minval = 1)
// sma
maLength    = input(defval = 34, title = "MA Period", minval = 1)
// invert trade direction
tradeInvert = input(defval = false, title = "Invert Trade Direction?")
// risk management
useStop     = input(defval = false, title = "Use Initial Stop Loss?")
slPoints    = input(defval = 25, title = "Initial Stop Loss Points", minval = 1)
useTS       = input(defval = true, title = "Use Trailing Stop?")
tslPoints   = input(defval = 120, title = "Trail Points", minval = 1)
useTSO      = input(defval = false, title = "Use Offset For Trailing Stop?")
tslOffset   = input(defval = 20, title = "Trail Offset Points", minval = 1)
// === /INPUTS ===

// === BASE FUNCTIONS ===
// delay for direction change actions
switchDelay(exp, len) =>
    average = len >= 2 ? sum(exp, len) / len : exp[1]
    up      = exp > average
    down    = exp < average
    state   = up ? true : down ? false : up[1]
// === /BASE FUNCTIONS ===

// === SERIES and VAR ===
// rsi
shunt = rsiSource == open ? 0 : 1
rsiUp = rma(max(change(rsiSource[shunt]), 0), rsiLength)
rsiDown = rma(-min(change(rsiSource[shunt]), 0), rsiLength)
rsi = (rsiDown == 0 ? 100 : rsiUp == 0 ? 0 : 100 - (100 / (1 + rsiUp / rsiDown))) - 50 // shifted 50 points to make 0 median
// sma of rsi
rsiMa   = sma(rsi, maLength)
// self explanatory..
tradeDirection = tradeInvert ? 0 <= rsiMa ? true : false : 0 >= rsiMa ? true : false
// === /SERIES ===

// === PLOTTING ===
barcolor(color = tradeDirection ? green : red, title = "Bar Colours")
// hlines
medianLine  = hline(0, title = 'Median', color = #996600, linestyle = dotted, linewidth = 1)
limitUp     = hline(25, title = 'Limit Up', color = silver, linestyle = dotted, linewidth = 1)
limitDown   = hline(-25, title = 'Limit Down', color = silver, linestyle = dotted, linewidth = 1)
// rsi and ma
rsiLine     = plot(rsi, title = 'RSI', color = purple, linewidth = 2, style = line, transp = 50)
areaLine    = plot(rsiMa, title = 'Area MA', color = silver, linewidth = 1, style = area, transp = 70)
// === /PLOTTING ===

goLong() => not tradeDirection[1] and tradeDirection
killLong() => tradeDirection[1] and not tradeDirection
strategy.entry(id = "Buy", long = true, when = goLong())
strategy.close(id = "Buy", when = killLong())

goShort() => tradeDirection[1] and not tradeDirection
killShort() => not tradeDirection[1] and tradeDirection
strategy.entry(id = "Sell", long = false, when = goShort())
strategy.close(id = "Sell", when = killShort())

if (useStop)
    strategy.exit("XSL", from_entry = "Buy", loss = slPoints)
    strategy.exit("XSS", from_entry = "Sell", loss = slPoints)
// if we're using the trailing stop
if (useTS and useTSO) // with offset
    strategy.exit("XSL", from_entry = "Buy", trail_points = tslPoints, trail_offset = tslOffset)
    strategy.exit("XSS", from_entry = "Sell", trail_points = tslPoints, trail_offset = tslOffset)
if (useTS and not useTSO) // without offset
    strategy.exit("XSL", from_entry = "Buy", trail_points = tslPoints)
    strategy.exit("XSS", from_entry = "Sell", trail_points = tslPoints)

This script should have the following functions:

-ability to backtest

-LotSize input - how much I want to use for trades, from 0,01 to 0,1 to 1 (of course I can set what I what I want e.g. 0,3 as well and so on)

-Automatic trade execution

SourceCode included of course


Responded

1
Developer 1
Rating
(1)
Projects
2
0%
Arbitration
3
0% / 100%
Overdue
0
Free
2
Developer 2
Rating
(48)
Projects
80
28%
Arbitration
8
75% / 13%
Overdue
41
51%
Free
3
Developer 3
Rating
(409)
Projects
540
75%
Arbitration
9
44% / 0%
Overdue
24
4%
Free
Similar orders
Convert MT4 EA to MT 5 EA. I just have the EA(ex4): I don't have the code. I want developer to copy same mt4 code and create mt5 EA NO EDITING REQUIRED
Terms of Reference: Development and Update of a MetaTrader 4 and MetaTrader 5 Bot Project Context: I currently own a MetaTrader 4 bot (Expert Advisor - EA) specialized in gold trading. I want to: Update the MetaTrader 4 version to integrate new features and secure the bot. Create a MetaTrader 5 version of this bot, with the same characteristics and functionalities. Project Objectives: Updating the MetaTrader 4 (MT4)
I want to convert my mt4 EA to mt5 EA . I have a mt4 ea with source code. i want developer to copy same mt4 code and create mt5 EA NO EDITING REQUIRED
DON'T REACH OUT IF YOU CAN'T CONVERT STRATEGY ON TRADINGVIEW TO A WELL AUTOMATED EXPERT ADVISOR THAT RUN WITHOUT PROBLEM ON METATRADER 5 Well, I am only looking for a programmer who is proficient in coding and can turn strategy on tradingview to a well customized expert advisor, please reach out if you can work timely on exactly what I just said
Hello Developers, I’m seeking a professional and highly experienced MQL4 developer to assist with converting an existing TradingView indicator into a fully functional MT4 indicator (.exe file). The source code will be provided , and the key task is ensuring that all features and functionality are preserved in the MT4 version. Project Requirements: Proven experience in converting TradingView Pine Script to MQL4
Project Overview: The project is to convert a high-frequency trading strategy from TradingView’s PineScript into an automated MQL5 Expert Advisor (EA). Additional features will be added to the EA which are not part of the TradingView PineScript, details are added below. Key Requirements: Experience: Strong expertise in both TradingView PineScript, MQL5, and FOREX trading is essential. The MQL5 EA must closely
O robot já está feito in jforex Java pra plaforma jforex Java Preciso.: 1 converta robôt jforex Pra egiabmql5 2: depois da conversão é pra adicionar estratégia grid ou seja irá converter jforex Java dukascopy pra mql4 e depois da conversão é pra adicionar dentro do mql4 a estratégia grid
This is a 2000 lines own-made breakout EA that I need to have cleanly converted from mql4 to mql5 for learning purposes The start() is about 400 lines long ; basic breakout with specific features , built for Index CFDs with 2 digits (typically DAX or SP500; TP SL... are expressed in actual Points) The Ontester() is about 400 lines (contains 58 different custom opimizations) The Deinit() is about 150 lines The
**Job Description**: I am looking for an experienced developer to convert my fully functioning TradingView code into an automated trading bot for the MQL5 terminal. The bot will be connected to my Exness account and should execute trades based on specific signals generated by the strategy. **Key Responsibilities**: - Convert existing TradingView Pine Script strategy into MQL5 code. - Ensure the MQL5 bot replicates
Preciso de um orçamento. Conversão de estratégias do TradingView para uso em MQL5. Todas são estratégias abertas, porém, não consigo contato com o desenvolvedor. 🔑 Principais recursos: - 🛠 Configurações personalizáveis ​​do PSAR: ajuste o ponto inicial, o incremento e os valores máximos do PSAR para adaptar o indicador à sua estratégia. - 📏 Padronização: suavize a volatilidade padronizando os valores do PSAR

Project information

Budget
30+ USD
For the developer
27 USD
Deadline
to 1 day(s)