prepare EU5 Workspace ...

This commit is contained in:
2024-01-31 09:40:40 -08:00
parent 7a61225897
commit eabb5d6827
18 changed files with 36528 additions and 17746 deletions
@@ -17,7 +17,7 @@
#property copyright "Copyright 2023, SaherElm IT Center"
#property link "https://saherelm.ir"
#property version "1.00"
#property description "SaherElm XAU5 EA"
#property description "SaherElm XEU5 EA"
#property strict
//
@@ -51,8 +51,8 @@ input group "Commons";
#include "../Libraries/x-saherelm.draw.lib.mq5"
//
// XAU5 Signal Provider ...
#include "../Providers/x-saherelm.xau5.provider.lib.mq5"
// XEU5 Signal Provider ...
#include "../Providers/x-saherelm.xeu5.provider.lib.mq5"
//
// END Including Providers ...
@@ -61,10 +61,10 @@ input group "Commons";
//
// START Global Definitions: Variables, Properties and etc ...
//
bool isXAU5NewHour;
bool isXAU5NewDay;
bool isXAU5NewWeek;
bool isXAU5NewMonth;
bool isXEU5NewHour;
bool isXEU5NewDay;
bool isXEU5NewWeek;
bool isXEU5NewMonth;
//
// END Global Definitions: Variables, Properties and etc ...
//
@@ -78,7 +78,7 @@ bool isXAU5NewMonth;
int OnInit()
{
//
logTag = "XAU5EA";
logTag = "XEU5EA";
drawPrefix = logTag;
alertPrefix = logTag;
@@ -98,8 +98,8 @@ int OnInit()
}
//
// Initialize XAU5 Provider ...
if (!XAU5InitSignalProviderLibrary())
// Initialize XEU5 Provider ...
if (!XEU5InitSignalProviderLibrary())
{
return INIT_PARAMETERS_INCORRECT;
}
@@ -129,8 +129,8 @@ void OnDeinit(const int reason)
// Here we can handle De Initialization Reasons ...
//
// De Initialize XAU5 Provider ...
XAU5DeinitSignalProviderLibrary(reason);
// De Initialize XEU5 Provider ...
XEU5DeinitSignalProviderLibrary(reason);
//
// De Init XDraw Library ...
@@ -144,15 +144,15 @@ void OnTick()
//
// Handle Monthly Alert ...
bool isFirstMonth = xMonth == -1;
isXAU5NewMonth = IsNewMonth();
isXEU5NewMonth = IsNewMonth();
bool canMonthlyAlert =
isXAU5NewMonth &&
xAU5EnableAlerts &&
xAU5EnableMonthlyAlerts;
isXEU5NewMonth &&
xEU5EnableAlerts &&
xEU5EnableMonthlyAlerts;
bool canMonthlyReport =
!isFirstMonth &&
canMonthlyAlert &&
xAU5EnableMonthlyReports;
xEU5EnableMonthlyReports;
if (canMonthlyAlert)
{
//
@@ -163,7 +163,7 @@ void OnTick()
if (canMonthlyReport)
{
//
string report = xAU5Reporter.GenerateReportString(XREPORT_MONTHLY);
string report = xEU5Reporter.GenerateReportString(XREPORT_MONTHLY);
//
message = "Last Month Report:\n" + report;
@@ -171,7 +171,7 @@ void OnTick()
//
// Reset Report ...
xAU5Reporter.Reset(XREPORT_MONTHLY);
xEU5Reporter.Reset(XREPORT_MONTHLY);
//
SendAlert(message);
@@ -180,15 +180,15 @@ void OnTick()
//
// Handle Weekly Alert ...
bool isFirstWeek = xDayOfWeek == -1;
isXAU5NewWeek = IsNewWeek();
isXEU5NewWeek = IsNewWeek();
bool canWeeklyAlert =
isXAU5NewWeek &&
xAU5EnableAlerts &&
xAU5EnableWeeklyAlerts;
isXEU5NewWeek &&
xEU5EnableAlerts &&
xEU5EnableWeeklyAlerts;
bool canWeeklyReport =
!isFirstWeek &&
canWeeklyAlert &&
xAU5EnableWeeklyReports;
xEU5EnableWeeklyReports;
if (canWeeklyAlert)
{
//
@@ -199,7 +199,7 @@ void OnTick()
if (canWeeklyReport)
{
//
string report = xAU5Reporter.GenerateReportString(XREPORT_WEEKLY);
string report = xEU5Reporter.GenerateReportString(XREPORT_WEEKLY);
//
message = "Last Week Report:\n" + report;
@@ -207,7 +207,7 @@ void OnTick()
//
// Reset Report ...
xAU5Reporter.Reset(XREPORT_WEEKLY);
xEU5Reporter.Reset(XREPORT_WEEKLY);
//
SendAlert(message);
@@ -216,15 +216,15 @@ void OnTick()
//
// Handle Daily Alert ...
bool isFirstDay = xDay == -1;
isXAU5NewDay = IsNewDay();
isXEU5NewDay = IsNewDay();
bool canDailyAlert =
isXAU5NewDay &&
xAU5EnableAlerts &&
xAU5EnableDailyAlerts;
isXEU5NewDay &&
xEU5EnableAlerts &&
xEU5EnableDailyAlerts;
bool canDailyReport =
!isFirstDay &&
canDailyAlert &&
xAU5EnableDailyReports;
xEU5EnableDailyReports;
if (canDailyAlert)
{
//
@@ -235,7 +235,7 @@ void OnTick()
if (canDailyReport)
{
//
string report = xAU5Reporter.GenerateReportString(XREPORT_DAILY);
string report = xEU5Reporter.GenerateReportString(XREPORT_DAILY);
//
message = "Last Week Report:\n" + report;
@@ -243,7 +243,7 @@ void OnTick()
//
// Reset Report ...
xAU5Reporter.Reset(XREPORT_DAILY);
xEU5Reporter.Reset(XREPORT_DAILY);
//
SendAlert(message);
@@ -252,11 +252,11 @@ void OnTick()
//
// Handle Hourly Alert ...
bool isFirstHour = xHour == -1;
isXAU5NewHour = IsNewHour();
isXEU5NewHour = IsNewHour();
bool canHourlyAlert =
isXAU5NewHour &&
xAU5EnableAlerts &&
xAU5EnableHourlyAlerts;
isXEU5NewHour &&
xEU5EnableAlerts &&
xEU5EnableHourlyAlerts;
if (canHourlyAlert)
{
//
@@ -269,11 +269,11 @@ void OnTick()
//
// Prevent Going Forward if user Disable it ...
if (xAU5EnableProvider)
if (xEU5EnableProvider)
{
//
// Handle Processing on XAU5 Signal Provider ...
XAU5SignalProviderDoControlState();
// Handle Processing on XEU5 Signal Provider ...
XEU5SignalProviderDoControlState();
}
//
@@ -284,11 +284,11 @@ void OnTick()
//
// Prevent Going Forward if user Disable it ...
if (xAU5EnableProvider)
if (xEU5EnableProvider)
{
//
// Handle Processing on XAU5 Signal Provider ...
XAU5SignalProviderHandleTick();
// Handle Processing on XEU5 Signal Provider ...
XEU5SignalProviderHandleTick();
}
}
@@ -299,11 +299,11 @@ void OnTrade()
//
// Prevent Going Forward if user Disable it ...
if (xAU5EnableProvider)
if (xEU5EnableProvider)
{
//
// Handle Processing Trades on XAU5 Signal Provider ...
XAU5SignalProviderHandleTrade();
// Handle Processing Trades on XEU5 Signal Provider ...
XEU5SignalProviderHandleTrade();
}
}
@@ -326,8 +326,8 @@ bool ValidateInputs()
// Validate Args ...
//
// Validate XAU5 Provider Inputs ...
result = XAU5ValidateInputs();
// Validate XEU5 Provider Inputs ...
result = XEU5ValidateInputs();
if (!result)
{
return false;