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