Guarda come scaricare robot di trading gratuitamente
Ci trovi su Telegram!
Unisciti alla nostra fan page
Script interessante?
Pubblica il link!
lasciare che altri lo valutino
Ti è piaciuto lo script? Provalo nel Terminale MetaTrader 5
Librerie

MT4 to MT5 Convertor (MT5Compat.mqh) - libreria per MetaTrader 4

OrderManagement is by @fxSaber https://www.mql5.com/en/users/fxsaber
Pubblicati da::
Amirhossein Ghasemi Moroodi
Visualizzazioni:
546
Valutazioni:
(3)
Pubblicato:
2024.11.16 15:34
Freelance MQL5 Hai bisogno di un robot o indicatore basato su questo codice? Ordinalo su Freelance Vai a Freelance

📢 MT5Compat a Comprehensive MT4 to MT5 Conversion Library 🚀

A new interface library has been developed to simplify the process of converting MT4 indicators and Expert Advisors (EAs) to MT5. This library supports most of the MetaTrader 4 functions, offering developers a unified solution for cross-platform compatibility.

You can add this to both 


🌟 Key Features:

 Extensive MT4 Function Support: Seamlessly integrates widely-used MT4 functions into MT5 projects. (Order part created by @fxSaber)
 Customizable: Developers can expand the library by adding additional functions as required.
 Unified Codebase: Enables writing a single codebase that works flawlessly for both MT4 and MT5.
 Flexible Integration Options: The library can be included as a  .mqh  file or directly integrated into an EA or indicator.


🛠️ How It Works:

1️⃣ Integrate your MT4 EA or indicator code with the provided library functions.
2️⃣ Use the  .mqh  file to incorporate the library into your project.
3️⃣ Write your logic once and achieve full compatibility with both MT4 and MT5.
4️⃣ You need to replace these functions with the compat version in order to be compatible with both platform with same code


MT4 Function Cross-Compatible Replacement Description
Ask GetAsk() Retrieves the current Ask price for a symbol.
Bid GetBid() Retrieves the current Bid price for a symbol.
MarketInfo(symbol, MODE_DIGITS) GetSymbolDigits(symbol) Gets the number of decimal places for a symbol.
MarketInfo(symbol, MODE_TICKSIZE) GetSymbolTickSize(symbol) Retrieves the tick size for a symbol.
MarketInfo(symbol, MODE_TICKVALUE) GetSymbolTickValue(symbol) Retrieves the tick value for a symbol.
MarketInfo(symbol, MODE_MINLOT) GetSymbolMinLot(symbol) Gets the minimum lot size for a symbol.
MarketInfo(symbol, MODE_MAXLOT)   GetSymbolMaxLot(symbol)   Gets the maximum lot size for a symbol.
MarketInfo(symbol, MODE_POINT) GetSymbolPoint(symbol) Retrieves the point size for a symbol.
MarketInfo(symbol, MODE_SPREAD) GetSymbolSpread(symbol) Gets the spread for a symbol.
Close[x] iClose(symbol, PERIOD_CURRENT, x) Retrieves the close price of the bar at index x .
Open[x] iOpen(symbol, PERIOD_CURRENT, x) Retrieves the open price of the bar at index x .
Low[x] iLow(symbol, PERIOD_CURRENT, x) Retrieves the low price of the bar at index x .
High[x] iHigh(symbol, PERIOD_CURRENT, x) Retrieves the high price of the bar at index x .

🌐 Why This Library?

This interface library is a powerful tool for developers looking to:

  • Save time and resources by maintaining a single codebase.
  • Transition existing MT4 products to MT5 with minimal effort.
  • Customize and expand functionality for advanced solutions.

📂 Availability

The library is now available for integration into your projects.

For inquiries or feedback, feel free to contribute to the discussion below. Let’s make development faster, simpler, and more efficient for everyone!


Empowering developers for cross-platform trading solutions. 🌟



PPF - Past Present Future PPF - Past Present Future

The same PNB from Yousufkhodja Sultonov.

Range Forecast H1 Range Forecast H1

The indicator displays the actual range of the hourly candle in percent and the calculated range based on average statistics.

Three Colors Three Colors

Example: Moving Average indicator filling by different colors

MACD Sample MACD Sample

Classical MACD Sample.