last ...
This commit is contained in:
@@ -27,7 +27,6 @@
|
||||
#include "../Classes/x-saherelm.xtrade.class.mq5"
|
||||
#include "../Helpers/x-saherelm.xcc.helper.mq5"
|
||||
#include "../Helpers/x-saherelm.xct.helper.mq5"
|
||||
#include <Controls/Dialog.mqh>
|
||||
|
||||
//
|
||||
// Inputs ...
|
||||
@@ -62,11 +61,12 @@ input bool eaReportNewHours = false; // Report New Hours
|
||||
// Define Local Variables ...
|
||||
|
||||
//
|
||||
string eaLogTag; // EA Log Prefix ...
|
||||
XSCAlert *eaAlert; // Alert Provider for Expert Adviser ...
|
||||
XSCTrade *eaTrader; // Trader of Expert Adviser ...
|
||||
XTimeTracker eaTimeTracker; // Time Tracker for Providing Reports ...
|
||||
XSCXCTHelper *mCTHelper; // Bar Timer Indicator Helper class ...
|
||||
XSCXCCHelper *mCCHelper; // Chart Styler Indicator Helper Class ...
|
||||
XSCXCTHelper *eaCHelper; // Bar Timer Indicator Helper class ...
|
||||
XSCXCCHelper *eaCCHelper; // Chart Styler Indicator Helper Class ...
|
||||
|
||||
//
|
||||
// Event Handlers ...
|
||||
@@ -326,14 +326,14 @@ bool InitEA()
|
||||
|
||||
//
|
||||
// Locally Apply Changes on Prefix ...
|
||||
string mEAPrefix = ShortName + ">" + eaLogSuffix;
|
||||
eaLogTag = ShortName + ">" + eaLogSuffix;
|
||||
|
||||
//
|
||||
// Bar Timer ...
|
||||
XCTInputs ctInputs;
|
||||
ctInputs.Default(); // Default Configurations ...
|
||||
mCTHelper = new XSCXCTHelper();
|
||||
result = mCTHelper.Init(
|
||||
eaCHelper = new XSCXCTHelper();
|
||||
result = eaCHelper.Init(
|
||||
_Symbol,
|
||||
_Period,
|
||||
ctInputs //
|
||||
@@ -347,8 +347,8 @@ bool InitEA()
|
||||
// Bar Styles ...
|
||||
XCCInputs ccInputs;
|
||||
ccInputs.Default(); // Default Configurations ...
|
||||
mCCHelper = new XSCXCCHelper();
|
||||
result = mCCHelper.Init(
|
||||
eaCCHelper = new XSCXCCHelper();
|
||||
result = eaCCHelper.Init(
|
||||
_Symbol,
|
||||
_Period,
|
||||
ccInputs //
|
||||
@@ -361,7 +361,7 @@ bool InitEA()
|
||||
//
|
||||
// Create Instance of Alert Class and Configure it ...
|
||||
eaAlert = new XSCAlert();
|
||||
eaAlert.SetPrefix(mEAPrefix);
|
||||
eaAlert.SetPrefix(eaLogTag);
|
||||
eaAlert.SetLogAlerts(eALogAlerts);
|
||||
eaAlert.SetMailAlerts(eAMailAlerts);
|
||||
eaAlert.SetPushAlerts(eAPushAlerts);
|
||||
@@ -388,8 +388,8 @@ bool InitEA()
|
||||
void DestroyEA()
|
||||
{
|
||||
//
|
||||
delete mCTHelper;
|
||||
delete mCCHelper;
|
||||
delete eaCHelper;
|
||||
delete eaCCHelper;
|
||||
|
||||
//
|
||||
delete eaAlert;
|
||||
|
||||
@@ -27,7 +27,20 @@
|
||||
#include "../Classes/x-saherelm.xtrade.class.mq5"
|
||||
#include "../Helpers/x-saherelm.xcc.helper.mq5"
|
||||
#include "../Helpers/x-saherelm.xct.helper.mq5"
|
||||
#include <Controls/Dialog.mqh>
|
||||
|
||||
//
|
||||
// Undifine and Redfine Dialog Styles ...
|
||||
|
||||
// //
|
||||
// #include <Controls/Defines.mqh>
|
||||
|
||||
// //
|
||||
// // Here we can Do all Styling ...
|
||||
// #undef CONTROLS_DIALOG_COLOR_CLIENT_BG
|
||||
// #define CONTROLS_DIALOG_COLOR_CLIENT_BG clrMagenta
|
||||
|
||||
// //
|
||||
// #include <Controls/Dialog.mqh>
|
||||
|
||||
//
|
||||
// Inputs ...
|
||||
@@ -62,11 +75,15 @@ input bool eaReportNewHours = false; // Report New Hours
|
||||
// Define Local Variables ...
|
||||
|
||||
//
|
||||
string eaLogTag; // EA Log Prefix ...
|
||||
XSCAlert *eaAlert; // Alert Provider for Expert Adviser ...
|
||||
XSCTrade *eaTrader; // Trader of Expert Adviser ...
|
||||
XTimeTracker eaTimeTracker; // Time Tracker for Providing Reports ...
|
||||
XSCXCTHelper *mCTHelper; // Bar Timer Indicator Helper class ...
|
||||
XSCXCCHelper *mCCHelper; // Chart Styler Indicator Helper Class ...
|
||||
XSCXCTHelper *eaCTHelper; // Bar Timer Indicator Helper class ...
|
||||
XSCXCCHelper *eaCCHelper; // Chart Styler Indicator Helper Class ...
|
||||
|
||||
//
|
||||
// CAppDialog eaMainWindow; // EA Main Dialog ...
|
||||
|
||||
//
|
||||
// Event Handlers ...
|
||||
@@ -85,7 +102,8 @@ int OnInit()
|
||||
|
||||
//
|
||||
// Initialize Timer ...
|
||||
if (!InitTimer()) {
|
||||
if (!InitTimer())
|
||||
{
|
||||
return INIT_FAILED;
|
||||
}
|
||||
|
||||
@@ -184,6 +202,10 @@ void OnChartEvent(
|
||||
const string &sparam //
|
||||
)
|
||||
{
|
||||
//
|
||||
// Apply Chart Event on Main Window ...
|
||||
// eaMainWindow.ChartEvent(id, lparam, dparam, sparam);
|
||||
|
||||
//
|
||||
// Handle OnClick Event ...
|
||||
if (id == CHARTEVENT_OBJECT_CLICK)
|
||||
@@ -291,7 +313,8 @@ bool ValidateInputs()
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool InitTimer() {
|
||||
bool InitTimer()
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
@@ -308,7 +331,8 @@ bool InitTimer() {
|
||||
/**
|
||||
* Destroy Timer ...
|
||||
*/
|
||||
void DestroyTimer() {
|
||||
void DestroyTimer()
|
||||
{
|
||||
//
|
||||
// TODO: Use This ...
|
||||
// EventKillTimer();
|
||||
@@ -326,14 +350,14 @@ bool InitEA()
|
||||
|
||||
//
|
||||
// Locally Apply Changes on Prefix ...
|
||||
string mEAPrefix = ShortName + ">" + eaLogSuffix;
|
||||
eaLogTag = ShortName + ">" + eaLogSuffix;
|
||||
|
||||
//
|
||||
// Bar Timer ...
|
||||
XCTInputs ctInputs;
|
||||
ctInputs.Default(); // Default Configurations ...
|
||||
mCTHelper = new XSCXCTHelper();
|
||||
result = mCTHelper.Init(
|
||||
eaCTHelper = new XSCXCTHelper();
|
||||
result = eaCTHelper.Init(
|
||||
_Symbol,
|
||||
_Period,
|
||||
ctInputs //
|
||||
@@ -347,8 +371,8 @@ bool InitEA()
|
||||
// Bar Styles ...
|
||||
XCCInputs ccInputs;
|
||||
ccInputs.Default(); // Default Configurations ...
|
||||
mCCHelper = new XSCXCCHelper();
|
||||
result = mCCHelper.Init(
|
||||
eaCCHelper = new XSCXCCHelper();
|
||||
result = eaCCHelper.Init(
|
||||
_Symbol,
|
||||
_Period,
|
||||
ccInputs //
|
||||
@@ -361,7 +385,7 @@ bool InitEA()
|
||||
//
|
||||
// Create Instance of Alert Class and Configure it ...
|
||||
eaAlert = new XSCAlert();
|
||||
eaAlert.SetPrefix(mEAPrefix);
|
||||
eaAlert.SetPrefix(eaLogTag);
|
||||
eaAlert.SetLogAlerts(eALogAlerts);
|
||||
eaAlert.SetMailAlerts(eAMailAlerts);
|
||||
eaAlert.SetPushAlerts(eAPushAlerts);
|
||||
@@ -388,8 +412,8 @@ bool InitEA()
|
||||
void DestroyEA()
|
||||
{
|
||||
//
|
||||
delete mCTHelper;
|
||||
delete mCCHelper;
|
||||
delete eaCTHelper;
|
||||
delete eaCCHelper;
|
||||
|
||||
//
|
||||
delete eaAlert;
|
||||
@@ -405,10 +429,31 @@ bool InitGUI()
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// TODO: Fix This ...
|
||||
// //
|
||||
// // Initialize Application Main Window ...
|
||||
// result = eaMainWindow.Create(
|
||||
// ChartID(),
|
||||
// ShortName, // Dialog Name ...
|
||||
// 0, // SubWindow ...
|
||||
// 10, // X1 ...
|
||||
// 35, // Y1 ...
|
||||
// 300, // X2 ...
|
||||
// 200 // Y2 ...
|
||||
// );
|
||||
|
||||
// //
|
||||
// // Configuring Dialog ...
|
||||
// eaMainWindow.Control(3).Hide(); // Hide Minimize Button ...
|
||||
// eaMainWindow.Control(5).Hide(); // Hide Close Button ...
|
||||
result = true;
|
||||
|
||||
//
|
||||
// Try To Run Main Window ...
|
||||
if (result)
|
||||
{
|
||||
// eaMainWindow.Run();
|
||||
}
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
@@ -428,7 +473,7 @@ void UpdateGUI()
|
||||
void DestroyGUI()
|
||||
{
|
||||
//
|
||||
// TODO: Complete this ...
|
||||
// eaMainWindow.Destroy();
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user