Multiple dynamic logistic regression first unsuccessful attempt
Info
The Multiple dynamic logistic regression first unsuccessful attempt is a Library for MetaTrader 5 that for anyone who does not understand the code provided in this library read the article linked heremultiple dynamic logistic regression challenge the biggest challenge i faced when building both and logistic regression libraries in both articles is multiple dynamic regression functions where we could use them for multiple data columns without having to hard-code things up for every data that gets added to our model, in the previous article i hardcoded two functions with the same name the only difference between them was the number of data each model could work with, one was able to work with two independent variables the other with four respectivelybut, this method is inconvenient and it feels like a premature way of coding things up and it violates the rules of clean code and dry (don't repeat yourself principles that oop is trying to help us achieve)unlike python with flexible functions that could take a large number of functional arguments with the help of *args and **kwargs, in mql5 this could be achieved using string only as far as i can think, i believe this is our starting pointthe input x_columns represents all the independent variables columns that we will use in our library, these columns will require us to have multiple independent arrays for each of the columns but, there is no way we can create arrays dynamically, so the use of arrays fall flat herewe can create multiple csv files dynamically and use them as arrays, for sure but this will make our programs more expensive when it comes to the use of computer resources compared to the use of arrays, especially when dealing with multiple data not to mention the while loops that we will frequently use to open the files will slow the whole process down, i'm not 100% sure so correct me if i'm wrongthought we can still use the mentioned way,i have discovered the way forward to use arrays we are going to store all the data from all the columns in one array then use the data separately from one that single arrayinside the for loop, we can manipulate the data in the arrays and perform all the calculations for the model the way want for all the columns, i have tried this method but i'm still on the unsuccessful attempt, the reason i explained this hypothesis is to let everyone reading this article understand this challenge and i welcome all your opinions in the comment sections on how we can code this multiple dynamic logistic regression functionthis is just a hypothesis, it is aimed to inspire you into the process of coding the multiple dynamic regression algorithm, as discussed in data science and machine learning article series linked above.
Usage
This tool is typically used for enhancing chart analysis and decision making.
Platform
This Library works exclusively on MetaTrader 5 (both build 600+ and newer versions).
Setup
Place the downloaded file in MQL5/Libraries folder via File ? Open Data Folder in MetaTrader 5.
How to Install and Use Multiple dynamic logistic regression first unsuccessful attempt
1. Storage: Place library files in the MQL/Libraries directory to ensure they are accessible to your projects.
2. Implementation: Include the library in your code using the #import directive, ensuring you match the exact function names and parameters.
3. Compilation: Ensure the library is present in the directory before you compile your main EA or script, as the compiler links them during this phase.
4. Management: Keep libraries organized in sub-folders if you manage many custom functions to maintain a clean project structure.
Frequently Asked Questions
Q: What is a library file used for? A: Libraries store reusable code modules, allowing you to centralize common logic used by multiple EAs or indicators.
Q: Is a library executable? A: No, libraries are non-executable files containing functions; they must be imported into an EA, indicator, or script to function.
Q: Can I update a library while the platform is running? A: You should compile your EA or script after updating a library to ensure the latest code changes are integrated.
What this tool does
For anyone who does not understand the code provided in this library read the article linked hereMultiple Dynamic Logistic Regression Challenge The biggest challenge I faced when building both and logistic regression libraries in both articles is multiple dynamic regression functions where we could use them for multiple data columns without having to hard-code things up for every data that gets added to our model, in the previous Article I hardcoded two functions with the same name the only difference between them was the number of data each model could work with, one was able to work with two independent variables the other with four respectivelybut, this method is inconvenient and it feels like a premature way of coding things up and it violates the rules of clean code and DRY (don't repeat yourself principles that OOP is trying to help us achieve)Unlike python with flexible functions that could take a large number of functional arguments with the help of *args and **kwargs, In MQL5 this could be achieved using string only as far as I can think, I believe this is our starting pointthe input x_columns represents all the independent variables columns that we will use in our library, these columns will require us to have multiple independent arrays for each of the columns but, there is no way we can create arrays dynamically, so the use of arrays fall flat hereWe can create multiple CSV files dynamically and use them as arrays, for sure but this will make our programs more expensive when it comes to the use of computer resources compared to the use of arrays, especially when dealing with multiple data not to mention the while loops that we will frequently use to open the files will slow the whole process down, I'm not 100% sure so correct me if I'm wrongthought we can still use the mentioned way,I have discovered the way forward to use arrays we are going to store all the data from all the columns in one array then use the data separately from one that single ArrayInside the for loop, we can manipulate the data in the arrays and perform all the calculations for the model the way want for all the columns, I have tried this method but I'm still on the unsuccessful attempt, the reason I explained this hypothesis is to let everyone reading this article understand this challenge and I welcome all your opinions in the comment sections on how we can code this multiple dynamic logistic regression functionThis is Just a hypothesis, it is aimed to inspire you into the process of coding the multiple dynamic regression Algorithm, as discussed in Data Science and Machine Learning Article series linked above.
Typical Use Case
This Library excels in automated trading and technical analysis on MetaTrader 5.
Compatible Platform & Setup
This Library works on MetaTrader 5. Place the file in the MQL5/Libraries folder and restart the terminal.
Description & Settings
Related: visitor - behavioral design pattern - another powerful library for MetaTrader 5 traders.
For anyone who does not understand the code provided in this library read the article linked here
Also recommended: Init Sync - similar library with strong performance on MetaTrader 5.
Multiple Dynamic Logistic Regression ChallengeThe biggest challenge I faced when building both and logistic regression libraries in both articles is multiple dynamic regression functions where we could use them for multiple data columns without having to hard-code things up for every data that gets added to our model, in the previous Article I hardcoded two functions with the same name the only difference between them was the number of data each model could work with, one was able to work with two independent variables the other with four respectively
but, this method is inconvenient and it feels like a premature way of coding things up and it violates the rules of clean code and DRY (don't repeat yourself principles that OOP is trying to help us achieve)
Unlike python with flexible functions that could take a large number of functional arguments with the help of *args and **kwargs, In MQL5 this could be achieved using string only as far as I can think, I believe this is our starting point
the input x_columns represents all the independent variables columns that we will use in our library, these columns will require us to have multiple independent arrays for each of the columns but, there is no way we can create arrays dynamically, so the use of arrays fall flat here
We can create multiple CSV files dynamically and use them as arrays, for sure but this will make our programs more expensive when it comes to the use of computer resources compared to the use of arrays, especially when dealing with multiple data not to mention the while loops that we will frequently use to open the files will slow the whole process down, I'm not 100% sure so correct me if I'm wrong
thought we can still use the mentioned way,
I have discovered the way forward to use arrays we are going to store all the data from all the columns in one array then use the data separately from one that single Array
Inside the for loop, we can manipulate the data in the arrays and perform all the calculations for the model the way want for all the columns, I have tried this method but I'm still on the unsuccessful attempt, the reason I explained this hypothesis is to let everyone reading this article understand this challenge and I welcome all your opinions in the comment sections on how we can code this multiple dynamic logistic regression function
This is Just a hypothesis, it is aimed to inspire you into the process of coding the multiple dynamic regression Algorithm, as discussed in Data Science and Machine Learning Article series linked above
You may also like: Session Time Filter Library - excellent alternative for library users on MetaTrader 5.
⚠ Limitations & Risk Warning
- This tool is provided for educational and testing purposes only.
- Past performance does not guarantee future results.
- Trading involves substantial risk of loss. Use on a demo account first.
- Results may vary depending on market conditions, broker, and settings.
- We recommend thorough backtesting and forward testing before using with real funds.