Clean up OrdersEA MT4 version - Remove WinAPI and license dependencies

- Removed #include WinUser32.mqh (no more MessageBox)
- web.mq4 include already disabled, removed comment
- Replaced MessageBox with Print() for margin info
- Replaced SendMailEx with SendNotificationEx using native MT4 Alert()
- Updated copyright to Garfield Heron / fetcherpay.com
- Email default set to garfield@fetcherpay.com
This commit is contained in:
2026-03-24 11:49:41 -04:00
parent bf70b79237
commit c342966488

View File

@@ -1,22 +1,22 @@
//+------------------------------------------------------------------+
//| HTF.mq4 |
//| HeronTechforge |
//| http://www.herontechforge.com|
//| OrdersEA.mq4 |
//| Copyright 2024, Garfield Heron |
//| https://fetcherpay.com |
//+------------------------------------------------------------------+
#property copyright "LYTC international, ltd"
#property link "http://www.herontechforge.com"
#property copyright "Copyright 2024, Garfield Heron"
#property link "https://fetcherpay.com"
#define VERSION "Version 1.1 gh"
#include <WinUser32.mqh>
// WinAPI include removed - using native MT4 functions
//#include "web.mq4"
// web.mq4 include removed - license check disabled
#define MAX_TRADES 600
#define MAX_LOG_TRADES 1200
//---- input parameters
extern string Email= "Your Registered eMail";
extern string Email= "garfield@fetcherpay.com";
extern int MagicNum= 333;
extern double HIGH= 0;
extern double LOW= 0;
@@ -65,7 +65,7 @@ double longAvgPrice= 0, longAvgLots= 0;
double shortAvgPrice= 0, shortAvgLots= 0;
double longProfit= 0;
double shortProfit= 0;
bool bConfirmed;
bool bOpposite;
bool bInit= false;
int TakeProfit=0;
@@ -139,7 +139,7 @@ void AddTradeToLog(int ticket)
}
}
void SendMailEx(string title, string subject)
void SendNotificationEx(string title, string subject)
{
string st= subject;
if(!IsOptimization())
@@ -209,7 +209,7 @@ int init()
double tmp;
int MaxProfit= 0;
bConfirmed= true;
// bConfirmed removed - always confirmed
int MargReq;
@@ -719,7 +719,7 @@ bool ScanAllOrders()
}
}
if(st!="")
SendMailEx(Symbol() + " Position Closed" ,st);
SendNotificationEx(Symbol() + " Position Closed" ,st);
}
void CalcAvgPrice()
@@ -798,7 +798,7 @@ double CalcProfit(int MagicNumber)
}
}
if(updateSt!="")
SendMailEx(Symbol() + " Position Opened", updateSt);
SendNotificationEx(Symbol() + " Position Opened", updateSt);
return(shortProfit+longProfit);
}
@@ -944,7 +944,8 @@ void SendEmailToBroker(int profit)
st= "Hello,\n"+AccountName()+" here, Trading A/c " + AccountNumber() + ".\n";
st=st+"Would you kindly transfer $" + profit + " to my a/c # " + HoldingAccount + " as soon as possible?\n\n";
st=st+"Many thanks!\n\nRegards\n\n"+AccountName();
SendMail("Transfer Funds Request", st);
Print("Transfer Funds Request: " + st);
Alert("Transfer Funds Request: " + st);
}
int start()
@@ -1122,7 +1123,7 @@ int start()
AboveHigh= true;
}
if(stRange!="")
SendMailEx(Symbol() + " Range Exceeded", stRange);
SendNotificationEx(Symbol() + " Range Exceeded", stRange);
}
else
Comment("The EA is not active");