Convert simple Tradingview PineScript v2 Strategy into MQL4 Expert

MQL4 Convertir

Tâche terminée

Temps d'exécution 1 jour
Commentaires de l'employé
Good project and great customer Thanks :)

Spécifications

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


Répondu

1
Développeur 1
Évaluation
(1)
Projets
2
0%
Arbitrage
3
0% / 100%
En retard
0
Gratuit
2
Développeur 2
Évaluation
(48)
Projets
80
28%
Arbitrage
8
75% / 13%
En retard
41
51%
Gratuit
3
Développeur 3
Évaluation
(401)
Projets
529
74%
Arbitrage
9
44% / 0%
En retard
24
5%
Travail
Commandes similaires
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
Seeking assistance to covert Pine script from TradingView to MetaTrader 5. Require seamless transition for optimal functionality. Appreciate expertise in script conversion. Contact for further details Expertly convert Pine script from TradingView to MetaTrader 5 with precision and efficiency. Ensure seamless functionality and compatibility for optimal trading experience. Experienced in script conversion, I guarantee
Programmer needed to make my HFT bot more suitable for live trading. After testing and proven, if up to expectation, full funds will be received. Genuine offer but if this is successful further discussions can take place. DM me first so we can discuss further
I have a Trading View Strategy which is working well. Now, i want to Convert my trading platform to Meta trader. I need an Experienced Expert for Conversion. If this sounds as something that interest you, you can respond to my message

Informations sur le projet

Budget
30+ USD
Pour le développeur
27 USD
Délais
à 1 jour(s)