diff --git a/Documents/Temlates/x-saherelm.x-ea.template.ea.mq5 b/Documents/Temlates/x-saherelm.x-ea.template.ea.mq5 index 29d54ccd..ec3e2574 100644 --- a/Documents/Temlates/x-saherelm.x-ea.template.ea.mq5 +++ b/Documents/Temlates/x-saherelm.x-ea.template.ea.mq5 @@ -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 // // 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; diff --git a/Experts/x-saherelm.x-panel.ea.mq5 b/Experts/x-saherelm.x-panel.ea.mq5 index 05b033a8..fef7bf17 100644 --- a/Experts/x-saherelm.x-panel.ea.mq5 +++ b/Experts/x-saherelm.x-panel.ea.mq5 @@ -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 + +// +// Undifine and Redfine Dialog Styles ... + +// // +// #include + +// // +// // Here we can Do all Styling ... +// #undef CONTROLS_DIALOG_COLOR_CLIENT_BG +// #define CONTROLS_DIALOG_COLOR_CLIENT_BG clrMagenta + +// // +// #include // // 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) @@ -288,10 +310,11 @@ bool ValidateInputs() /** * Initialize Timer ... - * + * * @return ( bool ) */ -bool InitTimer() { +bool InitTimer() +{ // bool result = false; @@ -308,10 +331,11 @@ bool InitTimer() { /** * Destroy Timer ... */ -void DestroyTimer() { +void DestroyTimer() +{ // // TODO: Use This ... - // EventKillTimer(); + // 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(); } // diff --git a/Files/XPANELEA_BTCUSD_Ini.dat b/Files/XPANELEA_BTCUSD_Ini.dat new file mode 100644 index 00000000..957906d0 Binary files /dev/null and b/Files/XPANELEA_BTCUSD_Ini.dat differ diff --git a/Files/_BTCUSD_Ini.dat b/Files/_BTCUSD_Ini.dat new file mode 100644 index 00000000..474629e4 Binary files /dev/null and b/Files/_BTCUSD_Ini.dat differ