commit 60a549d89c55eec8acbc9f55356c4935cfb11bc4 Author: GeneralTradingSarl Date: Tue Jun 24 00:33:04 2025 +0100 Initial commit: MQL5 Scripts Collection (MetaTrader 5) diff --git a/4click Trade Opener - script for MetaTrader 5/4click_Trade_Opener-0.png b/4click Trade Opener - script for MetaTrader 5/4click_Trade_Opener-0.png new file mode 100644 index 0000000..10b9ab3 Binary files /dev/null and b/4click Trade Opener - script for MetaTrader 5/4click_Trade_Opener-0.png differ diff --git a/4click Trade Opener - script for MetaTrader 5/4click_Trade_Opener-1__2.png b/4click Trade Opener - script for MetaTrader 5/4click_Trade_Opener-1__2.png new file mode 100644 index 0000000..5640d1e Binary files /dev/null and b/4click Trade Opener - script for MetaTrader 5/4click_Trade_Opener-1__2.png differ diff --git a/4click Trade Opener - script for MetaTrader 5/4click_trade_opener_v1.1.mq5 b/4click Trade Opener - script for MetaTrader 5/4click_trade_opener_v1.1.mq5 new file mode 100644 index 0000000..c75a297 Binary files /dev/null and b/4click Trade Opener - script for MetaTrader 5/4click_trade_opener_v1.1.mq5 differ diff --git a/4click Trade Opener - script for MetaTrader 5/README.md b/4click Trade Opener - script for MetaTrader 5/README.md new file mode 100644 index 0000000..0a6291a --- /dev/null +++ b/4click Trade Opener - script for MetaTrader 5/README.md @@ -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](4click_Trade_Opener-0.png) +![Screenshot](4click_Trade_Opener-1__2.png) +![Screenshot](script.png) + +## Source Files +- `4click_trade_opener_v1.1.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/4click Trade Opener - script for MetaTrader 5/expert.png b/4click Trade Opener - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/4click Trade Opener - script for MetaTrader 5/expert.png differ diff --git a/4click Trade Opener - script for MetaTrader 5/indicator.png b/4click Trade Opener - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/4click Trade Opener - script for MetaTrader 5/indicator.png differ diff --git a/4click Trade Opener - script for MetaTrader 5/logo-2.png b/4click Trade Opener - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/4click Trade Opener - script for MetaTrader 5/logo-2.png differ diff --git a/4click Trade Opener - script for MetaTrader 5/script.png b/4click Trade Opener - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/4click Trade Opener - script for MetaTrader 5/script.png differ diff --git a/A 3 line script that tells you how many bars are on your chart - script for MetaTrader 5/README.md b/A 3 line script that tells you how many bars are on your chart - script for MetaTrader 5/README.md new file mode 100644 index 0000000..81f7966 --- /dev/null +++ b/A 3 line script that tells you how many bars are on your chart - script for MetaTrader 5/README.md @@ -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 +- `rates_total.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/A 3 line script that tells you how many bars are on your chart - script for MetaTrader 5/indicator.png b/A 3 line script that tells you how many bars are on your chart - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/A 3 line script that tells you how many bars are on your chart - script for MetaTrader 5/indicator.png differ diff --git a/A 3 line script that tells you how many bars are on your chart - script for MetaTrader 5/library.png b/A 3 line script that tells you how many bars are on your chart - script for MetaTrader 5/library.png new file mode 100644 index 0000000..5c79a8f Binary files /dev/null and b/A 3 line script that tells you how many bars are on your chart - script for MetaTrader 5/library.png differ diff --git a/A 3 line script that tells you how many bars are on your chart - script for MetaTrader 5/logo-2.png b/A 3 line script that tells you how many bars are on your chart - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/A 3 line script that tells you how many bars are on your chart - script for MetaTrader 5/logo-2.png differ diff --git a/A 3 line script that tells you how many bars are on your chart - script for MetaTrader 5/rates_total.mq5 b/A 3 line script that tells you how many bars are on your chart - script for MetaTrader 5/rates_total.mq5 new file mode 100644 index 0000000..034ac1f --- /dev/null +++ b/A 3 line script that tells you how many bars are on your chart - script for MetaTrader 5/rates_total.mq5 @@ -0,0 +1,20 @@ +//+------------------------------------------------------------------+ +//| rates_total.mq5 | +//| Copyright 2023, MetaQuotes Ltd. | +//| https://www.mql5.com | +//+------------------------------------------------------------------+ +#property copyright "Copyright 2025, Sam Beatson, PhD." +#property link "https://www.sambeatson.com" +#property version "1.00" +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() + { +//--- + long bars_total = iBars(_Symbol, _Period); //Get the total bars on the chart + + Print("Number of bars on the current chart: ", bars_total); + Comment("No. bars: ", bars_total); + } +//+------------------------------------------------------------------+ diff --git a/A 3 line script that tells you how many bars are on your chart - script for MetaTrader 5/script.png b/A 3 line script that tells you how many bars are on your chart - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/A 3 line script that tells you how many bars are on your chart - script for MetaTrader 5/script.png differ diff --git a/Account History Export - script for MetaTrader 5/README.md b/Account History Export - script for MetaTrader 5/README.md new file mode 100644 index 0000000..99c464d --- /dev/null +++ b/Account History Export - script for MetaTrader 5/README.md @@ -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. diff --git a/Account History Export - script for MetaTrader 5/accounthistoryexport.mq5 b/Account History Export - script for MetaTrader 5/accounthistoryexport.mq5 new file mode 100644 index 0000000..c118bbb --- /dev/null +++ b/Account History Export - script for MetaTrader 5/accounthistoryexport.mq5 @@ -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 + +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); +} +//+------------------------------------------------------------------+ diff --git a/Account History Export - script for MetaTrader 5/expert.png b/Account History Export - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/Account History Export - script for MetaTrader 5/expert.png differ diff --git a/Account History Export - script for MetaTrader 5/indicator.png b/Account History Export - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Account History Export - script for MetaTrader 5/indicator.png differ diff --git a/Account History Export - script for MetaTrader 5/library.png b/Account History Export - script for MetaTrader 5/library.png new file mode 100644 index 0000000..5c79a8f Binary files /dev/null and b/Account History Export - script for MetaTrader 5/library.png differ diff --git a/Account History Export - script for MetaTrader 5/logo-2.png b/Account History Export - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Account History Export - script for MetaTrader 5/logo-2.png differ diff --git a/Account History Export - script for MetaTrader 5/script.png b/Account History Export - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Account History Export - script for MetaTrader 5/script.png differ diff --git a/Alphabet structure - script for MetaTrader 5/README.md b/Alphabet structure - script for MetaTrader 5/README.md new file mode 100644 index 0000000..e2c90d7 --- /dev/null +++ b/Alphabet structure - script for MetaTrader 5/README.md @@ -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 +- `alphabet.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Alphabet structure - script for MetaTrader 5/alphabet.mq5 b/Alphabet structure - script for MetaTrader 5/alphabet.mq5 new file mode 100644 index 0000000..b03991a Binary files /dev/null and b/Alphabet structure - script for MetaTrader 5/alphabet.mq5 differ diff --git a/Alphabet structure - script for MetaTrader 5/indicator.png b/Alphabet structure - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Alphabet structure - script for MetaTrader 5/indicator.png differ diff --git a/Alphabet structure - script for MetaTrader 5/library.png b/Alphabet structure - script for MetaTrader 5/library.png new file mode 100644 index 0000000..5c79a8f Binary files /dev/null and b/Alphabet structure - script for MetaTrader 5/library.png differ diff --git a/Alphabet structure - script for MetaTrader 5/logo-2.png b/Alphabet structure - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Alphabet structure - script for MetaTrader 5/logo-2.png differ diff --git a/Alphabet structure - script for MetaTrader 5/script.png b/Alphabet structure - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Alphabet structure - script for MetaTrader 5/script.png differ diff --git a/Apply Template - script for MetaTrader 5/README.md b/Apply Template - script for MetaTrader 5/README.md new file mode 100644 index 0000000..c4efe6c --- /dev/null +++ b/Apply Template - script for MetaTrader 5/README.md @@ -0,0 +1,22 @@ +# 🚀 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](forex-script-template_.png) +![Screenshot](opcao-binaria-indicador_.png) +![Screenshot](script-binary-option__2.png) +![Screenshot](script.png) + +## Source Files +- `apply_template.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Apply Template - script for MetaTrader 5/apply_template.mq5 b/Apply Template - script for MetaTrader 5/apply_template.mq5 new file mode 100644 index 0000000..c96a3ae --- /dev/null +++ b/Apply Template - script for MetaTrader 5/apply_template.mq5 @@ -0,0 +1,47 @@ +//+------------------------------------------------------------------+ +//| apply_template.mq5 | +//| Copyright 2014, byJJ | +//| http://ideiasparainvestir.com | +//+------------------------------------------------------------------+ +#property copyright "Copyright 2014, by JJ" +#property link "http://ideiasparainvestir.com" +#property version "1.00" +#property script_show_inputs +#property description "Simple Script for Apply Template and/or timeframe in all charts opened" +#include ; + +input ENUM_TIMEFRAMES tempo_grafico; // Change TimeFrame - Current = dont changed +input string template_name="D"; // Name of Template (without '.tpl') +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() + { + long currChart,prevChart=ChartFirst(); + int i=0,limit=100; + bool errTemplate; + while(i ",GetLastError()); + } + if(currChart<0) break; // Ter atingido o fim da lista de grfico + Print(i,ChartSymbol(currChart)," ID =",currChart); + prevChart=currChart;// vamos salvar o ID do grfico atual para o ChartNext() + i++;// No esquea de aumentar o contador + + } + + } +//+------------------------------------------------------------------+ diff --git a/Apply Template - script for MetaTrader 5/forex-script-template_.png b/Apply Template - script for MetaTrader 5/forex-script-template_.png new file mode 100644 index 0000000..14b8332 Binary files /dev/null and b/Apply Template - script for MetaTrader 5/forex-script-template_.png differ diff --git a/Apply Template - script for MetaTrader 5/indicator.png b/Apply Template - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Apply Template - script for MetaTrader 5/indicator.png differ diff --git a/Apply Template - script for MetaTrader 5/logo-2.png b/Apply Template - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Apply Template - script for MetaTrader 5/logo-2.png differ diff --git a/Apply Template - script for MetaTrader 5/opcao-binaria-indicador_.png b/Apply Template - script for MetaTrader 5/opcao-binaria-indicador_.png new file mode 100644 index 0000000..507919a Binary files /dev/null and b/Apply Template - script for MetaTrader 5/opcao-binaria-indicador_.png differ diff --git a/Apply Template - script for MetaTrader 5/script-binary-option__2.png b/Apply Template - script for MetaTrader 5/script-binary-option__2.png new file mode 100644 index 0000000..f0dc359 Binary files /dev/null and b/Apply Template - script for MetaTrader 5/script-binary-option__2.png differ diff --git a/Apply Template - script for MetaTrader 5/script.png b/Apply Template - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Apply Template - script for MetaTrader 5/script.png differ diff --git a/Aquarium Canvas Background - script for MetaTrader 5/2808252026162__1.png b/Aquarium Canvas Background - script for MetaTrader 5/2808252026162__1.png new file mode 100644 index 0000000..67e840f Binary files /dev/null and b/Aquarium Canvas Background - script for MetaTrader 5/2808252026162__1.png differ diff --git a/Aquarium Canvas Background - script for MetaTrader 5/4604556312269__1.png b/Aquarium Canvas Background - script for MetaTrader 5/4604556312269__1.png new file mode 100644 index 0000000..bfb0816 Binary files /dev/null and b/Aquarium Canvas Background - script for MetaTrader 5/4604556312269__1.png differ diff --git a/Aquarium Canvas Background - script for MetaTrader 5/README.md b/Aquarium Canvas Background - script for MetaTrader 5/README.md new file mode 100644 index 0000000..6373285 --- /dev/null +++ b/Aquarium Canvas Background - script for MetaTrader 5/README.md @@ -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](2808252026162__1.png) +![Screenshot](4604556312269__1.png) +![Screenshot](script.png) + +## Source Files +- `canvas_background.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Aquarium Canvas Background - script for MetaTrader 5/canvas_background.mq5 b/Aquarium Canvas Background - script for MetaTrader 5/canvas_background.mq5 new file mode 100644 index 0000000..ea58340 Binary files /dev/null and b/Aquarium Canvas Background - script for MetaTrader 5/canvas_background.mq5 differ diff --git a/Aquarium Canvas Background - script for MetaTrader 5/expert.png b/Aquarium Canvas Background - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/Aquarium Canvas Background - script for MetaTrader 5/expert.png differ diff --git a/Aquarium Canvas Background - script for MetaTrader 5/indicator.png b/Aquarium Canvas Background - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Aquarium Canvas Background - script for MetaTrader 5/indicator.png differ diff --git a/Aquarium Canvas Background - script for MetaTrader 5/logo-2.png b/Aquarium Canvas Background - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Aquarium Canvas Background - script for MetaTrader 5/logo-2.png differ diff --git a/Aquarium Canvas Background - script for MetaTrader 5/script.png b/Aquarium Canvas Background - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Aquarium Canvas Background - script for MetaTrader 5/script.png differ diff --git a/ArrowDrawingIndiEu - script for MetaTrader 5/BuffersValueDefault__4.png b/ArrowDrawingIndiEu - script for MetaTrader 5/BuffersValueDefault__4.png new file mode 100644 index 0000000..5e4bf5f Binary files /dev/null and b/ArrowDrawingIndiEu - script for MetaTrader 5/BuffersValueDefault__4.png differ diff --git a/ArrowDrawingIndiEu - script for MetaTrader 5/ICustom__4.png b/ArrowDrawingIndiEu - script for MetaTrader 5/ICustom__4.png new file mode 100644 index 0000000..11d494e Binary files /dev/null and b/ArrowDrawingIndiEu - script for MetaTrader 5/ICustom__4.png differ diff --git a/ArrowDrawingIndiEu - script for MetaTrader 5/Input__2.png b/ArrowDrawingIndiEu - script for MetaTrader 5/Input__2.png new file mode 100644 index 0000000..c4d9fa4 Binary files /dev/null and b/ArrowDrawingIndiEu - script for MetaTrader 5/Input__2.png differ diff --git a/ArrowDrawingIndiEu - script for MetaTrader 5/README.md b/ArrowDrawingIndiEu - script for MetaTrader 5/README.md new file mode 100644 index 0000000..c3e3acc --- /dev/null +++ b/ArrowDrawingIndiEu - script for MetaTrader 5/README.md @@ -0,0 +1,24 @@ +# 🚀 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](BuffersValueDefault__4.png) +![Screenshot](ICustom__4.png) +![Screenshot](Input__2.png) +![Screenshot](library.png) +![Screenshot](script.png) +![Screenshot](ValueOfBuffers__1.png) + +## Source Files +- `arrowdrawingindieu.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/ArrowDrawingIndiEu - script for MetaTrader 5/ValueOfBuffers__1.png b/ArrowDrawingIndiEu - script for MetaTrader 5/ValueOfBuffers__1.png new file mode 100644 index 0000000..3da14d6 Binary files /dev/null and b/ArrowDrawingIndiEu - script for MetaTrader 5/ValueOfBuffers__1.png differ diff --git a/ArrowDrawingIndiEu - script for MetaTrader 5/arrowdrawingindieu.mq5 b/ArrowDrawingIndiEu - script for MetaTrader 5/arrowdrawingindieu.mq5 new file mode 100644 index 0000000..0629554 --- /dev/null +++ b/ArrowDrawingIndiEu - script for MetaTrader 5/arrowdrawingindieu.mq5 @@ -0,0 +1,107 @@ +//+------------------------------------------------------------------+ +//| ArrowDrawingIndi.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 indicator_chart_window +int MA_handle; + +//----------------------------------------------------- +input string IndName=""; // Indicator name +input string ArrowUp="MyArrowUp"; // Name of up Signal +input string ArrowDown="MyArrowDown"; // Name of down Signal +input int upbuffer=1; // Number of up buffer +input int downbuffer=0; // Number of down buffer + +//----------------------------------------------------------------- +double Label1Buffer[]; +double Label1Buffer2[]; +int timerup=0; +int timerdown=0; +datetime CurTime=0; +//+------------------------------------------------------------------+ + +//+------------------------------------------------------------------+ +//| Custom indicator initialization function | +//+------------------------------------------------------------------+ +int OnInit() + { +//--- indicator buffers mapping + + MA_handle=iCustom(Symbol(),0,IndName,17,0,2,0,false,false,false); + +//MA_handle=iCustom(Symbol(),0,IndName,param1, param2, param3, param4); // <-----------------Example of adding your params here + + + +//--- + return(INIT_SUCCEEDED); + } +//+------------------------------------------------------------------+ +//| | +//+------------------------------------------------------------------+ +int OnDeinit() + { +//--- indicator buffers mapping + ObjectDelete(0,ArrowUp); + ObjectDelete(0,ArrowDown); +//--- + return(INIT_SUCCEEDED); + } +//+------------------------------------------------------------------+ +//| Custom indicator iteration function | +//+------------------------------------------------------------------+ +int OnCalculate(const int rates_total, + const int prev_calculated, + const datetime &time[], + const double &open[], + const double &high[], + const double &low[], + const double &close[], + const long &tick_volume[], + const long &volume[], + const int &spread[]) + { + CurTime=time[rates_total-1]; + if(timerup>0) + {timerup --;} + else + { + ObjectDelete(0,ArrowUp); + + } + if(timerdown>0) + {timerdown --;} + else + { + + ObjectDelete(0,ArrowDown); + } +//--- + if(rates_total==prev_calculated) + { + return(rates_total); + } + + int i=rates_total-2; + + CopyBuffer(MA_handle,upbuffer,0,rates_total,Label1Buffer); + CopyBuffer(MA_handle,downbuffer,0,rates_total,Label1Buffer2); + while(i0 /*&& CurTime<=time[i]*/) + { + ObjectCreate(0,ArrowUp,OBJ_ARROW_BUY,0,time[i],low[i]);timerup=5; + } + if(Label1Buffer2[i]>0 /*&& CurTime<=time[i]*/) + { + ObjectCreate(0,ArrowDown,OBJ_ARROW_SELL,0,time[i],high[i]);timerdown=5; + } + i++; + } + return(rates_total); + } +//+------------------------------------------------------------------+ diff --git a/ArrowDrawingIndiEu - script for MetaTrader 5/expert.png b/ArrowDrawingIndiEu - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/ArrowDrawingIndiEu - script for MetaTrader 5/expert.png differ diff --git a/ArrowDrawingIndiEu - script for MetaTrader 5/library.png b/ArrowDrawingIndiEu - script for MetaTrader 5/library.png new file mode 100644 index 0000000..5c79a8f Binary files /dev/null and b/ArrowDrawingIndiEu - script for MetaTrader 5/library.png differ diff --git a/ArrowDrawingIndiEu - script for MetaTrader 5/logo-2.png b/ArrowDrawingIndiEu - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/ArrowDrawingIndiEu - script for MetaTrader 5/logo-2.png differ diff --git a/ArrowDrawingIndiEu - script for MetaTrader 5/script.png b/ArrowDrawingIndiEu - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/ArrowDrawingIndiEu - script for MetaTrader 5/script.png differ diff --git a/Attractive Market Watch List for Potential Entries - script for MetaTrader 5/README.md b/Attractive Market Watch List for Potential Entries - script for MetaTrader 5/README.md new file mode 100644 index 0000000..2aa1919 --- /dev/null +++ b/Attractive Market Watch List for Potential Entries - script for MetaTrader 5/README.md @@ -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 +- `sct_priceaction_allpotentialentries.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Attractive Market Watch List for Potential Entries - script for MetaTrader 5/expert.png b/Attractive Market Watch List for Potential Entries - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/Attractive Market Watch List for Potential Entries - script for MetaTrader 5/expert.png differ diff --git a/Attractive Market Watch List for Potential Entries - script for MetaTrader 5/library.png b/Attractive Market Watch List for Potential Entries - script for MetaTrader 5/library.png new file mode 100644 index 0000000..5c79a8f Binary files /dev/null and b/Attractive Market Watch List for Potential Entries - script for MetaTrader 5/library.png differ diff --git a/Attractive Market Watch List for Potential Entries - script for MetaTrader 5/logo-2.png b/Attractive Market Watch List for Potential Entries - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Attractive Market Watch List for Potential Entries - script for MetaTrader 5/logo-2.png differ diff --git a/Attractive Market Watch List for Potential Entries - script for MetaTrader 5/script.png b/Attractive Market Watch List for Potential Entries - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Attractive Market Watch List for Potential Entries - script for MetaTrader 5/script.png differ diff --git a/Attractive Market Watch List for Potential Entries - script for MetaTrader 5/sct_priceaction_allpotentialentries.mq5 b/Attractive Market Watch List for Potential Entries - script for MetaTrader 5/sct_priceaction_allpotentialentries.mq5 new file mode 100644 index 0000000..5ec9256 --- /dev/null +++ b/Attractive Market Watch List for Potential Entries - script for MetaTrader 5/sct_priceaction_allpotentialentries.mq5 @@ -0,0 +1,96 @@ +//+------------------------------------------------------------------+ +//| PriceAction AllPotentialEntries.mq5 | +//| Copyright 2020, Mario Gharib. | +//| mario.gharib@hotmail.com | +//+------------------------------------------------------------------+ + +#property copyright "Copyright 2020, Mario Gharib. fxweirdos@gmail.com" +#property link "https://www.mql5.com" +#property version "1.00" + +class cCandlestick { + + public: + + double dOpenPrice, dHighPrice, dLowPrice, dClosePrice, dRangeCandle, dBodyCandle, dUpperWickCandle, dLowerWickCandle; + + bool bBullCandle; + bool bBearCandle; + bool bDojiCandle; + + void mvGetCandleStickCharateristics (string s, int i) { + + dOpenPrice = iOpen(s, PERIOD_CURRENT,i); + dHighPrice = iHigh(s, PERIOD_CURRENT,i); + dLowPrice = iLow(s, PERIOD_CURRENT,i); + dClosePrice = iClose(s, PERIOD_CURRENT,i); + + dRangeCandle = NormalizeDouble(MathAbs(dHighPrice-dLowPrice)/SymbolInfoDouble(s,SYMBOL_POINT),_Digits); + dBodyCandle = NormalizeDouble(MathAbs(dOpenPrice-dClosePrice)/SymbolInfoDouble(s,SYMBOL_POINT),_Digits); + dUpperWickCandle = NormalizeDouble(MathAbs(dHighPrice-MathMax(dClosePrice,dOpenPrice))/SymbolInfoDouble(s,SYMBOL_POINT),_Digits); + dLowerWickCandle = NormalizeDouble(MathAbs(MathMin(dClosePrice,dOpenPrice)-dLowPrice)/SymbolInfoDouble(s,SYMBOL_POINT),_Digits); + + if (dBodyCandle<=1.0 && dUpperWickCandle>dBodyCandle && dLowerWickCandle>dBodyCandle) { + bDojiCandle=true; bBullCandle=false; bBearCandle=false;} + else if (dOpenPricedClosePrice) { + bDojiCandle=false; bBullCandle=false; bBearCandle=true;} + } +}; + +cCandlestick cCS1, cCS2; + +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() { + + int z=1; + long chartid=0; + + int HowManySymbols=SymbolsTotal(true); + + int counter; + + for(int i=0;icCS2.dRangeCandle && cCS1.dBodyCandle>=cCS2.dBodyCandle) { + StringConcatenate(sArrowBuy1,"sArrowBuy1 ",SymbolName(i,true), string(iTime(SymbolName(i,true),PERIOD_CURRENT,z))); + ObjectCreate(chartid,sArrowBuy1,OBJ_ARROW_BUY,0,iTime(SymbolName(i,true),PERIOD_CURRENT,z),cCS1.dLowPrice); + StringConcatenate(sArrowBuy2,"sArrowBuy2 ",SymbolName(i,true), string(iTime(SymbolName(i,true),PERIOD_CURRENT,z+1))); + ObjectCreate(chartid,sArrowBuy2,OBJ_ARROW_BUY,0,iTime(SymbolName(i,true),PERIOD_CURRENT,z+1),cCS2.dLowPrice); + counter++; + } + + // ===============================================| + // ===============================================| + + if (cCS1.bBearCandle && cCS2.bBearCandle && cCS1.dBodyCandle>cCS2.dBodyCandle && cCS1.dRangeCandle>=cCS2.dRangeCandle) { + + StringConcatenate(sArrowSell1,"sArrowSell1 ",SymbolName(i,true),string(iTime(SymbolName(i,true),PERIOD_CURRENT,z))); + ObjectCreate(chartid,sArrowSell1,OBJ_ARROW_SELL,0,iTime(SymbolName(i,true),PERIOD_CURRENT,z),cCS1.dHighPrice); + StringConcatenate(sArrowSell2,"sArrowSell2 ",SymbolName(i,true), string(iTime(SymbolName(i,true),PERIOD_CURRENT,z+1))); + ObjectCreate(chartid,sArrowSell2,OBJ_ARROW_SELL,0,iTime(SymbolName(i,true),PERIOD_CURRENT,z+1),cCS2.dHighPrice); + counter++; + } + + if (counter==0) + ChartClose(chartid); + } + +} \ No newline at end of file diff --git a/Auto SL TP by Risk Reward Ratio - script for MetaTrader 5/README.md b/Auto SL TP by Risk Reward Ratio - script for MetaTrader 5/README.md new file mode 100644 index 0000000..ddcdc2d --- /dev/null +++ b/Auto SL TP by Risk Reward Ratio - script for MetaTrader 5/README.md @@ -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 +- `auto_sl_tp_by_risk_reward_ratio.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Auto SL TP by Risk Reward Ratio - script for MetaTrader 5/auto_sl_tp_by_risk_reward_ratio.mq5 b/Auto SL TP by Risk Reward Ratio - script for MetaTrader 5/auto_sl_tp_by_risk_reward_ratio.mq5 new file mode 100644 index 0000000..e67f0d6 --- /dev/null +++ b/Auto SL TP by Risk Reward Ratio - script for MetaTrader 5/auto_sl_tp_by_risk_reward_ratio.mq5 @@ -0,0 +1,61 @@ +#property copyright "Your Name" +#property link "Your Contact" +#property version "1.00" +#property description "Script to set Stop Loss and Take Profit based on Risk:Reward ratio" + +// Include the Trade.mqh file to use CTrade class +#include + +// Input parameters +input double RiskRewardRatio = 2.0; // Risk:Reward Ratio (e.g., 2.0 for 1:2) +input double StopLossPips = 20; // Stop Loss in pips + +void OnStart() +{ + // Get current symbol + string symbol = Symbol(); + double point = SymbolInfoDouble(symbol, SYMBOL_POINT); + double pip_value = point * 10; // Adjust for 5-digit brokers + + // Calculate Stop Loss and Take Profit in price units + double sl = StopLossPips * pip_value; + double tp = sl * RiskRewardRatio; + + // Get current market price + double bid = SymbolInfoDouble(symbol, SYMBOL_BID); + double ask = SymbolInfoDouble(symbol, SYMBOL_ASK); + + // Create a CTrade object + CTrade trade; + + // Example: Modify an open position (assumes one open position for simplicity) + for(int i = PositionsTotal() - 1; i >= 0; i--) + { + ulong ticket = PositionGetTicket(i); + if(PositionSelectByTicket(ticket)) + { + if(PositionGetString(POSITION_SYMBOL) == symbol) + { + double current_sl = PositionGetDouble(POSITION_SL); + double current_tp = PositionGetDouble(POSITION_TP); + double open_price = PositionGetDouble(POSITION_PRICE_OPEN); + + // Set SL and TP based on position type (Buy or Sell) + if(PositionGetInteger(POSITION_TYPE) == POSITION_TYPE_BUY) + { + current_sl = open_price - sl; + current_tp = open_price + tp; + } + else if(PositionGetInteger(POSITION_TYPE) == POSITION_TYPE_SELL) + { + current_sl = open_price + sl; + current_tp = open_price - tp; + } + + // Modify position + trade.PositionModify(ticket, current_sl, current_tp); + Print("SL and TP set for ticket #", ticket, ": SL=", current_sl, ", TP=", current_tp); + } + } + } +} \ No newline at end of file diff --git a/Auto SL TP by Risk Reward Ratio - script for MetaTrader 5/expert.png b/Auto SL TP by Risk Reward Ratio - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/Auto SL TP by Risk Reward Ratio - script for MetaTrader 5/expert.png differ diff --git a/Auto SL TP by Risk Reward Ratio - script for MetaTrader 5/indicator.png b/Auto SL TP by Risk Reward Ratio - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Auto SL TP by Risk Reward Ratio - script for MetaTrader 5/indicator.png differ diff --git a/Auto SL TP by Risk Reward Ratio - script for MetaTrader 5/library.png b/Auto SL TP by Risk Reward Ratio - script for MetaTrader 5/library.png new file mode 100644 index 0000000..5c79a8f Binary files /dev/null and b/Auto SL TP by Risk Reward Ratio - script for MetaTrader 5/library.png differ diff --git a/Auto SL TP by Risk Reward Ratio - script for MetaTrader 5/logo-2.png b/Auto SL TP by Risk Reward Ratio - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Auto SL TP by Risk Reward Ratio - script for MetaTrader 5/logo-2.png differ diff --git a/Auto SL TP by Risk Reward Ratio - script for MetaTrader 5/script.png b/Auto SL TP by Risk Reward Ratio - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Auto SL TP by Risk Reward Ratio - script for MetaTrader 5/script.png differ diff --git a/Automatic Posting with WebRequest() - script for MetaTrader 5/EURUSDM5__1.png b/Automatic Posting with WebRequest() - script for MetaTrader 5/EURUSDM5__1.png new file mode 100644 index 0000000..06716bc Binary files /dev/null and b/Automatic Posting with WebRequest() - script for MetaTrader 5/EURUSDM5__1.png differ diff --git a/Automatic Posting with WebRequest() - script for MetaTrader 5/README.md b/Automatic Posting with WebRequest() - script for MetaTrader 5/README.md new file mode 100644 index 0000000..bc42213 --- /dev/null +++ b/Automatic Posting with WebRequest() - script for MetaTrader 5/README.md @@ -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](EURUSDM5__1.png) +![Screenshot](script.png) + +## Source Files +- `webrequest_publicationscript.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Automatic Posting with WebRequest() - script for MetaTrader 5/indicator.png b/Automatic Posting with WebRequest() - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Automatic Posting with WebRequest() - script for MetaTrader 5/indicator.png differ diff --git a/Automatic Posting with WebRequest() - script for MetaTrader 5/logo-2.png b/Automatic Posting with WebRequest() - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Automatic Posting with WebRequest() - script for MetaTrader 5/logo-2.png differ diff --git a/Automatic Posting with WebRequest() - script for MetaTrader 5/script.png b/Automatic Posting with WebRequest() - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Automatic Posting with WebRequest() - script for MetaTrader 5/script.png differ diff --git a/Automatic Posting with WebRequest() - script for MetaTrader 5/webrequest_publicationscript.mq5 b/Automatic Posting with WebRequest() - script for MetaTrader 5/webrequest_publicationscript.mq5 new file mode 100644 index 0000000..5d1b42c Binary files /dev/null and b/Automatic Posting with WebRequest() - script for MetaTrader 5/webrequest_publicationscript.mq5 differ diff --git a/Average Intraday Range - script for MetaTrader 5/3269195080130.png b/Average Intraday Range - script for MetaTrader 5/3269195080130.png new file mode 100644 index 0000000..2510cc3 Binary files /dev/null and b/Average Intraday Range - script for MetaTrader 5/3269195080130.png differ diff --git a/Average Intraday Range - script for MetaTrader 5/README.md b/Average Intraday Range - script for MetaTrader 5/README.md new file mode 100644 index 0000000..6e9c138 --- /dev/null +++ b/Average Intraday Range - script for MetaTrader 5/README.md @@ -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](3269195080130.png) +![Screenshot](script.png) + +## Source Files +- `average_intraday_range.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Average Intraday Range - script for MetaTrader 5/average_intraday_range.mq5 b/Average Intraday Range - script for MetaTrader 5/average_intraday_range.mq5 new file mode 100644 index 0000000..e149938 Binary files /dev/null and b/Average Intraday Range - script for MetaTrader 5/average_intraday_range.mq5 differ diff --git a/Average Intraday Range - script for MetaTrader 5/indicator.png b/Average Intraday Range - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Average Intraday Range - script for MetaTrader 5/indicator.png differ diff --git a/Average Intraday Range - script for MetaTrader 5/logo-2.png b/Average Intraday Range - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Average Intraday Range - script for MetaTrader 5/logo-2.png differ diff --git a/Average Intraday Range - script for MetaTrader 5/script.png b/Average Intraday Range - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Average Intraday Range - script for MetaTrader 5/script.png differ diff --git a/Balance Graph HTML - script for MetaTrader 5/README.md b/Balance Graph HTML - script for MetaTrader 5/README.md new file mode 100644 index 0000000..fd8bff0 --- /dev/null +++ b/Balance Graph HTML - script for MetaTrader 5/README.md @@ -0,0 +1,24 @@ +# 🚀 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](clip0001__1.gif) +![Screenshot](library.png) +![Screenshot](screenshot.20.png) +![Screenshot](screenshot.21.png) +![Screenshot](screenshot.22.png) +![Screenshot](script.png) + +## Source Files +- `dummy.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Balance Graph HTML - script for MetaTrader 5/clip0001__1.gif b/Balance Graph HTML - script for MetaTrader 5/clip0001__1.gif new file mode 100644 index 0000000..f09ef55 Binary files /dev/null and b/Balance Graph HTML - script for MetaTrader 5/clip0001__1.gif differ diff --git a/Balance Graph HTML - script for MetaTrader 5/dummy.mq5 b/Balance Graph HTML - script for MetaTrader 5/dummy.mq5 new file mode 100644 index 0000000..27e09ad Binary files /dev/null and b/Balance Graph HTML - script for MetaTrader 5/dummy.mq5 differ diff --git a/Balance Graph HTML - script for MetaTrader 5/expert.png b/Balance Graph HTML - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/Balance Graph HTML - script for MetaTrader 5/expert.png differ diff --git a/Balance Graph HTML - script for MetaTrader 5/indicator.png b/Balance Graph HTML - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Balance Graph HTML - script for MetaTrader 5/indicator.png differ diff --git a/Balance Graph HTML - script for MetaTrader 5/library.png b/Balance Graph HTML - script for MetaTrader 5/library.png new file mode 100644 index 0000000..5c79a8f Binary files /dev/null and b/Balance Graph HTML - script for MetaTrader 5/library.png differ diff --git a/Balance Graph HTML - script for MetaTrader 5/logo-2.png b/Balance Graph HTML - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Balance Graph HTML - script for MetaTrader 5/logo-2.png differ diff --git a/Balance Graph HTML - script for MetaTrader 5/screenshot.20.png b/Balance Graph HTML - script for MetaTrader 5/screenshot.20.png new file mode 100644 index 0000000..77fd6d3 Binary files /dev/null and b/Balance Graph HTML - script for MetaTrader 5/screenshot.20.png differ diff --git a/Balance Graph HTML - script for MetaTrader 5/screenshot.21.png b/Balance Graph HTML - script for MetaTrader 5/screenshot.21.png new file mode 100644 index 0000000..0087fb5 Binary files /dev/null and b/Balance Graph HTML - script for MetaTrader 5/screenshot.21.png differ diff --git a/Balance Graph HTML - script for MetaTrader 5/screenshot.22.png b/Balance Graph HTML - script for MetaTrader 5/screenshot.22.png new file mode 100644 index 0000000..d683b9c Binary files /dev/null and b/Balance Graph HTML - script for MetaTrader 5/screenshot.22.png differ diff --git a/Balance Graph HTML - script for MetaTrader 5/script.png b/Balance Graph HTML - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Balance Graph HTML - script for MetaTrader 5/script.png differ diff --git a/Bar Prediction - script for MetaTrader 5/NQ100Daily__1.png b/Bar Prediction - script for MetaTrader 5/NQ100Daily__1.png new file mode 100644 index 0000000..e98d216 Binary files /dev/null and b/Bar Prediction - script for MetaTrader 5/NQ100Daily__1.png differ diff --git a/Bar Prediction - script for MetaTrader 5/NQ100M1__1.png b/Bar Prediction - script for MetaTrader 5/NQ100M1__1.png new file mode 100644 index 0000000..bd01bf2 Binary files /dev/null and b/Bar Prediction - script for MetaTrader 5/NQ100M1__1.png differ diff --git a/Bar Prediction - script for MetaTrader 5/README.md b/Bar Prediction - script for MetaTrader 5/README.md new file mode 100644 index 0000000..37f0658 --- /dev/null +++ b/Bar Prediction - script for MetaTrader 5/README.md @@ -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](NQ100Daily__1.png) +![Screenshot](NQ100M1__1.png) +![Screenshot](script.png) + +## Source Files +- `bar_prediction_mashhadi.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Bar Prediction - script for MetaTrader 5/bar_prediction_mashhadi.mq5 b/Bar Prediction - script for MetaTrader 5/bar_prediction_mashhadi.mq5 new file mode 100644 index 0000000..8ef8fd7 --- /dev/null +++ b/Bar Prediction - script for MetaTrader 5/bar_prediction_mashhadi.mq5 @@ -0,0 +1,131 @@ +//+------------------------------------------------------------------+ +//| Bar Prediction.mq5 | +//| Copyright 2022, MetaQuotes Ltd. | +//| saeed.h.mashhadi@gmail.com | +//+------------------------------------------------------------------+ +#property link "Author: saeed.h.mashhadi@gmail.com" +#property version "1.00" +#property description "The script estimates the bar's High-Low-Close, based on the past." +#property script_show_inputs + +#define NAME "Bar Prediction" + +//+------------------------------------------------------------------+ +//| Script inputs & global variables | +//+------------------------------------------------------------------+ +input int Prediction_Bar =0; // Prediction Bar >= -1 +input int Win =10; // Comparision Length > 0 +input int Num =7; // Prediction Bars # > 0 + +datetime time[]; +MqlRates Rates[]; + +//+------------------------------------------------------------------+ +//| Script "Start" event handler function | +//+------------------------------------------------------------------+ +void OnStart() + { +//Print("OnStart"); + MathSrand(GetTickCount()); + double Objects_Identifier=MathRand(); + + ArraySetAsSeries(time,true); + ArraySetAsSeries(Rates,true); + int Series_Bars=(int)SeriesInfoInteger(Symbol(),0,SERIES_BARS_COUNT); + CopyTime(Symbol(),NULL,0,MathMin(1000000,Series_Bars),time); + int rates_total=ArraySize(time); + CopyRates(NULL,0,0,rates_total,Rates); + + double Array_Ref[][4]; + double Array_Test[][4]; + double Array_Error[][2]; + ArrayResize(Array_Ref,Win); + ArrayResize(Array_Test,Win); + ArrayResize(Array_Error,rates_total-Prediction_Bar-Win-1); + ArrayFill(Array_Error,0,ArraySize(Array_Error),0); + + for(int ii=0; ii Made with ❤️ for the trading community. diff --git a/BinanceQuotesDownloader - script for MetaTrader 5/binancequotesdownloader.mq5 b/BinanceQuotesDownloader - script for MetaTrader 5/binancequotesdownloader.mq5 new file mode 100644 index 0000000..864b4e8 Binary files /dev/null and b/BinanceQuotesDownloader - script for MetaTrader 5/binancequotesdownloader.mq5 differ diff --git a/BinanceQuotesDownloader - script for MetaTrader 5/expert.png b/BinanceQuotesDownloader - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/BinanceQuotesDownloader - script for MetaTrader 5/expert.png differ diff --git a/BinanceQuotesDownloader - script for MetaTrader 5/indicator.png b/BinanceQuotesDownloader - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/BinanceQuotesDownloader - script for MetaTrader 5/indicator.png differ diff --git a/BinanceQuotesDownloader - script for MetaTrader 5/logo-2.png b/BinanceQuotesDownloader - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/BinanceQuotesDownloader - script for MetaTrader 5/logo-2.png differ diff --git a/BinanceQuotesDownloader - script for MetaTrader 5/script.png b/BinanceQuotesDownloader - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/BinanceQuotesDownloader - script for MetaTrader 5/script.png differ diff --git a/Breakout Strength Meter - MT5 - script for MetaTrader 5/1222.png b/Breakout Strength Meter - MT5 - script for MetaTrader 5/1222.png new file mode 100644 index 0000000..55cb13b Binary files /dev/null and b/Breakout Strength Meter - MT5 - script for MetaTrader 5/1222.png differ diff --git a/Breakout Strength Meter - MT5 - script for MetaTrader 5/README.md b/Breakout Strength Meter - MT5 - script for MetaTrader 5/README.md new file mode 100644 index 0000000..5f7d57a --- /dev/null +++ b/Breakout Strength Meter - MT5 - script for MetaTrader 5/README.md @@ -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](1222.png) +![Screenshot](library.png) +![Screenshot](script.png) + +## Source Files +- `sct_breakoutstrengthmeter.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Breakout Strength Meter - MT5 - script for MetaTrader 5/expert.png b/Breakout Strength Meter - MT5 - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/Breakout Strength Meter - MT5 - script for MetaTrader 5/expert.png differ diff --git a/Breakout Strength Meter - MT5 - script for MetaTrader 5/library.png b/Breakout Strength Meter - MT5 - script for MetaTrader 5/library.png new file mode 100644 index 0000000..5c79a8f Binary files /dev/null and b/Breakout Strength Meter - MT5 - script for MetaTrader 5/library.png differ diff --git a/Breakout Strength Meter - MT5 - script for MetaTrader 5/logo-2.png b/Breakout Strength Meter - MT5 - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Breakout Strength Meter - MT5 - script for MetaTrader 5/logo-2.png differ diff --git a/Breakout Strength Meter - MT5 - script for MetaTrader 5/script.png b/Breakout Strength Meter - MT5 - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Breakout Strength Meter - MT5 - script for MetaTrader 5/script.png differ diff --git a/Breakout Strength Meter - MT5 - script for MetaTrader 5/sct_breakoutstrengthmeter.mq5 b/Breakout Strength Meter - MT5 - script for MetaTrader 5/sct_breakoutstrengthmeter.mq5 new file mode 100644 index 0000000..96d4a96 --- /dev/null +++ b/Breakout Strength Meter - MT5 - script for MetaTrader 5/sct_breakoutstrengthmeter.mq5 @@ -0,0 +1,188 @@ +//+------------------------------------------------------------------+ +//| SCT_BreakoutStrengthMeter.mq5 | +//| Copyright 2021, FxWeirdos | +//| info@fxweirdos.com | +//+------------------------------------------------------------------+ + +#property copyright "Copyright 2021, FxWeirdos. Mario Gharib. Forex Jarvis. info@fxweirdos.com" +#property link "https://fxweirdos.com" +#property version "1.01" +#property script_show_inputs + +int iAUD=0, iCAD=0, iCHF=0, iEUR=0, iGBP=0, iJPY=0, iNZD=0, iUSD=0; +int iArray1[8]; +string sArray1[8]={"AUD","CAD", "CHF", "EUR", "GBP", "JPY", "NZD", "USD"}; + +input int iStart = 1; //Start + +//+------------------------------------------------------------------+ +//| | +//+------------------------------------------------------------------+ +class cCandlestick { + + public: + + double dHighPrice; + double dLowPrice; + double dClosePrice; + + void mvGetCandleStickCharateristics (string s, int i) { + + dHighPrice = iHigh(s, PERIOD_CURRENT,i); + dLowPrice = iLow(s, PERIOD_CURRENT,i); + dClosePrice = iClose(s, PERIOD_CURRENT,i); + + } +}; + +void vfunction (string sCountry, int iVal) { + + if (sCountry == "AUD") { + if (iVal==1) + iAUD++; + else if (iVal==0) + iAUD--; + } else if (sCountry == "CAD") { + if (iVal==1) + iCAD++; + else if (iVal==0) + iCAD--; + } else if (sCountry == "CHF") { + if (iVal==1) + iCHF++; + else if (iVal==0) + iCHF--; + } else if (sCountry == "EUR") { + if (iVal==1) + iEUR++; + else if (iVal==0) + iEUR--; + } else if (sCountry == "GBP") { + if (iVal==1) + iGBP++; + else if (iVal==0) + iGBP--; + } else if (sCountry == "JPY") { + if (iVal==1) + iJPY++; + else if (iVal==0) + iJPY--; + } else if (sCountry == "NZD") { + if (iVal==1) + iNZD++; + else if (iVal==0) + iNZD--; + } else if (sCountry == "USD") { + if (iVal==1) + iUSD++; + else if (iVal==0) + iUSD--; + } +} + + +//+---------------------------------------------------------------------+ +//| GetTimeFrame function - returns the textual timeframe | +//+---------------------------------------------------------------------+ +string GetTimeFrame(int lPeriod) { + + switch(lPeriod) + { + case 0: return("PERIOD_CURRENT"); + case 1: return("M1"); + case 5: return("M5"); + case 15: return("M15"); + case 30: return("M30"); + case 60: return("H1"); + case 240: return("H4"); + case 1440: return("D1"); + case 10080: return("W1"); + case 43200: return("MN1"); + case 2: return("M2"); + case 3: return("M3"); + case 4: return("M4"); + case 6: return("M6"); + case 10: return("M10"); + case 12: return("M12"); + case 16385: return("H1"); + case 16386: return("H2"); + case 16387: return("H3"); + case 16388: return("H4"); + case 16390: return("H6"); + case 16392: return("H8"); + case 16396: return("H12"); + case 16408: return("D1"); + case 32769: return("W1"); + case 49153: return("MN1"); + default: return("PERIOD_CURRENT"); + } +} + +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() { + + long chartid=0; + int HowManySymbols=SymbolsTotal(true); + + string sCurrency1, sCurrency2; + int iPos=0; + + for(int i=0;icCS2.dHighPrice) { + vfunction(sCurrency1,1); + vfunction(sCurrency2,0); + } + + if (cCS1.dClosePriceiArray1[j]) { + itemp = iArray1[i]; + stemp = sArray1[i]; + iArray1[i]=iArray1[j]; + sArray1[i]=sArray1[j]; + iArray1[j]=itemp; + sArray1[j]=stemp; + } + } + } + + Alert("==========="); + Alert( "Timeframe is ", GetTimeFrame(Period())); + Alert("==========="); + + for (i=0;i<8;i++) + Alert(sArray1[i], " = ",iArray1[i]); + +} \ No newline at end of file diff --git a/BufferInspector - script for MetaTrader 5/README.md b/BufferInspector - script for MetaTrader 5/README.md new file mode 100644 index 0000000..7f2c3a0 --- /dev/null +++ b/BufferInspector - script for MetaTrader 5/README.md @@ -0,0 +1,19 @@ +# 🚀 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](script.png) + +## Source Files +- `bufferinspector.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/BufferInspector - script for MetaTrader 5/bufferinspector.mq5 b/BufferInspector - script for MetaTrader 5/bufferinspector.mq5 new file mode 100644 index 0000000..9f50646 --- /dev/null +++ b/BufferInspector - script for MetaTrader 5/bufferinspector.mq5 @@ -0,0 +1,73 @@ +//+------------------------------------------------------------------+ +//defines + #define VERSION "1.00" +//properties + #property copyright "Copyright 2017, Diogo 'Quebralim' Seca" + #property link "https://www.mql5.com/en/users/quebralim" + #property version VERSION + #property description "The following Script iterates throughout all indicators attached to a given Chart." + #property description "The output is in the following form:\n" + #property description "INDICATOR_NAME [BUFFER_INDEX] [POSITION_INDEX] = VALUE" + #property script_show_inputs +//inputs + input int ValuesPerBuffer = 1; //Values Per Buffer + input uint DigitsToShow = 5; //Digits to Show + +//+------------------------------------------------------------------+ +//| Start +//+------------------------------------------------------------------+ +void OnStart(){ + //verifiy the input ValuesPerBuffer + if (ValuesPerBuffer < 1 || ValuesPerBuffer > 10){ + MessageBox("BufferInspector Input Error!\n\n"+ + "Please input a 'Values Per Buffer' between 1 and 10.", + "BufferInspector "+VERSION, MB_ICONERROR|MB_OK); + return; + } + + //compute DigitsToShow_ + int Digits = DigitsToShow ? (int)DigitsToShow : _Digits; + + //initialize buffer & chart + double buffer[]; + ArrayResize(buffer,ValuesPerBuffer); + long chart = ChartID(); + + //loop until stopped by user + while(!_StopFlag){ + string result_output = ""; + //iterate throughout all windows + long n_windows = ChartGetInteger(ChartID(),CHART_WINDOWS_TOTAL); + for(int w=0; w Made with ❤️ for the trading community. diff --git a/Bulk Information 1.0 - script for MetaTrader 5/bulkinfo.mq5 b/Bulk Information 1.0 - script for MetaTrader 5/bulkinfo.mq5 new file mode 100644 index 0000000..0497ee1 Binary files /dev/null and b/Bulk Information 1.0 - script for MetaTrader 5/bulkinfo.mq5 differ diff --git a/Bulk Information 1.0 - script for MetaTrader 5/indicator.png b/Bulk Information 1.0 - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Bulk Information 1.0 - script for MetaTrader 5/indicator.png differ diff --git a/Bulk Information 1.0 - script for MetaTrader 5/library.png b/Bulk Information 1.0 - script for MetaTrader 5/library.png new file mode 100644 index 0000000..5c79a8f Binary files /dev/null and b/Bulk Information 1.0 - script for MetaTrader 5/library.png differ diff --git a/Bulk Information 1.0 - script for MetaTrader 5/logo-2.png b/Bulk Information 1.0 - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Bulk Information 1.0 - script for MetaTrader 5/logo-2.png differ diff --git a/Bulk Information 1.0 - script for MetaTrader 5/script.png b/Bulk Information 1.0 - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Bulk Information 1.0 - script for MetaTrader 5/script.png differ diff --git a/Bulls and Bears - script for MetaTrader 5/README.md b/Bulls and Bears - script for MetaTrader 5/README.md new file mode 100644 index 0000000..80dad63 --- /dev/null +++ b/Bulls and Bears - script for MetaTrader 5/README.md @@ -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](bulls_bears.png) +![Screenshot](script.png) + +## Source Files +- `bulls_bears.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Bulls and Bears - script for MetaTrader 5/bulls_bears.mq5 b/Bulls and Bears - script for MetaTrader 5/bulls_bears.mq5 new file mode 100644 index 0000000..cfd8783 --- /dev/null +++ b/Bulls and Bears - script for MetaTrader 5/bulls_bears.mq5 @@ -0,0 +1,34 @@ +//+------------------------------------------------------------------+ +//| bulls_bears.mq5 | +//| Copyright 2015,Viktor Moss | +//| https://login.mql5.com/ru/users/vicmos | +//+------------------------------------------------------------------+ +#property copyright "Copyright 2015,Viktor Moss" +#property link "https://login.mql5.com/ru/users/vicmos" +#property version "1.00" +#property script_show_inputs + +input int NumCandles=1000; +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() + { +//--- + int bulls=0,bears=0; + double op[],cl[]; + int sp[]; + if(CopyOpen(_Symbol,PERIOD_CURRENT,0,NumCandles,op)<0) return; + if(CopyClose(_Symbol,PERIOD_CURRENT,0,NumCandles,cl)<0) return; + if(CopySpread(_Symbol,PERIOD_CURRENT,0,NumCandles,sp)<0) return; + for(int i=0; isp[i]*_Point) bulls++; + if(op[i]-cl[i]>sp[i]*_Point) bears++; + } + MessageBox(_Symbol+" "+StringSubstr(EnumToString(_Period),7)+"\n"+ + "Candles "+IntegerToString(NumCandles)+"\n"+ + "Bulls "+IntegerToString(bulls)+"\n"+ + "Bears "+IntegerToString(bears)); + } +//+------------------------------------------------------------------+ diff --git a/Bulls and Bears - script for MetaTrader 5/bulls_bears.png b/Bulls and Bears - script for MetaTrader 5/bulls_bears.png new file mode 100644 index 0000000..6d1cf88 Binary files /dev/null and b/Bulls and Bears - script for MetaTrader 5/bulls_bears.png differ diff --git a/Bulls and Bears - script for MetaTrader 5/expert.png b/Bulls and Bears - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/Bulls and Bears - script for MetaTrader 5/expert.png differ diff --git a/Bulls and Bears - script for MetaTrader 5/indicator.png b/Bulls and Bears - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Bulls and Bears - script for MetaTrader 5/indicator.png differ diff --git a/Bulls and Bears - script for MetaTrader 5/logo-2.png b/Bulls and Bears - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Bulls and Bears - script for MetaTrader 5/logo-2.png differ diff --git a/Bulls and Bears - script for MetaTrader 5/script.png b/Bulls and Bears - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Bulls and Bears - script for MetaTrader 5/script.png differ diff --git a/Buy using amount instead of lots - script for MetaTrader 5/4015540604364__1.png b/Buy using amount instead of lots - script for MetaTrader 5/4015540604364__1.png new file mode 100644 index 0000000..8cab4ee Binary files /dev/null and b/Buy using amount instead of lots - script for MetaTrader 5/4015540604364__1.png differ diff --git a/Buy using amount instead of lots - script for MetaTrader 5/README.md b/Buy using amount instead of lots - script for MetaTrader 5/README.md new file mode 100644 index 0000000..d2fbcb2 --- /dev/null +++ b/Buy using amount instead of lots - script for MetaTrader 5/README.md @@ -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](4015540604364__1.png) +![Screenshot](library.png) +![Screenshot](script.png) + +## Source Files +- `scriptbuy.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Buy using amount instead of lots - script for MetaTrader 5/library.png b/Buy using amount instead of lots - script for MetaTrader 5/library.png new file mode 100644 index 0000000..5c79a8f Binary files /dev/null and b/Buy using amount instead of lots - script for MetaTrader 5/library.png differ diff --git a/Buy using amount instead of lots - script for MetaTrader 5/logo-2.png b/Buy using amount instead of lots - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Buy using amount instead of lots - script for MetaTrader 5/logo-2.png differ diff --git a/Buy using amount instead of lots - script for MetaTrader 5/script.png b/Buy using amount instead of lots - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Buy using amount instead of lots - script for MetaTrader 5/script.png differ diff --git a/Buy using amount instead of lots - script for MetaTrader 5/scriptbuy.mq5 b/Buy using amount instead of lots - script for MetaTrader 5/scriptbuy.mq5 new file mode 100644 index 0000000..2f6f9fa --- /dev/null +++ b/Buy using amount instead of lots - script for MetaTrader 5/scriptbuy.mq5 @@ -0,0 +1,62 @@ +//+------------------------------------------------------------------+ +//| ScriptBuy.mq5 | +//| B Gabela | +//| https://www.mql5.com | +//+------------------------------------------------------------------+ +#property strict +#property script_show_inputs + +#include +#include +#include + +#include "TradeHelper.mqh" + +input double FIXED_DEAL_AMOUNT = 10000.00; //FIXED_DEAL_AMOUNT: Fixed amount to use per trade +input bool USE_SL_ON_BUY = true; //USE_SL_ON_BUY: Use stop loss on Long position + +//--- Global Variables +/* +_Symbol+_MAX_SPREAD //Max spread for given symbol +*/ + +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() + { + init(); + + int spread = SymbolInfoInteger(_Symbol,SYMBOL_SPREAD); + printHelper(LOG_INFO, StringFormat("Script: About to execute buy on %s with spread %d ", _Symbol, spread)); + +//Check spread + int maxSpread = GlobalVariableGet(_Symbol+"_MAX_SPREAD"); + if((maxSpread > 0) && (spread > maxSpread)) + { + printHelper(LOG_INFO, StringFormat("Script: Can't execute buy on %s as spread is above %d ", _Symbol, maxSpread)); + return; + } + + int barIndex = findLastRedBar(20); + double sl = iLow(NULL,0,barIndex) - (getAdjustedPoint()*0.60); + if(!USE_SL_ON_BUY) + { + sl = 0.00; + } + + placeBuyOrder(m_trade, sl, 0.00, FIXED_DEAL_AMOUNT, "[M] "); + } + +//+------------------------------------------------------------------+ +//| Initialisation of script | +//+------------------------------------------------------------------+ +void init() + { + m_trade.SetExpertMagicNumber(getMagicWithTimeframe()); + m_trade.SetMarginMode(); + m_trade.SetTypeFillingBySymbol(_Symbol); + m_trade.SetDeviationInPoints(m_slippage); + } + +//+------------------------------------------------------------------+ diff --git a/COLLECT ALL INDICATORS DATA - script for MetaTrader 5/README.md b/COLLECT ALL INDICATORS DATA - script for MetaTrader 5/README.md new file mode 100644 index 0000000..0baa585 --- /dev/null +++ b/COLLECT ALL INDICATORS DATA - script for MetaTrader 5/README.md @@ -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](bandicam_2023-12-26_14-51-15-611.gif) +![Screenshot](library.png) +![Screenshot](script.png) + +## Source Files +- `getallindicators_data.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/COLLECT ALL INDICATORS DATA - script for MetaTrader 5/bandicam_2023-12-26_14-51-15-611.gif b/COLLECT ALL INDICATORS DATA - script for MetaTrader 5/bandicam_2023-12-26_14-51-15-611.gif new file mode 100644 index 0000000..6aa606a Binary files /dev/null and b/COLLECT ALL INDICATORS DATA - script for MetaTrader 5/bandicam_2023-12-26_14-51-15-611.gif differ diff --git a/COLLECT ALL INDICATORS DATA - script for MetaTrader 5/getallindicators_data.mq5 b/COLLECT ALL INDICATORS DATA - script for MetaTrader 5/getallindicators_data.mq5 new file mode 100644 index 0000000..6e63045 --- /dev/null +++ b/COLLECT ALL INDICATORS DATA - script for MetaTrader 5/getallindicators_data.mq5 @@ -0,0 +1,402 @@ +//+------------------------------------------------------------------+ +//| 20 indicators data.mq5 | +//| Copyright 2023, Omega Joctan | +//| https://www.mql5.com/en/users/omegajoctan | +//+------------------------------------------------------------------+ +#property copyright "Copyright 2023, Omega Joctan" +#property link "https://www.mql5.com/en/users/omegajoctan" +#property version "1.00" +//#property script_show_inputs + +//The script collects all (37) builtin indicator data at default indicator values and the current chart timeframe; + +#define INDICATORS 38 + +input uint buffer_size = 100; + +struct buffer_info //Carry all the buffer information and values + { + matrix values; + string names; + + int GetNames(string names_str, string &NamesArr[]) + { + ushort sep = StringGetCharacter(",", 0); + return StringSplit(names_str,sep,NamesArr); + } + }; + +struct buffers_struct:public buffer_info + { + + buffer_info _CopyRates(long handle, string buff_names, int start, int count) //Copy all buffers given available buffers from an indicatpr + { + string names_arr[]; + + int total_buffers = GetNames(buff_names, names_arr); //Buffer names == total buffers | this function extracts the number of buffers + + buffer_info buffers; + buffers.values.Resize(count, total_buffers); + + vector v(count); + v.Fill(0.0); + + for (int i=0; i +bool WriteCsv(string csv_name, matrix &matrix_, string header_string, bool common=false, int digits=5) + { + FileDelete(csv_name); + int handle = FileOpen(csv_name,FILE_WRITE|FILE_CSV|FILE_ANSI|(common?FILE_COMMON:FILE_ANSI),",",CP_UTF8); + + + if(handle == INVALID_HANDLE) + { + printf("Invalid %s handle Error %d ",csv_name,GetLastError()); + return (false); + } + + string concstring; + vector row = {}; + + datetime time_start = GetTickCount(), current_time; + + string header[]; + + ushort u_sep; + u_sep = StringGetCharacter(",",0); + StringSplit(header_string,u_sep, header); + + vector colsinrows = matrix_.Row(0); + + if (ArraySize(header) != (int)colsinrows.Size()) + { + printf("headers=%d and columns=%d from the matrix vary is size ",ArraySize(header),colsinrows.Size()); + return false; + } + +//--- + + string header_str = ""; + for (int i=0; i0) || (axis == 1 && mat1.Rows() != mat2.Rows() && mat1.Rows()>0)) + { + Print(__FUNCTION__, "Err | Dimensions mismatch for concatenation"); + return m_out; + } + + if (axis == 0) { + m_out.Resize(mat1.Rows() + mat2.Rows(), MathMax(mat1.Cols(), mat2.Cols())); + + for (ulong row = 0; row < mat1.Rows(); row++) { + for (ulong col = 0; col < m_out.Cols(); col++) { + m_out[row][col] = mat1[row][col]; + } + } + + for (ulong row = 0; row < mat2.Rows(); row++) { + for (ulong col = 0; col < m_out.Cols(); col++) { + m_out[row + mat1.Rows()][col] = mat2[row][col]; + } + } + } else if (axis == 1) { + m_out.Resize(MathMax(mat1.Rows(), mat2.Rows()), mat1.Cols() + mat2.Cols()); + + for (ulong row = 0; row < m_out.Rows(); row++) { + for (ulong col = 0; col < mat1.Cols(); col++) { + m_out[row][col] = mat1[row][col]; + } + + for (ulong col = 0; col < mat2.Cols(); col++) { + m_out[row][col + mat1.Cols()] = mat2[row][col]; + } + } + } + return m_out; + } +//+------------------------------------------------------------------+ +//| | +//+------------------------------------------------------------------+ diff --git a/COLLECT ALL INDICATORS DATA - script for MetaTrader 5/indicator.png b/COLLECT ALL INDICATORS DATA - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/COLLECT ALL INDICATORS DATA - script for MetaTrader 5/indicator.png differ diff --git a/COLLECT ALL INDICATORS DATA - script for MetaTrader 5/library.png b/COLLECT ALL INDICATORS DATA - script for MetaTrader 5/library.png new file mode 100644 index 0000000..5c79a8f Binary files /dev/null and b/COLLECT ALL INDICATORS DATA - script for MetaTrader 5/library.png differ diff --git a/COLLECT ALL INDICATORS DATA - script for MetaTrader 5/logo-2.png b/COLLECT ALL INDICATORS DATA - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/COLLECT ALL INDICATORS DATA - script for MetaTrader 5/logo-2.png differ diff --git a/COLLECT ALL INDICATORS DATA - script for MetaTrader 5/script.png b/COLLECT ALL INDICATORS DATA - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/COLLECT ALL INDICATORS DATA - script for MetaTrader 5/script.png differ diff --git a/Calculate unrealized profit(s) at a specific time in history - script for MetaTrader 5/5623895356764__1.png b/Calculate unrealized profit(s) at a specific time in history - script for MetaTrader 5/5623895356764__1.png new file mode 100644 index 0000000..a327706 Binary files /dev/null and b/Calculate unrealized profit(s) at a specific time in history - script for MetaTrader 5/5623895356764__1.png differ diff --git a/Calculate unrealized profit(s) at a specific time in history - script for MetaTrader 5/README.md b/Calculate unrealized profit(s) at a specific time in history - script for MetaTrader 5/README.md new file mode 100644 index 0000000..f5fa563 --- /dev/null +++ b/Calculate unrealized profit(s) at a specific time in history - script for MetaTrader 5/README.md @@ -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](5623895356764__1.png) +![Screenshot](script.png) + +## Source Files +- `pnlat.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Calculate unrealized profit(s) at a specific time in history - script for MetaTrader 5/expert.png b/Calculate unrealized profit(s) at a specific time in history - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/Calculate unrealized profit(s) at a specific time in history - script for MetaTrader 5/expert.png differ diff --git a/Calculate unrealized profit(s) at a specific time in history - script for MetaTrader 5/indicator.png b/Calculate unrealized profit(s) at a specific time in history - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Calculate unrealized profit(s) at a specific time in history - script for MetaTrader 5/indicator.png differ diff --git a/Calculate unrealized profit(s) at a specific time in history - script for MetaTrader 5/logo-2.png b/Calculate unrealized profit(s) at a specific time in history - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Calculate unrealized profit(s) at a specific time in history - script for MetaTrader 5/logo-2.png differ diff --git a/Calculate unrealized profit(s) at a specific time in history - script for MetaTrader 5/pnlat.mq5 b/Calculate unrealized profit(s) at a specific time in history - script for MetaTrader 5/pnlat.mq5 new file mode 100644 index 0000000..3e2f615 --- /dev/null +++ b/Calculate unrealized profit(s) at a specific time in history - script for MetaTrader 5/pnlat.mq5 @@ -0,0 +1,132 @@ +//+------------------------------------------------------------------+ +//| PnLAt.mq5 | +//| Copyright 2022, MetaQuotes Ltd. | +//| https://www.mql5.com | +//| Author: Yashar Seyyedin | +//| Web Address: https://www.mql5.com/en/users/yashar.seyyedin | +//+------------------------------------------------------------------+ +#property copyright "Copyright 2022, MetaQuotes Ltd." +#property link "https://www.mql5.com" +#property version "1.00" +#property script_show_inputs + +//input parameters +input datetime time=NULL; + +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() + { +//--- + double TotalUnrealizedProfit=0; + Print("Your chosen time stamp= " , (time)); + Print("Total Unrealized Profit: " ,(PrintOpenPositionsPnLAt(TotalUnrealizedProfit))?(string)TotalUnrealizedProfit:"NaN"); + } +//+------------------------------------------------------------------+ + +bool PrintOpenPositionsPnLAt(double &TotalUnrealizedProfit) +{ + if(HistorySelect(0, TimeCurrent())==false) + { + Print("Error History Select..."); + return false; + } + + int total = HistoryDealsTotal(); + TotalUnrealizedProfit=0; + for(int i = 0; i < total; i++) //iterate to find the out deals + { + ulong out_dealTicket = HistoryDealGetTicket(i); + if(HistoryDealGetInteger(out_dealTicket, DEAL_ENTRY) != DEAL_ENTRY_OUT) continue; + if(HistoryDealGetInteger(out_dealTicket, DEAL_TIME) < time) continue; + ulong positionTicket=HistoryDealGetInteger(out_dealTicket, DEAL_POSITION_ID); + if(HistorySelectByPosition(positionTicket)==true) + { + int _total = HistoryDealsTotal(); + for(int j = 0; j < _total; j++) //iterate to find the coressponding in deal + { + ulong in_dealTicket = HistoryDealGetTicket(j); + if(HistoryDealGetInteger(in_dealTicket, DEAL_ENTRY) != DEAL_ENTRY_IN) continue; + if(HistoryDealGetInteger(in_dealTicket, DEAL_TIME) > time) continue; + double pnl = 0; + PrintInfo(in_dealTicket); + if(PnL(in_dealTicket, pnl)==false) return false; + TotalUnrealizedProfit+=pnl; + break; + } + } + HistorySelect(0, TimeCurrent()); + } + + for(int i=0;itime) continue; + if(HistorySelectByPosition(ticket)==true) + { + int _total = HistoryDealsTotal(); + for(int j = 0; j < _total; j++) //iterate to find the coressponding in deal + { + ulong in_dealTicket = HistoryDealGetTicket(j); + if(HistoryDealGetInteger(in_dealTicket, DEAL_ENTRY) != DEAL_ENTRY_IN) continue; + double pnl = 0; + PrintInfo(in_dealTicket); + if(PnL(in_dealTicket, pnl)==false) return false; + TotalUnrealizedProfit+=pnl; + break; + } + } + } + + return true; +} + + + +bool PnL(ulong in_dealTicket, double &profit) +{ + string symbol=HistoryDealGetString(in_dealTicket, DEAL_SYMBOL); + + //copy one tick from the input time stamp + MqlTick tick_array[1]; + if(CopyTicks(symbol,tick_array,COPY_TICKS_ALL,time*1000,1)!=1) + { + Print("Error Copying Ticks for: " , symbol); + return false; + } + + //retrieve deal info + ENUM_ORDER_TYPE order_type = HistoryDealGetInteger(in_dealTicket, DEAL_TYPE)==DEAL_TYPE_BUY?ORDER_TYPE_BUY:ORDER_TYPE_SELL; + double volume = HistoryDealGetDouble(in_dealTicket, DEAL_VOLUME); + double open_price = HistoryDealGetDouble(in_dealTicket, DEAL_PRICE); + double close_price = order_type==ORDER_TYPE_BUY?tick_array[0].bid:tick_array[0].ask; + + //calculate profit from the very specific tick at timestamp + profit=0; + if(OrderCalcProfit(order_type, symbol, volume, open_price, close_price, profit)== false) + { + Print("Error OrderCalcProfit for deal ticket: ", in_dealTicket); + return false; + } + + // Add swap and comission + profit = profit+HistoryDealGetDouble(in_dealTicket, DEAL_SWAP) + + HistoryDealGetDouble(in_dealTicket, DEAL_COMMISSION); + + //round two digits double format + profit=MathFloor(profit*100)/100; + return true; +} + +void PrintInfo(ulong ticket) +{ + double PNL=0; + Print("Ticket= " , ticket, + ", Symbol= " , HistoryDealGetString(ticket,DEAL_SYMBOL), + ", Type= " , EnumToString((ENUM_DEAL_TYPE) HistoryDealGetInteger(ticket,DEAL_TYPE)), + ", Time= " , TimeToString(HistoryDealGetInteger(ticket,DEAL_TIME)), + ", Unrealized Profit= ", PnL(ticket, PNL)?(string)PNL:"NaN" + ); +} \ No newline at end of file diff --git a/Calculate unrealized profit(s) at a specific time in history - script for MetaTrader 5/script.png b/Calculate unrealized profit(s) at a specific time in history - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Calculate unrealized profit(s) at a specific time in history - script for MetaTrader 5/script.png differ diff --git a/Candle Analysis Report - script for MetaTrader 5/Candle_Analysis_Example__1.png b/Candle Analysis Report - script for MetaTrader 5/Candle_Analysis_Example__1.png new file mode 100644 index 0000000..81e93e8 Binary files /dev/null and b/Candle Analysis Report - script for MetaTrader 5/Candle_Analysis_Example__1.png differ diff --git a/Candle Analysis Report - script for MetaTrader 5/README.md b/Candle Analysis Report - script for MetaTrader 5/README.md new file mode 100644 index 0000000..b2e6283 --- /dev/null +++ b/Candle Analysis Report - script for MetaTrader 5/README.md @@ -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](Candle_Analysis_Example__1.png) +![Screenshot](library.png) +![Screenshot](script.png) + +## Source Files +- `candle_analysis_report.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Candle Analysis Report - script for MetaTrader 5/candle_analysis_report.mq5 b/Candle Analysis Report - script for MetaTrader 5/candle_analysis_report.mq5 new file mode 100644 index 0000000..77be239 Binary files /dev/null and b/Candle Analysis Report - script for MetaTrader 5/candle_analysis_report.mq5 differ diff --git a/Candle Analysis Report - script for MetaTrader 5/expert.png b/Candle Analysis Report - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/Candle Analysis Report - script for MetaTrader 5/expert.png differ diff --git a/Candle Analysis Report - script for MetaTrader 5/indicator.png b/Candle Analysis Report - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Candle Analysis Report - script for MetaTrader 5/indicator.png differ diff --git a/Candle Analysis Report - script for MetaTrader 5/library.png b/Candle Analysis Report - script for MetaTrader 5/library.png new file mode 100644 index 0000000..5c79a8f Binary files /dev/null and b/Candle Analysis Report - script for MetaTrader 5/library.png differ diff --git a/Candle Analysis Report - script for MetaTrader 5/logo-2.png b/Candle Analysis Report - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Candle Analysis Report - script for MetaTrader 5/logo-2.png differ diff --git a/Candle Analysis Report - script for MetaTrader 5/script.png b/Candle Analysis Report - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Candle Analysis Report - script for MetaTrader 5/script.png differ diff --git a/Candle Signature - script for MetaTrader 5/README.md b/Candle Signature - script for MetaTrader 5/README.md new file mode 100644 index 0000000..54e0df7 --- /dev/null +++ b/Candle Signature - script for MetaTrader 5/README.md @@ -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 +- `candle_signs.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Candle Signature - script for MetaTrader 5/candle_signs.mq5 b/Candle Signature - script for MetaTrader 5/candle_signs.mq5 new file mode 100644 index 0000000..9aeb24c --- /dev/null +++ b/Candle Signature - script for MetaTrader 5/candle_signs.mq5 @@ -0,0 +1,156 @@ +//+------------------------------------------------------------------+ +//| Candle_Signs`.mq5 | +//| Copyright 2025, Rajesh Kumar Nait | +//| https://www.mql5.com/en/users/rajeshnait/seller | +//+------------------------------------------------------------------+ +#property copyright "Copyright 2025, Rajesh Kumar Nait" +#property link "https://www.mql5.com/en/users/rajeshnait/seller" +#property version "1.00" + +#include + +class CandlePatternDetector { + private: + CHashMap patternDatabase; + double tolerance; + + string GenerateSignature(double open, double high, double low, double close) { + // Normalize candle dimensions + double bodySize = MathAbs(close - open); + double upperWick = high - MathMax(open, close); + double lowerWick = MathMin(open, close) - low; + double totalSize = high - low; + + // Avoid division by zero + if(totalSize == 0) return "DOJI"; + + // Calculate ratios + double bodyRatio = bodySize / totalSize; + double upperWickRatio = upperWick / totalSize; + double lowerWickRatio = lowerWick / totalSize; + + // Generate fuzzy signature + string signature = ""; + + // Body classification + if(bodyRatio < 0.1) signature += "DOJI_"; + else if(bodyRatio < 0.3) signature += "SMALL_"; + else if(bodyRatio < 0.7) signature += "MEDIUM_"; + else signature += "LONG_"; + + // Wick classification + if(upperWickRatio < 0.1) signature += "NO_UPPER_WICK_"; + else if(upperWickRatio < 0.3) signature += "SHORT_UPPER_WICK_"; + else if(upperWickRatio < 0.7) signature += "MEDIUM_UPPER_WICK_"; + else signature += "LONG_UPPER_WICK_"; + + if(lowerWickRatio < 0.1) signature += "NO_LOWER_WICK_"; + else if(lowerWickRatio < 0.3) signature += "SHORT_LOWER_WICK_"; + else if(lowerWickRatio < 0.7) signature += "MEDIUM_LOWER_WICK_"; + else signature += "LONG_LOWER_WICK_"; + + // Direction + signature += (close > open) ? "BULLISH" : "BEARISH"; + + return signature; + } + + void LoadDemoPatterns() { + // Common bullish patterns + AddCustomPattern(1.0, 1.1, 0.95, 1.08, "Bullish Engulfing"); + AddCustomPattern(1.0, 1.05, 0.98, 1.03, "Hammer"); + AddCustomPattern(1.0, 1.02, 0.99, 1.01, "Doji Star"); + AddCustomPattern(1.0, 1.15, 0.9, 1.14, "Long Bullish Marubozu"); + + // Common bearish patterns + AddCustomPattern(1.0, 1.05, 0.9, 0.92, "Bearish Engulfing"); + AddCustomPattern(1.0, 1.02, 0.85, 0.86, "Hanging Man"); + AddCustomPattern(1.0, 1.01, 0.99, 1.0, "Gravestone Doji"); + AddCustomPattern(1.0, 1.02, 0.8, 0.81, "Long Bearish Marubozu"); + + // Neutral patterns + AddCustomPattern(1.0, 1.01, 0.99, 1.0, "Perfect Doji"); + AddCustomPattern(1.0, 1.05, 0.95, 1.0, "Spinning Top"); + } + + public: + CandlePatternDetector(double tol=0.2) { + tolerance = tol; + LoadDemoPatterns(); + Print("Loaded ", patternDatabase.Count(), " demo candle patterns"); + } + + string FindCandleSign(int index) { + double open = iOpen(NULL, 0, index); + double high = iHigh(NULL, 0, index); + double low = iLow(NULL, 0, index); + double close = iClose(NULL, 0, index); + + string currentSignature = GenerateSignature(open, high, low, close); + string value; + + // Exact match + if(patternDatabase.TryGetValue(currentSignature, value)) + return value; + + // Fuzzy match with tolerance + string bestMatch = ""; + double bestScore = 0; + + // Correct HashMap iteration using CopyTo + string keys[]; + string values[]; + patternDatabase.CopyTo(keys, values); + + for(int i = 0; i < ArraySize(keys); i++) { + double similarity = CompareSignatures(currentSignature, keys[i]); + if(similarity > bestScore && similarity >= (1.0 - tolerance)) { + bestScore = similarity; + bestMatch = values[i]; + } + } + + if(bestMatch != "") + return "SIMILAR_TO: " + bestMatch + " (Confidence: " + DoubleToString(bestScore*100, 1) + "%)"; + + return "UNKNOWN_PATTERN"; + } + + double CompareSignatures(string sig1, string sig2) { + string parts1[], parts2[]; + StringSplit(sig1, '_', parts1); + StringSplit(sig2, '_', parts2); + + if(ArraySize(parts1) != ArraySize(parts2)) + return 0.0; + + int matches = 0; + for(int i = 0; i < ArraySize(parts1); i++) { + if(parts1[i] == parts2[i]) + matches++; + } + + return (double)matches / ArraySize(parts1); + } + + void AddCustomPattern(double open, double high, double low, double close, string comment) { + string signature = GenerateSignature(open, high, low, close); + patternDatabase.Add(signature, comment); + } +}; + +// Global instance +CandlePatternDetector *detector; +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ + +// Example usage +void OnStart() { + detector = new CandlePatternDetector(0.3); // 30% tolerance + int currentCandle = 1; // Most recent closed candle + string patternInfo = detector.FindCandleSign(currentCandle); + Print("Candle Pattern: ", patternInfo); + delete detector; +} +//+------------------------------------------------------------------+ diff --git a/Candle Signature - script for MetaTrader 5/expert.png b/Candle Signature - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/Candle Signature - script for MetaTrader 5/expert.png differ diff --git a/Candle Signature - script for MetaTrader 5/indicator.png b/Candle Signature - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Candle Signature - script for MetaTrader 5/indicator.png differ diff --git a/Candle Signature - script for MetaTrader 5/library.png b/Candle Signature - script for MetaTrader 5/library.png new file mode 100644 index 0000000..5c79a8f Binary files /dev/null and b/Candle Signature - script for MetaTrader 5/library.png differ diff --git a/Candle Signature - script for MetaTrader 5/logo-2.png b/Candle Signature - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Candle Signature - script for MetaTrader 5/logo-2.png differ diff --git a/Candle Signature - script for MetaTrader 5/script.png b/Candle Signature - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Candle Signature - script for MetaTrader 5/script.png differ diff --git a/Change Chart and Timeframe - script for MetaTrader 5/README.md b/Change Chart and Timeframe - script for MetaTrader 5/README.md new file mode 100644 index 0000000..d0f05fa --- /dev/null +++ b/Change Chart and Timeframe - script for MetaTrader 5/README.md @@ -0,0 +1,19 @@ +# 🚀 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](script.png) + +## Source Files +- `chartbefore.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Change Chart and Timeframe - script for MetaTrader 5/chartbefore.mq5 b/Change Chart and Timeframe - script for MetaTrader 5/chartbefore.mq5 new file mode 100644 index 0000000..e676a62 --- /dev/null +++ b/Change Chart and Timeframe - script for MetaTrader 5/chartbefore.mq5 @@ -0,0 +1,45 @@ +//+------------------------------------------------------------------+ +//| ChartBefore.mq5 | +//| J.S. 2013 | +//| http://www.eselstreckdich.de | +//+------------------------------------------------------------------+ +#property copyright "J.S. 2013" +#property link "http://www.eselstreckdich.de" +#property version "1.00" +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() + { +//--- + long current=ChartID(); + long before=current; + + while(true) + { + long id=ChartNext(before); + if(id==-1) id=ChartFirst(); + if(id==current) break; + before=id; + } + + ChartBringToTop(before); + } +//+----------------------------------------------------------------------+ +//| Send command to the terminal to display the chart above all others. | +//+----------------------------------------------------------------------+ +bool ChartBringToTop(const long chart_ID=0) + { +//--- reset the error value + ResetLastError(); +//--- show the chart on top of all others + if(!ChartSetInteger(chart_ID,CHART_BRING_TO_TOP,0,true)) + { + //--- display the error message in Experts journal + Print(__FUNCTION__+", Error Code = ",GetLastError()); + return(false); + } +//--- successful execution + return(true); + } +//+------------------------------------------------------------------+ diff --git a/Change Chart and Timeframe - script for MetaTrader 5/expert.png b/Change Chart and Timeframe - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/Change Chart and Timeframe - script for MetaTrader 5/expert.png differ diff --git a/Change Chart and Timeframe - script for MetaTrader 5/indicator.png b/Change Chart and Timeframe - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Change Chart and Timeframe - script for MetaTrader 5/indicator.png differ diff --git a/Change Chart and Timeframe - script for MetaTrader 5/logo-2.png b/Change Chart and Timeframe - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Change Chart and Timeframe - script for MetaTrader 5/logo-2.png differ diff --git a/Change Chart and Timeframe - script for MetaTrader 5/script.png b/Change Chart and Timeframe - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Change Chart and Timeframe - script for MetaTrader 5/script.png differ diff --git a/Change SL_TP on chart drop off - script for MetaTrader 5/README.md b/Change SL_TP on chart drop off - script for MetaTrader 5/README.md new file mode 100644 index 0000000..c15f006 --- /dev/null +++ b/Change SL_TP on chart drop off - script for MetaTrader 5/README.md @@ -0,0 +1,19 @@ +# 🚀 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](script.png) + +## Source Files +- `dropadjust_sl-tp.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Change SL_TP on chart drop off - script for MetaTrader 5/dropadjust_sl-tp.mq5 b/Change SL_TP on chart drop off - script for MetaTrader 5/dropadjust_sl-tp.mq5 new file mode 100644 index 0000000..0953ac5 Binary files /dev/null and b/Change SL_TP on chart drop off - script for MetaTrader 5/dropadjust_sl-tp.mq5 differ diff --git a/Change SL_TP on chart drop off - script for MetaTrader 5/indicator.png b/Change SL_TP on chart drop off - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Change SL_TP on chart drop off - script for MetaTrader 5/indicator.png differ diff --git a/Change SL_TP on chart drop off - script for MetaTrader 5/logo-2.png b/Change SL_TP on chart drop off - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Change SL_TP on chart drop off - script for MetaTrader 5/logo-2.png differ diff --git a/Change SL_TP on chart drop off - script for MetaTrader 5/script.png b/Change SL_TP on chart drop off - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Change SL_TP on chart drop off - script for MetaTrader 5/script.png differ diff --git a/Chart Save Template - script for MetaTrader 5/Chart_save_template_tester.png b/Chart Save Template - script for MetaTrader 5/Chart_save_template_tester.png new file mode 100644 index 0000000..8288bbd Binary files /dev/null and b/Chart Save Template - script for MetaTrader 5/Chart_save_template_tester.png differ diff --git a/Chart Save Template - script for MetaTrader 5/README.md b/Chart Save Template - script for MetaTrader 5/README.md new file mode 100644 index 0000000..927dd0c --- /dev/null +++ b/Chart Save Template - script for MetaTrader 5/README.md @@ -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](Chart_save_template_tester.png) +![Screenshot](library.png) +![Screenshot](script.png) + +## Source Files +- `chart_save_template.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Chart Save Template - script for MetaTrader 5/chart_save_template.mq5 b/Chart Save Template - script for MetaTrader 5/chart_save_template.mq5 new file mode 100644 index 0000000..77ddc93 Binary files /dev/null and b/Chart Save Template - script for MetaTrader 5/chart_save_template.mq5 differ diff --git a/Chart Save Template - script for MetaTrader 5/expert.png b/Chart Save Template - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/Chart Save Template - script for MetaTrader 5/expert.png differ diff --git a/Chart Save Template - script for MetaTrader 5/indicator.png b/Chart Save Template - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Chart Save Template - script for MetaTrader 5/indicator.png differ diff --git a/Chart Save Template - script for MetaTrader 5/library.png b/Chart Save Template - script for MetaTrader 5/library.png new file mode 100644 index 0000000..5c79a8f Binary files /dev/null and b/Chart Save Template - script for MetaTrader 5/library.png differ diff --git a/Chart Save Template - script for MetaTrader 5/logo-2.png b/Chart Save Template - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Chart Save Template - script for MetaTrader 5/logo-2.png differ diff --git a/Chart Save Template - script for MetaTrader 5/script.png b/Chart Save Template - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Chart Save Template - script for MetaTrader 5/script.png differ diff --git a/ChartChanger - script for MetaTrader 5/README.md b/ChartChanger - script for MetaTrader 5/README.md new file mode 100644 index 0000000..b6ad93f --- /dev/null +++ b/ChartChanger - script for MetaTrader 5/README.md @@ -0,0 +1,19 @@ +# 🚀 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](script.png) + +## Source Files +- `chartchanger.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/ChartChanger - script for MetaTrader 5/chartchanger.mq5 b/ChartChanger - script for MetaTrader 5/chartchanger.mq5 new file mode 100644 index 0000000..d0d3ddd --- /dev/null +++ b/ChartChanger - script for MetaTrader 5/chartchanger.mq5 @@ -0,0 +1,29 @@ +//+------------------------------------------------------------------+ +//| ChartChanger | +//| Copyright 2013,Karlson | +//+------------------------------------------------------------------+ + +void OnStart() + { + long id=ChartNext(ChartID()); + if(id==-1) {id=ChartFirst();} + + ChartBringToTop(id); + } +//+----------------------------------------------------------------------+ +//| Send command to the terminal to display the chart above all others. | +//+----------------------------------------------------------------------+ +bool ChartBringToTop(const long chart_ID=0) + { +//--- reset the error value + ResetLastError(); +//--- show the chart on top of all others + if(!ChartSetInteger(chart_ID,CHART_BRING_TO_TOP,0,true)) + { + //--- display the error message in Experts journal + Print(__FUNCTION__+", Error Code = ",GetLastError()); + return(false); + } +//--- successful execution + return(true); + } diff --git a/ChartChanger - script for MetaTrader 5/indicator.png b/ChartChanger - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/ChartChanger - script for MetaTrader 5/indicator.png differ diff --git a/ChartChanger - script for MetaTrader 5/logo-2.png b/ChartChanger - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/ChartChanger - script for MetaTrader 5/logo-2.png differ diff --git a/ChartChanger - script for MetaTrader 5/script.png b/ChartChanger - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/ChartChanger - script for MetaTrader 5/script.png differ diff --git a/ChartNavigate Demo - script for MetaTrader 5/README.md b/ChartNavigate Demo - script for MetaTrader 5/README.md new file mode 100644 index 0000000..9031cc8 --- /dev/null +++ b/ChartNavigate Demo - script for MetaTrader 5/README.md @@ -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](chartnavigate.png) +![Screenshot](script.png) + +## Source Files +- `chartnavigate.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/ChartNavigate Demo - script for MetaTrader 5/chartnavigate.mq5 b/ChartNavigate Demo - script for MetaTrader 5/chartnavigate.mq5 new file mode 100644 index 0000000..d1aed80 --- /dev/null +++ b/ChartNavigate Demo - script for MetaTrader 5/chartnavigate.mq5 @@ -0,0 +1,80 @@ +//+------------------------------------------------------------------+ +//| ChartNavigate.mq5 | +//| Copyright 2011, MetaQuotes Software Corp. | +//| http://www.metaquotes.net | +//+------------------------------------------------------------------+ +#property copyright "Copyright 2011, MetaQuotes Software Corp." +#property link "http://www.metaquotes.net" +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() + { +//--- get handle of the current chart + long handle=ChartID(); + string comm=""; + if(handle>0) // if successful, configure it + { + //--- disable autoscroll + ChartSetInteger(handle,CHART_AUTOSCROLL,false); + //--- set chart shift + ChartSetInteger(handle,CHART_SHIFT,true); + //--- show as candles + ChartSetInteger(handle,CHART_MODE,CHART_CANDLES); + //--- show tick volumes + ChartSetInteger(handle,CHART_SHOW_VOLUMES,CHART_VOLUME_TICK); + + //--- prepare text for Comment() + comm="Let's scroll the chart 10 bars right from the beggining of the history)"; + //--- print comment + Comment(comm); + //--- scroll 10 bars right + ChartNavigate(handle,CHART_BEGIN,10); + //--- get first bar index (indexing as timeseries) + long first_bar=ChartGetInteger(0,CHART_FIRST_VISIBLE_BAR,0); + //--- add CR/LF + comm=comm+"\r\n"; + //--- add to comment + comm=comm+"First bar has index "+IntegerToString(first_bar)+"\r\n"; + //--- print comment + Comment(comm); + //--- wait 5 seconds to see how ChartNavigate works + Sleep(5000); + + //--- add to comment + comm=comm+"\r\n"+"Scroll 10 bars left (from the right border of the chart)"; + Comment(comm); + //--- scroll 10 bars left + ChartNavigate(handle,CHART_END,-10); + //--- get first bar index (indexing as timeseries) + first_bar=ChartGetInteger(0,CHART_FIRST_VISIBLE_BAR,0); + comm=comm+"\r\n"; + comm=comm+"First bar has index "+IntegerToString(first_bar)+"\r\n"; + Comment(comm); + //--- wait 5 seconds to see how ChartNavigate works + Sleep(5000); + + //--- new scrolling + comm=comm+"\r\n"+"Scroll 1000 bars right from the beggining of the history"; + Comment(comm); + //--- scroll 1000 bars right + ChartNavigate(handle,CHART_BEGIN,1000); + first_bar=ChartGetInteger(0,CHART_FIRST_VISIBLE_BAR,0); + comm=comm+"\r\n"; + comm=comm+"First bar has index "+IntegerToString(first_bar)+"\r\n"; + Comment(comm); + //--- wait 5 seconds to see how ChartNavigate works + Sleep(5000); + + //--- new demo + comm=comm+"\r\n"+"Scroll 1000 bars left from the right border of the chart"; + Comment(comm); + //--- scroll -100 bars left from the right border of the chart + ChartNavigate(handle,CHART_END,-1000); + first_bar=ChartGetInteger(0,CHART_FIRST_VISIBLE_BAR,0); + comm=comm+"\r\n"; + comm=comm+"First bar has index "+IntegerToString(first_bar)+"\r\n"; + Comment(comm); + } + } +//+------------------------------------------------------------------+ diff --git a/ChartNavigate Demo - script for MetaTrader 5/chartnavigate.png b/ChartNavigate Demo - script for MetaTrader 5/chartnavigate.png new file mode 100644 index 0000000..889f240 Binary files /dev/null and b/ChartNavigate Demo - script for MetaTrader 5/chartnavigate.png differ diff --git a/ChartNavigate Demo - script for MetaTrader 5/expert.png b/ChartNavigate Demo - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/ChartNavigate Demo - script for MetaTrader 5/expert.png differ diff --git a/ChartNavigate Demo - script for MetaTrader 5/indicator.png b/ChartNavigate Demo - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/ChartNavigate Demo - script for MetaTrader 5/indicator.png differ diff --git a/ChartNavigate Demo - script for MetaTrader 5/logo-2.png b/ChartNavigate Demo - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/ChartNavigate Demo - script for MetaTrader 5/logo-2.png differ diff --git a/ChartNavigate Demo - script for MetaTrader 5/script.png b/ChartNavigate Demo - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/ChartNavigate Demo - script for MetaTrader 5/script.png differ diff --git a/Chart_Period_Changer - script for MetaTrader 5/README.md b/Chart_Period_Changer - script for MetaTrader 5/README.md new file mode 100644 index 0000000..e9e9059 --- /dev/null +++ b/Chart_Period_Changer - script for MetaTrader 5/README.md @@ -0,0 +1,19 @@ +# 🚀 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](script.png) + +## Source Files +- `chart_period_change.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Chart_Period_Changer - script for MetaTrader 5/chart_period_change.mq5 b/Chart_Period_Changer - script for MetaTrader 5/chart_period_change.mq5 new file mode 100644 index 0000000..8d35b17 --- /dev/null +++ b/Chart_Period_Changer - script for MetaTrader 5/chart_period_change.mq5 @@ -0,0 +1,23 @@ +//+------------------------------------------------------------------+ +//| Chart_Period_Changer | +//| Copyright 2012,Karlson | +//+------------------------------------------------------------------+ +#property copyright "2012, Karlson." +#property link "https://login.mql5.com/ru/users/Karlson" +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() + { + if(ChartPeriod(0)==PERIOD_M1) {ChartSetSymbolPeriod(0,_Symbol,PERIOD_M5);return;} + if(ChartPeriod(0)==PERIOD_M5) {ChartSetSymbolPeriod(0,_Symbol,PERIOD_M15);return;} + if(ChartPeriod(0)==PERIOD_M15) {ChartSetSymbolPeriod(0,_Symbol,PERIOD_M30);return;} + if(ChartPeriod(0)==PERIOD_M30) {ChartSetSymbolPeriod(0,_Symbol,PERIOD_H1);return;} + if(ChartPeriod(0)==PERIOD_H1) {ChartSetSymbolPeriod(0,_Symbol,PERIOD_H4);return;} + if(ChartPeriod(0)==PERIOD_H4) {ChartSetSymbolPeriod(0,_Symbol,PERIOD_D1);return;} + if(ChartPeriod(0)==PERIOD_D1) {ChartSetSymbolPeriod(0,_Symbol,PERIOD_W1);return;} + if(ChartPeriod(0)==PERIOD_W1) {ChartSetSymbolPeriod(0,_Symbol,PERIOD_MN1);return;} + if(ChartPeriod(0)>=PERIOD_MN1) {ChartSetSymbolPeriod(0,_Symbol,PERIOD_M1);return;} + if(GetLastError()>0) {Print("Error (",GetLastError(),") ");} ResetLastError(); + } +//+------------------------------------------------------------------+ diff --git a/Chart_Period_Changer - script for MetaTrader 5/expert.png b/Chart_Period_Changer - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/Chart_Period_Changer - script for MetaTrader 5/expert.png differ diff --git a/Chart_Period_Changer - script for MetaTrader 5/indicator.png b/Chart_Period_Changer - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Chart_Period_Changer - script for MetaTrader 5/indicator.png differ diff --git a/Chart_Period_Changer - script for MetaTrader 5/logo-2.png b/Chart_Period_Changer - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Chart_Period_Changer - script for MetaTrader 5/logo-2.png differ diff --git a/Chart_Period_Changer - script for MetaTrader 5/script.png b/Chart_Period_Changer - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Chart_Period_Changer - script for MetaTrader 5/script.png differ diff --git a/Check Margin - script for MetaTrader 5/CM_01__1.png b/Check Margin - script for MetaTrader 5/CM_01__1.png new file mode 100644 index 0000000..c167bb4 Binary files /dev/null and b/Check Margin - script for MetaTrader 5/CM_01__1.png differ diff --git a/Check Margin - script for MetaTrader 5/README.md b/Check Margin - script for MetaTrader 5/README.md new file mode 100644 index 0000000..57dff4f --- /dev/null +++ b/Check Margin - script for MetaTrader 5/README.md @@ -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](CM_01__1.png) +![Screenshot](library.png) +![Screenshot](script.png) + +## Source Files +- `checkmargin.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Check Margin - script for MetaTrader 5/checkmargin.mq5 b/Check Margin - script for MetaTrader 5/checkmargin.mq5 new file mode 100644 index 0000000..4e54c98 Binary files /dev/null and b/Check Margin - script for MetaTrader 5/checkmargin.mq5 differ diff --git a/Check Margin - script for MetaTrader 5/expert.png b/Check Margin - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/Check Margin - script for MetaTrader 5/expert.png differ diff --git a/Check Margin - script for MetaTrader 5/indicator.png b/Check Margin - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Check Margin - script for MetaTrader 5/indicator.png differ diff --git a/Check Margin - script for MetaTrader 5/library.png b/Check Margin - script for MetaTrader 5/library.png new file mode 100644 index 0000000..5c79a8f Binary files /dev/null and b/Check Margin - script for MetaTrader 5/library.png differ diff --git a/Check Margin - script for MetaTrader 5/logo-2.png b/Check Margin - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Check Margin - script for MetaTrader 5/logo-2.png differ diff --git a/Check Margin - script for MetaTrader 5/script.png b/Check Margin - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Check Margin - script for MetaTrader 5/script.png differ diff --git a/Checking the server time changes due to the daylight saving time (DST) changeover - script for MetaTrader 5/README.md b/Checking the server time changes due to the daylight saving time (DST) changeover - script for MetaTrader 5/README.md new file mode 100644 index 0000000..c7377b9 --- /dev/null +++ b/Checking the server time changes due to the daylight saving time (DST) changeover - script for MetaTrader 5/README.md @@ -0,0 +1,19 @@ +# 🚀 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](script.png) + +## Source Files +- `test_weekenddata.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Checking the server time changes due to the daylight saving time (DST) changeover - script for MetaTrader 5/expert.png b/Checking the server time changes due to the daylight saving time (DST) changeover - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/Checking the server time changes due to the daylight saving time (DST) changeover - script for MetaTrader 5/expert.png differ diff --git a/Checking the server time changes due to the daylight saving time (DST) changeover - script for MetaTrader 5/indicator.png b/Checking the server time changes due to the daylight saving time (DST) changeover - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Checking the server time changes due to the daylight saving time (DST) changeover - script for MetaTrader 5/indicator.png differ diff --git a/Checking the server time changes due to the daylight saving time (DST) changeover - script for MetaTrader 5/logo-2.png b/Checking the server time changes due to the daylight saving time (DST) changeover - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Checking the server time changes due to the daylight saving time (DST) changeover - script for MetaTrader 5/logo-2.png differ diff --git a/Checking the server time changes due to the daylight saving time (DST) changeover - script for MetaTrader 5/script.png b/Checking the server time changes due to the daylight saving time (DST) changeover - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Checking the server time changes due to the daylight saving time (DST) changeover - script for MetaTrader 5/script.png differ diff --git a/Checking the server time changes due to the daylight saving time (DST) changeover - script for MetaTrader 5/test_weekenddata.mq5 b/Checking the server time changes due to the daylight saving time (DST) changeover - script for MetaTrader 5/test_weekenddata.mq5 new file mode 100644 index 0000000..edfe38e Binary files /dev/null and b/Checking the server time changes due to the daylight saving time (DST) changeover - script for MetaTrader 5/test_weekenddata.mq5 differ diff --git a/Clean up all drawings ( Delete All Object Comment etc ) - script for MetaTrader 5/README.md b/Clean up all drawings ( Delete All Object Comment etc ) - script for MetaTrader 5/README.md new file mode 100644 index 0000000..2aa4ef5 --- /dev/null +++ b/Clean up all drawings ( Delete All Object Comment etc ) - script for MetaTrader 5/README.md @@ -0,0 +1,19 @@ +# 🚀 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](script.png) + +## Source Files +- `clean_up_all_drawings_z_delete_all_object_comment_etc_j.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Clean up all drawings ( Delete All Object Comment etc ) - script for MetaTrader 5/clean_up_all_drawings_z_delete_all_object_comment_etc_j.mq5 b/Clean up all drawings ( Delete All Object Comment etc ) - script for MetaTrader 5/clean_up_all_drawings_z_delete_all_object_comment_etc_j.mq5 new file mode 100644 index 0000000..b694e13 --- /dev/null +++ b/Clean up all drawings ( Delete All Object Comment etc ) - script for MetaTrader 5/clean_up_all_drawings_z_delete_all_object_comment_etc_j.mq5 @@ -0,0 +1,19 @@ +//+------------------------------------------------------------------+ +//| Clean up all drawings ( Delete All Object Comment etc ).mq5 | +//| Dwi Sudarsono | +//| https://t.me/DwiSudarsono | +//+------------------------------------------------------------------+ +#property copyright "Dwi Sudarsono" +#property link "https://t.me/DwiSudarsono" +#property version "1.00" +#property description "Clean up all drawings ( Delete All Object Comment etc )" +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() + { +//--- + ObjectsDeleteAll(0); + Comment(""); + } +//+------------------------------------------------------------------+ diff --git a/Clean up all drawings ( Delete All Object Comment etc ) - script for MetaTrader 5/indicator.png b/Clean up all drawings ( Delete All Object Comment etc ) - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Clean up all drawings ( Delete All Object Comment etc ) - script for MetaTrader 5/indicator.png differ diff --git a/Clean up all drawings ( Delete All Object Comment etc ) - script for MetaTrader 5/logo-2.png b/Clean up all drawings ( Delete All Object Comment etc ) - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Clean up all drawings ( Delete All Object Comment etc ) - script for MetaTrader 5/logo-2.png differ diff --git a/Clean up all drawings ( Delete All Object Comment etc ) - script for MetaTrader 5/script.png b/Clean up all drawings ( Delete All Object Comment etc ) - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Clean up all drawings ( Delete All Object Comment etc ) - script for MetaTrader 5/script.png differ diff --git a/Clipboard - script for MetaTrader 5/Clipboard__1.jpg b/Clipboard - script for MetaTrader 5/Clipboard__1.jpg new file mode 100644 index 0000000..f6a5e0b Binary files /dev/null and b/Clipboard - script for MetaTrader 5/Clipboard__1.jpg differ diff --git a/Clipboard - script for MetaTrader 5/README.md b/Clipboard - script for MetaTrader 5/README.md new file mode 100644 index 0000000..bb4480f --- /dev/null +++ b/Clipboard - script for MetaTrader 5/README.md @@ -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](Clipboard__1.jpg) +![Screenshot](script.png) + +## Source Files +- `clipboard.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Clipboard - script for MetaTrader 5/clipboard.mq5 b/Clipboard - script for MetaTrader 5/clipboard.mq5 new file mode 100644 index 0000000..110f94b --- /dev/null +++ b/Clipboard - script for MetaTrader 5/clipboard.mq5 @@ -0,0 +1,59 @@ +//+------------------------------------------------------------------+ +//| Clipboard.mq4 | +//| PavelIvanovich(api) | +//| p231970@hotmail.com | +//| MQL5 version and unicode support by Alexey Sergeev | +//| profy.mql@gmail.com | +//+------------------------------------------------------------------+ +#property version "1.00" +#property description "Getting contents of the clipboard" + +#import "user32.dll" +bool OpenClipboard(int hwnd); +int GetClipboardData(int uFormat); +bool CloseClipboard(); +int GetAncestor(long hWnd,int gaFlags); +int GetAncestor(int hWnd,int gaFlags); +#import "kernel32.dll" +int GlobalLock(int hMem); +bool GlobalUnlock(int hMem); +string lstrcatW(int dst,string src); +#import +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +int OnStart() + { + int hMain; + string clip=""; +//--- + if(_IsX64) + hMain=GetAncestor(ChartGetInteger(ChartID(),CHART_WINDOW_HANDLE),2); + else + hMain=GetAncestor((int)ChartGetInteger(ChartID(),CHART_WINDOW_HANDLE),2); +//--- + if(OpenClipboard(hMain)) + { + int hglb=GetClipboardData(1/*CF_TEXT*/); + if(hglb!=0) + { + int lptstr=GlobalLock(hglb); + + if(lptstr!=0) { clip=lstrcatW(lptstr,""); GlobalUnlock(hglb); } + } + CloseClipboard(); + } + +// translate ANSI to UNICODE + ushort chW; uchar chA; string rez; + for(int i=0; i>8&255); rez=rez+CharToString(chA); + } + + MessageBox("Clipboard: \n"+rez,"Clipboard"); + return(0); + } +//+------------------------------------------------------------------+ diff --git a/Clipboard - script for MetaTrader 5/expert.png b/Clipboard - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/Clipboard - script for MetaTrader 5/expert.png differ diff --git a/Clipboard - script for MetaTrader 5/indicator.png b/Clipboard - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Clipboard - script for MetaTrader 5/indicator.png differ diff --git a/Clipboard - script for MetaTrader 5/logo-2.png b/Clipboard - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Clipboard - script for MetaTrader 5/logo-2.png differ diff --git a/Clipboard - script for MetaTrader 5/script.png b/Clipboard - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Clipboard - script for MetaTrader 5/script.png differ diff --git a/Close All Orders and Positions - script for MetaTrader 5/README.md b/Close All Orders and Positions - script for MetaTrader 5/README.md new file mode 100644 index 0000000..460672c --- /dev/null +++ b/Close All Orders and Positions - script for MetaTrader 5/README.md @@ -0,0 +1,19 @@ +# 🚀 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](script.png) + +## Source Files +- `close_all_orders_and_positions.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Close All Orders and Positions - script for MetaTrader 5/close_all_orders_and_positions.mq5 b/Close All Orders and Positions - script for MetaTrader 5/close_all_orders_and_positions.mq5 new file mode 100644 index 0000000..d923764 --- /dev/null +++ b/Close All Orders and Positions - script for MetaTrader 5/close_all_orders_and_positions.mq5 @@ -0,0 +1,74 @@ +//+------------------------------------------------------------------+ +//| CloseAll.mq5 | +//| Copyright 2021, Omega Joctan | +//| https://www.mql5.com/en/users/omegajoctan | +//+------------------------------------------------------------------+ +#property copyright "Copyright 2021, Omega Joctan" +#property link "https://www.mql5.com/en/users/omegajoctan" +#property version "1.00" +//--- +#include //Instatiate Trades Execution Library +#include //Instatiate Library for Orders Information +#include //Instatiate Library for Positions Information +//--- +CTrade m_trade; // Trades Info and Executions library +COrderInfo m_order; //Library for Orders information +CPositionInfo m_position; // Library for all position features and information +//--- +input color OrdersColor = clrDodgerBlue; // Orders counter color on the chart +input color PositionsColor = clrGreenYellow; //Positions counter color on the chart +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() + { +//--- + + ChartWrite("Positions", "Positions " + (string)PositionsTotal(), 100, 80, 20, clrGreen); // write number of positions on the chart + ChartWrite("Orders", "Orders " + (string)OrdersTotal(), 100, 50, 20, clrDodgerBlue); //Write Number of Orders on the Chart + + { + for(int i = PositionsTotal() - 1; i >= 0; i--) // loop all Open Positions + if(m_position.SelectByIndex(i)) // select a position + { + m_trade.PositionClose(m_position.Ticket()); // then close it --period + Sleep(100); // Relax for 100 ms + ChartWrite("Positions", "Positions " + (string)PositionsTotal(), 100, 80, 20, PositionsColor); //Re write number of positions on the chart + } + ObjectDelete(0, "Positions"); //delete a Position Object + } +//--- + { + for(int i = OrdersTotal() - 1; i >= 0; i--) // loop all Orders + if(m_order.SelectByIndex(i)) // select an order + { + m_trade.OrderDelete(m_order.Ticket()); // then delete it --period + Sleep(100); // Relax for 100 ms + ChartWrite("Orders", "Orders " + (string)OrdersTotal(), 100, 80, 20, OrdersColor); //Re write number of positions on the chart + } + ObjectDelete(0, "Orders"); + } + } +//+------------------------------------------------------------------+ +//| | +//+------------------------------------------------------------------+ +void ChartWrite(string name, + string comment, + int x_distance, + int y_distance, + int FontSize, + color clr) + { + ObjectCreate(0, name, OBJ_LABEL, 0, 0, 0); + ObjectSetInteger(0, name, OBJPROP_CORNER, CORNER_LEFT_UPPER); + ObjectSetInteger(0, name, OBJPROP_COLOR, clr); + ObjectSetString(0, name, OBJPROP_TEXT, comment); + ObjectSetInteger(0, name, OBJPROP_FONTSIZE, FontSize); + ObjectSetString(0, name, OBJPROP_FONT, "Lucida Console"); + ObjectSetInteger(0, name, OBJPROP_SELECTABLE, false); + ObjectSetInteger(0, name, OBJPROP_XDISTANCE, x_distance); + ObjectSetInteger(0, name, OBJPROP_YDISTANCE, y_distance); + } +//+------------------------------------------------------------------+ +//| | +//+------------------------------------------------------------------+ diff --git a/Close All Orders and Positions - script for MetaTrader 5/indicator.png b/Close All Orders and Positions - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Close All Orders and Positions - script for MetaTrader 5/indicator.png differ diff --git a/Close All Orders and Positions - script for MetaTrader 5/logo-2.png b/Close All Orders and Positions - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Close All Orders and Positions - script for MetaTrader 5/logo-2.png differ diff --git a/Close All Orders and Positions - script for MetaTrader 5/script.png b/Close All Orders and Positions - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Close All Orders and Positions - script for MetaTrader 5/script.png differ diff --git a/Close All Windows - script for MetaTrader 5/README.md b/Close All Windows - script for MetaTrader 5/README.md new file mode 100644 index 0000000..e173447 --- /dev/null +++ b/Close All Windows - script for MetaTrader 5/README.md @@ -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](mql5.png) +![Screenshot](script.png) + +## Source Files +- `close_all_windows.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Close All Windows - script for MetaTrader 5/close_all_windows.mq5 b/Close All Windows - script for MetaTrader 5/close_all_windows.mq5 new file mode 100644 index 0000000..ab2acbb --- /dev/null +++ b/Close All Windows - script for MetaTrader 5/close_all_windows.mq5 @@ -0,0 +1,29 @@ +//+------------------------------------------------------------------+ +//| Close_All_Windows.mq5 | +//| Copyright 2015, Daniel Osuna de la Rosa, Alias: _de_la_Rosa. | +//| https://www.mql5.com/en/users/_de_la_rosa | +//+------------------------------------------------------------------+ +#property copyright "Copyright 2015, Daniel Osuna de la Rosa, Alias: _de_la_Rosa" +#property link "https://www.mql5.com/en/users/_de_la_rosa" +#property version "1.00" +#property script_show_inputs + +//--- Inputs +input string NameSymbol="EURUSD";// Close Windows of this Symbol +input bool CloseAllSymbols=false; //Close All Windows +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() + { +//--- Chart Id. + long idchart=ChartFirst(); +//--- Check Window Symbol, close and get the next Window Id + while(idchart!=-1) + { + if(CloseAllSymbols==true)ChartClose(idchart); + else if(ChartSymbol(idchart)==NameSymbol) ChartClose(idchart); + idchart=ChartNext(idchart); + } + } +//+------------------------------------------------------------------+ diff --git a/Close All Windows - script for MetaTrader 5/expert.png b/Close All Windows - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/Close All Windows - script for MetaTrader 5/expert.png differ diff --git a/Close All Windows - script for MetaTrader 5/indicator.png b/Close All Windows - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Close All Windows - script for MetaTrader 5/indicator.png differ diff --git a/Close All Windows - script for MetaTrader 5/logo-2.png b/Close All Windows - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Close All Windows - script for MetaTrader 5/logo-2.png differ diff --git a/Close All Windows - script for MetaTrader 5/mql5.png b/Close All Windows - script for MetaTrader 5/mql5.png new file mode 100644 index 0000000..cb81453 Binary files /dev/null and b/Close All Windows - script for MetaTrader 5/mql5.png differ diff --git a/Close All Windows - script for MetaTrader 5/script.png b/Close All Windows - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Close All Windows - script for MetaTrader 5/script.png differ diff --git a/Close-All - script for MetaTrader 5/Capture__6.PNG b/Close-All - script for MetaTrader 5/Capture__6.PNG new file mode 100644 index 0000000..70e49de Binary files /dev/null and b/Close-All - script for MetaTrader 5/Capture__6.PNG differ diff --git a/Close-All - script for MetaTrader 5/README.md b/Close-All - script for MetaTrader 5/README.md new file mode 100644 index 0000000..1f88e09 --- /dev/null +++ b/Close-All - script for MetaTrader 5/README.md @@ -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](Capture__6.PNG) +![Screenshot](script.png) + +## Source Files +- `dummy.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Close-All - script for MetaTrader 5/dummy.mq5 b/Close-All - script for MetaTrader 5/dummy.mq5 new file mode 100644 index 0000000..27e09ad Binary files /dev/null and b/Close-All - script for MetaTrader 5/dummy.mq5 differ diff --git a/Close-All - script for MetaTrader 5/indicator.png b/Close-All - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Close-All - script for MetaTrader 5/indicator.png differ diff --git a/Close-All - script for MetaTrader 5/logo-2.png b/Close-All - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Close-All - script for MetaTrader 5/logo-2.png differ diff --git a/Close-All - script for MetaTrader 5/script.png b/Close-All - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Close-All - script for MetaTrader 5/script.png differ diff --git a/CloseAll FIFO - script for MetaTrader 5/README.md b/CloseAll FIFO - script for MetaTrader 5/README.md new file mode 100644 index 0000000..9e75dc1 --- /dev/null +++ b/CloseAll FIFO - script for MetaTrader 5/README.md @@ -0,0 +1,19 @@ +# 🚀 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](script.png) + +## Source Files +- `closeall_fifo.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/CloseAll FIFO - script for MetaTrader 5/closeall_fifo.mq5 b/CloseAll FIFO - script for MetaTrader 5/closeall_fifo.mq5 new file mode 100644 index 0000000..c61e3fe Binary files /dev/null and b/CloseAll FIFO - script for MetaTrader 5/closeall_fifo.mq5 differ diff --git a/CloseAll FIFO - script for MetaTrader 5/expert.png b/CloseAll FIFO - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/CloseAll FIFO - script for MetaTrader 5/expert.png differ diff --git a/CloseAll FIFO - script for MetaTrader 5/indicator.png b/CloseAll FIFO - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/CloseAll FIFO - script for MetaTrader 5/indicator.png differ diff --git a/CloseAll FIFO - script for MetaTrader 5/logo-2.png b/CloseAll FIFO - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/CloseAll FIFO - script for MetaTrader 5/logo-2.png differ diff --git a/CloseAll FIFO - script for MetaTrader 5/script.png b/CloseAll FIFO - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/CloseAll FIFO - script for MetaTrader 5/script.png differ diff --git a/CloseAllOrders - script for MetaTrader 5/README.md b/CloseAllOrders - script for MetaTrader 5/README.md new file mode 100644 index 0000000..abae616 --- /dev/null +++ b/CloseAllOrders - script for MetaTrader 5/README.md @@ -0,0 +1,19 @@ +# 🚀 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](script.png) + +## Source Files +- `closeallorders.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/CloseAllOrders - script for MetaTrader 5/closeallorders.mq5 b/CloseAllOrders - script for MetaTrader 5/closeallorders.mq5 new file mode 100644 index 0000000..6612dea Binary files /dev/null and b/CloseAllOrders - script for MetaTrader 5/closeallorders.mq5 differ diff --git a/CloseAllOrders - script for MetaTrader 5/expert.png b/CloseAllOrders - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/CloseAllOrders - script for MetaTrader 5/expert.png differ diff --git a/CloseAllOrders - script for MetaTrader 5/logo-2.png b/CloseAllOrders - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/CloseAllOrders - script for MetaTrader 5/logo-2.png differ diff --git a/CloseAllOrders - script for MetaTrader 5/script.png b/CloseAllOrders - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/CloseAllOrders - script for MetaTrader 5/script.png differ diff --git a/CloseAllPositions - script for MetaTrader 5/CloseAllPositions.png b/CloseAllPositions - script for MetaTrader 5/CloseAllPositions.png new file mode 100644 index 0000000..a4f8054 Binary files /dev/null and b/CloseAllPositions - script for MetaTrader 5/CloseAllPositions.png differ diff --git a/CloseAllPositions - script for MetaTrader 5/README.md b/CloseAllPositions - script for MetaTrader 5/README.md new file mode 100644 index 0000000..7f3c4b4 --- /dev/null +++ b/CloseAllPositions - script for MetaTrader 5/README.md @@ -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](CloseAllPositions.png) +![Screenshot](script.png) + +## Source Files +- `closeallpositions.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/CloseAllPositions - script for MetaTrader 5/closeallpositions.mq5 b/CloseAllPositions - script for MetaTrader 5/closeallpositions.mq5 new file mode 100644 index 0000000..f9863a1 Binary files /dev/null and b/CloseAllPositions - script for MetaTrader 5/closeallpositions.mq5 differ diff --git a/CloseAllPositions - script for MetaTrader 5/expert.png b/CloseAllPositions - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/CloseAllPositions - script for MetaTrader 5/expert.png differ diff --git a/CloseAllPositions - script for MetaTrader 5/indicator.png b/CloseAllPositions - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/CloseAllPositions - script for MetaTrader 5/indicator.png differ diff --git a/CloseAllPositions - script for MetaTrader 5/logo-2.png b/CloseAllPositions - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/CloseAllPositions - script for MetaTrader 5/logo-2.png differ diff --git a/CloseAllPositions - script for MetaTrader 5/script.png b/CloseAllPositions - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/CloseAllPositions - script for MetaTrader 5/script.png differ diff --git a/CloseOrdersBySymbol - script for MetaTrader 5/README.md b/CloseOrdersBySymbol - script for MetaTrader 5/README.md new file mode 100644 index 0000000..f9ed990 --- /dev/null +++ b/CloseOrdersBySymbol - script for MetaTrader 5/README.md @@ -0,0 +1,19 @@ +# 🚀 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](script.png) + +## Source Files +- `closeordersbysymbol.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/CloseOrdersBySymbol - script for MetaTrader 5/closeordersbysymbol.mq5 b/CloseOrdersBySymbol - script for MetaTrader 5/closeordersbysymbol.mq5 new file mode 100644 index 0000000..289eaba Binary files /dev/null and b/CloseOrdersBySymbol - script for MetaTrader 5/closeordersbysymbol.mq5 differ diff --git a/CloseOrdersBySymbol - script for MetaTrader 5/expert.png b/CloseOrdersBySymbol - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/CloseOrdersBySymbol - script for MetaTrader 5/expert.png differ diff --git a/CloseOrdersBySymbol - script for MetaTrader 5/indicator.png b/CloseOrdersBySymbol - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/CloseOrdersBySymbol - script for MetaTrader 5/indicator.png differ diff --git a/CloseOrdersBySymbol - script for MetaTrader 5/logo-2.png b/CloseOrdersBySymbol - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/CloseOrdersBySymbol - script for MetaTrader 5/logo-2.png differ diff --git a/CloseOrdersBySymbol - script for MetaTrader 5/script.png b/CloseOrdersBySymbol - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/CloseOrdersBySymbol - script for MetaTrader 5/script.png differ diff --git a/CloseOrdersBySymbolByType - script for MetaTrader 5/README.md b/CloseOrdersBySymbolByType - script for MetaTrader 5/README.md new file mode 100644 index 0000000..cbe0aca --- /dev/null +++ b/CloseOrdersBySymbolByType - script for MetaTrader 5/README.md @@ -0,0 +1,19 @@ +# 🚀 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](script.png) + +## Source Files +- `closeordersbysymbolbytype.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/CloseOrdersBySymbolByType - script for MetaTrader 5/closeordersbysymbolbytype.mq5 b/CloseOrdersBySymbolByType - script for MetaTrader 5/closeordersbysymbolbytype.mq5 new file mode 100644 index 0000000..0b81347 Binary files /dev/null and b/CloseOrdersBySymbolByType - script for MetaTrader 5/closeordersbysymbolbytype.mq5 differ diff --git a/CloseOrdersBySymbolByType - script for MetaTrader 5/expert.png b/CloseOrdersBySymbolByType - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/CloseOrdersBySymbolByType - script for MetaTrader 5/expert.png differ diff --git a/CloseOrdersBySymbolByType - script for MetaTrader 5/indicator.png b/CloseOrdersBySymbolByType - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/CloseOrdersBySymbolByType - script for MetaTrader 5/indicator.png differ diff --git a/CloseOrdersBySymbolByType - script for MetaTrader 5/logo-2.png b/CloseOrdersBySymbolByType - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/CloseOrdersBySymbolByType - script for MetaTrader 5/logo-2.png differ diff --git a/CloseOrdersBySymbolByType - script for MetaTrader 5/script.png b/CloseOrdersBySymbolByType - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/CloseOrdersBySymbolByType - script for MetaTrader 5/script.png differ diff --git a/ClosePosition - script for MetaTrader 5/README.md b/ClosePosition - script for MetaTrader 5/README.md new file mode 100644 index 0000000..4ae4af5 --- /dev/null +++ b/ClosePosition - script for MetaTrader 5/README.md @@ -0,0 +1,19 @@ +# 🚀 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](script.png) + +## Source Files +- `closeposition.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/ClosePosition - script for MetaTrader 5/closeposition.mq5 b/ClosePosition - script for MetaTrader 5/closeposition.mq5 new file mode 100644 index 0000000..4b0b868 --- /dev/null +++ b/ClosePosition - script for MetaTrader 5/closeposition.mq5 @@ -0,0 +1,342 @@ +//+------------------------------------------------------------------+ +//| ClosePosition.mq5 | +//| Copyright 2012, Nikolay Kositsin | +//| Khabarovsk, farria@mail.redcom.ru | +//+------------------------------------------------------------------+ +#property copyright "Copyright 2012, Nikolay Kositsin" +#property link "farria@mail.redcom.ru" +//---- script version number +#property version "1.01" +//---- show the input parameters +#property script_show_inputs +//+----------------------------------------------+ +//| INPUT PARAMETERS OF THE SCRIPT | +//+----------------------------------------------+ +input double VOLUME=1.0; // The volume of the closed position in relation to the initial +input int DEVIATION=10; // Price deviation +input uint RTOTAL=4; // The number of repeats on unsuccessful transactions +input uint SLEEPTIME=1; // Pause time in seconds between repeats +//+------------------------------------------------------------------+ +//| start function | +//+------------------------------------------------------------------+ +void OnStart() + { +//---- + if(VOLUME>1) + { + Print("The volume of a closed position can not be larger than the initial position!"); + return; + } + + for(uint count=0; count<=RTOTAL && !IsStopped(); count++) + { + uint result=ClosePosition(Symbol(),VOLUME,DEVIATION); + if(ResultRetcodeCheck(result)) break; + else Sleep(SLEEPTIME*1000); + } +//---- + } +//+------------------------------------------------------------------+ +//| Closing a trading position. | +//+------------------------------------------------------------------+ +uint ClosePosition +( + const string symbol, + double Volume, + uint deviation + ) +//ClosePosition(symbol, Volume, deviation); +//+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+ + { +//---- Checking, if there is an open position + ENUM_POSITION_TYPE PosType; + if(PositionSelect(symbol)) PosType=ENUM_POSITION_TYPE(PositionGetInteger(POSITION_TYPE)); + else return(TRADE_RETCODE_DONE); + + if(PosType!=POSITION_TYPE_BUY && PosType!=POSITION_TYPE_SELL) return(TRADE_RETCODE_DONE); + +//---- Declare structures of trade request and result of trade request + MqlTradeRequest request; + MqlTradeCheckResult check; + MqlTradeResult result; + +//---- nulling the structures + ZeroMemory(request); + ZeroMemory(result); + ZeroMemory(check); +//---- + double price; + string sType; + int digit=int(SymbolInfoInteger(symbol,SYMBOL_DIGITS)); + double point=SymbolInfoDouble(symbol,SYMBOL_POINT); + double Ask=SymbolInfoDouble(symbol, SYMBOL_ASK); + double Bid=SymbolInfoDouble(symbol, SYMBOL_BID); + double lot=PositionGetDouble(POSITION_VOLUME); + double MaxLot=SymbolInfoDouble(symbol,SYMBOL_VOLUME_MAX); + if(!digit || !point || !Ask || !Bid || !lot || !MaxLot) return(TRADE_RETCODE_ERROR); + if(lot>MaxLot) + { + string word=""; + StringConcatenate(word,__FUNCTION__,"(): <<< The script is closes the position by ", + symbol," only with a maximum volume ",DoubleToString(MaxLot,2),"! >>>"); + Print(word); + PlaySound("timeout.wav"); + return(TRADE_RETCODE_DONE); + } + +//---- Initializing structure of the MqlTradeRequest to open position + if(PosType==POSITION_TYPE_SELL) + { + request.type=ORDER_TYPE_BUY; + price=Ask; + sType="BUY"; + } + + if(PosType==POSITION_TYPE_BUY) + { + request.type=ORDER_TYPE_SELL; + price=Bid; + sType="SELL"; + } + + lot*=Volume; + if(!LotCorrect(symbol,lot,PosType) || !lot) + { + PlaySound("timeout.wav"); + return(TRADE_RETCODE_ERROR); + } + + request.price = price; + request.action = TRADE_ACTION_DEAL; + request.symbol = symbol; + request.volume = lot; +//---- + request.deviation=deviation; + request.type_filling=ORDER_FILLING_FOK; + +//---- Checking correctness of a trade request + if(!OrderCheck(request,check)) + { + Print(__FUNCTION__,"(): OrderCheck(): ",ResultRetcodeDescription(check.retcode)); + return(TRADE_RETCODE_INVALID); + } + + string word=""; + StringConcatenate(word,__FUNCTION__,"(): <<< Overturn ",sType," position by ",symbol,"! >>>"); + Print(word); + + word=__FUNCTION__+"(): OrderSend(): "; + +//---- Close position and check the result of trade request + if(!OrderSend(request,result) || result.retcode!=TRADE_RETCODE_DONE) + { + Print(word,"<<< Failed to ",sType," position by ",symbol,"!!! >>>"); + Print(word,ResultRetcodeDescription(result.retcode)); + PlaySound("timeout.wav"); + return(result.retcode); + } + else + if(result.retcode==TRADE_RETCODE_DONE) + { + Print(word,"<<< ",sType," position by ",symbol," is closed! >>>"); + PlaySound("ok.wav"); + } + else + { + Print(word,"<<< Failed to ",sType," position by ",symbol,"!!! >>>"); + PlaySound("timeout.wav"); + return(TRADE_RETCODE_ERROR); + } +//---- + return(TRADE_RETCODE_DONE); + } +//+------------------------------------------------------------------+ +//| correction of a pending order size to an acceptable value | +//+------------------------------------------------------------------+ +bool StopCorrect(string symbol,int &Stop) + { +//---- + int Extrem_Stop=int(SymbolInfoInteger(symbol,SYMBOL_TRADE_STOPS_LEVEL)); + if(!Extrem_Stop) return(false); + if(StopMaxLot) Lot=MaxLot; + +//---- checking the funds sufficiency + if(!LotFreeMarginCorrect(symbol,Lot,trade_operation))return(false); +//---- + return(true); + } +//+------------------------------------------------------------------+ +//| LotFreeMarginCorrect() function | +//+------------------------------------------------------------------+ +bool LotFreeMarginCorrect +( + string symbol, + double &Lot, + ENUM_POSITION_TYPE trade_operation + ) +//(string symbol, double& Lot, ENUM_POSITION_TYPE trade_operation) +//+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+ + { +//---- +//---- checking the funds sufficiency + double freemargin=AccountInfoDouble(ACCOUNT_FREEMARGIN); + if(freemargin<=0) return(false); + double LOTSTEP=SymbolInfoDouble(symbol,SYMBOL_VOLUME_STEP); + double MinLot=SymbolInfoDouble(symbol,SYMBOL_VOLUME_MIN); + if(!LOTSTEP || !MinLot) return(0); + double maxLot=GetLotForOpeningPos(symbol,trade_operation,freemargin); +//---- normalizing the lot size to the nearest standard value + maxLot=LOTSTEP*MathFloor(maxLot/LOTSTEP); + if(maxLotmaxLot) Lot=maxLot; +//---- + return(true); + } +//+------------------------------------------------------------------+ +//| Lot size calculation for opening a position with lot_margin | +//+------------------------------------------------------------------+ +double GetLotForOpeningPos(string symbol,ENUM_POSITION_TYPE direction,double lot_margin) + { +//---- + double price=0.0,n_margin; + if(direction==POSITION_TYPE_BUY) price=SymbolInfoDouble(symbol,SYMBOL_ASK); + if(direction==POSITION_TYPE_SELL) price=SymbolInfoDouble(symbol,SYMBOL_BID); + if(!price) return(NULL); + + if(!OrderCalcMargin(ENUM_ORDER_TYPE(direction),symbol,1,price,n_margin) || !n_margin) return(0); + double lot=lot_margin/n_margin; + +//---- get trade constants + double LOTSTEP=SymbolInfoDouble(symbol,SYMBOL_VOLUME_STEP); + double MaxLot=SymbolInfoDouble(symbol,SYMBOL_VOLUME_MAX); + double MinLot=SymbolInfoDouble(symbol,SYMBOL_VOLUME_MIN); + if(!LOTSTEP || !MaxLot || !MinLot) return(0); + +//---- normalizing the lot size to the nearest standard value + lot=LOTSTEP*MathFloor(lot/LOTSTEP); + +//---- checking the lot for the minimum allowable value + if(lotMaxLot) lot=MaxLot; +//---- + return(lot); + } +//+------------------------------------------------------------------+ +//| Returning a string result of a trading operation by its code | +//+------------------------------------------------------------------+ +string ResultRetcodeDescription(int retcode) + { + string str; +//---- + switch(retcode) + { + case TRADE_RETCODE_REQUOTE: str="Requote"; break; + case TRADE_RETCODE_REJECT: str="Request rejected"; break; + case TRADE_RETCODE_CANCEL: str="Request cancelled by trader"; break; + case TRADE_RETCODE_PLACED: str="Order is placed"; break; + case TRADE_RETCODE_DONE: str="Request is executed"; break; + case TRADE_RETCODE_DONE_PARTIAL: str="Request is executed partially"; break; + case TRADE_RETCODE_ERROR: str="Request processing error"; break; + case TRADE_RETCODE_TIMEOUT: str="Request is cancelled because of a time out";break; + case TRADE_RETCODE_INVALID: str="Invalid request"; break; + case TRADE_RETCODE_INVALID_VOLUME: str="Invalid request volume"; break; + case TRADE_RETCODE_INVALID_PRICE: str="Invalid request price"; break; + case TRADE_RETCODE_INVALID_STOPS: str="Invalid request stops"; break; + case TRADE_RETCODE_TRADE_DISABLED: str="Trading is forbidden"; break; + case TRADE_RETCODE_MARKET_CLOSED: str="Market is closed"; break; + case TRADE_RETCODE_NO_MONEY: str="Insufficient funds for request execution"; break; + case TRADE_RETCODE_PRICE_CHANGED: str="Prices have changed"; break; + case TRADE_RETCODE_PRICE_OFF: str="No quotes for request processing"; break; + case TRADE_RETCODE_INVALID_EXPIRATION: str="Invalid order expiration date in the request"; break; + case TRADE_RETCODE_ORDER_CHANGED: str="Order state has changed"; break; + case TRADE_RETCODE_TOO_MANY_REQUESTS: str="Too many requests"; break; + case TRADE_RETCODE_NO_CHANGES: str="No changes in the request"; break; + case TRADE_RETCODE_SERVER_DISABLES_AT: str="Autotrading is disabled by the server"; break; + case TRADE_RETCODE_CLIENT_DISABLES_AT: str="Autotrading is disabled by the client terminal"; break; + case TRADE_RETCODE_LOCKED: str="Request is blocked for processing"; break; + case TRADE_RETCODE_FROZEN: str="Order or position has been frozen"; break; + case TRADE_RETCODE_INVALID_FILL: str="Unsupported type of order execution for the balance is specified "; break; + case TRADE_RETCODE_CONNECTION: str="No connection with trade server"; break; + case TRADE_RETCODE_ONLY_REAL: str="Operation is allowed only for real accounts"; break; + case TRADE_RETCODE_LIMIT_ORDERS: str="Limit for the number of pending orders has been reached"; break; + case TRADE_RETCODE_LIMIT_VOLUME: str="Limit for orders and positions volume for this symbol has been reached"; break; + default: str="Unknown result"; + } +//---- + return(str); + } +//+------------------------------------------------------------------+ +//| returning the result of a trading operation to repeat the | +//| transaction | +//+------------------------------------------------------------------+ +bool ResultRetcodeCheck(int retcode) + { + string str; +//---- + switch(retcode) + { + case TRADE_RETCODE_REQUOTE: /*Requote*/ return(false); break; + case TRADE_RETCODE_REJECT: /*Request rejected*/ return(false); break; + case TRADE_RETCODE_CANCEL: /*Request cancelled by trader*/ return(true); break; + case TRADE_RETCODE_PLACED: /*Order is placed*/ return(true); break; + case TRADE_RETCODE_DONE: /*Request is executed*/ return(true); break; + case TRADE_RETCODE_DONE_PARTIAL: /*Request is executed partially*/ return(true); break; + case TRADE_RETCODE_ERROR: /*Request processing error*/ return(false); break; + case TRADE_RETCODE_TIMEOUT: /*Request is cancelled because of a time out*/ return(false); break; + case TRADE_RETCODE_INVALID: /*Invalid request*/ return(true); break; + case TRADE_RETCODE_INVALID_VOLUME: /*Invalid request volume*/ return(true); break; + case TRADE_RETCODE_INVALID_PRICE: /*Invalid request price*/ return(true); break; + case TRADE_RETCODE_INVALID_STOPS: /*Invalid request stops*/ return(true); break; + case TRADE_RETCODE_TRADE_DISABLED: /*Trading is forbidden*/ return(true); break; + case TRADE_RETCODE_MARKET_CLOSED: /*Market is closed*/ return(true); break; + case TRADE_RETCODE_NO_MONEY: /*Insufficient funds for request execution*/ return(true); break; + case TRADE_RETCODE_PRICE_CHANGED: /*Prices have changed*/ return(false); break; + case TRADE_RETCODE_PRICE_OFF: /*No quotes for request processing*/ return(false); break; + case TRADE_RETCODE_INVALID_EXPIRATION: /*Invalid order expiration date in the request*/ return(true); break; + case TRADE_RETCODE_ORDER_CHANGED: /*Order state has changed*/ return(true); break; + case TRADE_RETCODE_TOO_MANY_REQUESTS: /*Too many requests*/ return(false); break; + case TRADE_RETCODE_NO_CHANGES: /*No changes in the request*/ return(false); break; + case TRADE_RETCODE_SERVER_DISABLES_AT: /*Autotrading is disabled by the server*/ return(true); break; + case TRADE_RETCODE_CLIENT_DISABLES_AT: /*Autotrading is disabled by the client terminal*/ return(true); break; + case TRADE_RETCODE_LOCKED: /*Request is blocked for processing*/ return(true); break; + case TRADE_RETCODE_FROZEN: /*Order or position has been frozen*/ return(false); break; + case TRADE_RETCODE_INVALID_FILL: /*Unsupported type of order execution for the balance is specified */ return(true); break; + case TRADE_RETCODE_CONNECTION: /*No connection with trade server*/ break; + case TRADE_RETCODE_ONLY_REAL: /*Operation is allowed only for real accounts*/ return(true); break; + case TRADE_RETCODE_LIMIT_ORDERS: /*Limit for the number of pending orders has been reached*/ return(true); break; + case TRADE_RETCODE_LIMIT_VOLUME: /*Limit for orders and positions volume for this symbol has been reached*/ return(true); break; + default: /*Unknown result*/ return(false); + } +//---- + return(true); + } +//+------------------------------------------------------------------+ \ No newline at end of file diff --git a/ClosePosition - script for MetaTrader 5/expert.png b/ClosePosition - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/ClosePosition - script for MetaTrader 5/expert.png differ diff --git a/ClosePosition - script for MetaTrader 5/indicator.png b/ClosePosition - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/ClosePosition - script for MetaTrader 5/indicator.png differ diff --git a/ClosePosition - script for MetaTrader 5/logo-2.png b/ClosePosition - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/ClosePosition - script for MetaTrader 5/logo-2.png differ diff --git a/ClosePosition - script for MetaTrader 5/script.png b/ClosePosition - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/ClosePosition - script for MetaTrader 5/script.png differ diff --git a/ClosePositionsBySymbol - script for MetaTrader 5/ClosePositionsBySymbol.png b/ClosePositionsBySymbol - script for MetaTrader 5/ClosePositionsBySymbol.png new file mode 100644 index 0000000..44c2488 Binary files /dev/null and b/ClosePositionsBySymbol - script for MetaTrader 5/ClosePositionsBySymbol.png differ diff --git a/ClosePositionsBySymbol - script for MetaTrader 5/README.md b/ClosePositionsBySymbol - script for MetaTrader 5/README.md new file mode 100644 index 0000000..3a4a54a --- /dev/null +++ b/ClosePositionsBySymbol - script for MetaTrader 5/README.md @@ -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](ClosePositionsBySymbol.png) +![Screenshot](script.png) + +## Source Files +- `closepositionsbysymbol.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/ClosePositionsBySymbol - script for MetaTrader 5/closepositionsbysymbol.mq5 b/ClosePositionsBySymbol - script for MetaTrader 5/closepositionsbysymbol.mq5 new file mode 100644 index 0000000..248c213 Binary files /dev/null and b/ClosePositionsBySymbol - script for MetaTrader 5/closepositionsbysymbol.mq5 differ diff --git a/ClosePositionsBySymbol - script for MetaTrader 5/indicator.png b/ClosePositionsBySymbol - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/ClosePositionsBySymbol - script for MetaTrader 5/indicator.png differ diff --git a/ClosePositionsBySymbol - script for MetaTrader 5/logo-2.png b/ClosePositionsBySymbol - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/ClosePositionsBySymbol - script for MetaTrader 5/logo-2.png differ diff --git a/ClosePositionsBySymbol - script for MetaTrader 5/script.png b/ClosePositionsBySymbol - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/ClosePositionsBySymbol - script for MetaTrader 5/script.png differ diff --git a/Code To Check And Delete Chart Objects For MT5 - script for MetaTrader 5/Chart_After_Objects_Deletion__2.PNG b/Code To Check And Delete Chart Objects For MT5 - script for MetaTrader 5/Chart_After_Objects_Deletion__2.PNG new file mode 100644 index 0000000..c296854 Binary files /dev/null and b/Code To Check And Delete Chart Objects For MT5 - script for MetaTrader 5/Chart_After_Objects_Deletion__2.PNG differ diff --git a/Code To Check And Delete Chart Objects For MT5 - script for MetaTrader 5/Chart_With_Objects__2.PNG b/Code To Check And Delete Chart Objects For MT5 - script for MetaTrader 5/Chart_With_Objects__2.PNG new file mode 100644 index 0000000..6e28e95 Binary files /dev/null and b/Code To Check And Delete Chart Objects For MT5 - script for MetaTrader 5/Chart_With_Objects__2.PNG differ diff --git a/Code To Check And Delete Chart Objects For MT5 - script for MetaTrader 5/Log_of_the_Check_And_Delete_Chart_Object_Script__2.PNG b/Code To Check And Delete Chart Objects For MT5 - script for MetaTrader 5/Log_of_the_Check_And_Delete_Chart_Object_Script__2.PNG new file mode 100644 index 0000000..d388873 Binary files /dev/null and b/Code To Check And Delete Chart Objects For MT5 - script for MetaTrader 5/Log_of_the_Check_And_Delete_Chart_Object_Script__2.PNG differ diff --git a/Code To Check And Delete Chart Objects For MT5 - script for MetaTrader 5/README.md b/Code To Check And Delete Chart Objects For MT5 - script for MetaTrader 5/README.md new file mode 100644 index 0000000..0990dc4 --- /dev/null +++ b/Code To Check And Delete Chart Objects For MT5 - script for MetaTrader 5/README.md @@ -0,0 +1,23 @@ +# 🚀 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](Chart_After_Objects_Deletion__2.PNG) +![Screenshot](Chart_With_Objects__2.PNG) +![Screenshot](library.png) +![Screenshot](Log_of_the_Check_And_Delete_Chart_Object_Script__2.PNG) +![Screenshot](script.png) + +## Source Files +- `check_and_delete_chart_object_script.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Code To Check And Delete Chart Objects For MT5 - script for MetaTrader 5/check_and_delete_chart_object_script.mq5 b/Code To Check And Delete Chart Objects For MT5 - script for MetaTrader 5/check_and_delete_chart_object_script.mq5 new file mode 100644 index 0000000..b0b1dbf --- /dev/null +++ b/Code To Check And Delete Chart Objects For MT5 - script for MetaTrader 5/check_and_delete_chart_object_script.mq5 @@ -0,0 +1,61 @@ +//+------------------------------------------------------------------+ +//| Check And Delete Chart Object Script.mq5 +//+------------------------------------------------------------------+ +#property copyright "Chika E. Anumba" +#property link "anumbachika@yahoo.com" +#property version "1.00" +#property description "THE SCRIPT SCANS THROUGH THE CURRENT CHART FOR ANY AVAILABLE CHART OBJECTS, COUNTS THEM AND DELETE THEM ACCORDINGLY" + +/* +Code To Check And Delete Chart Objects For MT5: +- The script scans through the current chart for any available chart objects, +- Counts and delete them accordingly +- And log the the names of the objects on the chart rspectively. + + +*/ +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() + { + Print(" "); + Print(" "); +//calling the function to delete any Chart Object from the current chart + CheckAndDeleteChartObject(_Symbol, _Period); + } +//+------------------------------------------------------------------+ +//+------------------------------------------------------------------+ +//| CheckAndDeleteChartObject() Function | +//+------------------------------------------------------------------+ +void CheckAndDeleteChartObject(string gSymbol, ENUM_TIMEFRAMES TF) + { + long chartID =ChartID(); //declaring the chargt id + + Print("Total Number of Objects on the Current Chart before deletion = ", ObjectsTotal(chartID)); //log the total number of chart objects, if any + + for(int i=ObjectsTotal(chartID)-1;i>=0;i--) //loop through the existing objects on the chart. + { + string OBJECTname =ObjectName(chartID,i); //obtaining the name of a selected object + Print("Object name on the current chart '", gSymbol, " ", EnumToString(TF), "' = ", OBJECTname); //log the name of the selected chart object + + if(ObjectsTotal(chartID) >0) //if chart object exists + { + Print("Chart Object '", OBJECTname, "' is about to be deleted..."); //log the the name of the object for deletion from the chart + + if(ObjectDelete(0, OBJECTname)) //if an object is deleted from the current chart + { + Print("Chart Object '", OBJECTname, ", Deleted Successfully "); //log the deletion of the named chart object + } + else + { + ResetLastError(); + Print("Chart Object '", OBJECTname, ", COULD NOT BE Deleted due to Error# ", GetLastError(), "!!!"); //log the non-deletion of the chart object and obtain the error number + } + } + + Print("Total Number of Chart Objects Remianing after deletion = ", ObjectsTotal(chartID)); //log the total number of the chart objects remaining + Print(" "); + } + }//END of void CheckAndDeleteChartObject(string gSymbol, ENUM_TIMEFRAMES TF) +//+------------------------------------------------------------------+ diff --git a/Code To Check And Delete Chart Objects For MT5 - script for MetaTrader 5/indicator.png b/Code To Check And Delete Chart Objects For MT5 - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Code To Check And Delete Chart Objects For MT5 - script for MetaTrader 5/indicator.png differ diff --git a/Code To Check And Delete Chart Objects For MT5 - script for MetaTrader 5/library.png b/Code To Check And Delete Chart Objects For MT5 - script for MetaTrader 5/library.png new file mode 100644 index 0000000..5c79a8f Binary files /dev/null and b/Code To Check And Delete Chart Objects For MT5 - script for MetaTrader 5/library.png differ diff --git a/Code To Check And Delete Chart Objects For MT5 - script for MetaTrader 5/logo-2.png b/Code To Check And Delete Chart Objects For MT5 - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Code To Check And Delete Chart Objects For MT5 - script for MetaTrader 5/logo-2.png differ diff --git a/Code To Check And Delete Chart Objects For MT5 - script for MetaTrader 5/script.png b/Code To Check And Delete Chart Objects For MT5 - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Code To Check And Delete Chart Objects For MT5 - script for MetaTrader 5/script.png differ diff --git a/Coin Toss Trading - script for MetaTrader 5/README.md b/Coin Toss Trading - script for MetaTrader 5/README.md new file mode 100644 index 0000000..74be2ab --- /dev/null +++ b/Coin Toss Trading - script for MetaTrader 5/README.md @@ -0,0 +1,19 @@ +# 🚀 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](script.png) + +## Source Files +- `cointoss.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Coin Toss Trading - script for MetaTrader 5/cointoss.mq5 b/Coin Toss Trading - script for MetaTrader 5/cointoss.mq5 new file mode 100644 index 0000000..8077689 --- /dev/null +++ b/Coin Toss Trading - script for MetaTrader 5/cointoss.mq5 @@ -0,0 +1,71 @@ +#property copyright "Mokara" +#property link "https://www.mql5.com/en/users/mokara" +#property description "Coin Toss" +#property version "1.0" +#property script_show_inputs true + +#define MAGIC 5050; + +enum TYPE_TRADE +{ + TRADE_SELL = 0, + TRADE_BUY = 1 +}; + +input int Range = 500; //Range in Pips +input double Lots = 0.01; //Lots + +void DrawHLine(string n, int c, int s, double y) +{ + if(ObjectFind(0, n) == 0) ObjectDelete(0, n); + ObjectCreate(0, n, OBJ_HLINE, 0, 0, y); + ObjectSetInteger(0, n, OBJPROP_COLOR, c); + ObjectSetInteger(0, n, OBJPROP_STYLE, s); +} + +void OnStart() +{ + MqlTradeRequest tReq = {0}; + MqlTradeResult tRes = {0}; + int tType = -1; + + MathSrand(GetTickCount()); + tType = int(MathRand() % 2); + + ZeroMemory(tReq); + tReq.symbol = _Symbol; + tReq.volume = Lots; + tReq.action = TRADE_ACTION_DEAL; + tReq.deviation = 5; + tReq.magic = MAGIC; + + switch(tType) + { + case TRADE_SELL: + tReq.type = ORDER_TYPE_SELL; + tReq.price = SymbolInfoDouble(_Symbol, SYMBOL_BID); + tReq.tp = tReq.price - NormalizeDouble(Range * _Point, _Digits); + tReq.sl = tReq.price + NormalizeDouble(Range * _Point, _Digits); + break; + case TRADE_BUY: + tReq.type = ORDER_TYPE_BUY; + tReq.price = SymbolInfoDouble(_Symbol, SYMBOL_ASK); + tReq.tp = tReq.price + NormalizeDouble(Range * _Point, _Digits); + tReq.sl = tReq.price - NormalizeDouble(Range * _Point, _Digits); + break; + default: Print("ERROR: order type. " + GetLastError()); return; + } + + if(!OrderSend(tReq, tRes)) + { + Print("ERROR: order send. " + GetLastError()); + Print(tReq.price); + Print(tReq.tp); + Print(tReq.sl); + return; + } + + DrawHLine("ENTRY", clrAqua, STYLE_DOT, tReq.price); + DrawHLine("TP", clrLime, STYLE_SOLID, tReq.tp); + DrawHLine("SL", clrRed, STYLE_SOLID, tReq.sl); +} \ No newline at end of file diff --git a/Coin Toss Trading - script for MetaTrader 5/logo-2.png b/Coin Toss Trading - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Coin Toss Trading - script for MetaTrader 5/logo-2.png differ diff --git a/Coin Toss Trading - script for MetaTrader 5/script.png b/Coin Toss Trading - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Coin Toss Trading - script for MetaTrader 5/script.png differ diff --git a/Collect Data (Date, Time and Close Price) - script for MetaTrader 5/README.md b/Collect Data (Date, Time and Close Price) - script for MetaTrader 5/README.md new file mode 100644 index 0000000..be97e40 --- /dev/null +++ b/Collect Data (Date, Time and Close Price) - script for MetaTrader 5/README.md @@ -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 +- `grabcloses.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Collect Data (Date, Time and Close Price) - script for MetaTrader 5/grabcloses.mq5 b/Collect Data (Date, Time and Close Price) - script for MetaTrader 5/grabcloses.mq5 new file mode 100644 index 0000000..708a0dc Binary files /dev/null and b/Collect Data (Date, Time and Close Price) - script for MetaTrader 5/grabcloses.mq5 differ diff --git a/Collect Data (Date, Time and Close Price) - script for MetaTrader 5/indicator.png b/Collect Data (Date, Time and Close Price) - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Collect Data (Date, Time and Close Price) - script for MetaTrader 5/indicator.png differ diff --git a/Collect Data (Date, Time and Close Price) - script for MetaTrader 5/library.png b/Collect Data (Date, Time and Close Price) - script for MetaTrader 5/library.png new file mode 100644 index 0000000..5c79a8f Binary files /dev/null and b/Collect Data (Date, Time and Close Price) - script for MetaTrader 5/library.png differ diff --git a/Collect Data (Date, Time and Close Price) - script for MetaTrader 5/logo-2.png b/Collect Data (Date, Time and Close Price) - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Collect Data (Date, Time and Close Price) - script for MetaTrader 5/logo-2.png differ diff --git a/Collect Data (Date, Time and Close Price) - script for MetaTrader 5/script.png b/Collect Data (Date, Time and Close Price) - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Collect Data (Date, Time and Close Price) - script for MetaTrader 5/script.png differ diff --git a/ColorChart - script for MetaTrader 5/README.md b/ColorChart - script for MetaTrader 5/README.md new file mode 100644 index 0000000..fda3ddc --- /dev/null +++ b/ColorChart - script for MetaTrader 5/README.md @@ -0,0 +1,30 @@ +# 🚀 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](Sample1.png) +![Screenshot](Sample10.png) +![Screenshot](Sample2.png) +![Screenshot](Sample3.png) +![Screenshot](Sample4.png) +![Screenshot](Sample5.png) +![Screenshot](Sample6.png) +![Screenshot](Sample7.png) +![Screenshot](Sample8.png) +![Screenshot](Sample9.png) +![Screenshot](script.png) + +## Source Files +- `colorchart.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/ColorChart - script for MetaTrader 5/Sample1.png b/ColorChart - script for MetaTrader 5/Sample1.png new file mode 100644 index 0000000..116e46e Binary files /dev/null and b/ColorChart - script for MetaTrader 5/Sample1.png differ diff --git a/ColorChart - script for MetaTrader 5/Sample10.png b/ColorChart - script for MetaTrader 5/Sample10.png new file mode 100644 index 0000000..d5d8db4 Binary files /dev/null and b/ColorChart - script for MetaTrader 5/Sample10.png differ diff --git a/ColorChart - script for MetaTrader 5/Sample2.png b/ColorChart - script for MetaTrader 5/Sample2.png new file mode 100644 index 0000000..621d5a8 Binary files /dev/null and b/ColorChart - script for MetaTrader 5/Sample2.png differ diff --git a/ColorChart - script for MetaTrader 5/Sample3.png b/ColorChart - script for MetaTrader 5/Sample3.png new file mode 100644 index 0000000..23caeae Binary files /dev/null and b/ColorChart - script for MetaTrader 5/Sample3.png differ diff --git a/ColorChart - script for MetaTrader 5/Sample4.png b/ColorChart - script for MetaTrader 5/Sample4.png new file mode 100644 index 0000000..6dfb560 Binary files /dev/null and b/ColorChart - script for MetaTrader 5/Sample4.png differ diff --git a/ColorChart - script for MetaTrader 5/Sample5.png b/ColorChart - script for MetaTrader 5/Sample5.png new file mode 100644 index 0000000..17dbcc2 Binary files /dev/null and b/ColorChart - script for MetaTrader 5/Sample5.png differ diff --git a/ColorChart - script for MetaTrader 5/Sample6.png b/ColorChart - script for MetaTrader 5/Sample6.png new file mode 100644 index 0000000..434bb24 Binary files /dev/null and b/ColorChart - script for MetaTrader 5/Sample6.png differ diff --git a/ColorChart - script for MetaTrader 5/Sample7.png b/ColorChart - script for MetaTrader 5/Sample7.png new file mode 100644 index 0000000..8e65cc8 Binary files /dev/null and b/ColorChart - script for MetaTrader 5/Sample7.png differ diff --git a/ColorChart - script for MetaTrader 5/Sample8.png b/ColorChart - script for MetaTrader 5/Sample8.png new file mode 100644 index 0000000..3830f4d Binary files /dev/null and b/ColorChart - script for MetaTrader 5/Sample8.png differ diff --git a/ColorChart - script for MetaTrader 5/Sample9.png b/ColorChart - script for MetaTrader 5/Sample9.png new file mode 100644 index 0000000..1ac5e6c Binary files /dev/null and b/ColorChart - script for MetaTrader 5/Sample9.png differ diff --git a/ColorChart - script for MetaTrader 5/colorchart.mq5 b/ColorChart - script for MetaTrader 5/colorchart.mq5 new file mode 100644 index 0000000..abfe581 --- /dev/null +++ b/ColorChart - script for MetaTrader 5/colorchart.mq5 @@ -0,0 +1,61 @@ +//+------------------------------------------------------------------+ +//| ColorChart.mq5 | +//| OpenSource | +//| http://www.mql5.com | +//+------------------------------------------------------------------+ +#property copyright "OpenSource" +#property link "http://www.mql5.com" +#property version "1.00" +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() + { +//--- + RandomColor rndColor; + ChartSetInteger(0,CHART_COLOR_CANDLE_BEAR,rndColor.GetColor()); + ChartSetInteger(0,CHART_COLOR_CANDLE_BULL,rndColor.GetColor()); + ChartSetInteger(0,CHART_COLOR_BACKGROUND,rndColor.GetColor()); + ChartSetInteger(0,CHART_COLOR_ASK,rndColor.GetColor()); + ChartSetInteger(0,CHART_COLOR_BID,rndColor.GetColor()); + ChartSetInteger(0,CHART_COLOR_CHART_DOWN,rndColor.GetColor()); + ChartSetInteger(0,CHART_COLOR_CHART_LINE,rndColor.GetColor()); + ChartSetInteger(0,CHART_COLOR_CHART_UP,rndColor.GetColor()); + ChartSetInteger(0,CHART_COLOR_FOREGROUND,rndColor.GetColor()); + ChartSetInteger(0,CHART_COLOR_GRID,rndColor.GetColor()); + ChartSetInteger(0,CHART_COLOR_LAST,rndColor.GetColor()); + ChartSetInteger(0,CHART_COLOR_STOP_LEVEL,rndColor.GetColor()); + ChartSetInteger(0,CHART_COLOR_VOLUME,rndColor.GetColor()); + ChartRedraw(); + } +//+------------------------------------------------------------------+ +//| | +//+------------------------------------------------------------------+ +class Random + { +public: + int Rand(int from,int to) + { + long rnd=(long)this.Rand()*((long)to-(long)from)/(long)SHORT_MAX; + return(int)rnd; + } + int Rand() + { + return MathRand(); + } + }; +//+------------------------------------------------------------------+ +//| | +//+------------------------------------------------------------------+ +class RandomColor : Random + { +public: + color GetColor() + { + int red=Rand(0x0000FFFF,0x00FF0000); + int green= Rand(0x000000FF,0x0000FF00); + int blue = Rand(0x00000000,0x000000FF); + return(color)(red+green+blue); + } + }; +//+------------------------------------------------------------------+ diff --git a/ColorChart - script for MetaTrader 5/expert.png b/ColorChart - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/ColorChart - script for MetaTrader 5/expert.png differ diff --git a/ColorChart - script for MetaTrader 5/indicator.png b/ColorChart - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/ColorChart - script for MetaTrader 5/indicator.png differ diff --git a/ColorChart - script for MetaTrader 5/library.png b/ColorChart - script for MetaTrader 5/library.png new file mode 100644 index 0000000..5c79a8f Binary files /dev/null and b/ColorChart - script for MetaTrader 5/library.png differ diff --git a/ColorChart - script for MetaTrader 5/logo-2.png b/ColorChart - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/ColorChart - script for MetaTrader 5/logo-2.png differ diff --git a/ColorChart - script for MetaTrader 5/script.png b/ColorChart - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/ColorChart - script for MetaTrader 5/script.png differ diff --git a/ComeBacker Trading - script for MetaTrader 5/README.md b/ComeBacker Trading - script for MetaTrader 5/README.md new file mode 100644 index 0000000..47d0922 --- /dev/null +++ b/ComeBacker Trading - script for MetaTrader 5/README.md @@ -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 +- `comebacker.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/ComeBacker Trading - script for MetaTrader 5/comebacker.mq5 b/ComeBacker Trading - script for MetaTrader 5/comebacker.mq5 new file mode 100644 index 0000000..263e624 --- /dev/null +++ b/ComeBacker Trading - script for MetaTrader 5/comebacker.mq5 @@ -0,0 +1,92 @@ +#property copyright "Mokara" +#property link "https://www.mql5.com/en/users/mokara" +#property description "ComeBacker Trading" +#property version "1.0" +#property script_show_inputs true + +input int lastBars = 20; //Bar Count for Limits +input double ratePL = 2.0; //Profit/Loss Ratio +input int profitOffset = 0; //Additional Profit +input double lots = 0.1; //Lots + +int bHighest, bLowest; +double pHighest, pLowest, pCurrent, pTakeProfit, pStopLoss; +string objName = ""; +MqlRates Rates[]; +MqlTradeRequest tReq = {0}; +MqlTradeResult tRes = {0}; + +enum TYPE_POS{ + POS_LONG, + POS_SHORT +}tPos; + +void DrawVLine(string n, int c, int s, datetime x){ //name, color, style, x-coordinate + if(ObjectFind(0, n) == 0) ObjectDelete(0, n); + ObjectCreate(0, n, OBJ_VLINE, 0, x, 0); + ObjectSetInteger(0, n, OBJPROP_COLOR, c); + ObjectSetInteger(0, n, OBJPROP_STYLE, s); +} + +void DrawHLine(string n, int c, int s, double y){ //name, color, style, y-coordinate + if(ObjectFind(0, n) == 0) ObjectDelete(0, n); + ObjectCreate(0, n, OBJ_HLINE, 0, 0, y); + ObjectSetInteger(0, n, OBJPROP_COLOR, c); + ObjectSetInteger(0, n, OBJPROP_STYLE, s); +} + +void OnStart(){ + ArraySetAsSeries(Rates, true); + ArrayResize(Rates, lastBars); + CopyRates(_Symbol, _Period, 0, lastBars, Rates); + bHighest = iHighest(_Symbol, _Period, MODE_HIGH, lastBars, 0); + bLowest = iLowest(_Symbol, _Period, MODE_LOW, lastBars, 0); + pHighest = NormalizeDouble(Rates[bHighest].high, _Digits); + pLowest = NormalizeDouble(Rates[bLowest].low, _Digits); + if(bHighest < bLowest){ //highest occured last + tPos = POS_LONG; + pCurrent = SymbolInfoDouble(_Symbol, SYMBOL_ASK); + pTakeProfit = pHighest + profitOffset * _Point; + pStopLoss = pCurrent - (pTakeProfit - pCurrent) / ratePL; + DrawVLine("ComeBacker - Start", clrAqua, STYLE_DOT, Rates[bHighest].time); + DrawHLine("ComeBacker - Entry", clrAqua, STYLE_DOT, pCurrent); + DrawHLine("ComeBacker - Take Profit", clrLimeGreen, STYLE_SOLID, pTakeProfit); + DrawHLine("ComeBacker - Stop Loss", clrRed, STYLE_SOLID, pStopLoss); + tReq.symbol = _Symbol; + tReq.type = ORDER_TYPE_BUY; + tReq.volume = lots; + tReq.action = TRADE_ACTION_DEAL; + tReq.deviation = 5; + tReq.magic = 999; + tReq.price = SymbolInfoDouble(_Symbol, SYMBOL_ASK); + tReq.tp = pTakeProfit; + tReq.sl = pStopLoss; + if(!OrderSend(tReq, tRes)){ + Print("ERROR: order send. "+ _Symbol + " / " + IntegerToString(GetLastError())); + return; + } + } + else{ //lowest occcured last or highest/lowest on same bar + tPos = POS_SHORT; + pCurrent = SymbolInfoDouble(_Symbol, SYMBOL_BID); + pTakeProfit = pLowest - profitOffset * _Point;; + pStopLoss = pCurrent + (pCurrent - pTakeProfit) / ratePL; + DrawVLine("ComeBacker - Start", clrAqua, STYLE_DOT, Rates[bLowest].time); + DrawHLine("ComeBacker - Entry", clrAqua, STYLE_DOT, pCurrent); + DrawHLine("ComeBacker - Take Profit", clrLimeGreen, STYLE_SOLID, pTakeProfit); + DrawHLine("ComeBacker - Stop Loss", clrRed, STYLE_SOLID, pStopLoss); + tReq.symbol = _Symbol; + tReq.type = ORDER_TYPE_SELL; + tReq.volume = lots; + tReq.action = TRADE_ACTION_DEAL; + tReq.deviation = 5; + tReq.magic = 999; + tReq.price = SymbolInfoDouble(_Symbol, SYMBOL_BID); + tReq.tp = pTakeProfit; + tReq.sl = pStopLoss; + if(!OrderSend(tReq, tRes)){ + Print("ERROR: order send. "+ _Symbol + " / " + IntegerToString(GetLastError())); + return; + } + } +} \ No newline at end of file diff --git a/ComeBacker Trading - script for MetaTrader 5/indicator.png b/ComeBacker Trading - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/ComeBacker Trading - script for MetaTrader 5/indicator.png differ diff --git a/ComeBacker Trading - script for MetaTrader 5/library.png b/ComeBacker Trading - script for MetaTrader 5/library.png new file mode 100644 index 0000000..5c79a8f Binary files /dev/null and b/ComeBacker Trading - script for MetaTrader 5/library.png differ diff --git a/ComeBacker Trading - script for MetaTrader 5/logo-2.png b/ComeBacker Trading - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/ComeBacker Trading - script for MetaTrader 5/logo-2.png differ diff --git a/ComeBacker Trading - script for MetaTrader 5/script.png b/ComeBacker Trading - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/ComeBacker Trading - script for MetaTrader 5/script.png differ diff --git a/Copy constructor - script for MetaTrader 5/README.md b/Copy constructor - script for MetaTrader 5/README.md new file mode 100644 index 0000000..81d936a --- /dev/null +++ b/Copy constructor - script for MetaTrader 5/README.md @@ -0,0 +1,19 @@ +# 🚀 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](script.png) + +## Source Files +- `copyconstructor.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Copy constructor - script for MetaTrader 5/copyconstructor.mq5 b/Copy constructor - script for MetaTrader 5/copyconstructor.mq5 new file mode 100644 index 0000000..18b5bc4 Binary files /dev/null and b/Copy constructor - script for MetaTrader 5/copyconstructor.mq5 differ diff --git a/Copy constructor - script for MetaTrader 5/expert.png b/Copy constructor - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/Copy constructor - script for MetaTrader 5/expert.png differ diff --git a/Copy constructor - script for MetaTrader 5/indicator.png b/Copy constructor - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Copy constructor - script for MetaTrader 5/indicator.png differ diff --git a/Copy constructor - script for MetaTrader 5/logo-2.png b/Copy constructor - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Copy constructor - script for MetaTrader 5/logo-2.png differ diff --git a/Copy constructor - script for MetaTrader 5/script.png b/Copy constructor - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Copy constructor - script for MetaTrader 5/script.png differ diff --git a/Count consecutive no. of bull or bear bars - script for MetaTrader 5/5891533492215__1.png b/Count consecutive no. of bull or bear bars - script for MetaTrader 5/5891533492215__1.png new file mode 100644 index 0000000..25a9e14 Binary files /dev/null and b/Count consecutive no. of bull or bear bars - script for MetaTrader 5/5891533492215__1.png differ diff --git a/Count consecutive no. of bull or bear bars - script for MetaTrader 5/6152619465634__1.png b/Count consecutive no. of bull or bear bars - script for MetaTrader 5/6152619465634__1.png new file mode 100644 index 0000000..25a9e14 Binary files /dev/null and b/Count consecutive no. of bull or bear bars - script for MetaTrader 5/6152619465634__1.png differ diff --git a/Count consecutive no. of bull or bear bars - script for MetaTrader 5/README.md b/Count consecutive no. of bull or bear bars - script for MetaTrader 5/README.md new file mode 100644 index 0000000..608bc12 --- /dev/null +++ b/Count consecutive no. of bull or bear bars - script for MetaTrader 5/README.md @@ -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](5891533492215__1.png) +![Screenshot](6152619465634__1.png) +![Screenshot](script.png) + +## Source Files +- `scirpt-count-consecutive-bull-bear.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Count consecutive no. of bull or bear bars - script for MetaTrader 5/expert.png b/Count consecutive no. of bull or bear bars - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/Count consecutive no. of bull or bear bars - script for MetaTrader 5/expert.png differ diff --git a/Count consecutive no. of bull or bear bars - script for MetaTrader 5/indicator.png b/Count consecutive no. of bull or bear bars - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Count consecutive no. of bull or bear bars - script for MetaTrader 5/indicator.png differ diff --git a/Count consecutive no. of bull or bear bars - script for MetaTrader 5/logo-2.png b/Count consecutive no. of bull or bear bars - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Count consecutive no. of bull or bear bars - script for MetaTrader 5/logo-2.png differ diff --git a/Count consecutive no. of bull or bear bars - script for MetaTrader 5/scirpt-count-consecutive-bull-bear.mq5 b/Count consecutive no. of bull or bear bars - script for MetaTrader 5/scirpt-count-consecutive-bull-bear.mq5 new file mode 100644 index 0000000..322bbfa --- /dev/null +++ b/Count consecutive no. of bull or bear bars - script for MetaTrader 5/scirpt-count-consecutive-bull-bear.mq5 @@ -0,0 +1,105 @@ +//+------------------------------------------------------------------+ +//| Scirpt-Count-Consecutive-Bull-Bear.mq5 | +//| Copyright 2024,Rosh Jardine | +//| https://www.mql5.com/en/users/roshjardine | +//+------------------------------------------------------------------+ +#property copyright "Copyright 2024,Rosh Jardine" +#property link "https://www.mql5.com/en/users/roshjardine" +#property version "1.00" +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() + { + //--- + int count_in = 0; + count_in = CONSECUTIVE_BB(true,150); + Print("highest bull consecutive = ",IntegerToString(count_in)); + count_in = CONSECUTIVE_BB(false,150); + Print("highest bear consecutive = ",IntegerToString(count_in)); + + } +//+------------------------------------------------------------------+ +int CONSECUTIVE_BB(bool param_count_bull_bo,int param_look_back_in) + { + int look_back_in = (param_look_back_in<2) ? 3 : param_look_back_in; + //--- for testing purpose only + string pattern_text = ""; + for (int i=1;i<=look_back_in;i++) + { + if (iClose(_Symbol,PERIOD_CURRENT,i)>iOpen(_Symbol,PERIOD_CURRENT,i)) + { + pattern_text += "a"; + } + else + { + if (iClose(_Symbol,PERIOD_CURRENT,i)iOpen(_Symbol,PERIOD_CURRENT,i) && + iClose(_Symbol,PERIOD_CURRENT,i+1)>iOpen(_Symbol,PERIOD_CURRENT,i+1) + ) + { + consecutive_text += "a"; + last_consecutive_text = consecutive_text; + } + else + { + if (StringLen(last_consecutive_text)>StringLen(highest_consecutive_text)) + { + Print("last_consecutive_text bull=",last_consecutive_text); + highest_consecutive_text = last_consecutive_text; + } + consecutive_text = ""; + i++; + } + + } + Print("highest_consecutive_text bull=",highest_consecutive_text); + } + else + { + for (int i=1;iStringLen(highest_consecutive_text)) + { + Print("last_consecutive_text bear=",last_consecutive_text); + highest_consecutive_text = last_consecutive_text; + } + consecutive_text = ""; + i++; + } + + } + Print("highest_consecutive_text bear=",highest_consecutive_text); + } + //--- include the first predecessor +1, count only successors return string length + return(StringLen(highest_consecutive_text)+1); + } + + + \ No newline at end of file diff --git a/Count consecutive no. of bull or bear bars - script for MetaTrader 5/script.png b/Count consecutive no. of bull or bear bars - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Count consecutive no. of bull or bear bars - script for MetaTrader 5/script.png differ diff --git a/Creating a Simple News Filter for XAUUSD Trading on MT5 - script for MetaTrader 5/README.md b/Creating a Simple News Filter for XAUUSD Trading on MT5 - script for MetaTrader 5/README.md new file mode 100644 index 0000000..192c1c0 --- /dev/null +++ b/Creating a Simple News Filter for XAUUSD Trading on MT5 - script for MetaTrader 5/README.md @@ -0,0 +1,19 @@ +# 🚀 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](script.png) + +## Source Files +- `simple_news_filter_for_xauusd_trading_on_mt5.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Creating a Simple News Filter for XAUUSD Trading on MT5 - script for MetaTrader 5/expert.png b/Creating a Simple News Filter for XAUUSD Trading on MT5 - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/Creating a Simple News Filter for XAUUSD Trading on MT5 - script for MetaTrader 5/expert.png differ diff --git a/Creating a Simple News Filter for XAUUSD Trading on MT5 - script for MetaTrader 5/indicator.png b/Creating a Simple News Filter for XAUUSD Trading on MT5 - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Creating a Simple News Filter for XAUUSD Trading on MT5 - script for MetaTrader 5/indicator.png differ diff --git a/Creating a Simple News Filter for XAUUSD Trading on MT5 - script for MetaTrader 5/logo-2.png b/Creating a Simple News Filter for XAUUSD Trading on MT5 - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Creating a Simple News Filter for XAUUSD Trading on MT5 - script for MetaTrader 5/logo-2.png differ diff --git a/Creating a Simple News Filter for XAUUSD Trading on MT5 - script for MetaTrader 5/script.png b/Creating a Simple News Filter for XAUUSD Trading on MT5 - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Creating a Simple News Filter for XAUUSD Trading on MT5 - script for MetaTrader 5/script.png differ diff --git a/Creating a Simple News Filter for XAUUSD Trading on MT5 - script for MetaTrader 5/simple_news_filter_for_xauusd_trading_on_mt5.mq5 b/Creating a Simple News Filter for XAUUSD Trading on MT5 - script for MetaTrader 5/simple_news_filter_for_xauusd_trading_on_mt5.mq5 new file mode 100644 index 0000000..9da325f --- /dev/null +++ b/Creating a Simple News Filter for XAUUSD Trading on MT5 - script for MetaTrader 5/simple_news_filter_for_xauusd_trading_on_mt5.mq5 @@ -0,0 +1,66 @@ +//+------------------------------------------------------------------+ +//| Simple News Filter for XAUUSD Trading | +//+------------------------------------------------------------------+ +#property copyright "Duy Van NGUY" +#property link "https://www.mql5.com/en/market/product/your_product_id" +#property version "1.00" + +input int MinutesBeforeNews = 15; // Minutes before news to pause trading +input int MinutesAfterNews = 15; // Minutes after news to resume trading + +// Simulated news times (for demo purposes, replace with real news data source) +datetime newsTimes[] = {D'2025.05.07 14:30:00'}; // Example: News at 14:30 on May 7, 2025 + +//+------------------------------------------------------------------+ +//| Check if trading should be paused due to news | +//+------------------------------------------------------------------+ +bool IsNewsTime() +{ + datetime currentTime = TimeCurrent(); + + for(int i = 0; i < ArraySize(newsTimes); i++) + { + datetime newsTime = newsTimes[i]; + datetime startPause = newsTime - MinutesBeforeNews * 60; // Pause X minutes before news + datetime endPause = newsTime + MinutesAfterNews * 60; // Resume X minutes after news + + if(currentTime >= startPause && currentTime <= endPause) + { + Print("News Filter: Trading paused due to upcoming news at ", newsTime); + return true; // Pause trading + } + } + + return false; // Safe to trade +} + +//+------------------------------------------------------------------+ +//| Expert initialization function | +//+------------------------------------------------------------------+ +int OnInit() +{ + return(INIT_SUCCEEDED); +} + +//+------------------------------------------------------------------+ +//| Expert tick function | +//+------------------------------------------------------------------+ +void OnTick() +{ + if(IsNewsTime()) + { + return; // Skip trading during news time + } + + // Add your XAUUSD trading logic here + Print("Safe to trade XAUUSD"); +} + +//+------------------------------------------------------------------+ +//| Expert deinitialization function | +//+------------------------------------------------------------------+ +void OnDeinit(const int reason) +{ + // Clean-up code if needed +} +//+------------------------------------------------------------------+ \ No newline at end of file diff --git a/Cross - script for MetaTrader 5/README.md b/Cross - script for MetaTrader 5/README.md new file mode 100644 index 0000000..b2dc580 --- /dev/null +++ b/Cross - script for MetaTrader 5/README.md @@ -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](image__17.png) +![Screenshot](script.png) + +## Source Files +- `cross.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Cross - script for MetaTrader 5/cross.mq5 b/Cross - script for MetaTrader 5/cross.mq5 new file mode 100644 index 0000000..6451d4b Binary files /dev/null and b/Cross - script for MetaTrader 5/cross.mq5 differ diff --git a/Cross - script for MetaTrader 5/expert.png b/Cross - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/Cross - script for MetaTrader 5/expert.png differ diff --git a/Cross - script for MetaTrader 5/image__17.png b/Cross - script for MetaTrader 5/image__17.png new file mode 100644 index 0000000..4c48b18 Binary files /dev/null and b/Cross - script for MetaTrader 5/image__17.png differ diff --git a/Cross - script for MetaTrader 5/indicator.png b/Cross - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Cross - script for MetaTrader 5/indicator.png differ diff --git a/Cross - script for MetaTrader 5/logo-2.png b/Cross - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Cross - script for MetaTrader 5/logo-2.png differ diff --git a/Cross - script for MetaTrader 5/script.png b/Cross - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Cross - script for MetaTrader 5/script.png differ diff --git a/Currency Strenght Meter - MT5 - script for MetaTrader 5/CurrencyStrengthMeter.png b/Currency Strenght Meter - MT5 - script for MetaTrader 5/CurrencyStrengthMeter.png new file mode 100644 index 0000000..5f50510 Binary files /dev/null and b/Currency Strenght Meter - MT5 - script for MetaTrader 5/CurrencyStrengthMeter.png differ diff --git a/Currency Strenght Meter - MT5 - script for MetaTrader 5/README.md b/Currency Strenght Meter - MT5 - script for MetaTrader 5/README.md new file mode 100644 index 0000000..92978af --- /dev/null +++ b/Currency Strenght Meter - MT5 - script for MetaTrader 5/README.md @@ -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](CurrencyStrengthMeter.png) +![Screenshot](library.png) +![Screenshot](script.png) + +## Source Files +- `sct_currencystrengthmeter.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Currency Strenght Meter - MT5 - script for MetaTrader 5/indicator.png b/Currency Strenght Meter - MT5 - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Currency Strenght Meter - MT5 - script for MetaTrader 5/indicator.png differ diff --git a/Currency Strenght Meter - MT5 - script for MetaTrader 5/library.png b/Currency Strenght Meter - MT5 - script for MetaTrader 5/library.png new file mode 100644 index 0000000..5c79a8f Binary files /dev/null and b/Currency Strenght Meter - MT5 - script for MetaTrader 5/library.png differ diff --git a/Currency Strenght Meter - MT5 - script for MetaTrader 5/logo-2.png b/Currency Strenght Meter - MT5 - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Currency Strenght Meter - MT5 - script for MetaTrader 5/logo-2.png differ diff --git a/Currency Strenght Meter - MT5 - script for MetaTrader 5/script.png b/Currency Strenght Meter - MT5 - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Currency Strenght Meter - MT5 - script for MetaTrader 5/script.png differ diff --git a/Currency Strenght Meter - MT5 - script for MetaTrader 5/sct_currencystrengthmeter.mq5 b/Currency Strenght Meter - MT5 - script for MetaTrader 5/sct_currencystrengthmeter.mq5 new file mode 100644 index 0000000..3e86f3c --- /dev/null +++ b/Currency Strenght Meter - MT5 - script for MetaTrader 5/sct_currencystrengthmeter.mq5 @@ -0,0 +1,155 @@ +//+------------------------------------------------------------------+ +//| SCT_CurrencyStrengthMeter.mq5 | +//| Copyright 2021, FxWeirdos | +//| info@fxweirdos.com | +//+------------------------------------------------------------------+ + +#property copyright "Copyright 2021, FxWeirdos. Mario Gharib. Forex Jarvis. info@fxweirdos.com" +#property link "https://fxweirdos.com" +#property version "1.01" +#property script_show_inputs + +input int iStart = 1; //Start +input int iPeriod = 12; //Period + +double dAUD=0, dCAD=0, dCHF=0, dEUR=0, dGBP=0, dJPY=0, dNZD=0, dUSD=0; +double dArray1[8]; +string sArray1[8]={"AUD","CAD", "CHF", "EUR", "GBP", "JPY", "NZD", "USD"}; + +//+------------------------------------------------------------------+ +//| | +//+------------------------------------------------------------------+ +class cCandlestick { + + public: + + double dOpenPrice; + double dClosePrice; + + void mvGetCandleStickCharateristics (string s, int i) { + + dOpenPrice = iOpen(s, PERIOD_CURRENT,i); + dClosePrice = iClose(s, PERIOD_CURRENT,i); + + } +}; + +void vfunction (string ss, string sCountry, double dPrice1, double dPricen, int iSwitch) { + + if (sCountry == "AUD") { + dAUD=dAUD+(dPrice1-dPricen)/dPrice1*100*iSwitch; + } else if (sCountry == "CAD") { + dCAD=dCAD+(dPrice1-dPricen)/dPrice1*100*iSwitch; + } else if (sCountry == "CHF") { + dCHF=dCHF+(dPrice1-dPricen)/dPrice1*100*iSwitch; + } else if (sCountry == "EUR") { + dEUR=dEUR+(dPrice1-dPricen)/dPrice1*100*iSwitch; + } else if (sCountry == "GBP") { + dGBP=dGBP+(dPrice1-dPricen)/dPrice1*100*iSwitch; + } else if (sCountry == "JPY") { + dJPY=dJPY+(dPrice1-dPricen)/dPrice1*100*iSwitch; + } else if (sCountry == "NZD") { + dNZD=dNZD+(dPrice1-dPricen)/dPrice1*100*iSwitch; + } else if (sCountry == "USD") { + dUSD=dUSD+(dPrice1-dPricen)/dPrice1*100*iSwitch; + } +} + +//+---------------------------------------------------------------------+ +//| GetTimeFrame function - returns the textual timeframe | +//+---------------------------------------------------------------------+ +string GetTimeFrame(int lPeriod) { + + switch(lPeriod) + { + case 0: return("PERIOD_CURRENT"); + case 1: return("M1"); + case 5: return("M5"); + case 15: return("M15"); + case 30: return("M30"); + case 60: return("H1"); + case 240: return("H4"); + case 1440: return("D1"); + case 10080: return("W1"); + case 43200: return("MN1"); + case 2: return("M2"); + case 3: return("M3"); + case 4: return("M4"); + case 6: return("M6"); + case 10: return("M10"); + case 12: return("M12"); + case 16385: return("H1"); + case 16386: return("H2"); + case 16387: return("H3"); + case 16388: return("H4"); + case 16390: return("H6"); + case 16392: return("H8"); + case 16396: return("H12"); + case 16408: return("D1"); + case 32769: return("W1"); + case 49153: return("MN1"); + default: return("PERIOD_CURRENT"); + } +} + +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() { + + int HowManySymbols=SymbolsTotal(true); + + string sCurrency1, sCurrency2; + int iPos=0; + + for(int i=0;idArray1[j]) { + dtemp = dArray1[i]; + stemp = sArray1[i]; + dArray1[i]=dArray1[j]; + sArray1[i]=sArray1[j]; + dArray1[j]=dtemp; + sArray1[j]=stemp; + } + } + } + + Alert("==========="); + Alert( "Timeframe is ", GetTimeFrame(Period())); + Alert("==========="); + + for (i=0;i<8;i++) + Alert(sArray1[i], " = ",DoubleToString(dArray1[i],2)); + +} \ No newline at end of file diff --git a/Current Next Futures - script for MetaTrader 5/BR-10.17H1.png b/Current Next Futures - script for MetaTrader 5/BR-10.17H1.png new file mode 100644 index 0000000..b4d5c7c Binary files /dev/null and b/Current Next Futures - script for MetaTrader 5/BR-10.17H1.png differ diff --git a/Current Next Futures - script for MetaTrader 5/README.md b/Current Next Futures - script for MetaTrader 5/README.md new file mode 100644 index 0000000..bac3e8c --- /dev/null +++ b/Current Next Futures - script for MetaTrader 5/README.md @@ -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](BR-10.17H1.png) +![Screenshot](library.png) +![Screenshot](script.png) + +## Source Files +- `current_next_futures.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Current Next Futures - script for MetaTrader 5/current_next_futures.mq5 b/Current Next Futures - script for MetaTrader 5/current_next_futures.mq5 new file mode 100644 index 0000000..f1a2db2 --- /dev/null +++ b/Current Next Futures - script for MetaTrader 5/current_next_futures.mq5 @@ -0,0 +1,96 @@ +//+------------------------------------------------------------------+ +//| Current Next Futures.mq5 | +//| Copyright 2016, Serj_Che | +//| https://www.mql5.com/ru/users/serj_che | +//+------------------------------------------------------------------+ +#property copyright "Copyright 2016, Serj_Che" +#property link "https://www.mql5.com/ru/users/serj_che" +#property version "1.00" +#property script_show_inputs + +input string name=""; +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() + { +//--- + Comment( + "\n Last Futures: ",LastFutures(name), + "\n Current Futures: ",CurrFutures(name), + "\n Next Futures: ",NextFutures(name), + ""); + } +//+------------------------------------------------------------------+ +string CurrFutures(string short_name) + { + StringToUpper(short_name); + string long_name; + MqlDateTime time; + TimeCurrent(time); + int year=time.year; + int mon=time.mon; + for(int i=0; i<12; i++) + { + if(mon>12) { mon=1; year++; } + StringConcatenate(long_name,short_name,"-",mon,".",year%100); + if(SymbolSelect(long_name,true)) + { + if(SymbolInfoInteger(long_name,SYMBOL_EXPIRATION_TIME)>TimeCurrent()) break; + } + mon++; + long_name=""; + } + return(long_name); + } +//+------------------------------------------------------------------+ +string NextFutures(string short_name) + { + StringToUpper(short_name); + string long_name; + MqlDateTime time; + TimeCurrent(time); + int year=time.year; + int mon=time.mon; + datetime currtime=0; + for(int i=0; i<12; i++) + { + if(mon>12) { mon=1; year++; } + StringConcatenate(long_name,short_name,"-",mon,".",year%100); + if(SymbolSelect(long_name,true)) + { + int expirat=(int)SymbolInfoInteger(long_name,SYMBOL_EXPIRATION_TIME); + Print("expires: ",(datetime)expirat); + + if(currtime==0) + if(expirat>TimeCurrent()) { currtime=expirat; mon++; continue; } + if(currtime!=0) if(expirat>currtime) break; + } + mon++; + long_name=""; + } + return(long_name); + } +//+------------------------------------------------------------------+ +string LastFutures(string short_name) + { + StringToUpper(short_name); + string long_name; + MqlDateTime time; + TimeCurrent(time); + int year=time.year; + int mon=time.mon; + for(int i=0; i<12; i++) + { + if(mon<1) { mon=12; year--; } + StringConcatenate(long_name,short_name,"-",mon,".",year%100); + if(SymbolSelect(long_name,true)) + { + if(SymbolInfoInteger(long_name,SYMBOL_EXPIRATION_TIME) Made with ❤️ for the trading community. diff --git a/Day(hight-low) - script for MetaTrader 5/day_hight_low.mq5 b/Day(hight-low) - script for MetaTrader 5/day_hight_low.mq5 new file mode 100644 index 0000000..3e29385 Binary files /dev/null and b/Day(hight-low) - script for MetaTrader 5/day_hight_low.mq5 differ diff --git a/Day(hight-low) - script for MetaTrader 5/expert.png b/Day(hight-low) - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/Day(hight-low) - script for MetaTrader 5/expert.png differ diff --git a/Day(hight-low) - script for MetaTrader 5/indicator.png b/Day(hight-low) - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Day(hight-low) - script for MetaTrader 5/indicator.png differ diff --git a/Day(hight-low) - script for MetaTrader 5/logo-2.png b/Day(hight-low) - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Day(hight-low) - script for MetaTrader 5/logo-2.png differ diff --git a/Day(hight-low) - script for MetaTrader 5/script.png b/Day(hight-low) - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Day(hight-low) - script for MetaTrader 5/script.png differ diff --git a/Delete all objects on chart (main window and sub window) with drag and drop - script for MetaTrader 5/README.md b/Delete all objects on chart (main window and sub window) with drag and drop - script for MetaTrader 5/README.md new file mode 100644 index 0000000..1175883 --- /dev/null +++ b/Delete all objects on chart (main window and sub window) with drag and drop - script for MetaTrader 5/README.md @@ -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 +- `deleteobj.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Delete all objects on chart (main window and sub window) with drag and drop - script for MetaTrader 5/deleteobj.mq5 b/Delete all objects on chart (main window and sub window) with drag and drop - script for MetaTrader 5/deleteobj.mq5 new file mode 100644 index 0000000..657985f --- /dev/null +++ b/Delete all objects on chart (main window and sub window) with drag and drop - script for MetaTrader 5/deleteobj.mq5 @@ -0,0 +1,16 @@ +//+------------------------------------------------------------------+ +//| DeleteObj.mq5 | +//| Copyright 2023, MetaQuotes Ltd. | +//| https://www.mql5.com | +//+------------------------------------------------------------------+ +#property copyright "Copyright 2024, MetaQuotes Ltd." +#property link "https://www.mql5.com" +#property version "1.00" +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() + { + ObjectsDeleteAll(ChartID()); + } +//+------------------------------------------------------------------+ diff --git a/Delete all objects on chart (main window and sub window) with drag and drop - script for MetaTrader 5/expert.png b/Delete all objects on chart (main window and sub window) with drag and drop - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/Delete all objects on chart (main window and sub window) with drag and drop - script for MetaTrader 5/expert.png differ diff --git a/Delete all objects on chart (main window and sub window) with drag and drop - script for MetaTrader 5/indicator.png b/Delete all objects on chart (main window and sub window) with drag and drop - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Delete all objects on chart (main window and sub window) with drag and drop - script for MetaTrader 5/indicator.png differ diff --git a/Delete all objects on chart (main window and sub window) with drag and drop - script for MetaTrader 5/library.png b/Delete all objects on chart (main window and sub window) with drag and drop - script for MetaTrader 5/library.png new file mode 100644 index 0000000..5c79a8f Binary files /dev/null and b/Delete all objects on chart (main window and sub window) with drag and drop - script for MetaTrader 5/library.png differ diff --git a/Delete all objects on chart (main window and sub window) with drag and drop - script for MetaTrader 5/logo-2.png b/Delete all objects on chart (main window and sub window) with drag and drop - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Delete all objects on chart (main window and sub window) with drag and drop - script for MetaTrader 5/logo-2.png differ diff --git a/Delete all objects on chart (main window and sub window) with drag and drop - script for MetaTrader 5/script.png b/Delete all objects on chart (main window and sub window) with drag and drop - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Delete all objects on chart (main window and sub window) with drag and drop - script for MetaTrader 5/script.png differ diff --git a/Demo_BitmapOffset (OBJPROP_XOFFSET and OBJPROP_YOFFSET) - script for MetaTrader 5/Demo_Offset.png b/Demo_BitmapOffset (OBJPROP_XOFFSET and OBJPROP_YOFFSET) - script for MetaTrader 5/Demo_Offset.png new file mode 100644 index 0000000..fda6391 Binary files /dev/null and b/Demo_BitmapOffset (OBJPROP_XOFFSET and OBJPROP_YOFFSET) - script for MetaTrader 5/Demo_Offset.png differ diff --git a/Demo_BitmapOffset (OBJPROP_XOFFSET and OBJPROP_YOFFSET) - script for MetaTrader 5/README.md b/Demo_BitmapOffset (OBJPROP_XOFFSET and OBJPROP_YOFFSET) - script for MetaTrader 5/README.md new file mode 100644 index 0000000..58ccc5d --- /dev/null +++ b/Demo_BitmapOffset (OBJPROP_XOFFSET and OBJPROP_YOFFSET) - script for MetaTrader 5/README.md @@ -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](Demo_Offset.png) +![Screenshot](script.png) + +## Source Files +- `demo_bitmapoffset.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Demo_BitmapOffset (OBJPROP_XOFFSET and OBJPROP_YOFFSET) - script for MetaTrader 5/demo_bitmapoffset.mq5 b/Demo_BitmapOffset (OBJPROP_XOFFSET and OBJPROP_YOFFSET) - script for MetaTrader 5/demo_bitmapoffset.mq5 new file mode 100644 index 0000000..008f802 --- /dev/null +++ b/Demo_BitmapOffset (OBJPROP_XOFFSET and OBJPROP_YOFFSET) - script for MetaTrader 5/demo_bitmapoffset.mq5 @@ -0,0 +1,91 @@ +//+------------------------------------------------------------------+ +//| Demo_BitmapOffset.mq5 | +//| Copyright 2011, MetaQuotes Software Corp. | +//| http://www.mql5.com | +//+------------------------------------------------------------------+ +#property copyright "Copyright 2010, MetaQuotes Software Corp." +#property link "http://www.mql5.com" +#property version "1.00" + +#define X_left_top 50 +#define Y_left_top 50 +#define show_frame_time 20 + +#resource "\\Files\\thousands_rubies_galaxy.bmp"; +#resource "\\Files\\space_wind.wav"; +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() + { +//--- file name with photo of "M85 Lenticular Galaxy" + string image_resource="::Files\\thousands_rubies_galaxy.bmp"; + string bitmap_label="bitmap"; +//--- create object + ObjectCreate(0,bitmap_label,OBJ_BITMAP_LABEL,0,0,0,0,0); +//--- set coordinates of the left upper corner + ObjectSetInteger(0,bitmap_label,OBJPROP_XDISTANCE,X_left_top); + ObjectSetInteger(0,bitmap_label,OBJPROP_YDISTANCE,Y_left_top); + +//--- load image from the resource + bool set=ObjectSetString(0,bitmap_label,OBJPROP_BMPFILE,0,image_resource); +//--- report if failed + if(!set) + { + PrintFormat("Error in loading of image from file %s. Error %d", + image_resource, + GetLastError()); + } +//--- get image size (it's needed when specifying the visible area of the image) + long x_size=ObjectGetInteger(0,bitmap_label,OBJPROP_XSIZE); + long y_size=ObjectGetInteger(0,bitmap_label,OBJPROP_YSIZE); + PrintFormat("Loaded an image with size %d x %d pixels", + x_size, + y_size); +//--- chart redraw + ChartRedraw(); +//--- 1 second pause to see the whole image + Sleep(1000); +//--- set frame size to show a fragment of the image + ObjectSetInteger(0,bitmap_label,OBJPROP_XSIZE,x_size); +//--- calculate the vertical size of the visible (as 1/3 of the image height) + long visual_y_size=y_size/3; +//--- set visible height + ObjectSetInteger(0,bitmap_label,OBJPROP_YSIZE,visual_y_size); +//--- set the vertical frame shift inside the image + ObjectSetInteger(0,bitmap_label,OBJPROP_XOFFSET,0); +//--- set as backround + ObjectSetInteger(0,bitmap_label,OBJPROP_BACK,true); +//--- play sound + PlaySound("::Files\\space_wind.wav"); +//--- begin + for(int j=0;j<5 && !_StopFlag;j++) + { + int i; // used for a shift of the visible area relative to the upper left corner of the image + //--- go down + for(i=0;i=0;i--) + { + ObjectSetInteger(0,bitmap_label,OBJPROP_YDISTANCE,Y_left_top+i); + //--- set the vertical frame shift inside the image + ObjectSetInteger(0,bitmap_label,OBJPROP_YOFFSET,i); + ChartRedraw(); + //--- small pause before the next frame + Sleep(show_frame_time); + } + } + //--- final show of the last frame + Sleep(3000); + //--- delete object + ObjectDelete(0,bitmap_label); + } +//+------------------------------------------------------------------+ diff --git a/Demo_BitmapOffset (OBJPROP_XOFFSET and OBJPROP_YOFFSET) - script for MetaTrader 5/expert.png b/Demo_BitmapOffset (OBJPROP_XOFFSET and OBJPROP_YOFFSET) - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/Demo_BitmapOffset (OBJPROP_XOFFSET and OBJPROP_YOFFSET) - script for MetaTrader 5/expert.png differ diff --git a/Demo_BitmapOffset (OBJPROP_XOFFSET and OBJPROP_YOFFSET) - script for MetaTrader 5/logo-2.png b/Demo_BitmapOffset (OBJPROP_XOFFSET and OBJPROP_YOFFSET) - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Demo_BitmapOffset (OBJPROP_XOFFSET and OBJPROP_YOFFSET) - script for MetaTrader 5/logo-2.png differ diff --git a/Demo_BitmapOffset (OBJPROP_XOFFSET and OBJPROP_YOFFSET) - script for MetaTrader 5/script.png b/Demo_BitmapOffset (OBJPROP_XOFFSET and OBJPROP_YOFFSET) - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Demo_BitmapOffset (OBJPROP_XOFFSET and OBJPROP_YOFFSET) - script for MetaTrader 5/script.png differ diff --git a/Demo_Create_OBJ_BITMAP_Script - script for MetaTrader 5/2011-02-11_09_55_51.png b/Demo_Create_OBJ_BITMAP_Script - script for MetaTrader 5/2011-02-11_09_55_51.png new file mode 100644 index 0000000..7055b8f Binary files /dev/null and b/Demo_Create_OBJ_BITMAP_Script - script for MetaTrader 5/2011-02-11_09_55_51.png differ diff --git a/Demo_Create_OBJ_BITMAP_Script - script for MetaTrader 5/README.md b/Demo_Create_OBJ_BITMAP_Script - script for MetaTrader 5/README.md new file mode 100644 index 0000000..6d3ca89 --- /dev/null +++ b/Demo_Create_OBJ_BITMAP_Script - script for MetaTrader 5/README.md @@ -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](2011-02-11_09_55_51.png) +![Screenshot](library.png) +![Screenshot](script.png) + +## Source Files +- `demo_create_obj_bitmap_script.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Demo_Create_OBJ_BITMAP_Script - script for MetaTrader 5/demo_create_obj_bitmap_script.mq5 b/Demo_Create_OBJ_BITMAP_Script - script for MetaTrader 5/demo_create_obj_bitmap_script.mq5 new file mode 100644 index 0000000..8060047 --- /dev/null +++ b/Demo_Create_OBJ_BITMAP_Script - script for MetaTrader 5/demo_create_obj_bitmap_script.mq5 @@ -0,0 +1,62 @@ +//+------------------------------------------------------------------+ +//| Demo_Create_OBJ_BITMAP_Script.mq5 | +//| Copyright 2011, MetaQuotes Software Corp. | +//| http://www.mql5.com | +//+------------------------------------------------------------------+ +#property copyright "Copyright 2011, MetaQuotes Software Corp." +#property link "http://www.mql5.com" +#property version "1.00" +#property script_show_inputs +//--- input parameters +input string picture_filename="\\Images\\mql5_logo.bmp"; +//--- object name +string bitmap_name="Demo_Bitmap"; // OBJ_BITMAP object name +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() + { +//--- create the object of OBJ_BITMAP type, if not found + if(ObjectFind(0,bitmap_name)<0) + { + double high_price=ChartGetDouble(0,CHART_PRICE_MAX); + double low_price=ChartGetDouble(0,CHART_PRICE_MIN); + long first_bar=ChartGetInteger(0,CHART_FIRST_VISIBLE_BAR); + datetime time[]; + int copied=CopyTime(_Symbol,PERIOD_CURRENT,0,(int)first_bar+1,time); + if(copied<0) + { + PrintFormat("Error in CopyTime call. Error code %d",GetLastError()); + return; + } + else + { + ArraySetAsSeries(time,true); + } + double price=high_price-(high_price-low_price)*0.1; + //--- try to create an object of OBJ_BITMAP type + bool created=ObjectCreate(0,bitmap_name,OBJ_BITMAP,0,time[(int)first_bar],price); + if(created) + { + ResetLastError(); + //--- load image from the specified file + bool set=ObjectSetString(0,bitmap_name,OBJPROP_BMPFILE,0,picture_filename); + //--- check result + if(!set) + { + PrintFormat("Error loading image from file %s. Error code %d",picture_filename,GetLastError()); + } + ResetLastError(); + //--- redraw the chart to draw the button immediately + ChartRedraw(0); + } + else + { + //--- error in object creation, print it + PrintFormat("Error creating the object of OBJ_BITMAP type. Error code %d",GetLastError()); + } + } + Sleep(10000); + + } +//+------------------------------------------------------------------+ \ No newline at end of file diff --git a/Demo_Create_OBJ_BITMAP_Script - script for MetaTrader 5/expert.png b/Demo_Create_OBJ_BITMAP_Script - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/Demo_Create_OBJ_BITMAP_Script - script for MetaTrader 5/expert.png differ diff --git a/Demo_Create_OBJ_BITMAP_Script - script for MetaTrader 5/library.png b/Demo_Create_OBJ_BITMAP_Script - script for MetaTrader 5/library.png new file mode 100644 index 0000000..5c79a8f Binary files /dev/null and b/Demo_Create_OBJ_BITMAP_Script - script for MetaTrader 5/library.png differ diff --git a/Demo_Create_OBJ_BITMAP_Script - script for MetaTrader 5/logo-2.png b/Demo_Create_OBJ_BITMAP_Script - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Demo_Create_OBJ_BITMAP_Script - script for MetaTrader 5/logo-2.png differ diff --git a/Demo_Create_OBJ_BITMAP_Script - script for MetaTrader 5/script.png b/Demo_Create_OBJ_BITMAP_Script - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Demo_Create_OBJ_BITMAP_Script - script for MetaTrader 5/script.png differ diff --git a/Demo_FileCopy - script for MetaTrader 5/README.md b/Demo_FileCopy - script for MetaTrader 5/README.md new file mode 100644 index 0000000..e966d0c --- /dev/null +++ b/Demo_FileCopy - script for MetaTrader 5/README.md @@ -0,0 +1,19 @@ +# 🚀 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](script.png) + +## Source Files +- `demo_filecopy.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Demo_FileCopy - script for MetaTrader 5/demo_filecopy.mq5 b/Demo_FileCopy - script for MetaTrader 5/demo_filecopy.mq5 new file mode 100644 index 0000000..021fd4f --- /dev/null +++ b/Demo_FileCopy - script for MetaTrader 5/demo_filecopy.mq5 @@ -0,0 +1,75 @@ +//+------------------------------------------------------------------+ +//| Demo_FileCopy.mq5 | +//| Copyright 2013, MetaQuotes Software Corp. | +//| http://www.mql5.com | +//+------------------------------------------------------------------+ +#property copyright "Copyright 2013, MetaQuotes Software Corp." +#property link "http://www.mql5.com" +#property version "1.00" +//--- display the window of input parameters when launching the script +#property script_show_inputs +//--- input parameters +input string InpSrc="source.txt"; // source +input string InpDst="destination.txt"; // copy +input int InpEncodingType=FILE_ANSI; // ANSI=32 or UNICODE=64 +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() + { +//--- display the source contents (it must exist) + if(!FileDisplay(InpSrc)) + return; +//--- check if the copy file already exists (may not be created) + if(!FileDisplay(InpDst)) + { + //--- the copy file does not exist, copying without FILE_REWRITE flag (correct copying) + if(FileCopy(InpSrc,0,InpDst,0)) + Print("File is copied!"); + else + Print("File is not copied!"); + } + else + { + //--- the copy file already exists, try to copy without FILE_REWRITE flag (incorrect copying) + if(FileCopy(InpSrc,0,InpDst,0)) + Print("File is copied!"); + else + Print("File is not copied!"); + //--- InpDst file's contents remains the same + FileDisplay(InpDst); + //--- copy once more with FILE_REWRITE flag (correct copying if the file exists) + if(FileCopy(InpSrc,0,InpDst,FILE_REWRITE)) + Print("File is copied!"); + else + Print("File is not copied!"); + } +//--- receive InpSrc file copy + FileDisplay(InpDst); + } +//+------------------------------------------------------------------+ +//| Read the file contents | +//+------------------------------------------------------------------+ +bool FileDisplay(const string file_name) + { +//--- reset the error value + ResetLastError(); +//--- open the file + int file_handle=FileOpen(file_name,FILE_READ|FILE_TXT|InpEncodingType); + if(file_handle!=INVALID_HANDLE) + { + //--- display the file contents in the loop + Print("+---------------------+"); + PrintFormat("File name = %s",file_name); + while(!FileIsEnding(file_handle)) + Print(FileReadString(file_handle)); + Print("+---------------------+"); + //--- close the file + FileClose(file_handle); + return(true); + } +//--- failed to open the file + PrintFormat("%s is not opened, error = %d",file_name,GetLastError()); + return(false); + } +//+------------------------------------------------------------------+ diff --git a/Demo_FileCopy - script for MetaTrader 5/indicator.png b/Demo_FileCopy - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Demo_FileCopy - script for MetaTrader 5/indicator.png differ diff --git a/Demo_FileCopy - script for MetaTrader 5/logo-2.png b/Demo_FileCopy - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Demo_FileCopy - script for MetaTrader 5/logo-2.png differ diff --git a/Demo_FileCopy - script for MetaTrader 5/script.png b/Demo_FileCopy - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Demo_FileCopy - script for MetaTrader 5/script.png differ diff --git a/Demo_FileDelete - script for MetaTrader 5/README.md b/Demo_FileDelete - script for MetaTrader 5/README.md new file mode 100644 index 0000000..795eb04 --- /dev/null +++ b/Demo_FileDelete - script for MetaTrader 5/README.md @@ -0,0 +1,19 @@ +# 🚀 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](script.png) + +## Source Files +- `demo_filedelete.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Demo_FileDelete - script for MetaTrader 5/demo_filedelete.mq5 b/Demo_FileDelete - script for MetaTrader 5/demo_filedelete.mq5 new file mode 100644 index 0000000..d3c32b2 --- /dev/null +++ b/Demo_FileDelete - script for MetaTrader 5/demo_filedelete.mq5 @@ -0,0 +1,73 @@ +//+------------------------------------------------------------------+ +//| Demo_FileDelete.mq5 | +//| Copyright 2013, MetaQuotes Software Corp. | +//| http://www.mql5.com | +//+------------------------------------------------------------------+ +#property copyright "Copyright 2013, MetaQuotes Software Corp." +#property link "http://www.mql5.com" +#property version "1.00" +//--- show the window of input parameters when launching the script +#property script_show_inputs +//--- date for old files +input datetime InpFilesDate=D'2013.01.01 00:00'; +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() + { + string file_name; // variable for storing file names + string filter="*.txt"; // filter for searching the files + datetime create_date; // file creation date + string files[]; // list of file names + int def_size=25; // array size by default + int size=0; // number of files +//--- allocate memory for the array + ArrayResize(files,def_size); +//--- receive the search handle in the local folder's root + long search_handle=FileFindFirst(filter,file_name); +//--- check if FileFindFirst() executed successfully + if(search_handle!=INVALID_HANDLE) + { + //--- searching files in the loop + do + { + files[size]=file_name; + //--- increase the array size + size++; + if(size==def_size) + { + def_size+=25; + ArrayResize(files,def_size); + } + //--- reset the error value + ResetLastError(); + //--- receive the file creation date + create_date=(datetime)FileGetInteger(file_name,FILE_CREATE_DATE,false); + //--- check if the file is old + if(create_date Made with ❤️ for the trading community. diff --git a/Demo_FileFind - script for MetaTrader 5/demo_filefindfirst.mq5 b/Demo_FileFind - script for MetaTrader 5/demo_filefindfirst.mq5 new file mode 100644 index 0000000..c3c1858 --- /dev/null +++ b/Demo_FileFind - script for MetaTrader 5/demo_filefindfirst.mq5 @@ -0,0 +1,41 @@ +//+------------------------------------------------------------------+ +//| Demo_FileFindFirst.mq5 | +//| Copyright 2013, MetaQuotes Software Corp. | +//| http://www.mql5.com | +//+------------------------------------------------------------------+ +#property copyright "Copyright 2013, MetaQuotes Software Corp." +#property link "http://www.mql5.com" +#property version "1.00" +//--- display the window of input parameters when launching the script +#property script_show_inputs +//--- filter +input string InpFilter="*"; +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() + { + string file_name; + int i=1; +//--- receive search handle in local folder's root + long search_handle=FileFindFirst(InpFilter,file_name); +//--- check if FileFindFirst() function executed successfully + if(search_handle!=INVALID_HANDLE) + { + //--- check if the passed strings are file or directory names in the loop + do + { + ResetLastError(); + //--- if this is a file, the function will return true, if it is a directory, the function will generate error 5018 + FileIsExist(file_name); + PrintFormat("%d : %s name = %s",i,GetLastError()==5018 ? "Directory" : "File",file_name); + i++; + } + while(FileFindNext(search_handle,file_name)); + //--- close search handle + FileFindClose(search_handle); + } + else + Print("Files not found!"); + } +//+------------------------------------------------------------------+ diff --git a/Demo_FileFind - script for MetaTrader 5/indicator.png b/Demo_FileFind - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Demo_FileFind - script for MetaTrader 5/indicator.png differ diff --git a/Demo_FileFind - script for MetaTrader 5/logo-2.png b/Demo_FileFind - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Demo_FileFind - script for MetaTrader 5/logo-2.png differ diff --git a/Demo_FileFind - script for MetaTrader 5/script.png b/Demo_FileFind - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Demo_FileFind - script for MetaTrader 5/script.png differ diff --git a/Demo_FileFlush - script for MetaTrader 5/README.md b/Demo_FileFlush - script for MetaTrader 5/README.md new file mode 100644 index 0000000..94db5b5 --- /dev/null +++ b/Demo_FileFlush - script for MetaTrader 5/README.md @@ -0,0 +1,19 @@ +# 🚀 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](script.png) + +## Source Files +- `demo_fileflush.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Demo_FileFlush - script for MetaTrader 5/demo_fileflush.mq5 b/Demo_FileFlush - script for MetaTrader 5/demo_fileflush.mq5 new file mode 100644 index 0000000..4221b49 --- /dev/null +++ b/Demo_FileFlush - script for MetaTrader 5/demo_fileflush.mq5 @@ -0,0 +1,45 @@ +//+------------------------------------------------------------------+ +//| Demo_FileFlush.mq5 | +//| Copyright 2013, MetaQuotes Software Corp. | +//| http://www.mql5.com | +//+------------------------------------------------------------------+ +#property copyright "Copyright 2013, MetaQuotes Software Corp." +#property link "http://www.mql5.com" +#property version "1.00" +//--- show the window of input parameters when launching the script +#property script_show_inputs +//--- file name for writing +input string InpFileName="example.csv"; // file name +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() + { +//--- reset error value + ResetLastError(); +//--- open the file + int file_handle=FileOpen(InpFileName,FILE_READ|FILE_WRITE|FILE_CSV); + if(file_handle!=INVALID_HANDLE) + { + //--- write data to the file + for(int i=0;i<1000;i++) + { + //--- call write function + FileWrite(file_handle,TimeCurrent(),SymbolInfoDouble(Symbol(),SYMBOL_BID),SymbolInfoDouble(Symbol(),SYMBOL_ASK)); + //--- save data on the disk at each 128th iteration + if((i & 127)==127) + { + //--- now, data will be located in the file and will not be lost in case of a critical error + FileFlush(file_handle); + PrintFormat("i = %d, OK",i); + } + //--- 0.01 second pause + Sleep(10); + } + //--- close the file + FileClose(file_handle); + } + else + PrintFormat("Error, code = %d",GetLastError()); + } +//+------------------------------------------------------------------+ diff --git a/Demo_FileFlush - script for MetaTrader 5/indicator.png b/Demo_FileFlush - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Demo_FileFlush - script for MetaTrader 5/indicator.png differ diff --git a/Demo_FileFlush - script for MetaTrader 5/logo-2.png b/Demo_FileFlush - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Demo_FileFlush - script for MetaTrader 5/logo-2.png differ diff --git a/Demo_FileFlush - script for MetaTrader 5/script.png b/Demo_FileFlush - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Demo_FileFlush - script for MetaTrader 5/script.png differ diff --git a/Demo_FileGetInteger - script for MetaTrader 5/README.md b/Demo_FileGetInteger - script for MetaTrader 5/README.md new file mode 100644 index 0000000..603d8f4 --- /dev/null +++ b/Demo_FileGetInteger - script for MetaTrader 5/README.md @@ -0,0 +1,19 @@ +# 🚀 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](script.png) + +## Source Files +- `demo_filegetinteger.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Demo_FileGetInteger - script for MetaTrader 5/demo_filegetinteger.mq5 b/Demo_FileGetInteger - script for MetaTrader 5/demo_filegetinteger.mq5 new file mode 100644 index 0000000..85d1247 --- /dev/null +++ b/Demo_FileGetInteger - script for MetaTrader 5/demo_filegetinteger.mq5 @@ -0,0 +1,69 @@ +//+------------------------------------------------------------------+ +//| Demo_FileGetInteger.mq5 | +//| Copyright 2013, MetaQuotes Software Corp. | +//| http://www.mql5.com | +//+------------------------------------------------------------------+ +#property copyright "Copyright 2013, MetaQuotes Software Corp." +#property link "http://www.mql5.com" +#property version "1.00" +//--- display the window of input parameters when launching the script +#property script_show_inputs +//--- input parameters +input string InpFileName="data.csv"; +input string InpDirectoryName="SomeFolder"; +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() + { + string path=InpDirectoryName+"//"+InpFileName; + long l=0; +//--- open the file + ResetLastError(); + int handle=FileOpen(path,FILE_READ|FILE_CSV); + if(handle!=INVALID_HANDLE) + { + //--- print all information about the file + Print(InpFileName," file info:"); + FileInfo(handle,FILE_EXISTS,l,"bool"); + FileInfo(handle,FILE_CREATE_DATE,l,"date"); + FileInfo(handle,FILE_MODIFY_DATE,l,"date"); + FileInfo(handle,FILE_ACCESS_DATE,l,"date"); + FileInfo(handle,FILE_SIZE,l,"other"); + FileInfo(handle,FILE_POSITION,l,"other"); + FileInfo(handle,FILE_END,l,"bool"); + FileInfo(handle,FILE_IS_COMMON,l,"bool"); + FileInfo(handle,FILE_IS_TEXT,l,"bool"); + FileInfo(handle,FILE_IS_BINARY,l,"bool"); + FileInfo(handle,FILE_IS_CSV,l,"bool"); + FileInfo(handle,FILE_IS_ANSI,l,"bool"); + FileInfo(handle,FILE_IS_READABLE,l,"bool"); + FileInfo(handle,FILE_IS_WRITABLE,l,"bool"); + //--- close the file + FileClose(handle); + } + else + PrintFormat("%s file didn't open, ErrorCode = %d",InpFileName,GetLastError()); + } +//+------------------------------------------------------------------+ +//| Display the value of the file property | +//+------------------------------------------------------------------+ +void FileInfo(const int handle,const ENUM_FILE_PROPERTY_INTEGER id, + long l,const string type) + { +//--- receive the property value + ResetLastError(); + if((l=FileGetInteger(handle,id))!=-1) + { + //--- the value received, display it in the correct format + if(!StringCompare(type,"bool")) + Print(EnumToString(id)," = ",l ? "true" : "false"); + if(!StringCompare(type,"date")) + Print(EnumToString(id)," = ",(datetime)l); + if(!StringCompare(type,"other")) + Print(EnumToString(id)," = ",l); + } + else + Print("Error, Code = ",GetLastError()); + } +//+------------------------------------------------------------------+ diff --git a/Demo_FileGetInteger - script for MetaTrader 5/expert.png b/Demo_FileGetInteger - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/Demo_FileGetInteger - script for MetaTrader 5/expert.png differ diff --git a/Demo_FileGetInteger - script for MetaTrader 5/indicator.png b/Demo_FileGetInteger - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Demo_FileGetInteger - script for MetaTrader 5/indicator.png differ diff --git a/Demo_FileGetInteger - script for MetaTrader 5/logo-2.png b/Demo_FileGetInteger - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Demo_FileGetInteger - script for MetaTrader 5/logo-2.png differ diff --git a/Demo_FileGetInteger - script for MetaTrader 5/script.png b/Demo_FileGetInteger - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Demo_FileGetInteger - script for MetaTrader 5/script.png differ diff --git a/Demo_FileIsEnding - script for MetaTrader 5/README.md b/Demo_FileIsEnding - script for MetaTrader 5/README.md new file mode 100644 index 0000000..e229b34 --- /dev/null +++ b/Demo_FileIsEnding - script for MetaTrader 5/README.md @@ -0,0 +1,19 @@ +# 🚀 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](script.png) + +## Source Files +- `demo_fileisending.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Demo_FileIsEnding - script for MetaTrader 5/demo_fileisending.mq5 b/Demo_FileIsEnding - script for MetaTrader 5/demo_fileisending.mq5 new file mode 100644 index 0000000..1e4b267 --- /dev/null +++ b/Demo_FileIsEnding - script for MetaTrader 5/demo_fileisending.mq5 @@ -0,0 +1,37 @@ +//+------------------------------------------------------------------+ +//| Demo_FileIsEnding.mq5 | +//| Copyright 2013, MetaQuotes Software Corp. | +//| http://www.mql5.com | +//+------------------------------------------------------------------+ +#property copyright "Copyright 2013, MetaQuotes Software Corp." +#property link "http://www.mql5.com" +#property version "1.00" +//--- show the window of input parameters when launching the script +#property script_show_inputs +//--- input parameters +input string InpFileName="file.txt"; // file name +input string InpDirectoryName="Data"; // directory name +input int InpEncodingType=FILE_ANSI; // ANSI=32 or UNICODE=64 +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() + { +//--- print the path to the file we are going to use + PrintFormat("Working %s\\Files\\ folder",TerminalInfoString(TERMINAL_DATA_PATH)); +//--- reset the error value + ResetLastError(); +//--- open the file for reading (if the file does not exist, the error will occur) + int file_handle=FileOpen(InpDirectoryName+"//"+InpFileName,FILE_READ|FILE_TXT|InpEncodingType); + if(file_handle!=INVALID_HANDLE) + { + //--- print the file contents + while(!FileIsEnding(file_handle)) + Print(FileReadString(file_handle)); + //--- close the file + FileClose(file_handle); + } + else + PrintFormat("Error, code = %d",GetLastError()); + } +//+------------------------------------------------------------------+ diff --git a/Demo_FileIsEnding - script for MetaTrader 5/expert.png b/Demo_FileIsEnding - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/Demo_FileIsEnding - script for MetaTrader 5/expert.png differ diff --git a/Demo_FileIsEnding - script for MetaTrader 5/indicator.png b/Demo_FileIsEnding - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Demo_FileIsEnding - script for MetaTrader 5/indicator.png differ diff --git a/Demo_FileIsEnding - script for MetaTrader 5/logo-2.png b/Demo_FileIsEnding - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Demo_FileIsEnding - script for MetaTrader 5/logo-2.png differ diff --git a/Demo_FileIsEnding - script for MetaTrader 5/script.png b/Demo_FileIsEnding - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Demo_FileIsEnding - script for MetaTrader 5/script.png differ diff --git a/Demo_FileMove - script for MetaTrader 5/README.md b/Demo_FileMove - script for MetaTrader 5/README.md new file mode 100644 index 0000000..53409b1 --- /dev/null +++ b/Demo_FileMove - script for MetaTrader 5/README.md @@ -0,0 +1,19 @@ +# 🚀 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](script.png) + +## Source Files +- `demo_filemove.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Demo_FileMove - script for MetaTrader 5/demo_filemove.mq5 b/Demo_FileMove - script for MetaTrader 5/demo_filemove.mq5 new file mode 100644 index 0000000..d1d5f33 --- /dev/null +++ b/Demo_FileMove - script for MetaTrader 5/demo_filemove.mq5 @@ -0,0 +1,63 @@ +//+------------------------------------------------------------------+ +//| Demo_FileMove.mq5 | +//| Copyright 2013, MetaQuotes Software Corp. | +//| http://www.mql5.com | +//+------------------------------------------------------------------+ +#property copyright "Copyright 2013, MetaQuotes Software Corp." +#property link "http://www.mql5.com" +#property version "1.00" +//--- display the window of input parameters when launching the script +#property script_show_inputs +//--- input parameters +input string InpSrcName="data.txt"; +input string InpDstName="newdata.txt"; +input string InpSrcDirectory="SomeFolder"; +input string InpDstDirectory="OtherFolder"; +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() + { + string local=TerminalInfoString(TERMINAL_DATA_PATH); + string common=TerminalInfoString(TERMINAL_COMMONDATA_PATH); +//--- receive file paths + string src_path; + string dst_path; + StringConcatenate(src_path,InpSrcDirectory,"//",InpSrcName); + StringConcatenate(dst_path,InpDstDirectory,"//",InpDstName); +//--- check if the source file exists (if not - exit) + if(FileIsExist(src_path)) + PrintFormat("%s file exists in the %s\\Files\\%s folder",InpSrcName,local,InpSrcDirectory); + else + { + PrintFormat("Error, %s source file not found",InpSrcName); + return; + } +//--- check if the result file already exists + if(FileIsExist(dst_path,FILE_COMMON)) + { + PrintFormat("%s file exists in the %s\\Files\\%s folder",InpDstName,common,InpDstDirectory); + //--- file exists, moving should be performed with FILE_REWRITE flag + ResetLastError(); + if(FileMove(src_path,0,dst_path,FILE_COMMON|FILE_REWRITE)) + PrintFormat("%s file moved",InpSrcName); + else + PrintFormat("Error! Code = %d",GetLastError()); + } + else + { + PrintFormat("%s file does not exist in the %s\\Files\\%s folder",InpDstName,common,InpDstDirectory); + //--- the file does not exist, moving should be performed without FILE_REWRITE flag + ResetLastError(); + if(FileMove(src_path,0,dst_path,FILE_COMMON)) + PrintFormat("%s file moved",InpSrcName); + else + PrintFormat("Error! Code = %d",GetLastError()); + } +//--- the file is moved; let's check it out + if(FileIsExist(dst_path,FILE_COMMON) && !FileIsExist(src_path,0)) + Print("Success!"); + else + Print("Error!"); + } +//+------------------------------------------------------------------+ diff --git a/Demo_FileMove - script for MetaTrader 5/indicator.png b/Demo_FileMove - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Demo_FileMove - script for MetaTrader 5/indicator.png differ diff --git a/Demo_FileMove - script for MetaTrader 5/logo-2.png b/Demo_FileMove - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Demo_FileMove - script for MetaTrader 5/logo-2.png differ diff --git a/Demo_FileMove - script for MetaTrader 5/script.png b/Demo_FileMove - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Demo_FileMove - script for MetaTrader 5/script.png differ diff --git a/Demo_FileReadArray - script for MetaTrader 5/README.md b/Demo_FileReadArray - script for MetaTrader 5/README.md new file mode 100644 index 0000000..aceb67d --- /dev/null +++ b/Demo_FileReadArray - script for MetaTrader 5/README.md @@ -0,0 +1,19 @@ +# 🚀 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](script.png) + +## Source Files +- `demo_filereadarray.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Demo_FileReadArray - script for MetaTrader 5/demo_filereadarray.mq5 b/Demo_FileReadArray - script for MetaTrader 5/demo_filereadarray.mq5 new file mode 100644 index 0000000..1804c01 --- /dev/null +++ b/Demo_FileReadArray - script for MetaTrader 5/demo_filereadarray.mq5 @@ -0,0 +1,51 @@ +//+------------------------------------------------------------------+ +//| Demo_FileReadArray.mq5 | +//| Copyright 2013, MetaQuotes Software Corp. | +//| http://www.mql5.com | +//+------------------------------------------------------------------+ +#property copyright "Copyright 2013, MetaQuotes Software Corp." +#property link "http://www.mql5.com" +#property version "1.00" +//--- display the window of input parameters when launching the script +#property script_show_inputs +//--- input parameters +input string InpFileName="data.bin"; +input string InpDirectoryName="SomeFolder"; +//+------------------------------------------------------------------+ +//| Structure for storing price data | +//+------------------------------------------------------------------+ +struct prices + { + datetime date; // date + double bid; // bid price + double ask; // ask price + }; +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() + { +//--- structure array + prices arr[]; +//--- file path + string path=InpDirectoryName+"//"+InpFileName; +//--- open the file + ResetLastError(); + int file_handle=FileOpen(path,FILE_READ|FILE_BIN); + if(file_handle!=INVALID_HANDLE) + { + //--- read all data from the file to the array + FileReadArray(file_handle,arr); + //--- receive the array size + int size=ArraySize(arr); + //--- print data from the array + for(int i=0;i Made with ❤️ for the trading community. diff --git a/Demo_FileSize - script for MetaTrader 5/demo_filesize.mq5 b/Demo_FileSize - script for MetaTrader 5/demo_filesize.mq5 new file mode 100644 index 0000000..923fcbd --- /dev/null +++ b/Demo_FileSize - script for MetaTrader 5/demo_filesize.mq5 @@ -0,0 +1,71 @@ +//+------------------------------------------------------------------+ +//| Demo_FileSize.mq5 | +//| Copyright 2013, MetaQuotes Software Corp. | +//| http://www.mql5.com | +//+------------------------------------------------------------------+ +#property copyright "Copyright 2013, MetaQuotes Software Corp." +#property link "http://www.mql5.com" +#property version "1.00" +//--- show the window of input parameters when launching the script +#property script_show_inputs +//--- input parameters +input ulong InpThresholdSize=20; // file threshold size in kilobytes +input string InpBigFolderName="big"; // folder for large files +input string InpSmallFolderName="small"; // folder for small files +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() + { + string file_name; // variable for storing file names + string filter="*.csv"; // filter for searching the files + ulong file_size=0; // file size in bytes + int size=0; // number of files +//--- print the path to the file we are going to work with + PrintFormat("Working in %s\\Files\\ folder",TerminalInfoString(TERMINAL_COMMONDATA_PATH)); +//--- receive the search handle in common folder's root of all terminals + long search_handle=FileFindFirst(filter,file_name,FILE_COMMON); +//--- check if FileFindFirst() has been executed successfully + if(search_handle!=INVALID_HANDLE) + { + //--- move files in the loop according to their size + do + { + //--- open the file + ResetLastError(); + int file_handle=FileOpen(file_name,FILE_READ|FILE_CSV|FILE_COMMON); + if(file_handle!=INVALID_HANDLE) + { + //--- receive the file size + file_size=FileSize(file_handle); + //--- close the file + FileClose(file_handle); + } + else + { + PrintFormat("Failed to open %s file, Error code = %d",file_name,GetLastError()); + continue; + } + //--- print the file size + PrintFormat("Size of %s file is equal to %d bytes",file_name,file_size); + //--- define the path for moving the file + string path; + if(file_size>InpThresholdSize*1024) + path=InpBigFolderName+"//"+file_name; + else + path=InpSmallFolderName+"//"+file_name; + //--- move the file + ResetLastError(); + if(FileMove(file_name,FILE_COMMON,path,FILE_REWRITE|FILE_COMMON)) + PrintFormat("%s file is moved",file_name); + else + PrintFormat("Error, code = %d",GetLastError()); + } + while(FileFindNext(search_handle,file_name)); + //--- close the search handle + FileFindClose(search_handle); + } + else + Print("Files not found!"); + } +//+------------------------------------------------------------------+ diff --git a/Demo_FileSize - script for MetaTrader 5/indicator.png b/Demo_FileSize - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Demo_FileSize - script for MetaTrader 5/indicator.png differ diff --git a/Demo_FileSize - script for MetaTrader 5/logo-2.png b/Demo_FileSize - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Demo_FileSize - script for MetaTrader 5/logo-2.png differ diff --git a/Demo_FileSize - script for MetaTrader 5/script.png b/Demo_FileSize - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Demo_FileSize - script for MetaTrader 5/script.png differ diff --git a/Demo_FileTell - script for MetaTrader 5/README.md b/Demo_FileTell - script for MetaTrader 5/README.md new file mode 100644 index 0000000..32a192d --- /dev/null +++ b/Demo_FileTell - script for MetaTrader 5/README.md @@ -0,0 +1,19 @@ +# 🚀 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](script.png) + +## Source Files +- `demo_filetell.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Demo_FileTell - script for MetaTrader 5/demo_filetell.mq5 b/Demo_FileTell - script for MetaTrader 5/demo_filetell.mq5 new file mode 100644 index 0000000..0980f8c --- /dev/null +++ b/Demo_FileTell - script for MetaTrader 5/demo_filetell.mq5 @@ -0,0 +1,106 @@ +//+------------------------------------------------------------------+ +//| Demo_FileTell.mq5 | +//| Copyright 2013, MetaQuotes Software Corp. | +//| http://www.mql5.com | +//+------------------------------------------------------------------+ +#property copyright "Copyright 2013, MetaQuotes Software Corp." +#property link "http://www.mql5.com" +#property version "1.00" +//--- display the window of input parameters when launching the script +#property script_show_inputs +//--- input parameters +input string InpFileName="file.txt"; // file name +input string InpDirectoryName="Data"; // directory name +input int InpEncodingType=FILE_ANSI; // ANSI=32 or UNICODE=64 +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() + { +//--- specify the value of the variable for generating random numbers + _RandomSeed=GetTickCount(); +//--- variables for positions of the strings' start points + ulong pos[]; + int size; +//--- reset the error value + ResetLastError(); +//--- open the file + int file_handle=FileOpen(InpDirectoryName+"//"+InpFileName,FILE_READ|FILE_TXT|InpEncodingType); + if(file_handle!=INVALID_HANDLE) + { + PrintFormat("%s file is available for reading",InpFileName); + //--- receive start position for each string in the file + GetStringPositions(file_handle,pos); + //--- define the number of strings in the file + size=ArraySize(pos); + if(!size) + { + //--- stop if the file does not have strings + PrintFormat("%s file is empty!",InpFileName); + FileClose(file_handle); + return; + } + //--- make a random selection of a string number + int ind=MathRand()%size; + //--- shift position to the starting point of the string + FileSeek(file_handle,pos[ind],SEEK_SET); + //--- read and print the string with ind number + PrintFormat("String text with %d number: \"%s\"",ind,FileReadString(file_handle)); + //--- close the file + FileClose(file_handle); + PrintFormat("%s file is closed",InpFileName); + } + else + PrintFormat("Failed to open %s file, Error code = %d",InpFileName,GetLastError()); + } +//+-------------------------------------------------------------------------------+ +//| The function defines starting points for each of the strings in the file and | +//| places them in arr array | +//+-------------------------------------------------------------------------------+ +void GetStringPositions(const int handle,ulong &arr[]) + { +//--- default array size + int def_size=127; +//--- allocate memory for the array + ArrayResize(arr,def_size); +//--- string counter + int i=0; +//--- if this is not the file's end, then there is at least one string + if(!FileIsEnding(handle)) + { + arr[i]=FileTell(handle); + i++; + } + else + return; // the file is empty, exit +//--- define the shift in bytes depending on encoding + int shift; + if(FileGetInteger(handle,FILE_IS_ANSI)) + shift=1; + else + shift=2; +//--- go through the strings in the loop + while(1) + { + //--- read the string + FileReadString(handle); + //--- check for the file end + if(!FileIsEnding(handle)) + { + //--- store the next string's position + arr[i]=FileTell(handle)+shift; + i++; + //--- increase the size of the array if it is overflown + if(i==def_size) + { + def_size+=def_size+1; + ArrayResize(arr,def_size); + } + } + else + break; // end of the file, exit + } +//--- define the actual size of the array + ArrayResize(arr,i); + } +//+------------------------------------------------------------------+ diff --git a/Demo_FileTell - script for MetaTrader 5/indicator.png b/Demo_FileTell - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Demo_FileTell - script for MetaTrader 5/indicator.png differ diff --git a/Demo_FileTell - script for MetaTrader 5/logo-2.png b/Demo_FileTell - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Demo_FileTell - script for MetaTrader 5/logo-2.png differ diff --git a/Demo_FileTell - script for MetaTrader 5/script.png b/Demo_FileTell - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Demo_FileTell - script for MetaTrader 5/script.png differ diff --git a/Demo_FileWrite - script for MetaTrader 5/README.md b/Demo_FileWrite - script for MetaTrader 5/README.md new file mode 100644 index 0000000..f174ffd --- /dev/null +++ b/Demo_FileWrite - script for MetaTrader 5/README.md @@ -0,0 +1,19 @@ +# 🚀 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](script.png) + +## Source Files +- `demo_filewrite.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Demo_FileWrite - script for MetaTrader 5/demo_filewrite.mq5 b/Demo_FileWrite - script for MetaTrader 5/demo_filewrite.mq5 new file mode 100644 index 0000000..25beab5 --- /dev/null +++ b/Demo_FileWrite - script for MetaTrader 5/demo_filewrite.mq5 @@ -0,0 +1,104 @@ +//+------------------------------------------------------------------+ +//| Demo_FileWrite.mq5 | +//| Copyright 2013, MetaQuotes Software Corp. | +//| http://www.mql5.com | +//+------------------------------------------------------------------+ +#property copyright "Copyright 2013, MetaQuotes Software Corp." +#property link "http://www.mql5.com" +#property version "1.00" +//--- show the window of input parameters when launching the script +#property script_show_inputs +//--- parameters for receiving data from the terminal +input string InpSymbolName="EURUSD"; // currency pair +input ENUM_TIMEFRAMES InpSymbolPeriod=PERIOD_H1; // time frame +input int InpFastEMAPeriod=12; // fast EMA period +input int InpSlowEMAPeriod=26; // slow EMA period +input int InpSignalPeriod=9; // difference averaging period +input ENUM_APPLIED_PRICE InpAppliedPrice=PRICE_CLOSE; // price type +input datetime InpDateStart=D'2012.01.01 00:00'; // data copying start date +//--- parameters for writing data to file +input string InpFileName="MACD.csv"; // file name +input string InpDirectoryName="Data"; // directory name +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() + { + datetime date_finish; // data copying end date + bool sign_buff[]; // signal array (true - buy, false - sell) + datetime time_buff[]; // array of signals' arrival time + int sign_size=0; // signal array size + double macd_buff[]; // array of indicator values + datetime date_buff[]; // array of indicator dates + int macd_size=0; // size of indicator arrays +//--- end time is the current time + date_finish=TimeCurrent(); +//--- receive MACD indicator handle + ResetLastError(); + int macd_handle=iMACD(InpSymbolName,InpSymbolPeriod,InpFastEMAPeriod,InpSlowEMAPeriod,InpSignalPeriod,InpAppliedPrice); + if(macd_handle==INVALID_HANDLE) + { + //--- failed to receive indicator handle + PrintFormat("Error when receiving indicator handle. Error code = %d",GetLastError()); + return; + } +//--- being in the loop until the indicator calculates all its values + while(BarsCalculated(macd_handle)==-1) + Sleep(10); // pause to allow the indicator to calculate all its values +//--- copy the indicator values for a certain period of time + ResetLastError(); + if(CopyBuffer(macd_handle,0,InpDateStart,date_finish,macd_buff)==-1) + { + PrintFormat("Failed to copy indicator values. Error code = %d",GetLastError()); + return; + } +//--- copy the appropriate time for the indicator values + ResetLastError(); + if(CopyTime(InpSymbolName,InpSymbolPeriod,InpDateStart,date_finish,date_buff)==-1) + { + PrintFormat("Failed to copy time values. Error code = %d",GetLastError()); + return; + } +//--- free the memory occupied by the indicator + IndicatorRelease(macd_handle); +//--- receive the buffer size + macd_size=ArraySize(macd_buff); +//--- analyze the data and save the indicator signals to the arrays + ArrayResize(sign_buff,macd_size-1); + ArrayResize(time_buff,macd_size-1); + for(int i=1;i=0) + { + sign_buff[sign_size]=true; + time_buff[sign_size]=date_buff[i]; + sign_size++; + } + //--- sell signal + if(macd_buff[i-1]>0 && macd_buff[i]<=0) + { + sign_buff[sign_size]=false; + time_buff[sign_size]=date_buff[i]; + sign_size++; + } + } +//--- open the file for writing the indicator values (if the file is absent, it will be created automatically) + ResetLastError(); + int file_handle=FileOpen(InpDirectoryName+"//"+InpFileName,FILE_READ|FILE_WRITE|FILE_CSV); + if(file_handle!=INVALID_HANDLE) + { + PrintFormat("%s file is available for writing",InpFileName); + PrintFormat("File path: %s\\Files\\",TerminalInfoString(TERMINAL_DATA_PATH)); + //--- first, write the number of signals + FileWrite(file_handle,sign_size); + //--- write the time and values of signals to the file + for(int i=0;i Made with ❤️ for the trading community. diff --git a/Demo_FileWriteDouble - script for MetaTrader 5/demo_filewritedouble.mq5 b/Demo_FileWriteDouble - script for MetaTrader 5/demo_filewritedouble.mq5 new file mode 100644 index 0000000..47fd144 --- /dev/null +++ b/Demo_FileWriteDouble - script for MetaTrader 5/demo_filewritedouble.mq5 @@ -0,0 +1,84 @@ +//+------------------------------------------------------------------+ +//| Demo_FileWriteDouble.mq5 | +//| Copyright 2013, MetaQuotes Software Corp. | +//| http://www.mql5.com | +//+------------------------------------------------------------------+ +#property copyright "Copyright 2013, MetaQuotes Software Corp." +#property link "http://www.mql5.com" +#property version "1.00" +//--- show the window of input parameters when launching the script +#property script_show_inputs +//--- parameters for receiving data from the terminal +input string InpSymbolName="EURJPY"; // currency pair +input ENUM_TIMEFRAMES InpSymbolPeriod=PERIOD_M15; // time frame +input int InpMAPeriod=10; // smoothing period +input int InpMAShift=0; // indicator shift +input ENUM_MA_METHOD InpMAMethod=MODE_SMA; // smoothing type +input ENUM_APPLIED_PRICE InpAppliedPrice=PRICE_CLOSE; // price type +input datetime InpDateStart=D'2013.01.01 00:00'; // data copying start date +//--- parameters for writing data to the file +input string InpFileName="MA.csv"; // file name +input string InpDirectoryName="Data"; // directory name +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() + { + datetime date_finish=TimeCurrent(); + double ma_buff[]; + datetime time_buff[]; + int size; +//--- receive MA indicator handle + ResetLastError(); + int ma_handle=iMA(InpSymbolName,InpSymbolPeriod,InpMAPeriod,InpMAShift,InpMAMethod,InpAppliedPrice); + if(ma_handle==INVALID_HANDLE) + { + //--- failed to receive the indicator handle + PrintFormat("Error when receiving indicator handle. Error code = %d",GetLastError()); + return; + } +//--- being in the loop until the indicator calculates all its values + while(BarsCalculated(ma_handle)==-1) + Sleep(20); // a pause to allow the indicator to calculate all its values + PrintFormat("Indicator values starting from %s will be written to the file",TimeToString(InpDateStart)); +//--- copy the indicator values + ResetLastError(); + if(CopyBuffer(ma_handle,0,InpDateStart,date_finish,ma_buff)==-1) + { + PrintFormat("Failed to copy the indicator values. Error code = %d",GetLastError()); + return; + } +//--- copy the time of the appropriate bars' arrival + ResetLastError(); + if(CopyTime(InpSymbolName,InpSymbolPeriod,InpDateStart,date_finish,time_buff)==-1) + { + PrintFormat("Failed to copy time values. Error code = %d",GetLastError()); + return; + } +//--- receive the buffer size + size=ArraySize(ma_buff); +//--- free the memory occupied by the indicator + IndicatorRelease(ma_handle); +//--- open the file for writing the indicator values (if the file is absent, it will be created automatically) + ResetLastError(); + int file_handle=FileOpen(InpDirectoryName+"//"+InpFileName,FILE_READ|FILE_WRITE|FILE_BIN); + if(file_handle!=INVALID_HANDLE) + { + PrintFormat("%s file is available for writing",InpFileName); + PrintFormat("File path: %s\\Files\\",TerminalInfoString(TERMINAL_DATA_PATH)); + //--- first, write the size of data sample + FileWriteDouble(file_handle,(double)size); + //--- write the indicator time and value to the file + for(int i=0;i Made with ❤️ for the trading community. diff --git a/Demo_FileWriteInteger - script for MetaTrader 5/demo_filewriteinteger.mq5 b/Demo_FileWriteInteger - script for MetaTrader 5/demo_filewriteinteger.mq5 new file mode 100644 index 0000000..5a9f7e9 --- /dev/null +++ b/Demo_FileWriteInteger - script for MetaTrader 5/demo_filewriteinteger.mq5 @@ -0,0 +1,98 @@ +//+------------------------------------------------------------------+ +//| Demo_FileWriteInteger.mq5 | +//| Copyright 2013, MetaQuotes Software Corp. | +//| http://www.mql5.com | +//+------------------------------------------------------------------+ +#property copyright "Copyright 2013, MetaQuotes Software Corp." +#property link "http://www.mql5.com" +#property version "1.00" +//--- show the window of input parameters when launching the script +#property script_show_inputs +//--- parameters for receiving data from the terminal +input string InpSymbolName="EURUSD"; // currency pair +input ENUM_TIMEFRAMES InpSymbolPeriod=PERIOD_H1; // timeframe +input datetime InpDateStart=D'2013.01.01 00:00'; // data copying start date +//--- parameters for writing data to the file +input string InpFileName="Trend.bin"; // file name +input string InpDirectoryName="Data"; // directory name +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() + { + datetime date_finish=TimeCurrent(); + double close_buff[]; + datetime time_buff[]; + int size; +//--- reset the error value + ResetLastError(); +//--- copy the close price for each bar + if(CopyClose(InpSymbolName,InpSymbolPeriod,InpDateStart,date_finish,close_buff)==-1) + { + PrintFormat("Failed to copy the values of close prices. Error code = %d",GetLastError()); + return; + } +//--- copy the time for each bar + if(CopyTime(InpSymbolName,InpSymbolPeriod,InpDateStart,date_finish,time_buff)==-1) + { + PrintFormat("Failed to copy time values. Error code = %d",GetLastError()); + return; + } +//--- receive the buffer size + size=ArraySize(close_buff); +//--- open the file for writing the values (if the file is absent, it will be created automatically) + ResetLastError(); + int file_handle=FileOpen(InpDirectoryName+"//"+InpFileName,FILE_READ|FILE_WRITE|FILE_BIN); + if(file_handle!=INVALID_HANDLE) + { + PrintFormat("%s file is available for writing",InpFileName); + PrintFormat("File path: %s\\Files\\",TerminalInfoString(TERMINAL_DATA_PATH)); + //--- + int up_down=0; // trend flag + int arr_size; // arr array size + uchar arr[]; // uchar type array + //--- write time values to the file + for(int i=0;i Made with ❤️ for the trading community. diff --git a/Determine Broker's Daylight (DST) schedule - script for MetaTrader 5/brokerdaylightschedule.mq5 b/Determine Broker's Daylight (DST) schedule - script for MetaTrader 5/brokerdaylightschedule.mq5 new file mode 100644 index 0000000..ca94267 Binary files /dev/null and b/Determine Broker's Daylight (DST) schedule - script for MetaTrader 5/brokerdaylightschedule.mq5 differ diff --git a/Determine Broker's Daylight (DST) schedule - script for MetaTrader 5/indicator.png b/Determine Broker's Daylight (DST) schedule - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Determine Broker's Daylight (DST) schedule - script for MetaTrader 5/indicator.png differ diff --git a/Determine Broker's Daylight (DST) schedule - script for MetaTrader 5/logo-2.png b/Determine Broker's Daylight (DST) schedule - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Determine Broker's Daylight (DST) schedule - script for MetaTrader 5/logo-2.png differ diff --git a/Determine Broker's Daylight (DST) schedule - script for MetaTrader 5/script.png b/Determine Broker's Daylight (DST) schedule - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Determine Broker's Daylight (DST) schedule - script for MetaTrader 5/script.png differ diff --git a/Displaying Several CChartObject Objects in a Single Window - script for MetaTrader 5/Image_7.png b/Displaying Several CChartObject Objects in a Single Window - script for MetaTrader 5/Image_7.png new file mode 100644 index 0000000..2c7013b Binary files /dev/null and b/Displaying Several CChartObject Objects in a Single Window - script for MetaTrader 5/Image_7.png differ diff --git a/Displaying Several CChartObject Objects in a Single Window - script for MetaTrader 5/README.md b/Displaying Several CChartObject Objects in a Single Window - script for MetaTrader 5/README.md new file mode 100644 index 0000000..beabf68 --- /dev/null +++ b/Displaying Several CChartObject Objects in a Single Window - script for MetaTrader 5/README.md @@ -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](Image_7.png) +![Screenshot](script.png) + +## Source Files +- `multicharts.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Displaying Several CChartObject Objects in a Single Window - script for MetaTrader 5/expert.png b/Displaying Several CChartObject Objects in a Single Window - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/Displaying Several CChartObject Objects in a Single Window - script for MetaTrader 5/expert.png differ diff --git a/Displaying Several CChartObject Objects in a Single Window - script for MetaTrader 5/indicator.png b/Displaying Several CChartObject Objects in a Single Window - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Displaying Several CChartObject Objects in a Single Window - script for MetaTrader 5/indicator.png differ diff --git a/Displaying Several CChartObject Objects in a Single Window - script for MetaTrader 5/logo-2.png b/Displaying Several CChartObject Objects in a Single Window - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Displaying Several CChartObject Objects in a Single Window - script for MetaTrader 5/logo-2.png differ diff --git a/Displaying Several CChartObject Objects in a Single Window - script for MetaTrader 5/multicharts.mq5 b/Displaying Several CChartObject Objects in a Single Window - script for MetaTrader 5/multicharts.mq5 new file mode 100644 index 0000000..feb38a3 --- /dev/null +++ b/Displaying Several CChartObject Objects in a Single Window - script for MetaTrader 5/multicharts.mq5 @@ -0,0 +1,441 @@ +//+------------------------------------------------------------------+ +//| MultiCharts.mq5 | +//| Copyright 2012, MetaQuotes Software Corp. | +//| http://www.mql5.com | +//+------------------------------------------------------------------+ +#property copyright "Copyright 2012, MetaQuotes Software Corp." +#property link "http://www.mql5.com" +#property version "1.00" +//--- include the ChartObjectSubChart library +#include +//--- size of OBJ_Chart +#define chart_width 318 +#define chart_height 288 +//--- start point for charts table drawing +#define start_x 0 +#define start_y 0 +#property script_show_inputs +//--- input parameters +input datetime start=D'2012.11.26 00:00:00'; +input datetime stop=D'2012.12.01 00:00:00'; +//+------------------------------------------------------------------+ +//| Class for short and long lines levels | +//+------------------------------------------------------------------+ +class CLines + { +public: + string m_name; // name of currency pair + double m_short; // level value for the "short" line + double m_long; // level value for the "long" line + //--- constructor, destructor + CLines(void) { }; + ~CLines(void) { }; + }; +//+------------------------------------------------------------------+ +//| Class for draw a chart with rectangul area | +//| and short & long lines | +//+------------------------------------------------------------------+ +class CSubChartExtended: public CChartObjectSubChart + { +private: + long m_subchartID; // subchart ID + static bool m_lines_loaded; // flag of lines loading + static CLines m_linesData[]; // array for the lines + +public: + CSubChartExtended(void); + ~CSubChartExtended(void); + //--- subchart create + bool CreateSubChart(const long chart_id,const string name,const int window, + const int X,const int Y,const int sizeX,const int sizeY); + //--- changing of display settings + void ChangeSettings(void); + void SubChartNavigate(void); + //--- drawing of graphical objects + void DrawRectangle(void); + void DrawLines(void); + //--- redraw + void ReDraw(void); + //--- loading lines data + bool LoadLines(const string path); + virtual bool Load(const int file_handle); + //--- calculate the location of the point relative to the interval + void SetChartMaxMin(const double short_value,const double long_value); + int InRange(const double top,const double bottom,const double pos,const double indent); + }; +//+------------------------------------------------------------------+ +//| Constructor | +//+------------------------------------------------------------------+ +CSubChartExtended::CSubChartExtended(void) + { + } +//+------------------------------------------------------------------+ +//| Destructor | +//+------------------------------------------------------------------+ +CSubChartExtended::~CSubChartExtended(void) + { + } +//+------------------------------------------------------------------+ +//| Subchart create | +//+------------------------------------------------------------------+ +bool CSubChartExtended::CreateSubChart(const long chart_id,const string name, + const int window,const int X,const int Y, + const int sizeX,const int sizeY) + { +//--- creating of chart object + if(!Create(0,name,0,X,Y,sizeX,sizeY)) + return(false); +//--- get subchart ID + m_subchartID=ObjectGetInteger(0,name,OBJPROP_CHART_ID); +//--- successful creating + return(true); + } +//+------------------------------------------------------------------+ +//| Changing of display settings | +//+------------------------------------------------------------------+ +void CSubChartExtended::ChangeSettings(void) + { +//--- disable chart autoscroll + ChartSetInteger(m_subchartID,CHART_AUTOSCROLL,false); +//--- set the background color + if(!ChartSetInteger(m_subchartID,CHART_COLOR_BACKGROUND,C'245,255,250')) + Print("Failed to set the background color for the chart. Code ",GetLastError()); + ResetLastError(); +//--- color of axes, scale and OHLC line + ChartSetInteger(m_subchartID,CHART_COLOR_FOREGROUND,clrBlack); +//--- disable Ask, Bid and Last lines + ChartSetInteger(m_subchartID,CHART_SHOW_BID_LINE,false); + ChartSetInteger(m_subchartID,CHART_SHOW_BID_LINE,false); + ChartSetInteger(m_subchartID,CHART_SHOW_BID_LINE,false); +//--- disable OHLC + ChartSetInteger(m_subchartID,CHART_SHOW_OHLC,false); +//--- use candles + ChartSetInteger(m_subchartID,CHART_MODE,CHART_CANDLES); +//--- bullish candle color + ChartSetInteger(m_subchartID,CHART_COLOR_CANDLE_BULL,clrWhite); +//--- bullish bur color + ChartSetInteger(m_subchartID,CHART_COLOR_CHART_UP,clrBlack); +//--- bearish candle color + ChartSetInteger(m_subchartID,CHART_COLOR_CANDLE_BEAR,clrBlack); +//--- bearish bar color + ChartSetInteger(m_subchartID,CHART_COLOR_CHART_DOWN,clrBlack); +//--- line color + ChartSetInteger(m_subchartID,CHART_COLOR_CHART_LINE,clrBlack); +//--- disable the grid + if(!ChartSetInteger(m_subchartID,CHART_SHOW_GRID,0)) + Print("Failed to set property \"Grid \"\ for the chart. Code ",GetLastError()); + ResetLastError(); +//--- disable the shift of the right edge of the chart + ChartSetInteger(m_subchartID,CHART_SHIFT,0); +//--- set the shift equal to 30% of the chart width + ChartSetDouble(m_subchartID,CHART_SHIFT_SIZE,10); +//--- disable the trade levels display + if(!ChartSetInteger(m_subchartID,CHART_SHOW_TRADE_LEVELS,0)) + Print("Failed to set property \"Grid \"\ for the chart. Code ",GetLastError()); + ResetLastError(); + } +//+------------------------------------------------------------------+ +//| Chart shift to the left to the desired dates | +//+------------------------------------------------------------------+ +void CSubChartExtended::SubChartNavigate(void) + { +//--- chart shift + ChartNavigate(m_subchartID,CHART_END,GetShift(Name(),PERIOD_H4,m_subchartID)); + } +//+------------------------------------------------------------------+ +//| Draw a rectangle on the subchart | +//+------------------------------------------------------------------+ +void CSubChartExtended::DrawRectangle(void) + { +//--- create rectangle by start-stop dates + if(ObjectCreate(m_subchartID,"rect",OBJ_RECTANGLE,0,start,200,stop,0.01)) + { + //--- fill rectangle + ObjectSetInteger(m_subchartID,"rect",OBJPROP_FILL,true); + //--- rectangle color + ObjectSetInteger(m_subchartID,"rect",OBJPROP_COLOR,White); + } + else + { + //--- error + PrintFormat("Failed to create a rectangle, error code %d",GetLastError()); + ResetLastError(); + } + } +//+------------------------------------------------------------------+ +//| Draw short and long lines on the subchart | +//+------------------------------------------------------------------+ +void CSubChartExtended::DrawLines(void) + { +//--- check the flag of data loading + if(m_lines_loaded) + { + //--- create variables + double short_value=0; + double long_value=0; + int size=ArraySize(m_linesData); + //--- find lines data by name of currency pair + for(int j=0;j=top-indent) + return(1); +//--- if below, return -1 + if(pos<=bottom+indent) + return(-1); +//--- inside + return(0); + } +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() + { +//--- number of currency pairs + int symbols; +//--- name of currency pairs + string name; +//--- variables of row and column numbers for the chart drawing + int col; + int row; +//--- get the number of currency pairs + symbols=SymbolsTotal(true); +//--- subchart object + CSubChartExtended SubChart[]; + ArrayResize(SubChart,symbols); +//--- loading lines data + if(SubChart[0].LoadLines("linesdata.txt")) Print("Data successfully loaded"); + else Print("Failed to load data: ",GetLastError()); +//--- loop over all pairs + for(int i=0;i=0;j--) + if(DATA_TIME[j]==start) + index=j; + //--- get the shift, 2 - indent for the rectangle + shift=-count+index+visible_bars-2; + } +//--- return shift + return(shift); + } +//+------------------------------------------------------------------+ diff --git a/Displaying Several CChartObject Objects in a Single Window - script for MetaTrader 5/script.png b/Displaying Several CChartObject Objects in a Single Window - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Displaying Several CChartObject Objects in a Single Window - script for MetaTrader 5/script.png differ diff --git a/DownloadHistory - script for MetaTrader 5/Download_Script.png b/DownloadHistory - script for MetaTrader 5/Download_Script.png new file mode 100644 index 0000000..c031ddc Binary files /dev/null and b/DownloadHistory - script for MetaTrader 5/Download_Script.png differ diff --git a/DownloadHistory - script for MetaTrader 5/README.md b/DownloadHistory - script for MetaTrader 5/README.md new file mode 100644 index 0000000..5f51c11 --- /dev/null +++ b/DownloadHistory - script for MetaTrader 5/README.md @@ -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](Download_Script.png) +![Screenshot](script.png) + +## Source Files +- `download.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/DownloadHistory - script for MetaTrader 5/download.mq5 b/DownloadHistory - script for MetaTrader 5/download.mq5 new file mode 100644 index 0000000..fbe3184 --- /dev/null +++ b/DownloadHistory - script for MetaTrader 5/download.mq5 @@ -0,0 +1,20 @@ +/* + +*/ +#property copyright "Copyright 2014, Fleder" +#property link "https://login.mql5.com/ru/users/fleder" +#property version "1.00" +#property description " " +#property script_show_inputs +#include "Library\CAggregator.mqh" + +input datetime date=D'01.01.2007'; // +//--------------------------------------------------------------------- +// Script program start function +//--------------------------------------------------------------------- +void OnStart() +{ + Print("======================================="); + CAggregator a; + a.Download(date); +} \ No newline at end of file diff --git a/DownloadHistory - script for MetaTrader 5/indicator.png b/DownloadHistory - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/DownloadHistory - script for MetaTrader 5/indicator.png differ diff --git a/DownloadHistory - script for MetaTrader 5/logo-2.png b/DownloadHistory - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/DownloadHistory - script for MetaTrader 5/logo-2.png differ diff --git a/DownloadHistory - script for MetaTrader 5/script.png b/DownloadHistory - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/DownloadHistory - script for MetaTrader 5/script.png differ diff --git a/Drag and Drop Move StopLoss - script for MetaTrader 5/917629851778.gif b/Drag and Drop Move StopLoss - script for MetaTrader 5/917629851778.gif new file mode 100644 index 0000000..7823f3c Binary files /dev/null and b/Drag and Drop Move StopLoss - script for MetaTrader 5/917629851778.gif differ diff --git a/Drag and Drop Move StopLoss - script for MetaTrader 5/README.md b/Drag and Drop Move StopLoss - script for MetaTrader 5/README.md new file mode 100644 index 0000000..ed9f844 --- /dev/null +++ b/Drag and Drop Move StopLoss - script for MetaTrader 5/README.md @@ -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](917629851778.gif) +![Screenshot](library.png) +![Screenshot](script.png) + +## Source Files +- `move_stoploss.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Drag and Drop Move StopLoss - script for MetaTrader 5/indicator.png b/Drag and Drop Move StopLoss - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Drag and Drop Move StopLoss - script for MetaTrader 5/indicator.png differ diff --git a/Drag and Drop Move StopLoss - script for MetaTrader 5/library.png b/Drag and Drop Move StopLoss - script for MetaTrader 5/library.png new file mode 100644 index 0000000..5c79a8f Binary files /dev/null and b/Drag and Drop Move StopLoss - script for MetaTrader 5/library.png differ diff --git a/Drag and Drop Move StopLoss - script for MetaTrader 5/logo-2.png b/Drag and Drop Move StopLoss - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Drag and Drop Move StopLoss - script for MetaTrader 5/logo-2.png differ diff --git a/Drag and Drop Move StopLoss - script for MetaTrader 5/move_stoploss.mq5 b/Drag and Drop Move StopLoss - script for MetaTrader 5/move_stoploss.mq5 new file mode 100644 index 0000000..2e61557 --- /dev/null +++ b/Drag and Drop Move StopLoss - script for MetaTrader 5/move_stoploss.mq5 @@ -0,0 +1,26 @@ +//+------------------------------------------------------------------+ +//| Move StopLoss.mq5 | +//| Copyright 2023,Obunadike Chioma | +//| https://t.me/devbidden | +//+------------------------------------------------------------------+ +#property copyright "Copyright 2023,Obunadike Chioma" +#property link "https://t.me/devbidden" +#property version "1.00" +#include +CTrade trade; +CPositionInfo m_position; +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() + { + double Price = ChartPriceOnDropped(); + if(Price > 0) + for(int i = PositionsTotal() - 1; i >= 0; i--) // loop all Open Positions + if(m_position.SelectByIndex(i)) // select a position + { + trade.PositionModify(m_position.Ticket(),Price,m_position.TakeProfit()); + } +} +//+------------------------------------------------------------------+ + diff --git a/Drag and Drop Move StopLoss - script for MetaTrader 5/script.png b/Drag and Drop Move StopLoss - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Drag and Drop Move StopLoss - script for MetaTrader 5/script.png differ diff --git a/Drag and Drop Move TakeProfit - script for MetaTrader 5/README.md b/Drag and Drop Move TakeProfit - script for MetaTrader 5/README.md new file mode 100644 index 0000000..ebd83ee --- /dev/null +++ b/Drag and Drop Move TakeProfit - script for MetaTrader 5/README.md @@ -0,0 +1,19 @@ +# 🚀 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](script.png) + +## Source Files +- `move_takeprofit.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Drag and Drop Move TakeProfit - script for MetaTrader 5/indicator.png b/Drag and Drop Move TakeProfit - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Drag and Drop Move TakeProfit - script for MetaTrader 5/indicator.png differ diff --git a/Drag and Drop Move TakeProfit - script for MetaTrader 5/logo-2.png b/Drag and Drop Move TakeProfit - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Drag and Drop Move TakeProfit - script for MetaTrader 5/logo-2.png differ diff --git a/Drag and Drop Move TakeProfit - script for MetaTrader 5/move_takeprofit.mq5 b/Drag and Drop Move TakeProfit - script for MetaTrader 5/move_takeprofit.mq5 new file mode 100644 index 0000000..6772082 --- /dev/null +++ b/Drag and Drop Move TakeProfit - script for MetaTrader 5/move_takeprofit.mq5 @@ -0,0 +1,26 @@ +//+------------------------------------------------------------------+ +//| Move TakeProfit.mq5 | +//| Copyright 2023,Obunadike Chioma | +//| https://t.me/devbidden | +//+------------------------------------------------------------------+ +#property copyright "Copyright 2023,Obunadike Chioma" +#property link "https://t.me/devbidden" +#property version "1.00" +#include +CTrade trade; +CPositionInfo m_position; +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() + { + double Price = ChartPriceOnDropped(); + if(Price > 0) + for(int i = PositionsTotal() - 1; i >= 0; i--) // loop all Open Positions + if(m_position.SelectByIndex(i)) // select a position + { + trade.PositionModify(m_position.Ticket(),m_position.StopLoss(),Price); + } + + } +//+------------------------------------------------------------------+ diff --git a/Drag and Drop Move TakeProfit - script for MetaTrader 5/script.png b/Drag and Drop Move TakeProfit - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Drag and Drop Move TakeProfit - script for MetaTrader 5/script.png differ diff --git a/EMDcotir (Empirical Mode Decomposition) - script for MetaTrader 5/EMD02.png b/EMDcotir (Empirical Mode Decomposition) - script for MetaTrader 5/EMD02.png new file mode 100644 index 0000000..0385729 Binary files /dev/null and b/EMDcotir (Empirical Mode Decomposition) - script for MetaTrader 5/EMD02.png differ diff --git a/EMDcotir (Empirical Mode Decomposition) - script for MetaTrader 5/README.md b/EMDcotir (Empirical Mode Decomposition) - script for MetaTrader 5/README.md new file mode 100644 index 0000000..f002b74 --- /dev/null +++ b/EMDcotir (Empirical Mode Decomposition) - script for MetaTrader 5/README.md @@ -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](EMD02.png) +![Screenshot](script.png) + +## Source Files +- `emdcotir.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/EMDcotir (Empirical Mode Decomposition) - script for MetaTrader 5/emdcotir.mq5 b/EMDcotir (Empirical Mode Decomposition) - script for MetaTrader 5/emdcotir.mq5 new file mode 100644 index 0000000..5fed61c --- /dev/null +++ b/EMDcotir (Empirical Mode Decomposition) - script for MetaTrader 5/emdcotir.mq5 @@ -0,0 +1,105 @@ +//------------------------------------------------------------------------------------ +// EMDcotir.mq5 +// 2012, victorg +// http://www.mql5.com +//------------------------------------------------------------------------------------ +#property script_show_inputs +#property copyright "2012, victorg" +#property link "http://www.mql5.com" +#property version "1.00" +#property description "Empirical Mode Decomposition (EMD)" + +#include "CEMD_2.mqh" +#include "ChartTools\CLinDrawMulti.mqh" + +input int Len=300; // DataLength. Len>5. +input int AScale=1; // 1=AutoScale, 0=w/o AutoScale. +input int ADraw=1; // 1=AutoDraw, 0=w/o AutoDraw. +//------------------------------------------------------------------------------------ +// Script program start function +//------------------------------------------------------------------------------------ +void OnStart() + { + int i,j,n,ret; + double a,b,xx[],yy[],Sum[]; +//-------------------------- Preparation of the input sequence + n=Len; // Data Length + ArrayResize(xx,n); + ArrayResize(yy,n); + ArrayResize(Sum,n); + + CopyOpen(_Symbol,PERIOD_CURRENT,0,n,yy); + for(i=0;i Made with ❤️ for the trading community. diff --git a/EVZ Reader - script for MetaTrader 5/evzreader.mq5 b/EVZ Reader - script for MetaTrader 5/evzreader.mq5 new file mode 100644 index 0000000..969d314 Binary files /dev/null and b/EVZ Reader - script for MetaTrader 5/evzreader.mq5 differ diff --git a/EVZ Reader - script for MetaTrader 5/indicator.png b/EVZ Reader - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/EVZ Reader - script for MetaTrader 5/indicator.png differ diff --git a/EVZ Reader - script for MetaTrader 5/logo-2.png b/EVZ Reader - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/EVZ Reader - script for MetaTrader 5/logo-2.png differ diff --git a/EVZ Reader - script for MetaTrader 5/script.png b/EVZ Reader - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/EVZ Reader - script for MetaTrader 5/script.png differ diff --git a/Economic Calendar CSV - script for MetaTrader 5/EURUSDH1NFP.png b/Economic Calendar CSV - script for MetaTrader 5/EURUSDH1NFP.png new file mode 100644 index 0000000..79ceaad Binary files /dev/null and b/Economic Calendar CSV - script for MetaTrader 5/EURUSDH1NFP.png differ diff --git a/Economic Calendar CSV - script for MetaTrader 5/README.md b/Economic Calendar CSV - script for MetaTrader 5/README.md new file mode 100644 index 0000000..f54cd5b --- /dev/null +++ b/Economic Calendar CSV - script for MetaTrader 5/README.md @@ -0,0 +1,23 @@ +# 🚀 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](calcsv__1.png) +![Screenshot](EURUSDH1NFP.png) +![Screenshot](library.png) +![Screenshot](mt5calfix__1.png) +![Screenshot](script.png) + +## Source Files +- `calendarcsvfordates.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Economic Calendar CSV - script for MetaTrader 5/calcsv__1.png b/Economic Calendar CSV - script for MetaTrader 5/calcsv__1.png new file mode 100644 index 0000000..ea0fc69 Binary files /dev/null and b/Economic Calendar CSV - script for MetaTrader 5/calcsv__1.png differ diff --git a/Economic Calendar CSV - script for MetaTrader 5/calendarcsvfordates.mq5 b/Economic Calendar CSV - script for MetaTrader 5/calendarcsvfordates.mq5 new file mode 100644 index 0000000..947bcc7 --- /dev/null +++ b/Economic Calendar CSV - script for MetaTrader 5/calendarcsvfordates.mq5 @@ -0,0 +1,284 @@ +//+------------------------------------------------------------------+ +//| CalendarCSVForDates.mq5 | +//| Copyright 2022-2024, MetaQuotes Ltd. | +//| https://www.mql5.com | +//+------------------------------------------------------------------+ +#property copyright "Copyright 2022-2024, MetaQuotes Ltd." +#property link "https://www.mql5.com" +#property description "Saves a table of calendar records, with a filter for country and/or currency and for specific range of days, into a CSV-file.\n" +#property description "Can read data directly from the built-in calendar or from an archived cal-file saved by CalendarMonitorCached[TZ].mq5 indicator." +#property script_show_inputs + +#include +#include +#include // including before Calendar cache enables timezone fix-up support +#include +#include + +input group "General" +input string CountryCode = "EU"; // CountryCode (2-chars code) +input string Currency = ""; // Currency (3-chars code) +input ENUM_CALENDAR_SCOPE Scope = SCOPE_DAY; // Scope (timespan into the past and future) +input string CSVname = ""; // CSVname ('*' to generate filename automatically) +input string CalendarCacheFile = ""; // CalendarCacheFile (optional, *.cal-file from CalendarMonitorCached.mq5) + +input group "Advanced" +input bool FixCachedTimesBySymbolHistory = false; +input int UpgradeCacheVersion = 0; +input int ForceCachedServerTimeOffset = INT_MIN; + +AutoPtr cache; + +//+------------------------------------------------------------------+ +//| Extended struct with user-friendly data from MqlCalendarValue | +//+------------------------------------------------------------------+ +struct MqlCalendarRecord: public MqlCalendarValue +{ + string importance; + string name; + string currency; + string code; + string mode; + double actual, previous, revised, forecast; + + MqlCalendarRecord() { ZeroMemory(this); } + + MqlCalendarRecord(const MqlCalendarValue &value, CalendarCache *c = NULL) + { + this = value; + extend(c); + } + + void extend(CalendarCache *c) + { + static const string importances[] = {"N"/* None */, "L"/* Low */, "M"/* Medium */, "H"/* High */}; + static const string modes[] = {"T"/* exact Time */, "A"/* All day */, "N"/* No time */, "E"/* Estimate */}; + + MqlCalendarEvent event; + if(!(!c ? CalendarEventById(event_id, event) : c.calendarEventById(event_id, event))) + { + SetUserError(1); + return; + } + + name = event.name; + importance = importances[event.importance]; + mode = modes[event.time_mode]; + + MqlCalendarCountry country; + if(!(!c ? CalendarCountryById(event.country_id, country) : c.calendarCountryById(event.country_id, country))) + { + SetUserError(2); + return; + } + + currency = country.currency; + code = country.code; + + MqlCalendarValue value = this; + + // Neither one of the following works: + // GetActualValue(); + // this.GetActualValue(); + // MqlCalendarValue::GetActualValue(); + + actual = value.GetActualValue(); + previous = value.GetPreviousValue(); + revised = value.GetRevisedValue(); + forecast = value.GetForecastValue(); + } + + void asStringArray(string &data[], const bool header = false) + { + if(header) + { + const static string caption[] = + { + "id", "event", "time", "mode", "period", "revision", + "impact", "importance", "name", "currency", "code", "actual", "previous", "revised", "forecast" + }; + ArrayCopy(data, caption); + return; + } + + PUSH(data, (string)id); + PUSH(data, (string)event_id); + PUSH(data, (string)time); + PUSH(data, mode); + PUSH(data, TimeToString(period, TIME_DATE)); + PUSH(data, (string)revision); + const string impacts[] = {"", "+", "-"}; + PUSH(data, impacts[impact_type]); + PUSH(data, (string)importance); + if(StringFind(name, ",") > -1) + { + StringReplace(name, "\"", "\"\""); + name = "\"" + name + "\""; + } + PUSH(data, name); + PUSH(data, currency); + PUSH(data, code); + PUSH(data, (string)actual); + PUSH(data, (string)previous); + PUSH(data, (string)revised); + PUSH(data, (string)forecast); + } +}; + +// will be in MQL5 soon +bool StringEndsWith(const string text, const string suffix) +{ + return StringLen(text) >= StringLen(suffix) && StringFind(text, suffix) == StringLen(text) - StringLen(suffix); +} + +string DateTimeToTimestamp(const datetime dt) +{ + MqlDateTime mdt; + TimeToStruct(dt, mdt); + return StringFormat("%04d%02d%02d%02d%02d%02d", mdt.year, mdt.mon, mdt.day, mdt.hour, mdt.min, mdt.sec); +} + +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() +{ + MqlCalendarValue values[]; + MqlCalendarRecord records[]; + CalendarCache *extender = NULL; + datetime from = fmax(TimeCurrent() - Scope, 0); + datetime to = Scope == SCOPE_ALL ? D'3000.12.31' : TimeCurrent() + Scope; + // NB: first call to the calendar history with complete scope may take a while or even time out + + int tzoffset = 0; + int count = 0; + cache = new CalendarCache(CalendarCacheFile, true, 0, false/* we don't ask for sorting by default (by time), cause will sort below by 2 columns */); + if(cache[].isLoaded()) + { + if(cache[].getVersion() == 0) + { + Print("Version 1.0 of cal-file has no time-zone info!"); + tzoffset = -1; + if(UpgradeCacheVersion > 0) + { + cache[].save(CalendarCacheFile + "-upgrade" + (string)UpgradeCacheVersion + ".cal", 0, ForceCachedServerTimeOffset); + } + } + else + { + tzoffset = cache[].getTZOffset(); + PrintFormat("Current server TZ offset: %+d; calendar cached TZ offset: %+d", + TimeServerGMTOffset(), tzoffset); + + if(FixCachedTimesBySymbolHistory) + { + PrintFormat("Calendar records adjusted by time: %d", cache[].adjustTZonHistory(_Symbol, true)); + } + } + extender = cache[]; + count = PRTF(cache[].calendarValueHistory(values, from, to, CountryCode, Currency)); + PrintFormat("Relevant records retrieved from cache: %d", count); + } + else + { + Print("Loading built-in calendar (via caching)"); + cache = new CalendarCache(NULL, from, to, false); + if(cache[].isLoaded()) + { + tzoffset = TimeServerGMTOffset(); + if(FixCachedTimesBySymbolHistory) + { + PrintFormat("Calendar records adjusted by time: %d", cache[].adjustTZonHistory(_Symbol, true)); + } + count = PRTF(cache[].calendarValueHistory(values, from, to, CountryCode, Currency)); + } + } + + if(count > 0) + { + PrintFormat("Found %d calendar records in scope, sorting...", ArraySize(values)); + SORT_STRUCT_REF_2(MqlCalendarValue, values, time, id); + + for(int i = 0; i < ArraySize(values); ++i) + { + PUSH(records, MqlCalendarRecord(values[i], extender)); + } + + if(StringLen(CSVname) || StringLen(CalendarCacheFile)) + { + string fname = ""; + + if(StringLen(CalendarCacheFile) && !StringLen(CSVname)) + { + fname = CalendarCacheFile; + if(StringEndsWith(fname, ".cal")) + { + StringReplace(fname, ".cal", ".csv"); + } + } + else if(StringLen(CSVname) && CSVname != "*") + { + fname = CSVname; + } + else + { + fname = StringFormat("%s-%s-%s-%s-%s-%s", DateTimeToTimestamp(TimeCurrent()), + CountryCode, Currency, + from ? DateTimeToTimestamp(from) : "", + to == D'3000.12.31' ? "" : DateTimeToTimestamp(to), + EnumToString(Scope)); + } + string data[]; + const string f = StringEndsWith(fname, ".csv") ? fname : fname + ".csv"; + PrintFormat("Saving file '%s'", f); + int h = PRTF(FileOpen(f, FILE_WRITE | FILE_CSV | FILE_ANSI, ",", CP_UTF8)); + for(int i = 0; i < ArraySize(records); ++i) + { + if(!i) + { + records[i].asStringArray(data, true); + FileWriteString(h, StringCombine(data, ',') + "\n"); + ArrayFree(data); + } + records[i].asStringArray(data); + FileWriteString(h, StringCombine(data, ',') + "\n"); + ArrayFree(data); + } + + if(tzoffset != -1) + { + MqlCalendarRecord tz; + tz.revision = tzoffset; + tz.name = "(Server Time-Zone Offset)"; + tz.asStringArray(data); + FileWriteString(h, StringCombine(data, ',') + "\n"); + } + + FileClose(h); + } + else + { + ArrayPrint(records); + } + Print("Done"); + } + else + { + PrintFormat("Calendar history is not accessible (yet?) or there are no records in the given context. Error: %s (%d)", E2S(_LastError), _LastError); + } +} +//+------------------------------------------------------------------+ +/* + +CalendarValueHistory(values,from,to,CountryCode,Currency)=6 / ok +Near past and future calendar records (extended): + [id] [event_id] [time] [period] [revision] [actual_value] [prev_value] [revised_prev_value] [forecast_value] [impact_type] [reserved] [importance] [name] [currency] [code] [actual] [previous] [revised] [forecast] +[0] 162723 999020003 2022.06.23 03:00:00 1970.01.01 00:00:00 0 -9223372036854775808 -9223372036854775808 -9223372036854775808 -9223372036854775808 0 ... "High" "EU Leaders Summit" "EUR" "EU" nan nan nan nan +[1] 162724 999020003 2022.06.24 03:00:00 1970.01.01 00:00:00 0 -9223372036854775808 -9223372036854775808 -9223372036854775808 -9223372036854775808 0 ... "High" "EU Leaders Summit" "EUR" "EU" nan nan nan nan +[2] 168518 999010034 2022.06.24 11:00:00 1970.01.01 00:00:00 0 -9223372036854775808 -9223372036854775808 -9223372036854775808 -9223372036854775808 0 ... "Medium" "ECB Supervisory Board Member McCaul Speech" "EUR" "EU" nan nan nan nan +[3] 168515 999010031 2022.06.24 13:10:00 1970.01.01 00:00:00 0 -9223372036854775808 -9223372036854775808 -9223372036854775808 -9223372036854775808 0 ... "Medium" "ECB Supervisory Board Member Fernandez-Bollo Speech" "EUR" "EU" nan nan nan nan +[4] 168509 999010014 2022.06.24 14:30:00 1970.01.01 00:00:00 0 -9223372036854775808 -9223372036854775808 -9223372036854775808 -9223372036854775808 0 ... "Medium" "ECB Vice President de Guindos Speech" "EUR" "EU" nan nan nan nan +[5] 161014 999520001 2022.06.24 22:30:00 2022.06.21 00:00:00 0 -9223372036854775808 -6000000 -9223372036854775808 -9223372036854775808 0 ... "Low" "CFTC EUR Non-Commercial Net Positions" "EUR" "EU" nan -6.00000 nan nan + +*/ +//+------------------------------------------------------------------+ diff --git a/Economic Calendar CSV - script for MetaTrader 5/indicator.png b/Economic Calendar CSV - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Economic Calendar CSV - script for MetaTrader 5/indicator.png differ diff --git a/Economic Calendar CSV - script for MetaTrader 5/library.png b/Economic Calendar CSV - script for MetaTrader 5/library.png new file mode 100644 index 0000000..5c79a8f Binary files /dev/null and b/Economic Calendar CSV - script for MetaTrader 5/library.png differ diff --git a/Economic Calendar CSV - script for MetaTrader 5/logo-2.png b/Economic Calendar CSV - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Economic Calendar CSV - script for MetaTrader 5/logo-2.png differ diff --git a/Economic Calendar CSV - script for MetaTrader 5/mt5calfix__1.png b/Economic Calendar CSV - script for MetaTrader 5/mt5calfix__1.png new file mode 100644 index 0000000..24da1f3 Binary files /dev/null and b/Economic Calendar CSV - script for MetaTrader 5/mt5calfix__1.png differ diff --git a/Economic Calendar CSV - script for MetaTrader 5/script.png b/Economic Calendar CSV - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Economic Calendar CSV - script for MetaTrader 5/script.png differ diff --git a/Economic Calendar Data Aggregator - script for MetaTrader 5/README.md b/Economic Calendar Data Aggregator - script for MetaTrader 5/README.md new file mode 100644 index 0000000..2bfa646 --- /dev/null +++ b/Economic Calendar Data Aggregator - script for MetaTrader 5/README.md @@ -0,0 +1,19 @@ +# 🚀 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](script.png) + +## Source Files +- `economiccalendar_op.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Economic Calendar Data Aggregator - script for MetaTrader 5/economiccalendar_op.mq5 b/Economic Calendar Data Aggregator - script for MetaTrader 5/economiccalendar_op.mq5 new file mode 100644 index 0000000..ea894af --- /dev/null +++ b/Economic Calendar Data Aggregator - script for MetaTrader 5/economiccalendar_op.mq5 @@ -0,0 +1,119 @@ +//+------------------------------------------------------------------+ +//| EconomicCalendar_OP.mq5 | +//| Copyright 2022, MetaQuotes Ltd. | +//| https://www.mql5.com | +//+------------------------------------------------------------------+ +#property service +#property copyright "Copyright 2022, MetaQuotes Ltd." +#property link "https://www.mql5.com" +#property version "1.00" + +//+------------------------------------------------------------------+ +//| Service program start function | +//+------------------------------------------------------------------+ +void OnStart() + { +//--- + CreateTextFile(); + + } + + +void CreateTextFile() + { + if (FileIsExist("test.txt")) + { + FileDelete("test.txt"); + } + + int textFile=FileOpen("test.txt",FILE_READ|FILE_WRITE|FILE_ANSI|FILE_TXT); + if(textFile==INVALID_HANDLE) + { + Alert("Error opening file"); + } + WriteTextFile(textFile,"["); + MqlCalendarCountry countries []; + + int countries_count=CalendarCountries(countries); + //count=ArraySize(events); + + + for (int country_idx=0;country_idx0) + { + for(int event_idx=0; event_idx Made with ❤️ for the trading community. diff --git a/Export Calculated Prices & Indicator Buffers - script for MetaTrader 5/Sn1__1.png b/Export Calculated Prices & Indicator Buffers - script for MetaTrader 5/Sn1__1.png new file mode 100644 index 0000000..d3eda03 Binary files /dev/null and b/Export Calculated Prices & Indicator Buffers - script for MetaTrader 5/Sn1__1.png differ diff --git a/Export Calculated Prices & Indicator Buffers - script for MetaTrader 5/bi4.mq5 b/Export Calculated Prices & Indicator Buffers - script for MetaTrader 5/bi4.mq5 new file mode 100644 index 0000000..af3d414 Binary files /dev/null and b/Export Calculated Prices & Indicator Buffers - script for MetaTrader 5/bi4.mq5 differ diff --git a/Export Calculated Prices & Indicator Buffers - script for MetaTrader 5/indicator.png b/Export Calculated Prices & Indicator Buffers - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Export Calculated Prices & Indicator Buffers - script for MetaTrader 5/indicator.png differ diff --git a/Export Calculated Prices & Indicator Buffers - script for MetaTrader 5/logo-2.png b/Export Calculated Prices & Indicator Buffers - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Export Calculated Prices & Indicator Buffers - script for MetaTrader 5/logo-2.png differ diff --git a/Export Calculated Prices & Indicator Buffers - script for MetaTrader 5/script.png b/Export Calculated Prices & Indicator Buffers - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Export Calculated Prices & Indicator Buffers - script for MetaTrader 5/script.png differ diff --git a/Export Calculated Prices & Indicator Buffers - script for MetaTrader 5/sn2__1.png b/Export Calculated Prices & Indicator Buffers - script for MetaTrader 5/sn2__1.png new file mode 100644 index 0000000..b46a75e Binary files /dev/null and b/Export Calculated Prices & Indicator Buffers - script for MetaTrader 5/sn2__1.png differ diff --git a/Export Deals History V1 - script for MetaTrader 5/Capture__3.PNG b/Export Deals History V1 - script for MetaTrader 5/Capture__3.PNG new file mode 100644 index 0000000..c3bdddd Binary files /dev/null and b/Export Deals History V1 - script for MetaTrader 5/Capture__3.PNG differ diff --git a/Export Deals History V1 - script for MetaTrader 5/README.md b/Export Deals History V1 - script for MetaTrader 5/README.md new file mode 100644 index 0000000..173d137 --- /dev/null +++ b/Export Deals History V1 - script for MetaTrader 5/README.md @@ -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](Capture__3.PNG) +![Screenshot](script.png) + +## Source Files +- `dummy.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Export Deals History V1 - script for MetaTrader 5/dummy.mq5 b/Export Deals History V1 - script for MetaTrader 5/dummy.mq5 new file mode 100644 index 0000000..27e09ad Binary files /dev/null and b/Export Deals History V1 - script for MetaTrader 5/dummy.mq5 differ diff --git a/Export Deals History V1 - script for MetaTrader 5/indicator.png b/Export Deals History V1 - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Export Deals History V1 - script for MetaTrader 5/indicator.png differ diff --git a/Export Deals History V1 - script for MetaTrader 5/logo-2.png b/Export Deals History V1 - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Export Deals History V1 - script for MetaTrader 5/logo-2.png differ diff --git a/Export Deals History V1 - script for MetaTrader 5/script.png b/Export Deals History V1 - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Export Deals History V1 - script for MetaTrader 5/script.png differ diff --git a/Export Indicator's Values - script for MetaTrader 5/ExportIndicatorwsValues_v2.png b/Export Indicator's Values - script for MetaTrader 5/ExportIndicatorwsValues_v2.png new file mode 100644 index 0000000..1d3dc12 Binary files /dev/null and b/Export Indicator's Values - script for MetaTrader 5/ExportIndicatorwsValues_v2.png differ diff --git a/Export Indicator's Values - script for MetaTrader 5/README.md b/Export Indicator's Values - script for MetaTrader 5/README.md new file mode 100644 index 0000000..ff66099 --- /dev/null +++ b/Export Indicator's Values - script for MetaTrader 5/README.md @@ -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 +- `exportindicatorwsvalues_v2.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Export Indicator's Values - script for MetaTrader 5/expert.png b/Export Indicator's Values - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/Export Indicator's Values - script for MetaTrader 5/expert.png differ diff --git a/Export Indicator's Values - script for MetaTrader 5/exportindicatorwsvalues_v2.mq5 b/Export Indicator's Values - script for MetaTrader 5/exportindicatorwsvalues_v2.mq5 new file mode 100644 index 0000000..16e8093 --- /dev/null +++ b/Export Indicator's Values - script for MetaTrader 5/exportindicatorwsvalues_v2.mq5 @@ -0,0 +1,63 @@ +//+------------------------------------------------------------------+ +//| Export Indicator Values | +//+------------------------------------------------------------------+ +#property description "This Script Export Indicators Values to CSV File." +#property description "(You can change the iCustom function parameters to change what indicator to export)" +#property copyright "NFTrader" +#property version "2.00" +#property script_show_inputs + +input int IndicatorPeriod=14; +input string Indicator_Directory_And_Name="Examples\\RSI"; +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() + { + MqlRates rates_array[]; + string sSymbol=Symbol(); + +// Convert Period to string to use it in the file name + string sPeriod=EnumToString(Period()); +// Comment to appear in the up left screen + Comment("Exporting ... Please wait... "); + +// Prepare file name, e.g: EURUSD_PERIOD_H1(RSI,14) + string ExtFileName; // ="XXXXXX_PERIOD_H1(RSI,14).CSV"; + ExtFileName=sSymbol; + int pos=StringFind(Indicator_Directory_And_Name,"\\",0); + string indicatorName=StringSubstr(Indicator_Directory_And_Name,pos+1,-1); + string indicatorPeriod=IntegerToString(IndicatorPeriod); + StringConcatenate(ExtFileName,sSymbol,"_",sPeriod,"(",indicatorName,",",indicatorPeriod,")",".CSV"); + + ArraySetAsSeries(rates_array,true); + int MaxBar=TerminalInfoInteger(TERMINAL_MAXBARS); + int iCurrent=CopyRates(sSymbol,Period(),0,MaxBar,rates_array); + + double IndicatorBuffer[]; + SetIndexBuffer(0,IndicatorBuffer,INDICATOR_DATA); + + int bars=Bars(sSymbol,PERIOD_CURRENT); + int to_copy=bars; + + int rsiHandle=iCustom(sSymbol,PERIOD_CURRENT,Indicator_Directory_And_Name,IndicatorPeriod); // Change here. + + CopyBuffer(rsiHandle,0,0,to_copy,IndicatorBuffer); + ArraySetAsSeries(IndicatorBuffer,true); + + int fileHandle=FileOpen(ExtFileName,FILE_WRITE|FILE_CSV); + + for(int i=iCurrent-IndicatorPeriod-1; i>0; i--) + { + string outputData=StringFormat("%s",TimeToString(rates_array[i].time,TIME_DATE)); + outputData+=","+TimeToString(rates_array[i].time,TIME_MINUTES); + outputData+=","+ DoubleToString(IndicatorBuffer[i],2); + outputData+="\n"; + + FileWriteString(fileHandle,outputData); + } + + FileClose(fileHandle); + Comment("Exported Successfully"); + } +//+------------------------------------------------------------------+ diff --git a/Export Indicator's Values - script for MetaTrader 5/indicator.png b/Export Indicator's Values - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Export Indicator's Values - script for MetaTrader 5/indicator.png differ diff --git a/Export Indicator's Values - script for MetaTrader 5/library.png b/Export Indicator's Values - script for MetaTrader 5/library.png new file mode 100644 index 0000000..5c79a8f Binary files /dev/null and b/Export Indicator's Values - script for MetaTrader 5/library.png differ diff --git a/Export Indicator's Values - script for MetaTrader 5/logo-2.png b/Export Indicator's Values - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Export Indicator's Values - script for MetaTrader 5/logo-2.png differ diff --git a/Export Indicator's Values - script for MetaTrader 5/script.png b/Export Indicator's Values - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Export Indicator's Values - script for MetaTrader 5/script.png differ diff --git a/Export Positions History V1 - script for MetaTrader 5/Capture__9.PNG b/Export Positions History V1 - script for MetaTrader 5/Capture__9.PNG new file mode 100644 index 0000000..89cc148 Binary files /dev/null and b/Export Positions History V1 - script for MetaTrader 5/Capture__9.PNG differ diff --git a/Export Positions History V1 - script for MetaTrader 5/README.md b/Export Positions History V1 - script for MetaTrader 5/README.md new file mode 100644 index 0000000..fab5f5e --- /dev/null +++ b/Export Positions History V1 - script for MetaTrader 5/README.md @@ -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](Capture__9.PNG) +![Screenshot](script.png) + +## Source Files +- `dummy.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Export Positions History V1 - script for MetaTrader 5/dummy.mq5 b/Export Positions History V1 - script for MetaTrader 5/dummy.mq5 new file mode 100644 index 0000000..27e09ad Binary files /dev/null and b/Export Positions History V1 - script for MetaTrader 5/dummy.mq5 differ diff --git a/Export Positions History V1 - script for MetaTrader 5/indicator.png b/Export Positions History V1 - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Export Positions History V1 - script for MetaTrader 5/indicator.png differ diff --git a/Export Positions History V1 - script for MetaTrader 5/logo-2.png b/Export Positions History V1 - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Export Positions History V1 - script for MetaTrader 5/logo-2.png differ diff --git a/Export Positions History V1 - script for MetaTrader 5/script.png b/Export Positions History V1 - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Export Positions History V1 - script for MetaTrader 5/script.png differ diff --git a/Export Summary Grouped by Symbols - script for MetaTrader 5/Capture2.PNG b/Export Summary Grouped by Symbols - script for MetaTrader 5/Capture2.PNG new file mode 100644 index 0000000..2f40dce Binary files /dev/null and b/Export Summary Grouped by Symbols - script for MetaTrader 5/Capture2.PNG differ diff --git a/Export Summary Grouped by Symbols - script for MetaTrader 5/Capture__1.PNG b/Export Summary Grouped by Symbols - script for MetaTrader 5/Capture__1.PNG new file mode 100644 index 0000000..2148012 Binary files /dev/null and b/Export Summary Grouped by Symbols - script for MetaTrader 5/Capture__1.PNG differ diff --git a/Export Summary Grouped by Symbols - script for MetaTrader 5/README.md b/Export Summary Grouped by Symbols - script for MetaTrader 5/README.md new file mode 100644 index 0000000..732884b --- /dev/null +++ b/Export Summary Grouped by Symbols - script for MetaTrader 5/README.md @@ -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](Capture2.PNG) +![Screenshot](Capture__1.PNG) +![Screenshot](script.png) + +## Source Files +- `dummy.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Export Summary Grouped by Symbols - script for MetaTrader 5/dummy.mq5 b/Export Summary Grouped by Symbols - script for MetaTrader 5/dummy.mq5 new file mode 100644 index 0000000..27e09ad Binary files /dev/null and b/Export Summary Grouped by Symbols - script for MetaTrader 5/dummy.mq5 differ diff --git a/Export Summary Grouped by Symbols - script for MetaTrader 5/indicator.png b/Export Summary Grouped by Symbols - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Export Summary Grouped by Symbols - script for MetaTrader 5/indicator.png differ diff --git a/Export Summary Grouped by Symbols - script for MetaTrader 5/logo-2.png b/Export Summary Grouped by Symbols - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Export Summary Grouped by Symbols - script for MetaTrader 5/logo-2.png differ diff --git a/Export Summary Grouped by Symbols - script for MetaTrader 5/script.png b/Export Summary Grouped by Symbols - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Export Summary Grouped by Symbols - script for MetaTrader 5/script.png differ diff --git a/Export Summary Grouped by Trading Days - script for MetaTrader 5/Capture3.PNG b/Export Summary Grouped by Trading Days - script for MetaTrader 5/Capture3.PNG new file mode 100644 index 0000000..8e4a76e Binary files /dev/null and b/Export Summary Grouped by Trading Days - script for MetaTrader 5/Capture3.PNG differ diff --git a/Export Summary Grouped by Trading Days - script for MetaTrader 5/Capture__2.PNG b/Export Summary Grouped by Trading Days - script for MetaTrader 5/Capture__2.PNG new file mode 100644 index 0000000..7969829 Binary files /dev/null and b/Export Summary Grouped by Trading Days - script for MetaTrader 5/Capture__2.PNG differ diff --git a/Export Summary Grouped by Trading Days - script for MetaTrader 5/README.md b/Export Summary Grouped by Trading Days - script for MetaTrader 5/README.md new file mode 100644 index 0000000..e63c7c5 --- /dev/null +++ b/Export Summary Grouped by Trading Days - script for MetaTrader 5/README.md @@ -0,0 +1,22 @@ +# 🚀 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](Capture3.PNG) +![Screenshot](Capture__2.PNG) +![Screenshot](library.png) +![Screenshot](script.png) + +## Source Files +- `dummy.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Export Summary Grouped by Trading Days - script for MetaTrader 5/dummy.mq5 b/Export Summary Grouped by Trading Days - script for MetaTrader 5/dummy.mq5 new file mode 100644 index 0000000..27e09ad Binary files /dev/null and b/Export Summary Grouped by Trading Days - script for MetaTrader 5/dummy.mq5 differ diff --git a/Export Summary Grouped by Trading Days - script for MetaTrader 5/indicator.png b/Export Summary Grouped by Trading Days - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Export Summary Grouped by Trading Days - script for MetaTrader 5/indicator.png differ diff --git a/Export Summary Grouped by Trading Days - script for MetaTrader 5/library.png b/Export Summary Grouped by Trading Days - script for MetaTrader 5/library.png new file mode 100644 index 0000000..5c79a8f Binary files /dev/null and b/Export Summary Grouped by Trading Days - script for MetaTrader 5/library.png differ diff --git a/Export Summary Grouped by Trading Days - script for MetaTrader 5/logo-2.png b/Export Summary Grouped by Trading Days - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Export Summary Grouped by Trading Days - script for MetaTrader 5/logo-2.png differ diff --git a/Export Summary Grouped by Trading Days - script for MetaTrader 5/script.png b/Export Summary Grouped by Trading Days - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Export Summary Grouped by Trading Days - script for MetaTrader 5/script.png differ diff --git a/Export historical data - script for MetaTrader 5/README.md b/Export historical data - script for MetaTrader 5/README.md new file mode 100644 index 0000000..c98c9a8 --- /dev/null +++ b/Export historical data - script for MetaTrader 5/README.md @@ -0,0 +1,19 @@ +# 🚀 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](script.png) + +## Source Files +- `history_in_mathcad.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Export historical data - script for MetaTrader 5/expert.png b/Export historical data - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/Export historical data - script for MetaTrader 5/expert.png differ diff --git a/Export historical data - script for MetaTrader 5/history_in_mathcad.mq5 b/Export historical data - script for MetaTrader 5/history_in_mathcad.mq5 new file mode 100644 index 0000000..0fecaa6 --- /dev/null +++ b/Export historical data - script for MetaTrader 5/history_in_mathcad.mq5 @@ -0,0 +1,117 @@ +//+------------------------------------------------------------------+ +//| History_in_MathCAD.mq5 | +//| Privalov S.V. | +//| https://login.mql5.com/en/users/Prival | +//+------------------------------------------------------------------+ +#property copyright "Privalov S.V." +#property link "https://login.mql5.com/en/users/Prival" +#property version "1.08" +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() + { +//---- + WriteFile( 1,5,2010); // day, month, year + WriteFile( 1,6,2010); // + return;// script completed + } +//+------------------------------------------------------------------+ +//| WriteFile | +//+------------------------------------------------------------------+ +int WriteFile(int Day,int Month,int Year) + { +//--- if Day<1, then we get data from the beginning of month + if(Day<1) Day=1; + + string FileName=""; + int copied=0; + int FileHandle=0; + +//--- file name formation, (Symbol+Period+Month) EURUSD_M1_09.txt + FileName=Symbol()+"_"+fTimeFrameName(_Period)+"_"+IntegerToString(Month,2,'0')+".TXT"; + MqlRates rates[]; + MqlDateTime tm; + ArraySetAsSeries(rates,true); + + string start_time=IntegerToString(Year)+"."+IntegerToString(Month,2,'0')+"."+IntegerToString(Day,2,'0'); // + + ResetLastError(); + + copied=CopyRates(Symbol(),_Period,StringToTime(start_time),TimeCurrent(),rates); + + if(copied>0) + { + //--- open file for writing, ANSI codepage + FileHandle=FileOpen(FileName,FILE_WRITE|FILE_ANSI); + if(FileHandle!=INVALID_HANDLE) + { + for(int i=copied-1;i>=0;i--) + { + TimeToStruct(rates[i].time,tm); + if(tm.day>=Day && tm.mon==Month && tm.year==Year) // check for the specified range + FileWrite(FileHandle,// write data to file + DoubleToString(rates[i].time,0), // number of seconds, passed from 1st January 1970 + rates[i].open, // Open + rates[i].high, // High + rates[i].low, // Low + rates[i].close, // Close + rates[i].tick_volume, // Tick Volume + tm.year, // your + tm.mon, // month + tm.day, // day + tm.hour, // hour + tm.min, // minutes + tm.day_of_week, // week day (0-sunday, 1-monday) + tm.day_of_year); // day index in the year (1st January is the 0-th day of the year) + } + Print("Data of the ",IntegerToString(Month,2,'0')," month ",Year," year written to file ",FileName); + } + else Print("Error in call of CopyRates for the Symols",Symbol()," err=",GetLastError()); + } + +//--- close file (free handle), to make it available for other programs + FileClose(FileHandle); + + return(0); + } +//+------------------------------------------------------------------+ +//| fTimeFrameName | +//+------------------------------------------------------------------+ +string fTimeFrameName(int arg) + { + int v; + if(arg==0) + { + v=_Period; + } + else + { + v=arg; + } + switch(v) + { + case PERIOD_M1: return("M1"); + case PERIOD_M2: return("M2"); + case PERIOD_M3: return("M3"); + case PERIOD_M4: return("M4"); + case PERIOD_M5: return("M5"); + case PERIOD_M6: return("M6"); + case PERIOD_M10: return("M10"); + case PERIOD_M12: return("M12"); + case PERIOD_M15: return("M15"); + case PERIOD_M20: return("M20"); + case PERIOD_M30: return("M30"); + case PERIOD_H1: return("H1"); + case PERIOD_H2: return("H2"); + case PERIOD_H3: return("H3"); + case PERIOD_H4: return("H4"); + case PERIOD_H6: return("H6"); + case PERIOD_H8: return("H8"); + case PERIOD_H12: return("H12"); + case PERIOD_D1: return("D1"); + case PERIOD_W1: return("W1"); + case PERIOD_MN1: return("MN1"); + default: return("?"); + } + } // end fTimeFrameName diff --git a/Export historical data - script for MetaTrader 5/indicator.png b/Export historical data - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Export historical data - script for MetaTrader 5/indicator.png differ diff --git a/Export historical data - script for MetaTrader 5/logo-2.png b/Export historical data - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Export historical data - script for MetaTrader 5/logo-2.png differ diff --git a/Export historical data - script for MetaTrader 5/script.png b/Export historical data - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Export historical data - script for MetaTrader 5/script.png differ diff --git a/Export trade history to CSV - script for MetaTrader 5/README.md b/Export trade history to CSV - script for MetaTrader 5/README.md new file mode 100644 index 0000000..b37fa08 --- /dev/null +++ b/Export trade history to CSV - script for MetaTrader 5/README.md @@ -0,0 +1,19 @@ +# 🚀 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](script.png) + +## Source Files +- `s_closed_positions_export_to_csv.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Export trade history to CSV - script for MetaTrader 5/indicator.png b/Export trade history to CSV - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Export trade history to CSV - script for MetaTrader 5/indicator.png differ diff --git a/Export trade history to CSV - script for MetaTrader 5/logo-2.png b/Export trade history to CSV - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Export trade history to CSV - script for MetaTrader 5/logo-2.png differ diff --git a/Export trade history to CSV - script for MetaTrader 5/s_closed_positions_export_to_csv.mq5 b/Export trade history to CSV - script for MetaTrader 5/s_closed_positions_export_to_csv.mq5 new file mode 100644 index 0000000..4a0e111 Binary files /dev/null and b/Export trade history to CSV - script for MetaTrader 5/s_closed_positions_export_to_csv.mq5 differ diff --git a/Export trade history to CSV - script for MetaTrader 5/script.png b/Export trade history to CSV - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Export trade history to CSV - script for MetaTrader 5/script.png differ diff --git a/Export trade history to CSV v2 - script for MetaTrader 5/README.md b/Export trade history to CSV v2 - script for MetaTrader 5/README.md new file mode 100644 index 0000000..6edd40a --- /dev/null +++ b/Export trade history to CSV v2 - script for MetaTrader 5/README.md @@ -0,0 +1,19 @@ +# 🚀 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](script.png) + +## Source Files +- `s_closed_positions_export_to_csv_v2.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Export trade history to CSV v2 - script for MetaTrader 5/indicator.png b/Export trade history to CSV v2 - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Export trade history to CSV v2 - script for MetaTrader 5/indicator.png differ diff --git a/Export trade history to CSV v2 - script for MetaTrader 5/logo-2.png b/Export trade history to CSV v2 - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Export trade history to CSV v2 - script for MetaTrader 5/logo-2.png differ diff --git a/Export trade history to CSV v2 - script for MetaTrader 5/s_closed_positions_export_to_csv_v2.mq5 b/Export trade history to CSV v2 - script for MetaTrader 5/s_closed_positions_export_to_csv_v2.mq5 new file mode 100644 index 0000000..ed13402 Binary files /dev/null and b/Export trade history to CSV v2 - script for MetaTrader 5/s_closed_positions_export_to_csv_v2.mq5 differ diff --git a/Export trade history to CSV v2 - script for MetaTrader 5/script.png b/Export trade history to CSV v2 - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Export trade history to CSV v2 - script for MetaTrader 5/script.png differ diff --git a/Exposure - script for MetaTrader 5/README.md b/Exposure - script for MetaTrader 5/README.md new file mode 100644 index 0000000..6ff0adc --- /dev/null +++ b/Exposure - script for MetaTrader 5/README.md @@ -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 +- `exposure.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Exposure - script for MetaTrader 5/exposure.mq5 b/Exposure - script for MetaTrader 5/exposure.mq5 new file mode 100644 index 0000000..8746b62 --- /dev/null +++ b/Exposure - script for MetaTrader 5/exposure.mq5 @@ -0,0 +1,88 @@ +//+------------------------------------------------------------------+ +//| Exposure.mq5 | +//| iv | +//| http://www.mql5.com | +//+------------------------------------------------------------------+ +#property copyright "iv" +#property link "http://www.mql5.com" +#property version "1.00" +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +int ValuToIndex(string SIndex) // in=Valu_string; out=Index_of_Valu; + { + if(SIndex=="EUR") return(0); + if(SIndex=="USD") return(1); + if(SIndex=="JPY") return(2); + if(SIndex=="CHF") return(3); + if(SIndex=="GBP") return(4); + if(SIndex=="CAD") return(5); + return(-1); + } +//+------------------------------------------------------------------+ +//| | +//+------------------------------------------------------------------+ +string IndexToValu(int VIndex) // in=Index_of_Valu; out=Valu_string; + { + if(VIndex==0) return("EUR"); + if(VIndex==1) return("USD"); + if(VIndex==2) return("JPY"); + if(VIndex==3) return("CHF"); + if(VIndex==4) return("GBP"); + if(VIndex==5) return("CAD"); + return("ANY"); + } +//+------------------------------------------------------------------+ +//| | +//+------------------------------------------------------------------+ +void OnStart() // Exposure() : result is V[] and LotV + { + int EI,EJ; // Local index + const int Vmax=5; // index of last used valu +1 , first index=0 ! + double V[5]; // Valu exposure ; 0=EUR,1=USD,2=JPY,3=CHF,4=GBP,5=CAD ... no other for now. + string Val1,Val2; // Current Symbol ( valu-pair == Val1/Val2 ) + double LotV; // Sum all lots + string Out; // Text on the screen + + for(EI=0;EI Made with ❤️ for the trading community. diff --git a/Fast Pending Orders - script for MetaTrader 5/expert.png b/Fast Pending Orders - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/Fast Pending Orders - script for MetaTrader 5/expert.png differ diff --git a/Fast Pending Orders - script for MetaTrader 5/fast_pending_orders-v1.1.mq5 b/Fast Pending Orders - script for MetaTrader 5/fast_pending_orders-v1.1.mq5 new file mode 100644 index 0000000..8f1a56d Binary files /dev/null and b/Fast Pending Orders - script for MetaTrader 5/fast_pending_orders-v1.1.mq5 differ diff --git a/Fast Pending Orders - script for MetaTrader 5/indicator.png b/Fast Pending Orders - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Fast Pending Orders - script for MetaTrader 5/indicator.png differ diff --git a/Fast Pending Orders - script for MetaTrader 5/logo-2.png b/Fast Pending Orders - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Fast Pending Orders - script for MetaTrader 5/logo-2.png differ diff --git a/Fast Pending Orders - script for MetaTrader 5/script.png b/Fast Pending Orders - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Fast Pending Orders - script for MetaTrader 5/script.png differ diff --git a/Fear And Greed Function - script for MetaTrader 5/README.md b/Fear And Greed Function - script for MetaTrader 5/README.md new file mode 100644 index 0000000..d95bd8d --- /dev/null +++ b/Fear And Greed Function - script for MetaTrader 5/README.md @@ -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 +- `fearlgreed.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Fear And Greed Function - script for MetaTrader 5/expert.png b/Fear And Greed Function - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/Fear And Greed Function - script for MetaTrader 5/expert.png differ diff --git a/Fear And Greed Function - script for MetaTrader 5/fearlgreed.mq5 b/Fear And Greed Function - script for MetaTrader 5/fearlgreed.mq5 new file mode 100644 index 0000000..97aeb57 --- /dev/null +++ b/Fear And Greed Function - script for MetaTrader 5/fearlgreed.mq5 @@ -0,0 +1,379 @@ +//+------------------------------------------------------------------+ +//| Fear&Greed.mq5 | +//| Copyright 2022, Igor Gerasimov. | +//| tgwls2@gmail.com | +//+------------------------------------------------------------------+ +#property copyright "Copyright 2022, Igor Gerasimov." +#property link "tgwls2@gmail.com" +#property version "1.00" +class FearNgreed +{ +private: + uchar prd_stp, // the number of trading operations in the expected recovery period + prl_stp; // last value of trading operations in the expected recovery period + ushort mtv_stp; // the number of trading epochs + double sns_typ, // type of sensitivity (0-COWARD/1-BRAVE) + lst_bal, // highest account balance + act_bal, // actual account balance + mtv_bal, // motive account balance + mtl_bal, // last value of motive account balance + sts_bal, // stress account balance + act_eqy, // actual equity + add_eqy, // fear addition + lvl_mgn, // actual margin level percent + cff_dec, // balance reduction factor + cff_prf, // actual profit factor + cff_mgn, // margin level factor + cff_mtv, // motive factor - account balance increase at the end of time + val_mtv, // motive value - epoch account balance increase + mul_cwd, // coward factor + mul_nrm, // normal factor + mul_brv; // brave factor + bool amp_dec, // amplify balance reduction + amp_prf, // amplify actual profit + amp_mgn, // amplify margin level + aut_cff, // auto tune weight factors + aut_stp; // auto setup of the number of trading operations in the expected recovery period + ENUM_TIMEFRAMES cue_tim; // epoch duration + datetime act_tim; // actual day +public: + FearNgreed() + { + sns_typ=0; + prd_stp=4; + prl_stp=4; + mtv_stp=261; + lst_bal=AccountInfoDouble(ACCOUNT_BALANCE); + act_bal=lst_bal; + sts_bal=lst_bal; + act_eqy=AccountInfoDouble(ACCOUNT_EQUITY); + add_eqy=0; + lvl_mgn=AccountInfoDouble(ACCOUNT_MARGIN_LEVEL); + cff_dec=2; + cff_prf=9; + cff_mgn=1; + cff_mtv=M_E; + val_mtv=MathPow(cff_mtv,1/(double)mtv_stp); + mtv_bal=lst_bal*val_mtv; + mtl_bal=lst_bal; + mul_cwd=1; + mul_nrm=0; + mul_brv=0; + amp_dec=true; + amp_prf=true; + amp_mgn=true; + aut_cff=false; + aut_stp=false; + cue_tim=PERIOD_D1; + act_tim=iTime(_Symbol,cue_tim,0); + return; + } + ~FearNgreed() + { + } + void SetSensitivity(const double a) + { + sns_typ=a<1?(a>-1?a:-1):1; + const double t=0.5-sns_typ; + mul_cwd=1-MathSqrt(1-MathPow(t>0?t*2:0,2)); + mul_nrm=MathSqrt(1-MathPow(MathAbs(t)*2,2)); + mul_brv=1-MathSqrt(1-MathPow(-t>0?-t*2:0,2)); + if(aut_stp) prd_stp=2+(uchar)(253*sns_typ); + return; + } + double GetSensitivity() + { + return(sns_typ); + } + void SetTuneWeightFactors(const bool a) + { + aut_cff=a; + return; + } + bool GetTuneWeightFactors() + { + return(aut_cff); + } + void SetAutoRecoverySteps(const bool a) + { + aut_stp=a; + prd_stp=aut_stp?2+(uchar)(253*sns_typ):prl_stp; + return; + } + bool GetAutoRecoverySteps() + { + return(aut_stp); + } + void SetRecoverySteps(const uchar a) + { + prd_stp=a>1?a:2; + prl_stp=prd_stp; + return; + } + uchar GetRecoverySteps() + { + return(prd_stp); + } + void SetMotiveEpoch(const ENUM_TIMEFRAMES a) + { + cue_tim=a; + return; + } + ENUM_TIMEFRAMES GetMotiveEpoch() + { + return(cue_tim); + } + void SetMotiveSteps(const ushort a) + { + mtv_stp=a>0?(a<366?a:365):1; + val_mtv=MathPow(cff_mtv,1/(double)mtv_stp); + mtv_bal=mtl_bal*val_mtv; + return; + } + ushort GetMotiveSteps() + { + return(mtv_stp); + } + void SetMotiveFactor(const double a) + { + cff_mtv=a>1?a:1+DBL_EPSILON; + val_mtv=MathPow(cff_mtv,1/(double)mtv_stp); + mtv_bal=mtl_bal*val_mtv; + return; + } + double GetMotiveFactor() + { + return(cff_mtv); + } + void SetInitialBalance(const double a) + { + lst_bal=a>0?(a>=AccountInfoDouble(ACCOUNT_BALANCE)?a:AccountInfoDouble(ACCOUNT_BALANCE)):(0>=AccountInfoDouble(ACCOUNT_BALANCE)?0:AccountInfoDouble(ACCOUNT_BALANCE)); + mtv_bal=lst_bal*val_mtv; + mtl_bal=lst_bal; + return; + } + double GetInitialBalance() + { + return(lst_bal); + } + double GetMotiveBalance() + { + return(mtv_bal); + } + void SetActualBalance() + { + act_bal=AccountInfoDouble(ACCOUNT_BALANCE); + return; + } + double GetActualBalance() + { + return(act_bal); + } + void SetActualEquity() + { + act_eqy=AccountInfoDouble(ACCOUNT_EQUITY); + return; + } + double GetActualEquity() + { + return(act_eqy); + } + void SetMarginLevel() + { + lvl_mgn=AccountInfoDouble(ACCOUNT_MARGIN_LEVEL); + return; + } + double GetMarginLevel() + { + return(lvl_mgn); + } + void TrailInitialBalance() + { + lst_bal=AccountInfoDouble(ACCOUNT_BALANCE)>lst_bal?AccountInfoDouble(ACCOUNT_BALANCE):lst_bal; + return; + } + void TrailMotiveValues() + { + if(act_tim!=iTime(_Symbol,cue_tim,0)) + { + mtl_bal=mtv_bal; + mtv_bal*=val_mtv; + sts_bal=AccountInfoDouble(ACCOUNT_BALANCE); + act_tim=iTime(_Symbol,cue_tim,0); + } + return; + } + void TrailActualValues() + { + SetActualBalance(); + SetActualEquity(); + SetMarginLevel(); + return; + } + void SetReductionAmplification(const bool a) + { + amp_dec=a; + return; + } + bool GetReductionAmplification() + { + return(amp_dec); + } + double GetReductionFactor() + { + return(cff_dec); + } + double GetReductionValue() // Deposite Loss Fear + { + const double t=act_bal>0?MathPow(lst_bal/act_bal,1/(double)prd_stp)-1:1, + v=t<1?(t>-1?t:-1):1; + return(amp_dec?MathSin(v*M_PI_2):v); + } + void SetProfitAmplification(const bool a) + { + amp_prf=a; + return; + } + bool GetProfitAmplification() + { + return(amp_prf); + } + double GetProfitFactor() + { + return(cff_prf); + } + double GetProfitValue() // Negative Profit Fear + { + const double t=MathAbs(lst_bal)>=DBL_EPSILON?(lst_bal-act_eqy)/lst_bal:0, + v=t<1?(t>-1?t:-1):1; + add_eqy=t<0?-t:0; + return(amp_prf?MathSin(v*M_PI_2):v); + } + void SetMarginAmplification(const bool a) + { + amp_mgn=a; + return; + } + bool GetMarginAmplification() + { + return(amp_mgn); + } + double GetMarginFactor() + { + return(cff_mgn); + } + void SetWeightFactors(const double a,const double b,const double c) // a - balance reduction/ b - actual profit/ c - margin level + { + const double s=a+b+c; + if(s!=12) + { + if(MathAbs(s)=DBL_EPSILON)?100/lvl_mgn:0, + v=t<1?(t>-1?t:-1):1; + return(amp_mgn?MathSin(v*M_PI_2):v); + } + double GetFear() // General Fear + { + TrailActualValues(); + const double t_prf=GetProfitValue(); + double w_dec=cff_dec,w_prf=cff_prf,w_mgn=cff_mgn,t_dec=0,t_mgn=0,t=0; + if(act_eqy=DBL_EPSILON) + { + w_dec=cff_dec+(t_dec-n)*d_dec/d; + w_mgn=cff_mgn+(t_mgn-n)*d_mgn/d; + const double s=w_dec+w_prf+w_mgn; + if(MathAbs(s)-12?t:-12):12)/12*M_PI_2)*mul_nrm+ + (t>=0?MathSqrt(144-MathPow(-t>-12?-t:-12,2))/12-1:1-MathSqrt(144-MathPow(-t<12?-t:12,2))/12)*mul_brv):add_eqy); + } + double GetGreed() // General Greed + { + return(1+GetFear()); + } + double GetMotive() // General Motive + { + TrailActualValues(); + const double t=mtv_bal-(lst_bal=DBL_EPSILON? + MathTanh((1-(lst_bal=DBL_EPSILON?AccountInfoDouble(ACCOUNT_PROFIT)/(t*prl_stp):0; + return(MathSin((v<1?(v>-1?v:-1):1)*M_PI_2)); + } +}; +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() +{ + FearNgreed FnG; + FnG.SetWeightFactors(3,7,2); // Set Any Positive Three Values Whose Sum Is Not Zero + FnG.SetTuneWeightFactors(true); // Auto Tune Weight Factors + FnG.SetAutoRecoverySteps(true); // Calculate Recovery Steps Value Depending On Sensitivity + FnG.SetSensitivity(0.5); // 0 - SAFE / 0.5 - NORMAL / 1 - RISKY +// FnG.SetInitialBalance(20000); // Set Any Value Equal Or Greater Than Actual Balance + while(!IsStopped()) + { + if(AccountInfoDouble(ACCOUNT_BALANCE)!=FnG.GetInitialBalance()) FnG.TrailInitialBalance(); + FnG.TrailMotiveValues(); + const double t=FnG.GetFear(), + v=FnG.GetMotive(); // Remaining Epoch Commitments To Be Done + Comment(" Fear: "+DoubleToString(t,5),"\n", + " Stress: "+DoubleToString(FnG.GetStress(),5),"\n","\n", + " Greed: "+DoubleToString(1+t,5),"\n", + "Motive: "+DoubleToString(v,5)); + Sleep(999); + } + Comment(""); +} +//+------------------------------------------------------------------+ diff --git a/Fear And Greed Function - script for MetaTrader 5/indicator.png b/Fear And Greed Function - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Fear And Greed Function - script for MetaTrader 5/indicator.png differ diff --git a/Fear And Greed Function - script for MetaTrader 5/library.png b/Fear And Greed Function - script for MetaTrader 5/library.png new file mode 100644 index 0000000..5c79a8f Binary files /dev/null and b/Fear And Greed Function - script for MetaTrader 5/library.png differ diff --git a/Fear And Greed Function - script for MetaTrader 5/logo-2.png b/Fear And Greed Function - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Fear And Greed Function - script for MetaTrader 5/logo-2.png differ diff --git a/Fear And Greed Function - script for MetaTrader 5/script.png b/Fear And Greed Function - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Fear And Greed Function - script for MetaTrader 5/script.png differ diff --git a/Fibonacci Expansion with Custom Values - script for MetaTrader 5/1840954412467__1.png b/Fibonacci Expansion with Custom Values - script for MetaTrader 5/1840954412467__1.png new file mode 100644 index 0000000..0903255 Binary files /dev/null and b/Fibonacci Expansion with Custom Values - script for MetaTrader 5/1840954412467__1.png differ diff --git a/Fibonacci Expansion with Custom Values - script for MetaTrader 5/README.md b/Fibonacci Expansion with Custom Values - script for MetaTrader 5/README.md new file mode 100644 index 0000000..86a1475 --- /dev/null +++ b/Fibonacci Expansion with Custom Values - script for MetaTrader 5/README.md @@ -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](1840954412467__1.png) +![Screenshot](script.png) + +## Source Files +- `fibonacci_expansion.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Fibonacci Expansion with Custom Values - script for MetaTrader 5/fibonacci_expansion.mq5 b/Fibonacci Expansion with Custom Values - script for MetaTrader 5/fibonacci_expansion.mq5 new file mode 100644 index 0000000..3460b5b Binary files /dev/null and b/Fibonacci Expansion with Custom Values - script for MetaTrader 5/fibonacci_expansion.mq5 differ diff --git a/Fibonacci Expansion with Custom Values - script for MetaTrader 5/indicator.png b/Fibonacci Expansion with Custom Values - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Fibonacci Expansion with Custom Values - script for MetaTrader 5/indicator.png differ diff --git a/Fibonacci Expansion with Custom Values - script for MetaTrader 5/logo-2.png b/Fibonacci Expansion with Custom Values - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Fibonacci Expansion with Custom Values - script for MetaTrader 5/logo-2.png differ diff --git a/Fibonacci Expansion with Custom Values - script for MetaTrader 5/script.png b/Fibonacci Expansion with Custom Values - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Fibonacci Expansion with Custom Values - script for MetaTrader 5/script.png differ diff --git a/Fibonacci Fan with Custom Values - script for MetaTrader 5/2495418563303__1.png b/Fibonacci Fan with Custom Values - script for MetaTrader 5/2495418563303__1.png new file mode 100644 index 0000000..f54e0f9 Binary files /dev/null and b/Fibonacci Fan with Custom Values - script for MetaTrader 5/2495418563303__1.png differ diff --git a/Fibonacci Fan with Custom Values - script for MetaTrader 5/README.md b/Fibonacci Fan with Custom Values - script for MetaTrader 5/README.md new file mode 100644 index 0000000..6602a5d --- /dev/null +++ b/Fibonacci Fan with Custom Values - script for MetaTrader 5/README.md @@ -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](2495418563303__1.png) +![Screenshot](script.png) + +## Source Files +- `fibonacci_fan.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Fibonacci Fan with Custom Values - script for MetaTrader 5/fibonacci_fan.mq5 b/Fibonacci Fan with Custom Values - script for MetaTrader 5/fibonacci_fan.mq5 new file mode 100644 index 0000000..ed1fcd2 Binary files /dev/null and b/Fibonacci Fan with Custom Values - script for MetaTrader 5/fibonacci_fan.mq5 differ diff --git a/Fibonacci Fan with Custom Values - script for MetaTrader 5/indicator.png b/Fibonacci Fan with Custom Values - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Fibonacci Fan with Custom Values - script for MetaTrader 5/indicator.png differ diff --git a/Fibonacci Fan with Custom Values - script for MetaTrader 5/logo-2.png b/Fibonacci Fan with Custom Values - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Fibonacci Fan with Custom Values - script for MetaTrader 5/logo-2.png differ diff --git a/Fibonacci Fan with Custom Values - script for MetaTrader 5/script.png b/Fibonacci Fan with Custom Values - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Fibonacci Fan with Custom Values - script for MetaTrader 5/script.png differ diff --git a/Fibonacci Potential Entry - MT5 - script for MetaTrader 5/README.md b/Fibonacci Potential Entry - MT5 - script for MetaTrader 5/README.md new file mode 100644 index 0000000..3c958ec --- /dev/null +++ b/Fibonacci Potential Entry - MT5 - script for MetaTrader 5/README.md @@ -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 +- `sct_fibonaccipotentialentries.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Fibonacci Potential Entry - MT5 - script for MetaTrader 5/expert.png b/Fibonacci Potential Entry - MT5 - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/Fibonacci Potential Entry - MT5 - script for MetaTrader 5/expert.png differ diff --git a/Fibonacci Potential Entry - MT5 - script for MetaTrader 5/indicator.png b/Fibonacci Potential Entry - MT5 - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Fibonacci Potential Entry - MT5 - script for MetaTrader 5/indicator.png differ diff --git a/Fibonacci Potential Entry - MT5 - script for MetaTrader 5/library.png b/Fibonacci Potential Entry - MT5 - script for MetaTrader 5/library.png new file mode 100644 index 0000000..5c79a8f Binary files /dev/null and b/Fibonacci Potential Entry - MT5 - script for MetaTrader 5/library.png differ diff --git a/Fibonacci Potential Entry - MT5 - script for MetaTrader 5/logo-2.png b/Fibonacci Potential Entry - MT5 - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Fibonacci Potential Entry - MT5 - script for MetaTrader 5/logo-2.png differ diff --git a/Fibonacci Potential Entry - MT5 - script for MetaTrader 5/script.png b/Fibonacci Potential Entry - MT5 - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Fibonacci Potential Entry - MT5 - script for MetaTrader 5/script.png differ diff --git a/Fibonacci Potential Entry - MT5 - script for MetaTrader 5/sct_fibonaccipotentialentries.mq5 b/Fibonacci Potential Entry - MT5 - script for MetaTrader 5/sct_fibonaccipotentialentries.mq5 new file mode 100644 index 0000000..846ea53 --- /dev/null +++ b/Fibonacci Potential Entry - MT5 - script for MetaTrader 5/sct_fibonaccipotentialentries.mq5 @@ -0,0 +1,77 @@ +//+------------------------------------------------------------------+ +//| SCT_FibonacciPotentialEntries.mq5 | +//| Copyright 2020, Forex Jarvis. | +//| info@fxweirdos.com | +//+------------------------------------------------------------------+ +#property copyright "Copyright 2020, Forex Jarvis. info@fxweirdos.com" +#property link "https://fxweirdos.com" +#property version "1.00" +#property script_show_inputs +#include + +CTrade trade; + +input double dP50Level=0; // Price on 50% Level on M5 TF +input double dP61Level=0; // Price on 61% Level on M5 TF +input double dP100Level=0; // Price on 100% Level on M5 TF +input double dTarget2=0; // Second Target on H1 TF + +input double dRisk = 2; // RISK in % + +double dVolTradeBL1; +double dVolTradeBL2; + +double dVolTradeSL1; +double dVolTradeSL2; + +// INPUT TYPE PRICE ACTION +enum boolTypeMarket{ + A1 = 1, // Bull + A2 = 2, // Bear +}; +input boolTypeMarket bType = A1; // Bull/Bear + +double dLotSize(string sSymbol, double dPrice, double dSL, double dRiskAmount) { + + double dp=0; + if (SymbolInfoInteger(sSymbol,SYMBOL_DIGITS)==1 || SymbolInfoInteger(sSymbol,SYMBOL_DIGITS)==3 || SymbolInfoInteger(sSymbol,SYMBOL_DIGITS)==5) + dp=10; + else + dp=1; + double pipPos = SymbolInfoDouble(sSymbol,SYMBOL_POINT)*dp; + double dNbPips = NormalizeDouble(MathAbs((dPrice-dSL)/pipPos),1); + double PipValue = SymbolInfoDouble(sSymbol,SYMBOL_TRADE_TICK_VALUE)*pipPos/SymbolInfoDouble(sSymbol,SYMBOL_TRADE_TICK_SIZE); + double dAmountRisk = AccountInfoDouble(ACCOUNT_BALANCE)*dRiskAmount/100; + + return NormalizeDouble(dAmountRisk/(dNbPips*PipValue), 2); + +} + +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() + { + + double dAsk = NormalizeDouble(SymbolInfoDouble(_Symbol,SYMBOL_ASK),_Digits); + double dBid = NormalizeDouble(SymbolInfoDouble(_Symbol,SYMBOL_BID),_Digits); + double dSpread = dAsk-dBid; + + dVolTradeBL1 = dLotSize(_Symbol, dP50Level, dP61Level-3*dSpread, dRisk*0.33); + dVolTradeBL2 = dLotSize(_Symbol, dP61Level, (dP61Level+dP100Level)/2-(3*dSpread), dRisk*0.67); + + dVolTradeSL1 = dLotSize(_Symbol, dP50Level, dP61Level+3*dSpread, dRisk*0.33); + dVolTradeSL2 = dLotSize(_Symbol, dP61Level, (dP61Level+dP100Level)/2+(3*dSpread), dRisk*0.67); + + if (bType==1) { + trade.BuyLimit(dVolTradeBL1,dP50Level, _Symbol, dP61Level-3*dSpread, dTarget2,0,0,"1st Trade"); + trade.BuyLimit(dVolTradeBL2,dP61Level, _Symbol, (dP61Level+dP100Level)/2-(3*dSpread), dTarget2,0,0,"2nd Trade"); + + } else if (bType==2) { + trade.SellLimit(dVolTradeSL1,dP50Level, _Symbol, dP61Level+3*dSpread, dTarget2,0,0,"1st Trade"); + trade.SellLimit(dVolTradeSL2,dP61Level, _Symbol, (dP61Level+dP100Level)/2+(3*dSpread), dTarget2,0,0,"2nd Trade"); + } + + + +} \ No newline at end of file diff --git a/Fibonacci Retracement - script for MetaTrader 5/README.md b/Fibonacci Retracement - script for MetaTrader 5/README.md new file mode 100644 index 0000000..571d50e --- /dev/null +++ b/Fibonacci Retracement - script for MetaTrader 5/README.md @@ -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](Screenshot_195__1.png) +![Screenshot](script.png) + +## Source Files +- `mt5_delete_fibonacci_retracment_indicator_script_1.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Fibonacci Retracement - script for MetaTrader 5/Screenshot_195__1.png b/Fibonacci Retracement - script for MetaTrader 5/Screenshot_195__1.png new file mode 100644 index 0000000..cad9cc7 Binary files /dev/null and b/Fibonacci Retracement - script for MetaTrader 5/Screenshot_195__1.png differ diff --git a/Fibonacci Retracement - script for MetaTrader 5/expert.png b/Fibonacci Retracement - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/Fibonacci Retracement - script for MetaTrader 5/expert.png differ diff --git a/Fibonacci Retracement - script for MetaTrader 5/indicator.png b/Fibonacci Retracement - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Fibonacci Retracement - script for MetaTrader 5/indicator.png differ diff --git a/Fibonacci Retracement - script for MetaTrader 5/logo-2.png b/Fibonacci Retracement - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Fibonacci Retracement - script for MetaTrader 5/logo-2.png differ diff --git a/Fibonacci Retracement - script for MetaTrader 5/mt5_delete_fibonacci_retracment_indicator_script_1.mq5 b/Fibonacci Retracement - script for MetaTrader 5/mt5_delete_fibonacci_retracment_indicator_script_1.mq5 new file mode 100644 index 0000000..a7a3bdb Binary files /dev/null and b/Fibonacci Retracement - script for MetaTrader 5/mt5_delete_fibonacci_retracment_indicator_script_1.mq5 differ diff --git a/Fibonacci Retracement - script for MetaTrader 5/script.png b/Fibonacci Retracement - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Fibonacci Retracement - script for MetaTrader 5/script.png differ diff --git a/Fibonacci Retracement with Custom Values - script for MetaTrader 5/4336413267392.png b/Fibonacci Retracement with Custom Values - script for MetaTrader 5/4336413267392.png new file mode 100644 index 0000000..ef077e1 Binary files /dev/null and b/Fibonacci Retracement with Custom Values - script for MetaTrader 5/4336413267392.png differ diff --git a/Fibonacci Retracement with Custom Values - script for MetaTrader 5/README.md b/Fibonacci Retracement with Custom Values - script for MetaTrader 5/README.md new file mode 100644 index 0000000..98cd77d --- /dev/null +++ b/Fibonacci Retracement with Custom Values - script for MetaTrader 5/README.md @@ -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](4336413267392.png) +![Screenshot](script.png) + +## Source Files +- `fibonacci_retrace.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Fibonacci Retracement with Custom Values - script for MetaTrader 5/fibonacci_retrace.mq5 b/Fibonacci Retracement with Custom Values - script for MetaTrader 5/fibonacci_retrace.mq5 new file mode 100644 index 0000000..ddaefbc Binary files /dev/null and b/Fibonacci Retracement with Custom Values - script for MetaTrader 5/fibonacci_retrace.mq5 differ diff --git a/Fibonacci Retracement with Custom Values - script for MetaTrader 5/indicator.png b/Fibonacci Retracement with Custom Values - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Fibonacci Retracement with Custom Values - script for MetaTrader 5/indicator.png differ diff --git a/Fibonacci Retracement with Custom Values - script for MetaTrader 5/logo-2.png b/Fibonacci Retracement with Custom Values - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Fibonacci Retracement with Custom Values - script for MetaTrader 5/logo-2.png differ diff --git a/Fibonacci Retracement with Custom Values - script for MetaTrader 5/script.png b/Fibonacci Retracement with Custom Values - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Fibonacci Retracement with Custom Values - script for MetaTrader 5/script.png differ diff --git a/Forex market sessions identification - script for MetaTrader 5/README.md b/Forex market sessions identification - script for MetaTrader 5/README.md new file mode 100644 index 0000000..8ba22b1 --- /dev/null +++ b/Forex market sessions identification - script for MetaTrader 5/README.md @@ -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 +- `forexcoloredsessions.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Forex market sessions identification - script for MetaTrader 5/expert.png b/Forex market sessions identification - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/Forex market sessions identification - script for MetaTrader 5/expert.png differ diff --git a/Forex market sessions identification - script for MetaTrader 5/forexcoloredsessions.mq5 b/Forex market sessions identification - script for MetaTrader 5/forexcoloredsessions.mq5 new file mode 100644 index 0000000..d820dea --- /dev/null +++ b/Forex market sessions identification - script for MetaTrader 5/forexcoloredsessions.mq5 @@ -0,0 +1,176 @@ +//+------------------------------------------------------------------+ +//| Forex Colored Sessions | +//| Last update: 25.06.2020 | +//| Copyright 2020, M&N Investing | +//+------------------------------------------------------------------+ +#property copyright "Copyright 2020, M&N Investing" +#property version "1.01" +#property description "Highlight Forex sessions with colored rectangles." +#property description "Won't work for timeframes greater than H3." +#property script_show_inputs + +// Opening session hours (h) +input group "Sessions opening hours" +input int openSydney = 18, openTokyo = 21, openLondon = 4, openNewYork = 9; + +// Session durations (h) +input group "Sessions duration" +input int lastSydney = 9, lastTokyo = 9, lastLondon = 8, lastNewYork = 9; + +// Session colors +input group "Rectangle colors" +input color clrSydney = clrLemonChiffon, clrTokyo = clrLavender, + clrLondon = clrLinen, clrNewYork = clrAliceBlue; + +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +int OnStart() +{ + ResetLastError(); + + // Inputs verification + ENUM_TIMEFRAMES chartPeriod = Period(); + if((int)chartPeriod > 30 && (int)chartPeriod != PERIOD_H1) + { + return(INIT_PARAMETERS_INCORRECT); + } + + // Initialization + ObjectsDeleteAll(0,-1,-1); // Clear objects from chart + int numBars = Bars(Symbol(),0); // Number of bars in the chart + + // MqlRates + MqlRates rates[]; // History of trades + ArraySetAsSeries(rates,true); // rates[0] newest + if(CopyRates(NULL,0,0,numBars,rates) < 0) // Get rates data + { + Alert("Error @CopyRates! ",GetLastError()); + } + + // Closing times + int closeSydney = GetClosingTime(openSydney,lastSydney); + int closeTokyo = GetClosingTime(openTokyo,lastTokyo); + int closeLondon = GetClosingTime(openLondon,lastLondon); + int closeNewYork = GetClosingTime(openNewYork,lastNewYork); + + // Rectangles index + int iSSydney = -1, iFSydney = -1; + int iSTokyo = -1, iFTokyo = -1; + int iSLondon = -1, iFLondon = -1; + int iSNewYork = -1, iFNewYork = -1; + + // Sessions identification loop + MqlDateTime ratesDateTime, prevDateTime; // rates dateTime structures + + for(int iRates = numBars - 2; iRates >= 0; iRates--) // From past to present + { + TimeToStruct(rates[iRates+1].time, prevDateTime); + TimeToStruct(rates[iRates].time, ratesDateTime); + + //-- Identify sessions borders + + // Sydney + if(ratesDateTime.hour == openSydney && prevDateTime.hour != openSydney) + { + iSSydney = iRates; + } + else if(ratesDateTime.hour == closeSydney && prevDateTime.hour != closeSydney) + { + iFSydney = iRates; + if(iSSydney >= 0) // Complete window + { + CreateColoredRectangle(rates,iSSydney,iFSydney,clrSydney); + } + } + + // Tokyo + if(ratesDateTime.hour == openTokyo && prevDateTime.hour != openTokyo) + { + iSTokyo = iRates; + } + else if(ratesDateTime.hour == closeTokyo && prevDateTime.hour != closeTokyo) + { + iFTokyo = iRates; + if(iSTokyo >= 0) // Complete window + { + CreateColoredRectangle(rates,iSTokyo,iFTokyo,clrTokyo); + } + } + + // London + if(ratesDateTime.hour == openLondon && prevDateTime.hour != openLondon) + { + iSLondon = iRates; + } + else if(ratesDateTime.hour == closeLondon && prevDateTime.hour != closeLondon) + { + iFLondon = iRates; + if(iSLondon >= 0) // Complete window + { + CreateColoredRectangle(rates,iSLondon,iFLondon,clrLondon); + } + } + + // New York + if(ratesDateTime.hour == openNewYork && prevDateTime.hour != openNewYork) + { + iSNewYork = iRates; + } + else if(ratesDateTime.hour == closeNewYork && prevDateTime.hour != closeNewYork) + { + iFNewYork = iRates; + if(iSNewYork >= 0) // Complete window + { + CreateColoredRectangle(rates,iSNewYork,iFNewYork,clrNewYork); + } + } + } + return 0; // Success +} + +void CreateColoredRectangle(MqlRates &mqlRates[],int iInitial,int iFinal,color clrSession) +{ + // Get minimum and maximum values + double highRates[], lowRates[]; + CopyHigh(Symbol(),0,iFinal,iInitial-iFinal,highRates); + CopyLow(Symbol(),0,iFinal,iInitial-iFinal,lowRates); + + int maxIndex = ArrayMaximum(highRates,0,WHOLE_ARRAY); + int minIndex = ArrayMinimum(lowRates,0,WHOLE_ARRAY); + + if(maxIndex >= 0 && minIndex >= 0) + { + double maxValue = highRates[maxIndex]; + double minValue = lowRates[minIndex]; + + string name = IntegerToString(iInitial,0,' '); + + // Create rectangle + if(!ObjectCreate(0,name,OBJ_RECTANGLE,0,mqlRates[iInitial].time, + minValue,mqlRates[iFinal].time,maxValue)) + { + Print("Error"); + } + + ObjectSetInteger(0,name,OBJPROP_COLOR,clrSession); // Color + ObjectSetInteger(0,name,OBJPROP_STYLE,STYLE_SOLID); // Lines + ObjectSetInteger(0,name,OBJPROP_WIDTH,1); // Lines width + ObjectSetInteger(0,name,OBJPROP_FILL,true); // Fill + ObjectSetInteger(0,name,OBJPROP_BACK,true); // To background + ObjectSetInteger(0,name,OBJPROP_SELECTABLE,true); // Highlighting + ObjectSetInteger(0,name,OBJPROP_SELECTED,false); // Moving + ObjectSetInteger(0,name,OBJPROP_HIDDEN,true); // Show name in list + ObjectSetInteger(0,name,OBJPROP_ZORDER,0); // Mouse click order + } +} + +int GetClosingTime(int opening, int duration) +{ + int closeTime = opening + duration; + if(closeTime > 23) + { + closeTime -= 24; + } + return closeTime; +} \ No newline at end of file diff --git a/Forex market sessions identification - script for MetaTrader 5/indicator.png b/Forex market sessions identification - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Forex market sessions identification - script for MetaTrader 5/indicator.png differ diff --git a/Forex market sessions identification - script for MetaTrader 5/library.png b/Forex market sessions identification - script for MetaTrader 5/library.png new file mode 100644 index 0000000..5c79a8f Binary files /dev/null and b/Forex market sessions identification - script for MetaTrader 5/library.png differ diff --git a/Forex market sessions identification - script for MetaTrader 5/logo-2.png b/Forex market sessions identification - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Forex market sessions identification - script for MetaTrader 5/logo-2.png differ diff --git a/Forex market sessions identification - script for MetaTrader 5/script.png b/Forex market sessions identification - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Forex market sessions identification - script for MetaTrader 5/script.png differ diff --git a/Function for checking whether the market is open for trading at the moment by the current symbol - script for MetaTrader 5/README.md b/Function for checking whether the market is open for trading at the moment by the current symbol - script for MetaTrader 5/README.md new file mode 100644 index 0000000..4fe3dca --- /dev/null +++ b/Function for checking whether the market is open for trading at the moment by the current symbol - script for MetaTrader 5/README.md @@ -0,0 +1,19 @@ +# 🚀 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](script.png) + +## Source Files +- `checktradeallowed.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Function for checking whether the market is open for trading at the moment by the current symbol - script for MetaTrader 5/checktradeallowed.mq5 b/Function for checking whether the market is open for trading at the moment by the current symbol - script for MetaTrader 5/checktradeallowed.mq5 new file mode 100644 index 0000000..2c8d790 --- /dev/null +++ b/Function for checking whether the market is open for trading at the moment by the current symbol - script for MetaTrader 5/checktradeallowed.mq5 @@ -0,0 +1,38 @@ +//+------------------------------------------------------------------+ +//| CheckTradeAllowed.mq5 | +//| Copyright 2023, MetaQuotes Ltd. | +//| https://www.mql5.com | +//+------------------------------------------------------------------+ +#property copyright "Copyright 2023, MetaQuotes Ltd." +#property link "https://www.mql5.com" +#property version "1.00" +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() + { + if(CheckTradeAllowed()) + Print("Market for trading on symbol ", Symbol(), " is now opened"); + else + Print("Market for trading on symbol ", Symbol(), " is now closed"); + } +//+------------------------------------------------------------------+ +bool CheckTradeAllowed() + { + MqlDateTime date_cur; + TimeTradeServer(date_cur); + datetime seconds_cur = date_cur.hour * 3600 + date_cur.min * 60 + date_cur.sec; + int i = 0; + while(true) + { + datetime seconds_from = {}, seconds_to = {}; + if(!SymbolInfoSessionTrade(Symbol(), (ENUM_DAY_OF_WEEK)date_cur.day_of_week, i, seconds_from, seconds_to)) + break; + if(seconds_cur > seconds_from && seconds_cur < seconds_to) + return true; + ++i; + } + return false; + } + +//+------------------------------------------------------------------+ diff --git a/Function for checking whether the market is open for trading at the moment by the current symbol - script for MetaTrader 5/expert.png b/Function for checking whether the market is open for trading at the moment by the current symbol - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/Function for checking whether the market is open for trading at the moment by the current symbol - script for MetaTrader 5/expert.png differ diff --git a/Function for checking whether the market is open for trading at the moment by the current symbol - script for MetaTrader 5/indicator.png b/Function for checking whether the market is open for trading at the moment by the current symbol - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Function for checking whether the market is open for trading at the moment by the current symbol - script for MetaTrader 5/indicator.png differ diff --git a/Function for checking whether the market is open for trading at the moment by the current symbol - script for MetaTrader 5/logo-2.png b/Function for checking whether the market is open for trading at the moment by the current symbol - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Function for checking whether the market is open for trading at the moment by the current symbol - script for MetaTrader 5/logo-2.png differ diff --git a/Function for checking whether the market is open for trading at the moment by the current symbol - script for MetaTrader 5/script.png b/Function for checking whether the market is open for trading at the moment by the current symbol - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Function for checking whether the market is open for trading at the moment by the current symbol - script for MetaTrader 5/script.png differ diff --git a/Function for converting the number of seconds to years, months, days, hours, minutes, seconds - script for MetaTrader 5/README.md b/Function for converting the number of seconds to years, months, days, hours, minutes, seconds - script for MetaTrader 5/README.md new file mode 100644 index 0000000..098d05f --- /dev/null +++ b/Function for converting the number of seconds to years, months, days, hours, minutes, seconds - script for MetaTrader 5/README.md @@ -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 +- `newyearcountdown.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Function for converting the number of seconds to years, months, days, hours, minutes, seconds - script for MetaTrader 5/expert.png b/Function for converting the number of seconds to years, months, days, hours, minutes, seconds - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/Function for converting the number of seconds to years, months, days, hours, minutes, seconds - script for MetaTrader 5/expert.png differ diff --git a/Function for converting the number of seconds to years, months, days, hours, minutes, seconds - script for MetaTrader 5/indicator.png b/Function for converting the number of seconds to years, months, days, hours, minutes, seconds - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Function for converting the number of seconds to years, months, days, hours, minutes, seconds - script for MetaTrader 5/indicator.png differ diff --git a/Function for converting the number of seconds to years, months, days, hours, minutes, seconds - script for MetaTrader 5/library.png b/Function for converting the number of seconds to years, months, days, hours, minutes, seconds - script for MetaTrader 5/library.png new file mode 100644 index 0000000..5c79a8f Binary files /dev/null and b/Function for converting the number of seconds to years, months, days, hours, minutes, seconds - script for MetaTrader 5/library.png differ diff --git a/Function for converting the number of seconds to years, months, days, hours, minutes, seconds - script for MetaTrader 5/logo-2.png b/Function for converting the number of seconds to years, months, days, hours, minutes, seconds - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Function for converting the number of seconds to years, months, days, hours, minutes, seconds - script for MetaTrader 5/logo-2.png differ diff --git a/Function for converting the number of seconds to years, months, days, hours, minutes, seconds - script for MetaTrader 5/newyearcountdown.mq5 b/Function for converting the number of seconds to years, months, days, hours, minutes, seconds - script for MetaTrader 5/newyearcountdown.mq5 new file mode 100644 index 0000000..f10df64 --- /dev/null +++ b/Function for converting the number of seconds to years, months, days, hours, minutes, seconds - script for MetaTrader 5/newyearcountdown.mq5 @@ -0,0 +1,65 @@ +//+------------------------------------------------------------------+ +//| NewYearCountdown.mq5 | +//| Copyright 2023, MetaQuotes Ltd. | +//| https://www.mql5.com | +//+------------------------------------------------------------------+ +#property copyright "Copyright 2023, MetaQuotes Ltd." +#property link "https://www.mql5.com" +#property version "1.00" +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() + { + MqlDateTime date_current; + ObjectCreate(0, "new_year_text", OBJ_LABEL, 0, 0, 0); + ObjectSetInteger(0, "new_year_text", OBJPROP_XDISTANCE, 30); + ObjectSetInteger(0, "new_year_text", OBJPROP_YDISTANCE, 30); + ObjectSetString(0, "new_year_text", OBJPROP_TEXT, "New Year will start in"); + ObjectCreate(0, "new_year_counter", OBJ_LABEL, 0, 0, 0); + ObjectSetInteger(0, "new_year_counter", OBJPROP_XDISTANCE, 30); + ObjectSetInteger(0, "new_year_counter", OBJPROP_YDISTANCE, 50); + while(!IsStopped()) + { + TimeLocal(date_current); + datetime seconds_new_year = StringToTime((string)(date_current.year + 1) + ".01.01 [00:00:00]"); + ObjectSetString(0, "new_year_counter", OBJPROP_TEXT, GetTimeSpan(seconds_new_year - TimeLocal())); + ChartRedraw(); + Sleep(1000); + } + ObjectDelete(0, "new_year_text"); + ObjectDelete(0, "new_year_counter"); + } +//+------------------------------------------------------------------+ +string GetTimeSpan(datetime time_sec) + { + if(time_sec <= 0) + return "0 seconds"; + string time_text = {}; + datetime remaining_sec = time_sec; + int years = (int)remaining_sec / 31536000; + remaining_sec %= 31536000; + int months = (int)remaining_sec / 2592000; + remaining_sec %= 2592000; + int days = (int)remaining_sec / 86400; + remaining_sec %= 86400; + int hours = (int)remaining_sec / 3600; + remaining_sec %= 3600; + int minutes = (int)remaining_sec / 60; + remaining_sec %= 60; + int seconds = (int)remaining_sec; + if(years > 0) + time_text += (string)years + " years "; + if(months > 0) + time_text += (string)months + " months "; + if(days > 0) + time_text += (string)days + " days "; + if(hours > 0) + time_text += (string)hours + " hours "; + if(minutes > 0) + time_text += (string)minutes + " minutes "; + if(seconds > 0) + time_text += (string)seconds + " seconds "; + return time_text; + } +//+------------------------------------------------------------------+ diff --git a/Function for converting the number of seconds to years, months, days, hours, minutes, seconds - script for MetaTrader 5/script.png b/Function for converting the number of seconds to years, months, days, hours, minutes, seconds - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Function for converting the number of seconds to years, months, days, hours, minutes, seconds - script for MetaTrader 5/script.png differ diff --git a/Get Last Deal History - script for MetaTrader 5/README.md b/Get Last Deal History - script for MetaTrader 5/README.md new file mode 100644 index 0000000..e6c2c7b --- /dev/null +++ b/Get Last Deal History - script for MetaTrader 5/README.md @@ -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 +- `get_last_history.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Get Last Deal History - script for MetaTrader 5/expert.png b/Get Last Deal History - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/Get Last Deal History - script for MetaTrader 5/expert.png differ diff --git a/Get Last Deal History - script for MetaTrader 5/get_last_history.mq5 b/Get Last Deal History - script for MetaTrader 5/get_last_history.mq5 new file mode 100644 index 0000000..9b446c5 --- /dev/null +++ b/Get Last Deal History - script for MetaTrader 5/get_last_history.mq5 @@ -0,0 +1,89 @@ +//+------------------------------------------------------------------+ +//| Get Last History.mq5 | +//| Developed by Donald Reeves Sihombing | +//| https://www.mql5.com/en/users/dspro | +//| 20200925 | +//+------------------------------------------------------------------+ +#property copyright "" +#property link "" +#property version "1.00" + +input ulong m_magic = 0; // Magic Number +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() + { +//--- + long dtype; + double dprofit; + GetLastHistory(dtype,dprofit); + + } +//+------------------------------------------------------------------+ +void GetLastHistory(long& dtype, double& dprofit) + { +//get the history data + if(!HistorySelect(0,TimeCurrent())) + { + Print("__FUNCTION__ "+__FUNCTION__+", Failed to select History"); + return; + } + + uint total = HistoryDealsTotal(); + ulong dticket = 0; + datetime dtime = 0; + string dsymbol; + double dprice = 0; + double dfee=0, dswap=0, dcommission=0; + long dealentry; + ulong dmagic = 0; + string dealtype = ""; + + for(uint i=total-1; i>=0; i--) //start from the last history + { + dticket = HistoryDealGetTicket(i); + if(dticket<=0) + continue; + //check the symbol + dsymbol = HistoryDealGetString(dticket,DEAL_SYMBOL); + if(dsymbol!=Symbol()) + continue; + //check deal entry + dealentry = HistoryDealGetInteger(dticket,DEAL_ENTRY); + if(dealentry!=DEAL_ENTRY_OUT) //position closed + continue; + //check magic number + dmagic = HistoryDealGetInteger(dticket,DEAL_MAGIC); + if(dmagic!=m_magic) + continue; + //deal type must be buy or sell + dtype = HistoryDealGetInteger(dticket,DEAL_TYPE); + if(dtype!=DEAL_TYPE_BUY && dtype!=DEAL_TYPE_SELL) + continue; + + dealtype = "Buy"; + if(dtype==DEAL_TYPE_BUY) //if a position closed by Buy, then the original is Sell + dealtype = "Sell"; + + dprice = HistoryDealGetDouble(dticket,DEAL_PRICE); //close price, because we get the DEAL_ENTRY_OUT + dprofit = HistoryDealGetDouble(dticket,DEAL_PROFIT); + dfee = HistoryDealGetDouble(dticket,DEAL_FEE); + dswap = HistoryDealGetDouble(dticket,DEAL_SWAP); + dcommission = HistoryDealGetDouble(dticket,DEAL_COMMISSION); + + dtime = (datetime)HistoryDealGetInteger(dticket,DEAL_TIME); //close time + break; //after get the last history, exit the loop + } + Comment("tot hist = ",total, + "\nticket = ",dticket, + "\nprice = ",dprice, + "\nprofit = ",dprofit, + "\nfee = ",dfee, + "\nswap = ",dswap, + "\ncommission = ",dcommission, + "\nsymbol = ",dsymbol, + "\ntype = ",dealtype, + "\ntime = ",dtime); + } +//+------------------------------------------------------------------+ diff --git a/Get Last Deal History - script for MetaTrader 5/library.png b/Get Last Deal History - script for MetaTrader 5/library.png new file mode 100644 index 0000000..5c79a8f Binary files /dev/null and b/Get Last Deal History - script for MetaTrader 5/library.png differ diff --git a/Get Last Deal History - script for MetaTrader 5/logo-2.png b/Get Last Deal History - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Get Last Deal History - script for MetaTrader 5/logo-2.png differ diff --git a/Get Last Deal History - script for MetaTrader 5/script.png b/Get Last Deal History - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Get Last Deal History - script for MetaTrader 5/script.png differ diff --git a/Get Position commission OrderCommission (mt4 term) of an active position in MT5 - script for MetaTrader 5/README.md b/Get Position commission OrderCommission (mt4 term) of an active position in MT5 - script for MetaTrader 5/README.md new file mode 100644 index 0000000..a173870 --- /dev/null +++ b/Get Position commission OrderCommission (mt4 term) of an active position in MT5 - script for MetaTrader 5/README.md @@ -0,0 +1,19 @@ +# 🚀 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](script.png) + +## Source Files +- `readpositioncommission.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Get Position commission OrderCommission (mt4 term) of an active position in MT5 - script for MetaTrader 5/expert.png b/Get Position commission OrderCommission (mt4 term) of an active position in MT5 - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/Get Position commission OrderCommission (mt4 term) of an active position in MT5 - script for MetaTrader 5/expert.png differ diff --git a/Get Position commission OrderCommission (mt4 term) of an active position in MT5 - script for MetaTrader 5/indicator.png b/Get Position commission OrderCommission (mt4 term) of an active position in MT5 - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Get Position commission OrderCommission (mt4 term) of an active position in MT5 - script for MetaTrader 5/indicator.png differ diff --git a/Get Position commission OrderCommission (mt4 term) of an active position in MT5 - script for MetaTrader 5/logo-2.png b/Get Position commission OrderCommission (mt4 term) of an active position in MT5 - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Get Position commission OrderCommission (mt4 term) of an active position in MT5 - script for MetaTrader 5/logo-2.png differ diff --git a/Get Position commission OrderCommission (mt4 term) of an active position in MT5 - script for MetaTrader 5/readpositioncommission.mq5 b/Get Position commission OrderCommission (mt4 term) of an active position in MT5 - script for MetaTrader 5/readpositioncommission.mq5 new file mode 100644 index 0000000..9cfe79f --- /dev/null +++ b/Get Position commission OrderCommission (mt4 term) of an active position in MT5 - script for MetaTrader 5/readpositioncommission.mq5 @@ -0,0 +1,44 @@ +//+------------------------------------------------------------------+ +//| ReadPositionCommission.mq5 | +//| Copyright 2023, Mian Farrukh Aleem | +//| https://www.mql5.com/en/users/farrukh | +//+------------------------------------------------------------------+ +#property copyright "Copyright 2023, Mian Farrukh Aleem" +#property link "https://www.mql5.com/en/users/farrukh" +#property version "1.00" +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() + { +//--- + for(int i=0;i0) + { + bool dim_defined=(type_info.dimensions[0]>0); + string dimensions=IntegerToString(type_info.dimensions[0]); + for(long n=1; n1) + { + ArrayResize(dims,reduced+1); + dims[reduced++]=dimension; + } + } + //--- all dimensions assumed 1 + if(reduced==0) + { + ArrayResize(dims,1); + dims[reduced++]=1; + } + //--- shape was reduced + if(reduced Made with ❤️ for the trading community. diff --git a/Get min margin in to csv - script for MetaTrader 5/expert.png b/Get min margin in to csv - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/Get min margin in to csv - script for MetaTrader 5/expert.png differ diff --git a/Get min margin in to csv - script for MetaTrader 5/indicator.png b/Get min margin in to csv - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Get min margin in to csv - script for MetaTrader 5/indicator.png differ diff --git a/Get min margin in to csv - script for MetaTrader 5/library.png b/Get min margin in to csv - script for MetaTrader 5/library.png new file mode 100644 index 0000000..5c79a8f Binary files /dev/null and b/Get min margin in to csv - script for MetaTrader 5/library.png differ diff --git a/Get min margin in to csv - script for MetaTrader 5/logo-2.png b/Get min margin in to csv - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Get min margin in to csv - script for MetaTrader 5/logo-2.png differ diff --git a/Get min margin in to csv - script for MetaTrader 5/minmargins.mq5 b/Get min margin in to csv - script for MetaTrader 5/minmargins.mq5 new file mode 100644 index 0000000..4e61afc --- /dev/null +++ b/Get min margin in to csv - script for MetaTrader 5/minmargins.mq5 @@ -0,0 +1,72 @@ +//+------------------------------------------------------------------+ +//| MinMargins.mq5 | +//| Copyright 2024, Ayib(Pvt) Ltd. | +//| https://www.ayib.co.zw | +//+------------------------------------------------------------------+ +#property copyright "Copyright 2024, Ayib(Pvt) Ltd." +#property link "https://www.ayib.co.zw" +#property version "1.00" +//+------------------------------------------------------------------+ +//| SaveMinMargins.mq5 | +//| Script to calculate min margins for all symbols and save to CSV | +//+------------------------------------------------------------------+ +#property strict + +//#include // Standard library for error handling + +void OnStart() +{ + // Define the output file name + string fileName = "MinMargins.csv"; + + // Open the file for writing in the "Files" folder + int fileHandle = FileOpen(fileName, FILE_CSV | FILE_WRITE, ';'); + + if (fileHandle == INVALID_HANDLE) + { + Print("Failed to create file: ", GetLastError()); + return; + } + + // Write the header row + FileWrite(fileHandle, "Symbol", "Min Lot Size", "Min Margin","Sym Path"); + + // Get the total number of symbols in the Market Watch + int totalSymbols = SymbolsTotal(false); // False for not selected + + for (int i = 0; i < totalSymbols; i++) + { + // Get the symbol name + string symbolName = SymbolName(i, false); + + if (symbolName == "") + { + Print("Failed to retrieve symbol name for index: ", i); + continue; + } + + // Get the minimum margin for the symbol + string category = SymbolInfoString(symbolName,SYMBOL_PATH); + double minLotSize = SymbolInfoDouble(symbolName, SYMBOL_VOLUME_MIN); + double contractSize = SymbolInfoDouble(symbolName, SYMBOL_TRADE_CONTRACT_SIZE); + double price = SymbolInfoDouble(symbolName, SYMBOL_BID); + double leverage = AccountInfoInteger(ACCOUNT_LEVERAGE); + double leverageFraction = 1.0 / leverage; + + double margin = minLotSize * contractSize * price * leverageFraction; + + // Check for errors in retrieving margin info + if (minLotSize <= 0 || contractSize <= 0 || price <= 0 || leverage <= 0) + { + Print("Failed to retrieve necessary data for symbol: ", symbolName); + continue; + } + printf(category); + // Write the symbol and its margin to the CSV file + FileWrite(fileHandle, symbolName, DoubleToString(minLotSize, 2), DoubleToString(margin, 2),category); + } + + // Close the file + FileClose(fileHandle); + Print("Min margins saved to file: ", fileName); +} diff --git a/Get min margin in to csv - script for MetaTrader 5/script.png b/Get min margin in to csv - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Get min margin in to csv - script for MetaTrader 5/script.png differ diff --git a/Group transfer Stop loss - script for MetaTrader 5/Group_transfer_Stop_loss.png b/Group transfer Stop loss - script for MetaTrader 5/Group_transfer_Stop_loss.png new file mode 100644 index 0000000..8718d0f Binary files /dev/null and b/Group transfer Stop loss - script for MetaTrader 5/Group_transfer_Stop_loss.png differ diff --git a/Group transfer Stop loss - script for MetaTrader 5/README.md b/Group transfer Stop loss - script for MetaTrader 5/README.md new file mode 100644 index 0000000..069fe33 --- /dev/null +++ b/Group transfer Stop loss - script for MetaTrader 5/README.md @@ -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](Group_transfer_Stop_loss.png) +![Screenshot](script.png) + +## Source Files +- `group_transfer_stop_loss.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Group transfer Stop loss - script for MetaTrader 5/expert.png b/Group transfer Stop loss - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/Group transfer Stop loss - script for MetaTrader 5/expert.png differ diff --git a/Group transfer Stop loss - script for MetaTrader 5/group_transfer_stop_loss.mq5 b/Group transfer Stop loss - script for MetaTrader 5/group_transfer_stop_loss.mq5 new file mode 100644 index 0000000..87cab9d Binary files /dev/null and b/Group transfer Stop loss - script for MetaTrader 5/group_transfer_stop_loss.mq5 differ diff --git a/Group transfer Stop loss - script for MetaTrader 5/indicator.png b/Group transfer Stop loss - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Group transfer Stop loss - script for MetaTrader 5/indicator.png differ diff --git a/Group transfer Stop loss - script for MetaTrader 5/logo-2.png b/Group transfer Stop loss - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Group transfer Stop loss - script for MetaTrader 5/logo-2.png differ diff --git a/Group transfer Stop loss - script for MetaTrader 5/script.png b/Group transfer Stop loss - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Group transfer Stop loss - script for MetaTrader 5/script.png differ diff --git a/HTML file converter for the economic calendar - script for MetaTrader 5/README.md b/HTML file converter for the economic calendar - script for MetaTrader 5/README.md new file mode 100644 index 0000000..f0a9633 --- /dev/null +++ b/HTML file converter for the economic calendar - script for MetaTrader 5/README.md @@ -0,0 +1,19 @@ +# 🚀 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](script.png) + +## Source Files +- `libreconver_lite_v1.007.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/HTML file converter for the economic calendar - script for MetaTrader 5/expert.png b/HTML file converter for the economic calendar - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/HTML file converter for the economic calendar - script for MetaTrader 5/expert.png differ diff --git a/HTML file converter for the economic calendar - script for MetaTrader 5/indicator.png b/HTML file converter for the economic calendar - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/HTML file converter for the economic calendar - script for MetaTrader 5/indicator.png differ diff --git a/HTML file converter for the economic calendar - script for MetaTrader 5/libreconver_lite_v1.007.mq5 b/HTML file converter for the economic calendar - script for MetaTrader 5/libreconver_lite_v1.007.mq5 new file mode 100644 index 0000000..7cba49e Binary files /dev/null and b/HTML file converter for the economic calendar - script for MetaTrader 5/libreconver_lite_v1.007.mq5 differ diff --git a/HTML file converter for the economic calendar - script for MetaTrader 5/logo-2.png b/HTML file converter for the economic calendar - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/HTML file converter for the economic calendar - script for MetaTrader 5/logo-2.png differ diff --git a/HTML file converter for the economic calendar - script for MetaTrader 5/script.png b/HTML file converter for the economic calendar - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/HTML file converter for the economic calendar - script for MetaTrader 5/script.png differ diff --git a/Highest High fetch - script for MetaTrader 5/README.md b/Highest High fetch - script for MetaTrader 5/README.md new file mode 100644 index 0000000..97f5574 --- /dev/null +++ b/Highest High fetch - script for MetaTrader 5/README.md @@ -0,0 +1,19 @@ +# 🚀 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](script.png) + +## Source Files +- `high_fetch.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Highest High fetch - script for MetaTrader 5/expert.png b/Highest High fetch - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/Highest High fetch - script for MetaTrader 5/expert.png differ diff --git a/Highest High fetch - script for MetaTrader 5/high_fetch.mq5 b/Highest High fetch - script for MetaTrader 5/high_fetch.mq5 new file mode 100644 index 0000000..eb0bd5a --- /dev/null +++ b/Highest High fetch - script for MetaTrader 5/high_fetch.mq5 @@ -0,0 +1,43 @@ +//+------------------------------------------------------------------+ +//| High Fetch.mq5 | +//| Sj | +//| https://www.mql5.com | +//+------------------------------------------------------------------+ +#property copyright "Sj" +#property link "https://www.mql5.com" +#property version "1.00" + +// ---- Global variables ---- + int StartHour = 12; + int StartMins = 0; + int EndHour = 16; + int EndMins = 0; +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() + { + double highPrice = RangeHighs(StartHour,StartMins,EndHour,EndMins); + Print(highPrice); + } +//+------------------------------------------------------------------+ + double RangeHighs(int pStartHour,int pStartMins, int pEndHour,int pEndMins) + { + MqlDateTime time{}; + TimeCurrent(time); + time.sec = 0; + time.hour = pStartHour; + time.min = pStartMins; + datetime timeStart = StructToTime(time); + //------------------- + time.hour = pEndHour; + time.min = pEndMins; + datetime timeEnd = StructToTime(time); + //------------------- + double high[]; + ArraySetAsSeries(high,true); + CopyHigh(_Symbol,PERIOD_CURRENT,timeStart,timeEnd,high); + int highestbar = ArrayMaximum(high,0,WHOLE_ARRAY); + return high[highestbar]; + } + diff --git a/Highest High fetch - script for MetaTrader 5/indicator.png b/Highest High fetch - script for MetaTrader 5/indicator.png new file mode 100644 index 0000000..7a885d8 Binary files /dev/null and b/Highest High fetch - script for MetaTrader 5/indicator.png differ diff --git a/Highest High fetch - script for MetaTrader 5/logo-2.png b/Highest High fetch - script for MetaTrader 5/logo-2.png new file mode 100644 index 0000000..28ea55c Binary files /dev/null and b/Highest High fetch - script for MetaTrader 5/logo-2.png differ diff --git a/Highest High fetch - script for MetaTrader 5/script.png b/Highest High fetch - script for MetaTrader 5/script.png new file mode 100644 index 0000000..d32d874 Binary files /dev/null and b/Highest High fetch - script for MetaTrader 5/script.png differ diff --git a/Historex_ export the history of rates and ticks to CSV-files - script for MetaTrader 5/README.md b/Historex_ export the history of rates and ticks to CSV-files - script for MetaTrader 5/README.md new file mode 100644 index 0000000..0750a6b --- /dev/null +++ b/Historex_ export the history of rates and ticks to CSV-files - script for MetaTrader 5/README.md @@ -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 +- `historex.mq5` + +--- +> Made with ❤️ for the trading community. diff --git a/Historex_ export the history of rates and ticks to CSV-files - script for MetaTrader 5/expert.png b/Historex_ export the history of rates and ticks to CSV-files - script for MetaTrader 5/expert.png new file mode 100644 index 0000000..9a2e616 Binary files /dev/null and b/Historex_ export the history of rates and ticks to CSV-files - script for MetaTrader 5/expert.png differ diff --git a/Historex_ export the history of rates and ticks to CSV-files - script for MetaTrader 5/historex.mq5 b/Historex_ export the history of rates and ticks to CSV-files - script for MetaTrader 5/historex.mq5 new file mode 100644 index 0000000..fef6983 --- /dev/null +++ b/Historex_ export the history of rates and ticks to CSV-files - script for MetaTrader 5/historex.mq5 @@ -0,0 +1,230 @@ +//+------------------------------------------------------------------+ +//| Historex.mq5 | +//| Copyright (c) 2020-2024, Marketeer | +//| https://www.mql5.com/en/users/marketeer | +//| Based on https://www.mql5.com/en/articles/8226 | +//+------------------------------------------------------------------+ + +#property script_show_inputs +#property description "Export rates and ticks of current chart's symbol into CSV-files compatible with MT5's export/import format." + +input datetime FilterStart = 0; +input datetime FilterStop = 0; + +const long DAY_LONG = 60 * 60 * 24; + +#define TTSM(x) TimeToString((datetime)(x), TIME_DATE|TIME_MINUTES) + +interface TickPlayer +{ + bool accept(const MqlTick &t); +}; + +class TickProvider +{ + public: + virtual bool hasNext() = 0; + virtual void getTick(MqlTick &t) = 0; + virtual void getAllTicks(MqlTick &out[]) = 0; + + bool read(MqlTick &out[]) + { + while(hasNext() && !IsStopped()) + { + MqlTick part[]; + getAllTicks(part); + ArrayCopy(out, part, ArraySize(out)); + } + + return IsStopped(); + } + + bool read(TickPlayer *p) + { + while(hasNext() && !IsStopped()) + { + MqlTick t; + getTick(t); + if(!p.accept(t)) break; + } + + return IsStopped(); + } +}; + +class HistoryTickProvider : public TickProvider +{ + private: + datetime origin; + datetime start; + datetime stop; + ulong length; // in seconds + MqlTick array[]; + int size; + int cursor; + + int numberOfDays; + int daysCount; + + protected: + void fillArray() + { + cursor = 0; + do + { + const datetime _stop = (datetime)MathMin(start + length, stop); + size = CopyTicksRange(_Symbol, array, COPY_TICKS_ALL, start * 1000, _stop * 1000); + + static datetime lastKnownTime = 0; + + if(start == origin) lastKnownTime = 0; + + if(size > 0) + { + lastKnownTime = array[size - 1].time; + } + const float estimated = lastKnownTime ? (float)((lastKnownTime - origin) / DAY_LONG) : daysCount; + + const double percent = estimated * 100.0 / (numberOfDays + 1); + Print("Processing ", TTSM(start), " - ", TTSM(_stop), " ", size, " ", + DoubleToString(percent, 0), "%, days:[actual=", daysCount, ", calendar=", estimated, "]"); + Comment("Processing: ", DoubleToString(percent, 0), "% ", TTSM(start)); + + if(size == -1) + { + Print("CopyTicksRange failed: ", GetLastError()); + } + else + { + if(size > 0 && array[0].time_msc < start * 1000) // MT5 bug is suspected: older than requested data returned + { + start = stop; + size = 0; + } + else + { + start = (datetime)MathMin(start + length, stop); + if(size > 0) daysCount++; + } + } + } + while(size == 0 && start < stop); + } + + public: + HistoryTickProvider(const datetime from, const long secs, const datetime to = 0): start(from), stop(to), length(secs), cursor(0), size(0) + { + if(start == 0) start = (datetime)SeriesInfoInteger(_Symbol, _Period, SERIES_FIRSTDATE); + start = (datetime)(start / DAY_LONG * DAY_LONG); + origin = start; + if(stop == 0) stop = TimeCurrent(); + numberOfDays = (int)((stop - start) / DAY_LONG); + PrintFormat("History processing started for %d calendar days [%s - %s]", + numberOfDays, TTSM(start), TTSM(stop)); + daysCount = 0; + fillArray(); + } + + bool hasNext() override + { + return cursor < size; + } + + void getTick(MqlTick &t) override + { + if(cursor < size) + { + t = array[cursor++]; + if(cursor == size) + { + fillArray(); + } + } + } + + void getAllTicks(MqlTick &out[]) override + { + if(cursor < size) + { + ArraySwap(array, out); + cursor = size; + fillArray(); + } + } +}; + + + +void OnStart() +{ + string s1 = TTSM(FilterStart); + string s2 = TTSM(FilterStop ? FilterStop : LONG_MAX); + StringReplace(s1, ":", ""); StringReplace(s1, ".", ""); StringReplace(s1, " ", ""); + StringReplace(s2, ":", ""); StringReplace(s2, ".", ""); StringReplace(s2, " ", ""); + const string prefix = _Symbol + "-" + s1 + "-" + s2; + + HistoryTickProvider htp(FilterStart, DAY_LONG, FilterStop); + + MqlTick ticks[]; + htp.read(ticks); + if(!IsStopped()) + { + Comment("Writing ticks..."); + ExportTicks(prefix + "-ticks.csv", ticks); + Comment("Writing rates..."); + ExportRates(prefix + "-" + StringSubstr(EnumToString(_Period), StringLen("PERIOD_")) + "-rates.csv"); + } + Comment(""); +} + +void OutputTick(const int handle, const MqlTick &tick) +{ + FileWrite(handle, + TimeToString(tick.time, TIME_DATE), + TimeToString(tick.time, TIME_SECONDS) + "." + StringFormat("%03d", tick.time_msc % 1000), + !!(tick.flags & TICK_FLAG_BID) ? DoubleToString(tick.bid, _Digits) : "", + !!(tick.flags & TICK_FLAG_ASK) ? DoubleToString(tick.ask, _Digits) : "", + !!(tick.flags & TICK_FLAG_LAST) ? DoubleToString(tick.last, _Digits) : "", + !!(tick.flags & TICK_FLAG_VOLUME) ? (string)tick.volume : "", + tick.flags); +} + +void ExportTicks(const string filename, const MqlTick &ticks[]) +{ + int handle = FileOpen(filename, FILE_ANSI | FILE_CSV | FILE_WRITE, "\t"); + FileWrite(handle, "", "