add support for Time Tracker and also Handle Time Reporting ...
This commit is contained in:
@@ -90,6 +90,7 @@ XCAlert *eaAlert;
|
||||
XCTrade *eaTrade;
|
||||
XSignal eaSignal;
|
||||
XCVolume *eaVolume;
|
||||
XTimeTracker eaTimeTracker;
|
||||
XCXCAEASignaller *eaSignaller;
|
||||
XCXCAEATradeManager *eaTradeManager;
|
||||
XCAEAStrategyConditions eaConditions;
|
||||
@@ -168,6 +169,7 @@ void OnDeinit(const int reason)
|
||||
//
|
||||
eaSignal.Clean();
|
||||
eaConditions.Clean();
|
||||
eaTimeTracker.Clean();
|
||||
|
||||
//
|
||||
DestroyTimer();
|
||||
@@ -595,7 +597,6 @@ bool InitVolume()
|
||||
|
||||
/**
|
||||
* Initial Requirements of EA ...
|
||||
*
|
||||
*/
|
||||
void InitRequirements()
|
||||
{
|
||||
@@ -682,4 +683,58 @@ void InitRequirements()
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Handling Time Reporting ...
|
||||
*/
|
||||
void HandleTimeReport()
|
||||
{
|
||||
//
|
||||
// Monthly Report ....
|
||||
if (eaReportNewMonths &&
|
||||
eaTimeTracker.IsNewMonth())
|
||||
{
|
||||
//
|
||||
string msg = "New Month ...";
|
||||
|
||||
//
|
||||
eaAlert.Alert(msg);
|
||||
}
|
||||
|
||||
//
|
||||
// Weekly Report ....
|
||||
if (eaReportNewWeeks &&
|
||||
eaTimeTracker.IsNewWeek())
|
||||
{
|
||||
//
|
||||
string msg = "New Week ...";
|
||||
|
||||
//
|
||||
eaAlert.Alert(msg);
|
||||
}
|
||||
|
||||
//
|
||||
// Daily Report ....
|
||||
if (eaReportNewDays &&
|
||||
eaTimeTracker.IsNewDay())
|
||||
{
|
||||
//
|
||||
string msg = "New Day ...";
|
||||
|
||||
//
|
||||
eaAlert.Alert(msg);
|
||||
}
|
||||
|
||||
//
|
||||
// Hourly Report ....
|
||||
if (eaReportNewHours &&
|
||||
eaTimeTracker.IsNewHour())
|
||||
{
|
||||
//
|
||||
string msg = "New Hour ...";
|
||||
|
||||
//
|
||||
eaAlert.Alert(msg);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user