last ...
This commit is contained in:
@@ -725,6 +725,89 @@ struct X121SMCStrategyXWZWorkingZone
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
bool IsDestroyed(
|
||||
int barIndex = 0,
|
||||
ENUM_TIMEFRAMES forPeriod = NULL //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
if (barIndex < 0)
|
||||
{
|
||||
barIndex = 0;
|
||||
}
|
||||
|
||||
//
|
||||
if (!IsValid(forPeriod))
|
||||
{
|
||||
forPeriod = period;
|
||||
}
|
||||
|
||||
//
|
||||
result = IsValid();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
XOHCL bar;
|
||||
result = bar.Init(
|
||||
symbol,
|
||||
period,
|
||||
barIndex //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
//
|
||||
bar.Clean();
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
XOHCL cBar;
|
||||
result = bar.GetPreviousBar(cBar);
|
||||
if (!result)
|
||||
{
|
||||
//
|
||||
bar.Clean();
|
||||
cBar.Clean();
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool isSupplyZoneBreaked =
|
||||
//
|
||||
bar.low > supplyZone.Upper() &&
|
||||
cBar.low > supplyZone.Upper()
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isDemandZoneBreaked =
|
||||
//
|
||||
bar.high < demandZone.Lower() &&
|
||||
cBar.high < demandZone.Lower()
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bar.Clean();
|
||||
cBar.Clean();
|
||||
|
||||
//
|
||||
result = isSupplyZoneBreaked ||
|
||||
isDemandZoneBreaked;
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool IsOrderFlowBreaked(
|
||||
int &breakedIndex,
|
||||
|
||||
Reference in New Issue
Block a user