Convert TradingView Indicator/Strategy into MT4 EA/Trading Robot

MQL4 Experts

Specification

Looking for someone to examine and correct a pine script and convert into MQL4 script to perform the following functions as a robot & also an indicator for both Pine Script & MQL. 


The robot needs to:

Determine total available balance for trading. 

Useable on all trading timeframes (5min, 15min, 1Hr, 4Hr, Daily, Weekly) charts & Forex Pairs

Enter a Buy order of 10% of total available equity when 100 EMA crosses under 200 EMA (close of bar). 

Enter a Sell order of 10% of total available equity when 100 EMA crosses over 200 EMA (close of bar). 

(Example: $10,000 cash deposit on a 1:10 ratio account = $100,000 available including margin; trades = each trade uses 10% of $100,000 to each trade and no more than 50% of total margin or 5 trades open at one time reserving 50% of margin for drawdown.)

Ability to turn off either the Buy or the Sell so robot only performs Buy or the Sell trades leaving it up to the trader to include or exclude one or the other.

No more than 5 trades can be open at one time. 

Trades opens at cross. 

Long take profit @ .4 percent of price.

Stop loss @ .5 percent of price 

Plots both the 100 (color:red) & 200 (color:white) EMA's

Plots trade entry & exit with arrows. (red for Sell, green for Buy)

Ability to adjust parameters like the Take Profit & Stop Loss %'s & pyramid amount.

Audible alert of trade entry & exit.


Here's the Pine Script I have thus far (Please make any changes to meet the needs described above):


// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/

// © ForexDestiny


//@version=3

strategy(title="Take profit (% of instrument price)", calc_on_order_fills=true,calc_on_every_tick =true, initial_capital=100000,commission_value=.05,overlay=true,pyramiding=5, default_qty_type = strategy.percent_of_equity, default_qty_value = 10)

StartYear = input(2021, "Backtest Start Year")

StartMonth = input(1, "Backtest Start Month")

StartDay = input(1, "Backtest Start Day")


// STEP 1:

// Make inputs that set the take profit % (optional)

longProfitPerc = input(title="Long Take Profit (%)",

     type=float, minval=0.0, step=0.1, defval=1) * 0.01


shortProfitPerc = input(title="Short Take Profit (%)",

     type=float, minval=0.0, step=0.1, defval=1) * 0.01

     

longLossPerc = input(title="Long Stop Loss (%)",

     type=float, minval=0.0, step=0.1, defval=5) * 0.01


// Calculate moving averages

EMA100 = ema(close, 100)

EMA200 = ema(close, 200)


// Calculate trading conditions

enterLong  = crossunder(EMA100, EMA200)

enterShort = crossover(EMA100, EMA200)


// Plot moving averages

plot(series=EMA100, color=teal)

plot(series=EMA200, color=orange)


// STEP 2:

// Figure out take profit price

longExitPrice  = strategy.position_avg_price * (1 + longProfitPerc)

shortExitPrice = strategy.position_avg_price * (1 - shortProfitPerc)


// Determine Stop Loss price

longStopPrice  = strategy.position_avg_price * (1 - longLossPerc)


// Plot take profit values for confirmation

plot(series=(strategy.position_size > 0) ? longExitPrice : na,

     color=green, style=circles,

     linewidth=3, title="Long Take Profit")

     

plot(series=(strategy.position_size < 0) ? shortExitPrice : na,

     color=red, style=circles,

     linewidth=3, title="Short Take Profit")

     

// Plot stop loss values for confirmation

plot(series=(strategy.position_size > 0) ? longStopPrice : na,

     color=red, style=cross,

     linewidth=2, title="Long Stop Loss")


// Submit entry orders

if (enterLong)

    strategy.entry(id="EL", long=true)


// STEP 3:

// Submit exit orders based on take profit price

if (strategy.position_size > 0)

    strategy.exit(id="XL TP", limit=longExitPrice)

    

    // Submit exit orders based on calculated stop loss price

