Library/class for calculating Required Margin.

Job finished

Execution time 29 days
Feedback from customer
great developer, has extensive programming knowledge, strongly committed, effective in solving encountered problems in the project.
Feedback from employee
Positive experience with a great client, developer himself. Calm and attentive to details, appreciative of and willing to accommodate unexpected job complexity.

Specification

I need to write a library to calculate Required Margin in MT4 and MT5 according to the following requirements:

Create a ReqMargin class and add a public function in it

double ReqMarginCalc(string symbol, double lot)

which calculates and returns the required margin for the given symbol and lot.
The function must work for both MT4 and MT5.
It is best to have one common mqh file with the class and divide the code inside with directives:

#ifdef __MQL5__
// MQL5 code
#else
// MQL4 code
#endif

The function must correctly calculate Required Margin for all types of instruments available in metatrader, not only currency pairs but indices, commodities, cryptos, etc.

All source code must be provided.

Responded

1
Developer 1
Rating
(258)
Projects
321
30%
Arbitration
34
26% / 65%
Overdue
10
3%
Free
2
Developer 2
Rating
(195)
Projects
242
34%
Arbitration
11
45% / 45%
Overdue
8
3%
Free
Published: 1 article, 8 codes
3
Developer 3
Rating
(19)
Projects
27
26%
Arbitration
2
0% / 100%
Overdue
2
7%
Free
4
Developer 4
Rating
(16)
Projects
35
23%
Arbitration
4
0% / 50%
Overdue
2
6%
Working
5
Developer 5
Rating
(45)
Projects
46
24%
Arbitration
34
9% / 85%
Overdue
10
22%
Free
6
Developer 6
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
Published: 9 codes
7
Developer 7
Rating
(32)
Projects
42
43%
Arbitration
2
100% / 0%
Overdue
4
10%
Free
8
Developer 8
Rating
(1)
Projects
2
0%
Arbitration
2
50% / 50%
Overdue
0
Free
Similar orders
Требуется напи сать пользовательский форекс-индикатор на основе стандартного индикатора ZigZag для торговой платформы МТ5 с фильтрацией колен (граней) по их минимальной длине. Пояснение: используя стандартный индикатор ZigZag для МТ5, добавить в его настройки функцию\опцию задания минимальной длины граней зигзага (чтобы индикатор игнорировал мелкие грани, а рисовал \ отмечал только те грани, длина которых составляет
Project Overview We have a highly optimized, production-ready custom cTrader cBot built for a fast-paced Renko breakout strategy (specifically trading XAUUSD/Gold). The core system architecture, structural mapping, and breakout logic are flawless. We are seeking an expert C# algorithmic developer for a targeted engagement to refine the execution mechanics and add an advanced trade management module. This is not a
SNIPER X AI 30 - 200 USD
I really need a developer Who can help me to create my SNIPER X AI - Elite AI Trading System Overview SNIPER X AI BOT is an AI-assisted trading system for Forex, Crypto, Stocks, Indices, and Gold. Currency: USD,RAND,KWD, POUND,EURO Core Features AI Scalping, Sniper Entries, Auto Buy/Sell, Smart Risk Management, Telegram Alerts, Mobile Monitoring, VPS Deployment. Supported Platforms MetaTrader 4, MetaTrader 5, Exness
Limzy 30+ USD
//+------------------------------------------------------------------+ //| HighPerformanceEA.mq5 | //| Copyright 2026, AI Developer | //| https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2026" #property link " https://www.mql5.com " #property version "1.00" #property strict //
I need an experienced MQL5 developer to build a professional XAUUSD scalping Expert Advisor. The trading logic is already fully defined and will be shared privately with selected developers. Requirements Fast execution suitable for scalping Dynamic lot sizing Strict risk management Clean and optimized MQL5 code Compatible with MetaTrader 5 Additional Rules No repainting logic No delayed execution Avoid duplicate
ZigZag based on oscillators is needed The idea of ​​the indicator Create a ZigZag indicator, which is constructed based on extreme values determined using oscillators. It can use any classical normalized oscillator, which has overbought and oversold zones. The algorithm should first be executed with the WPR indicator, then similarly add the possibility to draw a zigzag using the following indicators: CCI Chaikin RSI
Prepare expert for xauusd live chart [ expert is not executing xauusd trades , just printing the logic on the chart ] . Deletion and cleaning code ( subject to if required ) . Integration of candles with present logic, Since expert is coming out from an arbitration subject : Before project start , review the code if it is clean and ready for the developer to continue with previous developer's technical debt -thereby
Hello, I am looking for an experienced developer who can build a professional EA suitable for long-term prop firm account passing and account management. I am NOT interested in risky strategies such as martingale, grid, or aggressive recovery systems. My main priorities are: very low and stable drawdown, strong and consistent risk management, strict news filter, long-term sustainability, realistic and stable monthly
Dear developers. We seek experienced developer in PHP, MySQL, JavaScript. we want to publish custom chart and CSV to our website Homepage. Our MQL5 Script contains custom layout we seek to publish on the website. we are looking for experienced developer in the field of website engineer. we want to broadcast our custom pairs in our website, as outlined in our MQL5 Script. we need React developers
TrendPulse EMA Wick EA 50 - 200 USD
EA specification for MT5 developer (coder‑ready spec) You can copy‑paste this directly into an MQL5 Freelance job. --- 1. General * Platform: MetaTrader 5 (MT5) * Type: Expert Advisor (EA) * Markets: Major FX pairs (configurable list via inputs) * Execution: Market orders only * Timeframes: EA must work on any timeframe, but I will mainly use it on M15–H1 --- 2. Indicators & definitions * EMA 20: Exponential Moving

Project information

Budget
30+ USD
Deadline
to 3 day(s)