Function for calculating static TP market price for all open orders by entering profit percentage

Tâche terminée

Temps d'exécution 7 heures
Commentaires du client
Job completed quickly and with quality, thanks Khuman. I will definitely contact you again with other jobs.
Commentaires de l'employé
Thanks! Another great and understanding customer

Spécifications

Hi all,

I need somebody to help me with writing a function for MT4 which will calculate TakeProfit market price for all open orders entering profit percentage, when profit of winning orders exceeds loss of losing orders.

For example, if I set 10% as input value, profit of open winning orders have to be 10% more than loss of open losing  orders.

I need this function for my grid system EA

For example:

My EA opened 3 market orders in same direction (EURUSD symbol)

1. order - buy with 0,02 lots, opened at 1.17196

2. order - buy with 0,04 lots, opened at 1.16946

3. order - buy with 0,08 lots, opened at 1.16696

my TP percentage is 10%, I need to calculate TakeProfit market price when profit from open  winning orders exceeds loss of open losing orders for 10%.

function input parameter will be percentage, for example: 5 or 10 or 15.5 (%)

function return value will be TP market price, for example above: 1.17112

function need to iterate over all open orders and calculate TP market price.

Order swap and order commission must be taken into account in the calculation.

function will be used for open buy or sell orders in same direction.

I want to use this function in all of my future EAs, so I need all rights for it.

double calcTPFromPercentage(double percentage)
{
  return TPMarketPrice;
}


Répondu

1
Développeur 1
Évaluation
(115)
Projets
129
18%
Arbitrage
11
27% / 55%
En retard
4
3%
Gratuit
2
Développeur 2
Évaluation
(19)
Projets
35
26%
Arbitrage
10
30% / 70%
En retard
5
14%
Gratuit
3
Développeur 3
Évaluation
(442)
Projets
570
37%
Arbitrage
106
39% / 33%
En retard
17
3%
Gratuit
4
Développeur 4
Évaluation
(70)
Projets
91
25%
Arbitrage
26
19% / 54%
En retard
25
27%
Gratuit
5
Développeur 5
Évaluation
(111)
Projets
139
43%
Arbitrage
9
33% / 44%
En retard
6
4%
Gratuit
Commandes similaires
Phahla fx boto 30+ USD
99.99% signal accuracy 10-15 trades distribution all currency trade and meta AI assistance on loss[advice] stop and start robot cyber security firewall protection activation code: 20060605TLP20 Please create a trading bot with any logo with the name elevation
Refine signal trigger execution . Optimize live chart performance . Ensure stable and clean code structure : Stable and clean code is important . Otherwise its a mess . Apply with as much accurate structure you foresee
This post is subject to developers response . Edit the post as you like . May be with me you can make a come back . So , , , Shift calculations . More to the calculation then you can comprehend is known . What else comes to your mind
I’m hiring an experienced MQL5 developer to finish and fix an existing project (NOT building from scratch). I have: An existing MT5 EA (.mq5 + .ex5) that is based on my TradingView logic A TradingView indicator version used for signals/alerts The EA works but has logic/consistency issues and needs improvements + cleanup Goal Make the EA reliable and consistent: Ensure entries/exits match the intended logic Fix
The indicator a bit inverted. But it doesn’t matter to me as long as the winrate make sense for investment. For brief details regarding the indicator. What should have been a sell, i inverted it into buy with sl and tp swapped(only change the name of sl and tp for visualisation , but the code still on right tp and sl) . And in script ive inverted the signal command code. But the trouble is the tp and sl cant be
All other Necessary filters already coded , Mostly it is referring to another expert copy pasting . Live Chart Optimization . Optimization from Signal Trigger Point . Apply to stay ahead . While applying please explain the correct trailing stop loss for value gap entries
I would like to create a robot with the smart money concepts, that integrates order block,FVG,supply & demand ,read the market structure,liquidity and also trade with the session and also after a liquidity sweep a market structure is needed to verify the reversal and a retracement to the order block and sometimes fair value Gap
I’m looking to acquire an existing, profitable Expert Advisor (EA) with full source code to add to our client investment portfolio. To be clear, this is not a request to develop or design a new strategy. If you already have an EA that is proven, consistent, and production-ready, I’m open to reviewing it immediately. Please apply only if you meet all the requirements below. Submissions without a proper introduction or
Trailing Stop Based on Thresholds . Other Necessary Filters already Coded . Live Chart Only . The strategy already coded - needs a fresh new draft . To Start from Signal Trigger
I am looking for a professional MQL5 developer to build a structured MT5 Expert Advisor. This is NOT a martingale or high-risk grid bot. Platform: • MT5 only (MQL5 source code required) Symbols: • XAUUSD • GBPUSD • GBPJPY Timeframe: • M5 Risk Management: • Adjustable risk per trade (default 0.5% equity) • Daily drawdown protection (max 3%, auto-lock trading for the day) • Maximum 2 open trades • Minimum 120 seconds

Informations sur le projet

Budget
30+ USD
Délais
de 1 à 2 jour(s)