how to edit .ex4 MQL4 executable file?
how to edit .ex4 MQL4 executable file?
Loading saved threads...
Lord OfTheRing · External communityPost link
External question — Stack Overflow Stack Exchange
Author: Lord OfTheRing
Original post: https://stackoverflow.com/questions/65802097
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
Anyone tell me how can I comment out some of the line of the code from existing .ex4 (MQL4 language) file ?. I know people are doing but just don't know how to do it. I would really appreciate if someone tell me what tool I need and procedure to go about making it happen. Note: I am not looking for decompile entire code. I just want to add some line and comment some line to ex4 executable file.
Quote
Report
VincentDM · External communityPost link
External answer — Stack Overflow Stack Exchange
Author: VincentDM
Original post: https://stackoverflow.com/a/66511095
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
You cannot edit a ex4 file without decompiling/recompiling. If you can get the source mq4 file, then you could edit it and compile to a valid ex4 with MetaEditor.
Quote
Report
Muhammad Afreed · External communityPost link
External answer — Stack Overflow Stack Exchange
Author: Muhammad Afreed
Original post: https://stackoverflow.com/a/78358718
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
// Integration of multiple EAs into a single EA
// Define input parameters
input double weightEA1 = 0.3; // Weight for EA1's decision
input double weightEA2 = 0.3; // Weight for EA2's decision
input double weightEA3 = 0.4; // Weight for EA3's decision
// Define global variables
double decisionEA1, decisionEA2, decisionEA3;
// Initialization function
int OnInit(){
// Initialization logic for each individual EA
// ...
return(INIT_SUCCEEDED);
}
// Execution function
void OnTick(){
// Get decisions from each individual EA
decisionEA1 = getDecisionEA1();
decisionEA2 = getDecisionEA2();
decisionEA3 = getDecisionEA3();
// Combine decisions
double combinedDecision = (weightEA1 * decisionEA1) + (weightEA2 * decisionEA2) + (weightEA3 * decisionEA3);
// Take trade based on combined decision
if (combinedDecision >= 2) {
// Open buy order
// ...
} else if (combinedDecision <= -2) {
// Open sell order
// ...
}
}
// Cleanup function
void OnDeinit(const int reason){
// Perform any cleanup tasks if needed
}
// Helper functions to get decisions from individual EAs
double getDecisionEA1(){
// Logic for EA1's decision
// ...
}
double getDecisionEA2(){
// Logic for EA2's decision
// ...
}
double getDecisionEA3(){
// Logic for EA3's decision
// ...
}
Quote
Report
Post Reply
Quoted from Forex.com.bd-Editorial External answer — Stack Overflow Stack Exchange Author: VincentDM Source score (net votes, not local likes): 2 Original post: https://stackoverflow.com/a/66511095 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. You cannot edit a ex4 file without decompiling/recompiling. If you can get the source mq4 file, then you could edit it and compile to a valid ex4 with MetaEditor.
Checking account access…