last ...
This commit is contained in:
@@ -94,6 +94,7 @@ class XCBackTesterEA : public XCBase
|
||||
|
||||
//
|
||||
XCAlert *eaAlert; // EA Scope Alert Handler ...
|
||||
XCGuard *eaGuard; // EA Scope Guard Handler ...
|
||||
XCTrade *eaTrader; // EA Scope Trade Handler ...
|
||||
XCTarget *eaTarget; // EA Scope Target Manager ...
|
||||
XCVolume *eaVolume; // EA Scope Volume Manager ...
|
||||
@@ -310,6 +311,13 @@ class XCBackTesterEA : public XCBase
|
||||
// Init Target Managers ...
|
||||
eaTarget = new XCTarget(eaTrader, eaAlert);
|
||||
|
||||
//
|
||||
// Initialize Guard Handler ...
|
||||
eaGuard = new XCGuard(
|
||||
eaAlert,
|
||||
eaTrader //
|
||||
);
|
||||
|
||||
//
|
||||
eaVolume = new XCVolume();
|
||||
result = eaVolume.Init(
|
||||
@@ -369,6 +377,10 @@ class XCBackTesterEA : public XCBase
|
||||
delete eaTrader;
|
||||
ZeroMemory(eaTrader);
|
||||
|
||||
//
|
||||
delete eaGuard;
|
||||
ZeroMemory(eaGuard);
|
||||
|
||||
//
|
||||
SpecifiedClean(mOnModifyEventHandlers);
|
||||
SpecifiedClean(mStopLossEventHandlers);
|
||||
@@ -406,7 +418,10 @@ class XCBackTesterEA : public XCBase
|
||||
|
||||
//
|
||||
// Manage Positions Drawings ...
|
||||
eaPositionDrawer.Update();
|
||||
if (eaPositionDrawer != NULL)
|
||||
{
|
||||
eaPositionDrawer.Update();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -480,7 +495,10 @@ class XCBackTesterEA : public XCBase
|
||||
eaTarget.HandleOnStopLossTriggered(deal);
|
||||
|
||||
//
|
||||
eaPositionDrawer.HandleStopLossTriggered(deal);
|
||||
if (eaPositionDrawer != NULL)
|
||||
{
|
||||
eaPositionDrawer.HandleStopLossTriggered(deal);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -498,7 +516,10 @@ class XCBackTesterEA : public XCBase
|
||||
eaTarget.HandleOnTakeProfitTriggered(deal);
|
||||
|
||||
//
|
||||
eaPositionDrawer.HandleOnTakeProfitTriggered(deal);
|
||||
if (eaPositionDrawer != NULL)
|
||||
{
|
||||
eaPositionDrawer.HandleOnTakeProfitTriggered(deal);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -526,11 +547,15 @@ class XCBackTesterEA : public XCBase
|
||||
);
|
||||
|
||||
//
|
||||
eaPositionDrawer.HandleOnPositionForceClosed(
|
||||
ticket,
|
||||
position,
|
||||
comment //
|
||||
);
|
||||
if (eaPositionDrawer != NULL)
|
||||
{
|
||||
//
|
||||
eaPositionDrawer.HandleOnPositionForceClosed(
|
||||
ticket,
|
||||
position,
|
||||
comment //
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -598,11 +623,15 @@ class XCBackTesterEA : public XCBase
|
||||
)
|
||||
{
|
||||
//
|
||||
eaPositionDrawer.HandleOnPositionModified(
|
||||
ticket,
|
||||
profit,
|
||||
comment //
|
||||
);
|
||||
if (eaPositionDrawer != NULL)
|
||||
{
|
||||
//
|
||||
eaPositionDrawer.HandleOnPositionModified(
|
||||
ticket,
|
||||
profit,
|
||||
comment //
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -665,7 +694,10 @@ class XCBackTesterEA : public XCBase
|
||||
eaTarget.AddExecutedSignal(signal);
|
||||
|
||||
//
|
||||
eaPositionDrawer.AddExecutedSignal(signal);
|
||||
if (eaPositionDrawer != NULL)
|
||||
{
|
||||
eaPositionDrawer.AddExecutedSignal(signal);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user