if (strategy.position_size > 0)

    strategy.exit(id="XL STP", stop=longStopPrice)









Responded

1
Developer 1
Rating
(33)
Projects
49
12%
Arbitration
16
0% / 88%
Overdue
10
20%
Free
2
Developer 2
Rating
(203)
Projects
303
35%
Arbitration
56
38% / 38%
Overdue
99
33%
Free
3
Developer 3
Rating
(1)
Projects
1
0%
Arbitration
0
Overdue
0
Free
4
Developer 4
Rating
(70)
Projects
105
54%
Arbitration
3
0% / 67%
Overdue
8
8%
Working
5
Developer 5
Rating
(564)
Projects
933
47%
Arbitration
302
59% / 25%
Overdue
125
13%
Loaded
6
Developer 6
Rating
(137)
Projects
167
35%
Arbitration
11
91% / 0%
Overdue
0
Free
Similar orders
Mega-FX Indicator 30 - 100 USD
Hello the Mega-Fx Indicator is currently running on MT4. I would need it in Mt5 and automatic trading with free setting of parameters. Specifically. When he should make a trade should be adjustable
I am looking for someone to help me to automate my trading from mt4/5 expert advisors and own trades to tradovate. My trades are generated by my expert in MT5, I want those trades copied to Tradovate's platform using their API to different accounts, that some programmers have suggested is a REST API and should be easily doable
Kindly access the vps to check out the EA, the name of the EA I'm referring to is called TOPGUN 2.0 The EA is in below VPS Server: 176.57.188.42 User:administrator Password: Test20082024! The project is to replicate the same EA in the server and code a very similar one based on the exact functionality in that existing EA
Good day. I would like to have an EA that closes all positions when a certain equity has been achieved. For example, I set balance to 100$ and equity target profit to 5$. When equity reaches 105$, it closes all positions and does the process again to 110$, 115$ and so on and so forth
*Forex Robot Requirements Specification* *General Information* - Robot Name: [Success Fighter] - Trading Platform: [MetaTrader 4/5] - Broker Compatibility: [Exness] - Currency Pairs: [ *Major Currency Pairs:* 1. EUR/USD (Euro/US Dollar) 2. USD/JPY (US Dollar/Japanese Yen) 3. GBP/USD (British Pound/US Dollar) 4. USD/CHF (US Dollar/Swiss Franc) 5. AUD/USD (Australian Dollar/US Dollar) 6. USD/CAD (US Dollar/Canadian
Hello, I need a capable programmer who can convert a Tradingview indicator I created into an EA based on a given trading strategy. I need both an MT4 and MT5 version. Thank you for your offers =)
Hello, I am looking for a skilled developer to create an Expert Advisor (EA) using Parabolic SAR Brief Task Description: 1. This EA will use the Parabolic SAR indicator for signals, and its open and close orders will be based on the signal, as well as the "candlestick behavior of price relative to the Parabolic SAR This EA will have a time-based function, subject to the
The service of a coder is required to Add an indicator menu and indicator file to the existing ea The Indicator will work with already installed indicator Details of the strategy will discussed when you applies The ea will be proof on the live market before its approved
Hi, Project Description: Develop a sophisticated Expert Advisor (EA) for MetaTrader 5 that leverages custom indicator signals to execute trades with advanced trade management features. The EA should support dynamic trade entries, customizable stop loss (SL) and trailing stops, versatile lot sizing, handling of opposite signals, detailed trade commenting, and incorporate Inside Candle pattern detection along with
Overview: I'm searching for a highly skilled and experienced MQL5 coder to create an Expert Advisor (EA) based on a purchased indicator from the MQL5 marketplace. The EA should execute trades with specific trade management settings, allowing full customization for trade entry, stop loss, trailing, and lot sizes, as well as handling opposite signals. Only serious applicants should apply, as I have no time to waste

Project information

Budget
30+ USD
For the developer
27 USD