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