• Overview
  • Reviews
  • Comments
  • What's new

SortedByValue

This library is used for sorting key and value arrays, we often need to sort values.

like in the python language

sorted(key_value.items(), key = lambda kv:(kv[1], kv[0]))


import function

Example of usage scenarios

1. Grid EA orders are sorted according to the opening price

void SortedByOpenPride()
  {
   long    OrderTicketBuffer[];
   double  OpenPriceBuffer[];

   for(int i = PositionsTotal()-1; i>=0; i--)
     {
      if(m_position.SelectByIndex(i))
        {
         OrderTicketBuffer[i] = long(m_position.Ticket());
         OpenPriceBuffer[i] = m_position.PriceOpen();
        }
     }

   SortedByDouble(OrderTicketBuffer,OpenPriceBuffer);
  }
The ticket of the top order is OrderTicketBuffer[ArraySize(OrderTicketBuffer)-1];
The ticket of the bottom order is OrderTicketBuffer[0];


2. Sort by currency strength
   string    key[5];
   double    value[5];

   key[0] = "USD";
   key[1] = "EUR";
   key[2] = "GBP";
   key[3] = "AUD";
   key[4] = "JPY";

   value[0] = 1.2;
   value[1] = 2.5;
   value[2] = 3.3;
   value[3] = 1.1;
   value[4] = 0.8;

   SortedByDouble(key,value);

The strongest currency is key[4], "GBP"
The weakest currency is key[0], "JPY"


Recommended products
Counter Triple MA
Andre Philipp Hollenbach
I’m sharing this code here for free to support the trading community. Feel free to modify it or even copy it entirely for your own use. I hope it’s helpful, and don’t hesitate to reach out if you have any questions or feedback! https://github.com/holle112/AlgoTradingConcepts.git Key Features: 1. Risk Management: Counter Triple MA prioritizes the protection of your capital with its sophisticated risk management system. It calculates risk as a percentage of your account balance, ensuring th
FREE
The Matrix
Omega J Msigwa
Matrix is the foundation of complex trading algorithms as it helps you perform complex calculations effortlessly and without the need for too much computation power, It's no doubt that matrix has made possible many of the calculations in modern computers as we all know that bits of information are stored in array forms in our computer memory RAM, Using some of the functions in this library I was able to create machine learning robots that could take on a large number of inputs To use this libra
A Simple Moving Average (SMA) is a statistical indicator used in time series analysis. This indicator represents the arithmetic mean of a sequence of values over a specific period of time. SMA is used to smooth short-term fluctuations in data, helping to highlight the overall trend or direction of changes. This aids analysts and traders in better understanding the general dynamics of the time series and identifying potential trends or changes in direction.  More information you can find in Wiki 
Bober Real MT5
Arnold Bobrinskii
4.76 (17)
Bober Real MT5 is a fully automatic Forex trading Expert Advisor. This robot was made in 2014 year and did a lot of profitbale trades during this period. So far over 7000% growth on my personal account. There was many updates but 2019 update is the best one. The robot can run on any instrument, but the results are better with EURGBP, GBPUSD, on the M5 timeframe. Robot doesn't show good results in tester or live account if you run incorrect sets. Set files for Live accounts availible only for c
| Fully-automated Smart Money Concept (ICT) inspired trading solution with multi-strategy capabilities | Built by a grid trader >> for grid traders.  This is MT5 version, click  here  for  Blue CARA MT4  (settings and logics are same in both versions)     Real monitoring signal  -->  Cara Gold Intro Blue CARA EA   ('CARA') - short for  C omprehensive  A lgorithmic   R esponsive   A dvisor is a next-gen  multi-currency    multi-timeframe  EA base on the widely known (and perhaps the most popul
Premium level is a unique indicator with more than 80% accuracy of correct predictions! This indicator has been tested for more than two months by the best Trading Specialists! The author's indicator you will not find anywhere else! From the screenshots you can see for yourself the accuracy of this tool! 1 is great for trading binary options with an expiration time of 1 candle. 2 works on all currency pairs, stocks, commodities, cryptocurrencies Instructions: As soon as the red ar
Hamster Scalping mt5
Ramil Minniakhmetov
4.7 (194)
Hamster Scalping is a fully automated Expert Advisor. Night scalping strategy. The RSI indicator and an ATR-based filter are used for entries. The advisor needs a hedging account type IMPORTANT! Contact me immediately after the purchase to get instructions and a bonus! Real operation monitoring as well as my other products can be found here: https://www.mql5.com/en/users/mechanic/seller General Recommendations The minimum deposit is $100, use an ECN account with the minimum spread,  default sett
SolarTrade Suite Financial Robot: LaunchPad Market Expert - designed to open trades! This is a trading robot that uses special innovative and advanced algorithms to calculate its values, Your Assistant in the World of Financial Markets. Use our set of indicators from the SolarTrade Suite series to better choose the moment to launch this robot. Check out our other products from the SolarTrade Suite series at the bottom of the description. Do you want to confidently navigate the world of in
MT4/5通用交易库(  一份代码通用4和5 ) #ifdef __MQL5__      #define KOD_TICKET ulong      #define KOD_MAGIC   long #else        #define KOD_TICKET long      #define KOD_MAGIC   int #endif class ODLIST; #import "K Trade Lib Pro 5.ex5"       //祝有个美好开始,运行首行加入    void StartGood() ;    //简单开单    long OrderOpen( int type, double volume, int magic, string symbol= "" , string comment= "" , double opprice= 0 , double sl= 0 , double tp= 0 , int expiration= 0 , bool slsetmode= false , bool tpsetmode= false );    //复杂开单
Magic EA MT5
Kyra Nickaline Watson-gordon
Magic EA is an Expert Advisor based on Scalping, Elliot Waves and with filters such as RSI, Stochastic and 3 other strategies managed and decided with the robot smartly. Large number of inputs and settings are tested and optimized and embedded in the program thus inputs are limited and very simple. Using EA doesn't need any professional information or Forex Trading Knowledge. EA can trade on all symbols and all time frames, using special and unique strategies developed by the author. The EA
Magic Grid MT5
Aliaksandr Charkes
4 (5)
Magic Grid MT5 is a non-indicator Expert Advisor using a grid strategy (on a hedging account). The strategy is based on automatic reopening of grid pending orders, after closing their market positions (by Take-Profit, Stop-Loss or manually). Pending orders are placed with a specified step from the initial prices, which can be entered manually or generated automatically (once at the beginning of the trade).   The robot can trade on any timeframe, on any currency pair, on several currency pairs,
Trade News EA
Sugianto
5 (1)
Trade   News EA is a semi automatic expert advisor designed for trade news event. News Calendar uses the built in calendar of MT5 terminal. Expert advisor explanation :   Click here   | Free News Reminder :   Click here   Parameters input: 1. Manage Open Positions + Trade Buy : Allow buy + Trade Sell : Allow sell 2. Show news + High importance : Show high importance news + High importance color : Color of high importance news + Medium importance : Show Medium importance news + Medium import
Mine Farm
Maryna Kauzova
Mine Farm is one of the most classic and time-tested scalping strategies based on the breakdown of strong price levels. Mine Farm is the author's modification of the system for determining entry and exit points into the market... Mine Farm - is the combination of great potential with reliability and safety. Why Mine Farm?! - each order has a short dynamic Stop Loss - the advisor does not use any risky methods (averaging, martingale, grid, locking, etc.) - the advisor tries to get
Noize Absorption Index - is the manual trading system that measures the difference of pressure between bears forces and bulls forces. Green line - is a noize free index that showing curent situation. Zero value of index shows totally choppy/flat market.Values above zero level shows how powerfull bullish wave is and values below zero measures bearish forces.Up arrow appears on bearish market when it's ready to reverse, dn arrow appears on weak bullish market, as a result of reverse expectation.
Goliath Mt5
Nicolokondwani Biscaldi
Goliath MT5 - scalper fully automated Expert Advisor for medium-volatile forex markets P roperties: The Library trades 10 currency pairs (USDCHF, EURCHF, EURGBP, AUDUSD, USDCAD, GBPUSD, EURUSD, NZDUSD, CADCHF, EURAUD, EURCAD, AUDJPY) The Library does not use martingale The Library sets a fixed stop loss and take profit for all orders The Library only trades a user input volume The Library can be installed on any currency pair and any timeframe Recommendations: Before using on a real account,
Net Z
Sugianto
5 (1)
NET Z uses a very well-known trend reversal technique to determine position entry with slight modifications by using virtual trade techniques and virtual pending orders so that position entry is not too early or too late. Why NETZ? NET Z does not require complicated settings and is easy to use because user only need to upload a set file that is already available. Currently there are set files for 20 fx pairs. The best GRID EA with the ability to control risks. I will share my personal daily r
KopierMaschine - локальный копировщик сделок между различными счетами MetaTrader 4 и MetaTrader 5 в любом направлении расположенных на одном компьютере с интуитивно понятным интерфейсом. Направления копирования: MT4 --> MT5 MT4 --> MT4 MT5 --> MT5 MT5 --> MT4 для копирования между терминалами MetaTrader 4 и   MetaTrader   5 необходимо приобрести версию продукта   KopierMaschine  для    MetaTrader  4 Особенности Программа работает в двух режимах Master и Slave На один подчиненный счет можно коп
Ict Smc Fvg Scalping
Nuno Miguel Rocha Dos Reis Tavares
ICT SMC FVG Scalping This product will be discontinued in 2025 as we are currently working on another project   Phoenix Ultimate   and until then this will be free for you to use with hope you will give us a fair review. Enjoy ! This advanced trading bot leverages the ICT SMC (Smart Money Concepts) and FVG (Fair Value Gap) strategy to identify optimal entry points in the market. By targeting the re-pricing of gaps (FVGs), the bot aims to capitalize on these imbalances for trade execution. It em
FREE
Kintech Gold
Doan Van Hai
Following our guide, you will gain more than you lose. EA for long-term. Stable profit - min risk. Symbol:  XAUUSD Attach to any timeframe Min deposit:   3000$ - Calculate profit by month EA input instruction: 1. With XAU 2 digits (eg: 1843.23) please set - Input   [3. Max spread]: 55 - Input   [9. Step point]: 100 2. With XAU 3 digits (eg: 1843.235) please set - Input   [3. Max spread]: 550 - Input   [9. Step point]: 1000 3. If you want to attach to one more Window, please set input   [1. Numb
US500 Scalper
Sergey Batudayev
The S&P 500 Scalper Advisor is an innovative tool designed for traders who want to successfully trade the S&P 500 Index. The index is one of the most widely used and prestigious indicators of the American stock market, comprising the 500 largest companies in the United States. Peculiarities: Automated trading solutions:   The advisor is based on advanced algorithms and technical analysis to automatically adapt the strategy to changing market conditions. Versatile approach:   The advisor combine
Owl Smart Levels MT5
Sergey Ermolov
4.07 (28)
MT4 version  |   FAQ The Owl Smart Levels Indicator is a complete trading system within the one indicator that includes such popular market analysis tools as Bill Williams' advanced fractals , Valable ZigZag which builds the correct wave structure of the market, and Fibonacci levels which mark the exact levels of entry into the market and places to take profits. Detailed description of the strategy Instructions for working with the indicator Advisor-assistant in trading Owl Helper Private User
FVG EA Pro
Haidar, Lionel Haj Ali
4.52 (27)
FVG EA PRO   is a must-have smart money concept EA, highly customizable and using advanced techniques of FVG "Fair Value Gap" and market structure to capture high probability trades.  It is highly configurable,  you can build various strategies based on market structure and FVG as entry criteria. FVG EA PRO can be used to trade Kill Zones and Silver Bullet Windows. It is fully compatible with swing trade strategies. It contains all the functionalities  needed by any  successful traders to automa
Gyroscopes mt5
Nadiya Mirosh
5 (1)
Gyroscope        professional forex expert   (for EURUSD, GBPUSD, USDJPY, AUDUSD, USDCHF, EURGBP, EURJPY, NZDUSD, USDCAD, EURCHF, AUDJPY, CADJPY pairs)   alyzing the market using the Elliot Wave Index. Elliott wave theory is the interpretation of processes in financial markets through a system of visual models (waves) on price charts. The author of the theory, Ralph Elliott, identified eight variants of alternating waves (of which five are in the trend and three are against the trend). The mo
Bergland Gold MT5
Matthias Bessler
2.33 (3)
This fully automated trading system is part of the Bergland signal. It features a highly efficient trading logic, and a money management system. Reasonable calculated stop loss and take profit levels. It is easy to install and do not require a special setfile. XAUUSD, M15 Special Promo:    If you register with my cashback link, you will get this EA for free. PM me for instructions.
Boom 300 Players
Ignacio Agustin Mene Franco
Good community, on this occasion I present to you Boom 300 Players where it has the 2 Bolinger Bands strategy with each bolinger band configured with different parameters to make the entry into Trend candles more perfect! The Ea is also used for funding accounts. Starts with a recommended capital of 1000 USD operates with lots of between 2 and 3 depending on capital It is used in a time frame of 1 Minute and the parameters to be configured are as in the photo without more good profit enjoy!!
Boom 500 Players
Ignacio Agustin Mene Franco
Good community, on this occasion I present to you Boom 500 Players where it has the 2 Bolinger Bands strategy with each bolinger band configured with different parameters one with 44 and another with 22 to make the entry into Trend candles more perfect! The EA also works for funding accounts. Prop firms Starts with a recommended capital of 1000 USD operates with lots of between 2 and 3 depending on capital It is used in a time frame of 1 Minute and the parameters to be configured are as in the p
The indicator builds current quotes, which can be compared with historical ones and on this basis make a price movement forecast. The indicator has a text field for quick navigation to the desired date. Options: Symbol - selection of the symbol that the indicator will display; SymbolPeriod - selection of the period from which the indicator will take data; IndicatorColor - indicator color; Inverse - true reverses quotes, false - original view; Next are the settings of the te
Exclusive FOREX account HEDGE FuzzyLogicTrendEA is based on fuzzy logic strategy based on  analysis 5 indicators and filters. When the EA analysis all this indicators, it decides, based on its fuzzy strategy, which trade will be better: sell or buy. As additional functions, it´s possible defines spread maximum, stop loss and others. Recomm. Symbol: EURUSD, AUDUSD, GBPUSD, NZDUSD, USDCAD, AUDCAD, EURCAD e USDJPY Recomm. timeframe: H1. Backtest were done on EURUSD, H1, 01/07/2023 - 26/0
Welcome to the Ultimate Harmonic Patterns recognition indicator that is focused to detect advanced patterns. The Gartley pattern, Bat pattern, and Cypher pattern  are popular technical analysis tools used by traders to identify potential reversal points in the market. Our Ultimate Harmonic Patterns recognition Indicator is a powerful tool that uses advanced algorithms to scan the markets and identify these patterns in real-time. With our Ultimate Harmonic Patterns recognition Indicator, you
Buyers of this product also purchase
The library is dedicated to help manage your trades, calculate lot, trailing, partial close and other functions. Lot Calculation Mode 0: Fixed Lot. Mode 1: Martingale Lot (1,3,5,8,13) you can use it in different way calculate when loss=1 ,when profit=0. Mode 2: Multiplier Lot (1,2,4,8,16) you can use it in different way calculate when loss=1 ,when profit=0. Mode 3: Plus Lot (1,2,3,4,5) you can use it in different way calculate when loss=1 ,when profit=0. Mode 4: SL/Risk Lot calculate based on
WalkForwardOptimizer MT5
Stanislav Korotky
3.86 (7)
WalkForwardOptimizer library allows you to perform rolling and cluster walk-forward optimization of expert advisers (EA) in MetaTrader 5. To use the library include its header file WalkForwardOptimizer.mqh into your EA source code, add call provided functions as appropriate. Once the library is embedded into EA, you may start optimization according to the procedure described in the User guide . When it's finished, intermediate results are saved into a CSV file and some special global variables.
OrderBook History Library
Stanislav Korotky
3 (2)
Order Book, known also as Market Book, market depth, Level 2, - is a dynamically updated table with current volumes of orders to buy and to sell specific financial instument at price levels near Bid and Ask. MetaTrader 5 provides the means for receiving market book from your broker, but in real time only, without access to its history. The library OrderBook History Library reads market book state in the past from archive files, created by OrderBook Recorder . The library can be embedded into you
Native Websocket
Racheal Samson
5 (5)
An   easy to use, fast,  asynchronous   WebSocket library  for MQL5. It supports: ws://   and   wss://  (Secure "TLS" WebSocket) text   and   binary   data It handles: fragmented message  automatically (large data transfer) ping-pong   frames  automatically (keep-alive handshake) Benefits: No DLL required. No OpenSSL installation required. Up to 128 WebSocket Connections from a single program. Various Log Levels for error tracing Can be synchronized to MQL5 Virtual Hosting . Completely native to
This library will allow you to manage trades using any of your EA and its very easy to integrate on any EA which you can do yourself with the script code which is mentioned in description and also demo examples on video which shows the complete process. This product allows trading operations via API For chart : Renting Crypto Charting for OHLC data or Crypto Ticks with Order Book Depth is optional If your EA is HFT and operations on seconds chart, You may be interested in converting charts to se
MetaCOT 2 CFTC ToolBox MT5
Vasiliy Sokolov
3.67 (3)
MetaCOT 2 CFTC ToolBox is a special library that provides access to CFTC (U.S. Commodity Futures Trading Commission) reports straight from the MetaTrader terminal. The library includes all indicators that are based on these reports. With this library you do not need to purchase each MetaCOT indicator separately. Instead, you can obtain a single set of all 34 indicators including additional indicators that are not available as separate versions. The library supports all types of reports, and prov
AO Core
Andrey Dik
3 (2)
AO Core is the core of the optimization algorithm, it is a library built on the author's HMA (hybrid metaheuristic algorithm) algorithm. Pay attention to the MT5 Optimization Booster product , which makes it very easy to manage the regular MT5 optimizer . An example of using AO Core is described in the article: https://www.mql5.com/ru/articles/14183 https://www.mql5.com/en/blogs/post/756510 This hybrid algorithm is based on a genetic algorithm and contains the best qualities and properties of
This is a simplified and effective version of the library for walk forward analysis of trading experts. It collects data about the expert's trade during the optimization process in the MetaTrader tester and stores them in intermediate files in the "MQL5\Files" directory. Then it uses these files to automatically build a cluster walk forward report and rolling walk forward reports that refine it (all of them in one HTML file). Using the WalkForwardBuilder MT5 auxiliary script allows building othe
BitMEX Trading API
Romeu Bertho
5 (1)
Cryptocurrency analysis has never been easier with Crypto Charts for MetaTrader 5. Now, trading on BitMEX has never been easier with BitMEX Trading API for MetaTrader 5. BitMEX Trading API library was built to be as easy to use as possible. Just include the library into your Expert Advisor or Script, call the corresponding methods and start trading! Features Trade on BitMEX and BitMEX Testnet. Build and automate your strategies. Concern more with the trading strategy logic and less with the c
Binance Library
Hadil Mutaqin SE
5 (1)
The library is used to develop automatic trading on Binance Spot Market from MT5 platform. Support all order types: Limit, Market, Stop-Limit and Stop-Market. Support margin trading. Automatically display the chart on the screen. Usage: - Open MQL5 demo account - Move BinanceLib.ex5 from folder \MQL5\Scripts\Market to MQL5\Libraries - Download Header   file and EA sample https://www.mql5.com/en/code/download/34972_260999.zip Copy Binance.mqh header file to folder \MQL5\Include Copy  BinanceEA-
Gold plucking machine   Gold plucking machine is an Expert Advisor designed specifically for trading gold. The operation is based on opening orders using the Fast and Slow lines indicator, thus the EA works according to the "Trend Follow" strategy, which means following the trend. Use grid strategy to place orders without stop loss operation, so please make sure the account has sufficient funds. magic number      -  is a special number that the EA assigns to its orders. Lot Multiplier        -
Gold plucking machine S   Gold plucking machine  S Gold plucking machine S   is an Expert Advisor designed specifically for trading gold. The operation is based on opening orders using the Fast and Slow lines indicator, thus the EA works according to the "Trend Follow" strategy, which means following the trend. Use grid strategy to place orders without stop loss operation, so please make sure the account has sufficient funds. magic number        -  is a special number that the EA assigns to its
The library is used to develop automatic trading on Binance Futures Market from MT5 platform. Support all order types: Limit, Market, Stop-Limit, Stop-Market , StopLoss and TakeProfit. Automatically display the chart on the screen. Usage: - Open MQL5 demo account - Move BinanceFuturesLib.ex5 from folder \MQL5\Scripts\Market to MQL5\Libraries -  Download Header file and EA sample https://www.mql5.com/en/code/download/34976_252386.zip Copy BinanceFutures.mqh header file to folder \MQL5\Include C
If you're a trader looking to use Binance.com and Binance.us exchanges directly from your MetaTrader 5 terminal, you'll want to check out Binance Library MetaTrader 5. This powerful tool allows you to trade all asset classes on both exchanges, including Spot, USD-M   and COIN-M futures, and includes all the necessary functions for trading activity. With Binance Library MetaTrader 5, you can easily add instruments from Binance to the Symbols list of MetaTrader 5, as well as obtain information ab
1. What is this The MT5 system comes with very few optimization results. Sometimes we need to study more results. This library allows you to output more results during backtest optimization. It also supports printing more strategy results in a single backtest. 2. Product Features The results of the optimized output are quite numerous. CustomMax can be customized. The output is in the Common folder. It is automatically named according to the name of the EA, and the name of the same EA will be au
EA Toolkit
Esteban Thevenon
EA Toolkit is a library that allows any developer to quickly and easily program Advisor experts. It includes many functions and enumerations such as trailing stop, lot, stop loss management, market trading authorisations, price table updates, trading conditions and many more. Installation + Documentation : You will find all the information to install this library and the documentation of its functions on this GitHub : https://github.com/Venon282/Expert-Advisor-Toolkit WARNING : The installatio
This is standard library built for flexible neural Networks with performance in mind. Calling this Library is so simple and takes few lines of code:    matrix Matrix = matrix_utils.ReadCsv( "Nasdaq analysis.csv" );       matrix x_train, x_test;    vector y_train, y_test;         matrix_utils.TrainTestSplitMatrices(Matrix,x_train,y_train,x_test,y_test, 0.7 , 42 );    reg_nets = new CRegressorNets(x_train,y_train,AF_RELU_,HL, NORM_MIN_MAX_SCALER); //INitializing network       reg_nets.RegressorN
Hello everyone! I am a professional MQL programmer , Making EAs, Indicators and Trading Tools for my clients all over the world. I build 3-7 programs every week but I seldomly sell any ready-made Robots. Because I am fastidious and good strategy is so few...  this EA is the only one so far I think its good enough to be published here.  As we all know, the Ichimoku indicator has become world popular for decades, but still, only few people knows the right way of using it, and if we check the cl
Applying these methods, I managed to arrive at a nuanced conclusion that is crucial to understanding the importance of unique strategies in contemporary trading. Although the neural network advisor showed impressive efficiency in the initial stages, it proved to be highly unstable in the long run. Various factors such as market fluctuations, trend changes, external events, etc. cause its operation to be chaotic and eventually lead to instability. With these experiences, I accepted the challenge
Introducing "TG Risk Service Manager" — your comprehensive toolkit for swift and precise risk management and lot size calculations in the dynamic world of trading. Designed to streamline development processes and enhance trading strategies, this indispensable library equips developers with essential tools for optimizing risk assessment and trade profitability. Metatrader4 Version |  All Products  |  Contact   Key Features: Efficient Lot Size Calculation : Harness the power of precise lot size
Introducing "TG Trade Service Manager" — your all-in-one solution for seamless trade management in both MQL4 and MQL5 environments. With a focus on speed, reliability, and convenience, this powerful library simplifies the complexities of trade execution and management, empowering developers with a single interface for enhanced efficiency. Metatrader4 Version   |   All Products   |   Contact   Key Features: Unified Interface : TG Trade Service Manager" provides a unified interface for   MQL4   a
This is an EXPERT with a FOCUS on LEARNING and PROFESSIONAL DEVELOPMENT!!! The idea of this product is to commercialize the source code, allowing those who want to develop their own robots, or start a professional activity developing customized experts, to have a reference source code that helps them in the learning and development process. This source code will be increased, that is, new functionalities will be created, thus allowing the project to continue evolving. For every 10 sales a new v
OpenAI Library MT5
VitalDefender Inc.
The following library is proposed as a means of being able to use the OpenAI API directly on the metatrader, in the simplest way possible. For more on the library's capabilities, read the following article: https://www.mql5.com/en/blogs/post/756098 The files needed to use the library can be found here: Manual IMPORTANT: To use the EA you must add the following URL to allow you to access the OpenAI API as shown in the attached images In order to use the library, you must include the following Hea
Nmt5
Liang Qi Quan
这段代码是一个简单的交易专家顾问(Expert Advisor)示例,主要功能如下: 使用两个移动平均线(MA)作为交易信号: 快速MA(FastMA)和慢速MA(SlowMA) 初始化函数(OnInit): 创建两个MA指标句柄 设置数组为时间序列模式 清理函数(OnDeinit): 释放指标句柄,防止内存泄漏 主要交易逻辑(OnTick): 获取最新的MA值 判断趋势和交易信号 在无持仓时执行交易 交易规则: 上升趋势+买入信号时开多单 下降趋势+卖出信号时开空单 使用固定的止损和止盈点数 风险管理: 使用输入参数设置交易手数、止损和止盈 每次只允许一个持仓(inTrade变量) 使用MQL5的Trade库进行交易操作,简化了下单过程 这个EA适合初学者学习,展示了基本的EA结构和简单的交易策略实现方法。但在实际使用前,还需要进行更多的测试和优化。
The library is dedicated to help manage your trades, calculate lot, trailing, partial close and other functions. Lot Calculation Mode 0: Fixed Lot. Mode 1: Martingale Lot (1,3,5,8,13) you can use it in different way calculate when loss=1 ,when profit=0. Mode 2: Multiplier Lot (1,2,4,8,16) you can use it in different way calculate when loss=1 ,when profit=0. Mode 3: Plus Lot (1,2,3,4,5) you can use it in different way calculate when loss=1 ,when profit=0. Mode 4: SL/Risk Lot calculate based on
WalkForwardOptimizer MT5
Stanislav Korotky
3.86 (7)
WalkForwardOptimizer library allows you to perform rolling and cluster walk-forward optimization of expert advisers (EA) in MetaTrader 5. To use the library include its header file WalkForwardOptimizer.mqh into your EA source code, add call provided functions as appropriate. Once the library is embedded into EA, you may start optimization according to the procedure described in the User guide . When it's finished, intermediate results are saved into a CSV file and some special global variables.
OrderBook History Library
Stanislav Korotky
3 (2)
Order Book, known also as Market Book, market depth, Level 2, - is a dynamically updated table with current volumes of orders to buy and to sell specific financial instument at price levels near Bid and Ask. MetaTrader 5 provides the means for receiving market book from your broker, but in real time only, without access to its history. The library OrderBook History Library reads market book state in the past from archive files, created by OrderBook Recorder . The library can be embedded into you
Native Websocket
Racheal Samson
5 (5)
An   easy to use, fast,  asynchronous   WebSocket library  for MQL5. It supports: ws://   and   wss://  (Secure "TLS" WebSocket) text   and   binary   data It handles: fragmented message  automatically (large data transfer) ping-pong   frames  automatically (keep-alive handshake) Benefits: No DLL required. No OpenSSL installation required. Up to 128 WebSocket Connections from a single program. Various Log Levels for error tracing Can be synchronized to MQL5 Virtual Hosting . Completely native to
This library will allow you to manage trades using any of your EA and its very easy to integrate on any EA which you can do yourself with the script code which is mentioned in description and also demo examples on video which shows the complete process. This product allows trading operations via API For chart : Renting Crypto Charting for OHLC data or Crypto Ticks with Order Book Depth is optional If your EA is HFT and operations on seconds chart, You may be interested in converting charts to se
MetaCOT 2 CFTC ToolBox MT5
Vasiliy Sokolov
3.67 (3)
MetaCOT 2 CFTC ToolBox is a special library that provides access to CFTC (U.S. Commodity Futures Trading Commission) reports straight from the MetaTrader terminal. The library includes all indicators that are based on these reports. With this library you do not need to purchase each MetaCOT indicator separately. Instead, you can obtain a single set of all 34 indicators including additional indicators that are not available as separate versions. The library supports all types of reports, and prov
More from author
This indicator combines the classic MACD and Zigzag indicators to detect divergence between price and indicators. It also uses advanced artificial intelligence (AI) technology to detect the validity of divergence. MACD is known as the "king of indicators," and Zigzag is also a very useful indicator. By combining these two indicators, this indicator leverages the strengths of both. The detection of divergence is a probabilistic problem. Often, divergences occur only to be followed by further
Smart Peak Bottom
Xiaoyu Huang
5 (2)
This is a clear indicator for judging tops and bottoms, and it works well for Oscillating market. Promotional price 49$ → 59$ features good at judging tops and bottoms No redrawing, no drifting Fast calculation, no lag Rich reminder mode Multiple parameters and colors can be adjusted parameter "======== Main ========" HighLowPeriod1 = 9 HighLowPeriod2 = 60 HighLowPeriod3 = 34 HighLowEMAPeriod = 4 MASignalPeriod = 5 "======== Notify ========" UseAlertNotify = true; UseMetaQuotesIDNotify =
WuKong EA
Xiaoyu Huang
This is a long-term stable and profitable trading EA with very little risk. It uses traditional technical indicators for adaptive EA. This EA is mainly algorithm optimization rather than parameter optimization. What we pursue is long-term stable profit. Stable money making is the most important thing. New EA promotional price: $199   → $299 Features One order at a time, no Martingale, grid Profitable after long-term verification Fixed stop loss adaptive Use limit order to reduce slippage In
Introduction This is a pullback EA designed to detect trend divergences, which corresponds to the first type of buying and selling points in the "Zhan Zhong Shuo Chan" theory. With an exceptionally high profit factor, this EA delivers consistent long-term profitability. It employs dynamic grid trading, enabling it to adapt seamlessly to various market conditions. New EA Promotional Price: $99 → $149 Live Signal: https://www.mql5.com/en/signals/2196313 Set File https://c.mql5.com/6/954/Profi
Currency Strength Indicator The Currency Strength Indicator is a powerful tool for identifying trends. It compares the strength and weakness of different currencies and makes it easy to find trending currency pairs. Sale Price: $49 Features Effectively distinguishes between strong and weak currencies Automatically identifies trending currencies Multi-timeframe Loads 28 currency pairs Performance optimized Indicator Usage Strong currencies: Currencies above 80 are considered strong. Weak currenci
Talking about Zen MACD indicator Four-color two-wire MACD Show the sum of the area of the column InpFastMA=12; // Fast EMA period InpSlowMA=26; // Slow EMA period InpSignalMA=9; // Signal SMA period InpAppliedPrice=PRICE_CLOSE;// Applied price InpMaMethod=MODE_EMA; //Ma_Method input bool ChArea = false; //chzhshch Area Fast EMA period fast line parameters Slow EMA period slow line parameters Signal SMA period signal line parameters Application price optional Contrast t
Introduction This is an EA for night trading, trading between 21: 00-22: 00 Long-term Live Trade is profitable Only trade one order at a time and will not cause a big loss Each order is set with stop loss and take profit, no grid, Martin, or other high-risk fund management is used Multiple currencies can be traded at the same time Set time zone automatically by default Characteristic Trading chart: M15 Tradeable currencies: EURUSD,GBPSUD,USDCAD,USDCHF,AUDCHF,EURGBP,EURCHF,USDJPY,EURCAD,EURAUD,
EEVCC Hedge Promotion price: $59 Activation: 10 Introduction This is a two-way (buy and sell at the same time) grid hedge trading EA Long-term firm offers are profitable Can be used for multiple currencies at the same time Safe profit calculation method characteristic Trading chart: H1 Recommended currency: EURGBP, EURUSD Minimum deposit: 3000USD, recommended 10000USD, 100USD for cent accounts Recommended brokers: RofoForex, Exness and other platforms with high leverage and cent accounts Link: h
Quick View
Xiaoyu Huang
1 day Promotional price: $49 Activation: 30 10 days promotional price: $59 activation: 20 Introduction Quick View Quickly check the profitability for a period of time and display the statistics Quickly filter historical transactions and make statistics based on time, magic number, currency, and comments Statistics include Net Profit, LotTotal, Profit Factor, Short Trades (win %), Long Trades (win %), Average Profit Trade, etc. Refresh statistical data in real time Calculation time is
Introduction This is an indicator of daily profitability Characteristic Statistics can be based on currency, magic number, and notes Statistics can be based on time Available for all currencies, all periods There are white and black themes Reverse sort The refresh rate can be adjusted You can set the refresh time to the latest Parameter nD                     =  30;                                     // Number of days StartTime          =  D'2021.06.01 00:00:00';       //  StartTime EndTi
SemiAuto Martin System introduce This tool is used for semi-automatic Martin trading, click on the panel to place an order and the EA will manage the position Just decide the direction of the transaction, and leave the rest to the EA management Automatic Martin, add warehouse according to the set grid, you can also disable this function One-click liquidation One key lock function time control Warning sound prompt characteristic Trading chart: any Tradeable currency: any Automatic take p
Introduce This is a trading assistant, information panel indicators, aggregate currency statistics, account statistics, position information, server and local time, currency strength, K-line remaining time, support and resistance lines, server time offset, currency fluctuations Rate and other functions. Can be used for all types of accounts and currencies. Excellent performance, very few resources You can customize the position, color, font size Any module can be individually displayed or disab
CZSC Fractal type index Features: Carried out a thorough processing of the inclusion relationship It is convenient to use the EA call to judge whether it is a top-bottom classification, and the status in "Teaching You to Stock 93: The Relationship between the Two Tables and the Inside of the Trend Structure 2" Show top-bottom classification with arrows Show possible pens in different colors The inclusion relationship of two adjacent K-lines gives a definition: the high and low p
King of Dragon Channel, King of Dragon Indicator, King of Dragon System, King of Dragon MT5, King of Dragon classic indicator, King of Dragon swiping system, King of Dragon All in One King of Dragon  channel trading system, which is a classic channel trading system, many users strongly request the MT5 version. This program has been optimized for performance in multiple versions, and it is already a relatively smooth system. 49$ → 59$ Red area, long trend, only long, not short Green area, shor
Gold Digger AI
Xiaoyu Huang
5 (2)
This is a long-term stable and profitable gold trading EA, using traditional technical indicators and using AI for adaptive EA. New EA Promotion Price: $199   →   $24 9 Characteristic one order at a time fixed stop loss adaptive night trading Optimize slippage news filter Suitable for passing FTMO, DARWINEX Zero Can be used with other EAs Object-oriented programming, the program framework has been tested for 5 years Signal https://www.mql5.com/en/signals/2211776 https://www.mql5.com/en/users/ma
Introducing Chart Compare - Your Ultimate Multi-Chart Synchronization Tool Now on sale for $39 (regularly $59) Seamlessly synchronize multiple charts for instant insights. Key Features: Blazing-fast synchronization: Event-driven technology ensures smooth and immediate updates across all charts. Lightweight and efficient: Minimal system resource usage for optimal performance. Quick comparisons: Easily compare similar instruments side-by-side. Years of refinement: Proven reliability and continuous
Filter:
No reviews
Reply to review
Version 1.7 2023.05.07
added validation