無料でロボットをダウンロードする方法を見る
Twitter上で私たちを見つけてください。
私たちのファンページに参加してください
興味深いスクリプト?
それではリンクにそれを投稿してください。-
他の人にそれを評価してもらいます
記事を気に入りましたか?MetaTrader 5ターミナルの中でそれを試してみてください。
ライブラリ

MT4 to MT5 Convertor (MT5Compat.mqh) - MetaTrader 4のためのライブラリ

OrderManagement is by @fxSaber https://www.mql5.com/en/users/fxsaber
発行者:
Amirhossein Ghasemi Moroodi
ビュー:
3739
評価:
(3)
パブリッシュ済み:
2024.11.16 15:34
MQL5フリーランス このコードに基づいたロボットまたはインジケーターが必要なら、フリーランスでご注文ください フリーランスに移動

📢 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.

Range Levels Range Levels

The indicator draws the nearest levels of the specified price range.

BuySellZigZag BuySellZigZag

Double ZigZag draws virtual Buy and Sell levels on the price chart.