Initial commit: MQL5 Scripts Collection (MetaTrader 5)

This commit is contained in:
GeneralTradingSarl
2025-06-24 00:33:04 +01:00
commit 60a549d89c
1959 changed files with 31907 additions and 0 deletions
@@ -0,0 +1,20 @@
# 🚀 Unlock the Power of Trading!
Welcome to this open-source trading project. Here you will find powerful tools to enhance your trading journey. If you find this project useful, please consider starring ⭐, sharing, or donating to support further development!
---
**Support the project:**
- Star this repository on GitHub
- Share it with your trading friends
- [Donate here](https://www.paypal.com/donate/?hosted_button_id=YOUR_BUTTON_ID) to help us grow!
---
![Screenshot](library.png)
![Screenshot](script.png)
## Source Files
- `accounthistoryexport.mq5`
---
> Made with ❤️ for the trading community.
@@ -0,0 +1,60 @@
//+------------------------------------------------------------------+
//| AccountHistoryExport.mq5 |
//| Copyright 2021, Yuriy Bykov |
//| https://www.mql5.com/ru/code/37495 |
//| https://www.mql5.com/en/code/38976 |
//| https://www.mql5.com/en/code/38935 |
//| https://www.mql5.com/en/code/38975 |
//| https://www.mql5.com/ru/market/product/75526 |
//+------------------------------------------------------------------+
#property description "Export deals history for current account to CSV-file"
#property copyright "Copyright 2021, Yuriy Bykov"
#property link "https://www.mql5.com/ru/code/37495"
#property link "https://www.mql5.com/ru/code/38976"
#property link "https://www.mql5.com/en/code/38935"
#property link "https://www.mql5.com/en/code/38975"
#property link "https://www.mql5.com/ru/market/product/75526"
#property version "1.2"
#property strict
#property script_show_inputs
enum ENUM_EXRORT_DATA_FORMAT {
EDF_COMMA_POINT, // For data: ',' (comma) / For Decimal: '.' (dot)
EDF_COMMA_COMMA, // For data: ',' (comma) / For Decimal: ',' (comma)
EDF_SEMI_POINT, // For data: ';' (semicolon) / For Decimal: '.' (dot)
EDF_SEMI_COMMA, // For data: ';' (semicolon) / For Decimal: ',' (comma)
};
#include <ExpertHistory.mqh>
input string accountName = ""; // Name for file. Auto-generating if it is blank
input ENUM_EXRORT_DATA_FORMAT exportDataFormat = EDF_COMMA_POINT; // Separators
input bool useCommonFolder = false; // Save file to Common Folder
//+------------------------------------------------------------------+
//| Script program start function |
//+------------------------------------------------------------------+
void OnStart() {
//---
string separator = ",";
string decimalPoint = ".";
uint commonFlag = 0;
if(exportDataFormat == EDF_SEMI_COMMA || exportDataFormat == EDF_SEMI_POINT) {
separator = ";";
}
if(exportDataFormat == EDF_COMMA_COMMA || exportDataFormat == EDF_SEMI_COMMA) {
decimalPoint = ",";
}
if(useCommonFolder) {
commonFlag = FILE_COMMON;
}
CExpertHistory accountHistory(accountName, "", separator, decimalPoint);
accountHistory.Export(accountName, HEF_CSV_DEALS, HFF_ACCOUNT_PERIOD, commonFlag);
}
//+------------------------------------------------------------------+
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB