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
Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

@@ -0,0 +1,21 @@
# 🚀 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](Modify__1.gif)
![Screenshot](script.png)
## Source Files
- `sct_editsltp_buyselllimitorders.mq5`
---
> Made with ❤️ for the trading community.
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

@@ -0,0 +1,38 @@
//+------------------------------------------------------------------+
//| SCT_EDITSLTP2.mq5 |
//| Copyright 2019, MetaQuotes Software Corp. |
//| https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2019, MetaQuotes Software Corp."
#property link "https://www.mql5.com"
#property version "1.00"
#property script_show_inputs
//--- input parameters
input double SL_BuyLimitOrder;
input double TP_BuyLimitOrder;
input double SL_SellLimitOrder;
input double TP_SellLimitOrder;
#include <Trade\Trade.mqh>
CTrade c_trade;
void OnStart()
{
// MODIFY SL AND TP OF BUY LIMIT ORDERS :
for (int j=OrdersTotal()-1; j>=0; --j) {
ulong ticket=OrderGetTicket(j);
if (OrderGetString(ORDER_SYMBOL)==Symbol() && OrderGetInteger(ORDER_TYPE)==2) {
c_trade.OrderModify(ticket,OrderGetDouble(ORDER_PRICE_OPEN),SL_BuyLimitOrder,TP_BuyLimitOrder,ORDER_TIME_DAY,0);
}
}
// MODIFY SL AND TP OF SELL LIMIT ORDERS :
for (int j=OrdersTotal()-1; j>=0; --j) {
ulong ticket=OrderGetTicket(j);
if (OrderGetString(ORDER_SYMBOL)==Symbol() && OrderGetInteger(ORDER_TYPE)==3) {
c_trade.OrderModify(ticket,OrderGetDouble(ORDER_PRICE_OPEN),SL_SellLimitOrder,TP_SellLimitOrder,ORDER_TIME_DAY,0);
}
}
}