Codes sources MQL5 des scripts pour MetaTrader 5 - 5

icon

Les scripts effectuent des actions ponctuelles dans MetaTrader 5 à l'aide d'un programme MQL5 et sont supprimés du graphique immédiatement après. Les exemples de fonctions comprennent le téléchargement de l'historique de trading, la génération d'un rapport et son envoi par e-mail, le téléchargement et le traitement des données depuis un fichier. Les scripts peuvent également être utilisés pour créer une interface graphique ou exécuter rapidement des opérations de trading de type unique, par exemple, clôturer immédiatement toutes les positions.

Vous pouvez télécharger et lancer les scripts proposés dans MetaTrader 5. La bibliothèque de scripts est également disponible directement depuis la plateforme MetaEditor, ce qui vous permet d'apprendre la programmation MQL5.

Soumettre votre code

Le script TradeReportExporter est conçu pour exporter l'historique des transactions (trades) dans un fichier CSV pratique. Il recueille automatiquement les données relatives à toutes les transactions effectuées au cours de l'année écoulée pour l'instrument sur lequel il est installé. Le fichier comprend des données telles que la date et l'heure, le type de transaction (achat/vente), le prix, le volume, la commission et le profit/perte. Le résultat est enregistré dans un fichier qui peut être ouvert dans Excel ou tout autre tableur.

Le trading du XAUUSD (or) est souvent influencé par des événements économiques majeurs tels que les communiqués de presse sur le dollar, la livre sterling ou l'euro. Pour atténuer les risques pendant ces périodes de volatilité, il est essentiel d'utiliser un filtre de nouvelles dans votre Expert Advisor (EA). Dans cet article, je vais vous expliquer comment créer un filtre d'actualité simple sur MT5 et l'appliquer au trading du XAUUSD.

Ce script a pour but d'exporter l'historique des cotations dans un format adapté à l'analyse à l'aide de logiciels spécialisés d'analyse technique.

Un Expert Advisor simple et efficace basé sur les signaux de renversement de l'Oscillateur Stochastique sur l'échelle de temps H1. Les signaux d'achat sont déclenchés lorsque %K croise au-dessus de %D en dessous du niveau 20. Les signaux de vente sont déclenchés lorsque %K croise en dessous de %D au-dessus du niveau 80. Le risque est calculé sur la base du solde du compte, avec une taille de lot fixée à 0,1 (ajustable si nécessaire). Le Take Profit (TP) est fixé à 300 points pour toutes les positions. Le Stop Loss (SL) est calculé dynamiquement sur la base du signal de croisement dans la direction opposée. La position est fermée lorsqu'un croisement dans la direction opposée se produit, ainsi que lorsque le TP ou le SL est atteint.

Récupération du contenu du presse-papiers (clipboard)

Les algorithmes d'optimisation basés sur la population sont rassemblés ici. L'archive contient tous les fichiers nécessaires pour exécuter les algorithmes sur des fonctions de test.

Ce script permet de faire défiler de manière synchronisée tous les graphiques ouverts dans le terminal.

Cette fonction peut être utile pour ne pas surcharger le serveur de demandes de transactions lorsque le marché est fermé.

Le script trace les niveaux de Rudolf Axel

Signature de la bougie avec exemple | Pour la recherche et le développement

Il est tenu compte du fait qu'il y a 30 jours dans un mois, 365 jours dans une année Le script démontre le compteur de temps jusqu'au début de la nouvelle année

Ce script CalculateHistoryProfit version 1.0 est conçu pour calculer les bénéfices d'une période donnée à l'aide d'un panneau graphique.

Multi_BreakEven is a script file that enables setting multiple entry positions to breakeven, either through pips or a target price, once the trade becomes favorable.

Provide simplest class to read and parse CSV file

Set TakeProfit by just dragging and dropping script on the desired price level.

Set StopLoss by just dragging and dropping script on the desired price level.

Calculates the risk in the account currency for a given trading volume of the selected symbol at different time periods.

