last ...
This commit is contained in:
@@ -452,6 +452,12 @@ int OnInit()
|
||||
// detectorConfig.FullDetect();
|
||||
// marketStructureDrawerConfig.FullDraw();
|
||||
|
||||
//
|
||||
// Ignoring Position Drawer ...
|
||||
delete eaExpert.eaPositionDrawer;
|
||||
ZeroMemory(eaExpert.eaPositionDrawer);
|
||||
eaExpert.eaPositionDrawer = NULL;
|
||||
|
||||
//
|
||||
Print(ShortName, ": Initialized Successfully ...");
|
||||
return INIT_SUCCEEDED;
|
||||
@@ -518,6 +524,35 @@ void OnTick()
|
||||
//
|
||||
// Signallers Calling OnTick ...
|
||||
fima1Signaller.OnTick(barIndex);
|
||||
|
||||
//
|
||||
// Checking For Guard only When has Position ...
|
||||
XPosition positions[];
|
||||
int positionsCount = eaExpert.eaTrader.GetPositions(
|
||||
positions,
|
||||
fima1Signaller.symbol,
|
||||
fima1Signaller.name,
|
||||
fima1Signaller.period,
|
||||
NULL, // All Types ...
|
||||
true, // Filter By Magic ...
|
||||
true // Force Clean ...
|
||||
);
|
||||
if (IsValidSize(positionsCount))
|
||||
{
|
||||
//
|
||||
XGuard guards[];
|
||||
int guardsCount = fima1Signaller.CheckForGuard(
|
||||
guards,
|
||||
positions,
|
||||
barIndex //
|
||||
);
|
||||
if (IsValidSize(guardsCount))
|
||||
{
|
||||
//
|
||||
// Handling Guards ...
|
||||
eaExpert.eaGuard.DoGuards(guards);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user