Multi Selllimit and Sellstop orders are script files that enable traders to place multiple orders with ease. These orders allow traders to enter the market at a specific price level, or at a specified number of pips away from the current market price, with stop-loss and take-profit levels. By default, the points value is set to 400, which means the trade will be placed 400 points away from the current market price for a 5-digit broker. Moreover, the multi Selllimit and Sellstop orders offer traders the flexibility to customize their trading strategies. Traders can set the stop-loss level to zero if they do not use stop-loss, and can choose between a target price or a points-based entry. This level of flexibility allows traders to tailor their trading strategies to their specific needs, which can result in better trading outcomes.

Multi buylimit and buystop orders are script files that enable traders to place multiple orders with ease. With just one command, traders can place multiple buylimit or buystop orders using either a target price or points. By default, the points value is set to 400, which means the trade will be placed 400 points away from the current market price for a 5-digit broker. This setup includes stop-loss and take-profit levels, which can be adjusted based on the trader's preferences. Notably, these orders come with a level of flexibility that enables traders to fine-tune their trading strategies. For instance, a trader can opt to set the stop-loss level to zero if they do not use stop-loss.

To assist traders who wish to open multiple sell orders quickly, a script file has been developed that allows them to execute a large number of trades with just one command. The default take profit and stop loss values are set in 5-digit broker format, but for traders using a 4-digit broker, the default must be TP=40 and SL=20. NumberOfSells is the number of trades to execute. This script file can be extremely useful for traders who want to take advantage of market conditions quickly and efficiently. By simplifying the process of opening multiple sell orders, it can save traders valuable time and allow them to focus on other aspects of their trading

To assist traders who wish to open multiple buy orders quickly, a script file has been developed that allows them to execute a large number of trades with just one command. The default take profit and stop loss values are set in 5-digit broker format, but for traders using a 4-digit broker, the default must be TP=40 and SL=20. NumberOfBuys is the number trades the trader wish to open instantly. This script file can be extremely useful for traders who want to take advantage of market conditions quickly and efficiently. By simplifying the process of opening multiple buy orders, it can save traders valuable time and allow them to focus on other aspects of their trading strategy.

Learn how to split the volume data into different groups so that you can compare them and create a strategy based on volume average.

This example was created to see how long it takes to reach 100 ticks. So this indicator is a seconds / "centick" (centick = 100 ticks). It helps you trade orders flow.

You learn how to subtract time, insert it manually in a string format, tick counter and see output on comment function.

Generates, creates and stores passwords for your account.

This script counts the number of pending buy stop orders for each symbol and returns the value.

hi, this code need your telegram token and telegram chat id . you can make robot by BotFather and then search in google how you can find telegram token and chat id then attach them to this code . now every trade would be signals on your telegram channel.

Time Left To New Bar Watch

The script obtains information about the number, types and sizes of input and output tensors in an ONNX model

Script gets information about input and output tensors of onnx-model, their types and shapes

This Script will Refresh All Open Charts in MT5, Usually custom symbols in MT5 needs to be Refresh sometime so this script will help to refresh all open chart at once. We can also use this Script anywhere where we need to refresh all open charts.

Pivots based on Bar Prediction.

Get commission of an active position in mt5 , its easy to use function.

The code defines a function "RangeHighs" that calculates the highest price of a financial instrument within a specified time range (start and end time). The time range is defined by 4 input parameters (hour and minute of start and end time). The highest price is found using the "CopyHigh" function and stored in an array, from which the maximum value is returned.

It is known that the market is mainly driven by two emotions: fear and greed. This should be seen as an attempt to implement these emotions in the form of a mathematical model.

he script estimates the bar's High-Low-Close, based on the stream similarity.

Service Script for aggregating Economic Calendar data to a .txt file

The script (not an Expert Advisor) sets and moves the Stop Loss for all positions on the current symbol to the specified price

This simple quick & dirty script code will output a CSV file of all the Signals' properties as reported by the MQL5 Trade Signals functionality.