last ...
This commit is contained in:
@@ -22,146 +22,11 @@
|
||||
//
|
||||
// Imports ...
|
||||
#include "../Libraries/x-saherelm.x-poi.lib.mq5"
|
||||
#include "../Libraries/x-saherelm.xobfvg.lib.mq5"
|
||||
#include "../Libraries/x-saherelm.x-poi.state.lib.mq5"
|
||||
|
||||
//
|
||||
// Extensions ...
|
||||
|
||||
/**
|
||||
* Combine a Collection of States into dest ...
|
||||
*
|
||||
* @param dest: XPOIState instance ...
|
||||
* @param source: XPOIState Collection ...
|
||||
*/
|
||||
void CombineStates(
|
||||
XPOIState &dest,
|
||||
XPOIState &source[] //
|
||||
)
|
||||
{
|
||||
//
|
||||
dest.Clean();
|
||||
|
||||
//
|
||||
int count = ArraySize(source);
|
||||
if (!IsValidSize(count))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
//
|
||||
XPOIState iState = source[i];
|
||||
|
||||
//
|
||||
if (dest.ticksZone == NULL)
|
||||
{
|
||||
dest.ticksZone = iState.ticksZone;
|
||||
}
|
||||
|
||||
//
|
||||
Copy(
|
||||
iState.swingHighs,
|
||||
dest.swingHighs,
|
||||
false //
|
||||
);
|
||||
|
||||
//
|
||||
Copy(
|
||||
iState.swingLows,
|
||||
dest.swingLows,
|
||||
false //
|
||||
);
|
||||
|
||||
//
|
||||
Copy(
|
||||
iState.bullishMomentumBars,
|
||||
dest.bullishMomentumBars,
|
||||
false //
|
||||
);
|
||||
|
||||
//
|
||||
Copy(
|
||||
iState.bearishMomentumBars,
|
||||
dest.bearishMomentumBars,
|
||||
false //
|
||||
);
|
||||
|
||||
//
|
||||
Copy(
|
||||
iState.bullishRejectionBars,
|
||||
dest.bullishRejectionBars,
|
||||
false //
|
||||
);
|
||||
|
||||
//
|
||||
Copy(
|
||||
iState.bearishRejectionBars,
|
||||
dest.bearishRejectionBars,
|
||||
false //
|
||||
);
|
||||
|
||||
//
|
||||
Copy(
|
||||
iState.supportZones,
|
||||
dest.supportZones,
|
||||
false //
|
||||
);
|
||||
|
||||
//
|
||||
Copy(
|
||||
iState.resistanceZones,
|
||||
dest.resistanceZones,
|
||||
false //
|
||||
);
|
||||
|
||||
//
|
||||
Copy(
|
||||
iState.supplyZones,
|
||||
dest.supplyZones,
|
||||
false //
|
||||
);
|
||||
|
||||
//
|
||||
Copy(
|
||||
iState.demandZones,
|
||||
dest.demandZones,
|
||||
false //
|
||||
);
|
||||
|
||||
//
|
||||
Copy(
|
||||
iState.bullishOrderBlocks,
|
||||
dest.bullishOrderBlocks,
|
||||
false //
|
||||
);
|
||||
|
||||
//
|
||||
Copy(
|
||||
iState.bearishOrderBlocks,
|
||||
dest.bearishOrderBlocks,
|
||||
false //
|
||||
);
|
||||
|
||||
//
|
||||
Copy(
|
||||
iState.bullishFairValueGaps,
|
||||
dest.bullishFairValueGaps,
|
||||
false //
|
||||
);
|
||||
|
||||
//
|
||||
Copy(
|
||||
iState.bearishFairValueGaps,
|
||||
dest.bearishFairValueGaps,
|
||||
false //
|
||||
);
|
||||
|
||||
//
|
||||
}
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
bool ToZone(
|
||||
T *&source[],
|
||||
@@ -265,7 +130,7 @@ bool ToBox(
|
||||
|
||||
template <typename T>
|
||||
int GetOldest(
|
||||
T *&sourec[] //
|
||||
T *&source[] //
|
||||
)
|
||||
{
|
||||
//
|
||||
@@ -732,6 +597,47 @@ bool IsInside(
|
||||
return result;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
bool IsInsideOr(
|
||||
T *source,
|
||||
T *dest //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
XBoxZone sourceBox;
|
||||
result = ToBox(
|
||||
sourceBox,
|
||||
source //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
XBoxZone destBox;
|
||||
result = ToBox(
|
||||
destBox,
|
||||
dest //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result = IsBoxInsideOr(
|
||||
sourceBox,
|
||||
destBox //
|
||||
);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
template <typename T, typename F>
|
||||
bool IsInsideDiff(
|
||||
T *source,
|
||||
@@ -775,6 +681,48 @@ bool IsInsideDiff(
|
||||
return result;
|
||||
}
|
||||
|
||||
template <typename T, typename F>
|
||||
bool IsInsideOrDiff(
|
||||
T *source,
|
||||
F *dest,
|
||||
bool forceSideOut = false //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
XBoxZone sourceBox;
|
||||
result = ToBox(
|
||||
sourceBox,
|
||||
source //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
XBoxZone destBox;
|
||||
result = ToBox(
|
||||
destBox,
|
||||
dest //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result = IsBoxInsideOr(
|
||||
sourceBox,
|
||||
destBox //
|
||||
);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
bool FindIndex(
|
||||
int &index,
|
||||
@@ -1117,6 +1065,50 @@ bool IsBoxInside(
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Detect source BoX is Inside Dest Box or Have a Side Out on it ...
|
||||
*
|
||||
* @param source: XBoxZone instance, source box which checks by dest ...
|
||||
* @param dest: XBoxZone instance, dest Box which compares source with it ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool IsBoxInsideOr(
|
||||
XBoxZone &source,
|
||||
XBoxZone &dest //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
result = source.IsValid() &&
|
||||
dest.IsValid() &&
|
||||
!source.IsSame(dest);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool isLowerInside =
|
||||
source.lower > dest.lower &&
|
||||
source.lower < dest.upper &&
|
||||
(source.upper < dest.upper ||
|
||||
source.upper > dest.upper);
|
||||
bool isUpperInside =
|
||||
source.upper < dest.upper &&
|
||||
source.upper > dest.lower &&
|
||||
(source.lower > dest.lower ||
|
||||
source.lower < dest.lower);
|
||||
result =
|
||||
isLowerInside ||
|
||||
isUpperInside;
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check Value is Inside Specified Box ...
|
||||
*
|
||||
|
||||
@@ -27,9 +27,6 @@
|
||||
//
|
||||
// Definitions ...
|
||||
|
||||
//
|
||||
// Definitions ...
|
||||
|
||||
//
|
||||
// All Available POI(s) ...
|
||||
enum ENUM_XPOIS
|
||||
@@ -76,6 +73,8 @@ enum ENUM_XPOIS
|
||||
// Event Types ...
|
||||
enum ENUM_XPOI_EVENTS
|
||||
{
|
||||
//
|
||||
X_POI_EVENT_NONE,
|
||||
//
|
||||
// Trading Days ...
|
||||
X_TRADE_DAY_FIRST_BAR, // Trading Day First Bar ...
|
||||
@@ -3392,7 +3391,8 @@ class XCSupplyZone : public XCBarZone
|
||||
*/
|
||||
bool Init(
|
||||
XOHCL &bar,
|
||||
int range = 0 //
|
||||
int range = 0,
|
||||
bool useRangeAsStart = false //
|
||||
)
|
||||
{
|
||||
//
|
||||
@@ -3427,7 +3427,10 @@ class XCSupplyZone : public XCBarZone
|
||||
int periodSeconds = PeriodSeconds(bar.period);
|
||||
|
||||
//
|
||||
datetime from = (datetime)((int)time - (range * periodSeconds));
|
||||
datetime from =
|
||||
!useRangeAsStart
|
||||
? (datetime)((int)time - (range * periodSeconds))
|
||||
: time;
|
||||
datetime to = (datetime)((int)time + (range * periodSeconds));
|
||||
|
||||
//
|
||||
@@ -3502,7 +3505,8 @@ class XCDemandZone : public XCBarZone
|
||||
*/
|
||||
bool Init(
|
||||
XOHCL &bar,
|
||||
int range = 0 //
|
||||
int range = 0,
|
||||
bool useRangeAsStart = false //
|
||||
)
|
||||
{
|
||||
//
|
||||
@@ -3537,7 +3541,10 @@ class XCDemandZone : public XCBarZone
|
||||
int periodSeconds = PeriodSeconds(bar.period);
|
||||
|
||||
//
|
||||
datetime from = (datetime)((int)time - (range * periodSeconds));
|
||||
datetime from =
|
||||
!useRangeAsStart
|
||||
? (datetime)((int)time - (range * periodSeconds))
|
||||
: time;
|
||||
datetime to = (datetime)((int)time + (range * periodSeconds));
|
||||
|
||||
//
|
||||
@@ -5168,633 +5175,6 @@ class XCSession : public XCFromToZone
|
||||
//
|
||||
};
|
||||
|
||||
//
|
||||
//
|
||||
// Model Exists Founded POIs ...
|
||||
struct XPOIState
|
||||
{
|
||||
//
|
||||
string symbol;
|
||||
ENUM_TIMEFRAMES period;
|
||||
datetime time;
|
||||
|
||||
//
|
||||
XCTicksZone *ticksZone; // Ticks Zone ...
|
||||
|
||||
//
|
||||
XCSwing *swingHighs[]; // Holds Founded Swing Highs ...
|
||||
XCSwing *swingLows[]; // Holds Founded Swing Lows ...
|
||||
XCMomentumBar *bullishMomentumBars[]; // Holds Founded Bullish Momentum Bars ...
|
||||
XCMomentumBar *bearishMomentumBars[]; // Holds Founded Bearish Momentum Bars ...
|
||||
XCRejectionBar *bullishRejectionBars[]; // Holds Founded Bullish Rejection Bars ...
|
||||
XCRejectionBar *bearishRejectionBars[]; // Holds Founded Bearish Rejection Bars ...
|
||||
XCSupportZone *supportZones[]; // Holds Founded Support Zones ...
|
||||
XCResistanceZone *resistanceZones[]; // Holds Founded Resistance Zones ...
|
||||
XCSupplyZone *supplyZones[]; // Holds Founded Supply Zones ...
|
||||
XCDemandZone *demandZones[]; // Holds Founded Demand Zones ...
|
||||
XCOrderBlock *bullishOrderBlocks[]; // Holds Founded Bullish Order Blocks ...
|
||||
XCOrderBlock *bearishOrderBlocks[]; // Holds Founded Bearish Order Blocks ...
|
||||
XCFVG *bullishFairValueGaps[]; // Holds Founded Bullish Fair Value Gaps ...
|
||||
XCFVG *bearishFairValueGaps[]; // Holds Founded Bearish Fair Value Gaps ...
|
||||
|
||||
//
|
||||
// Constructor ...
|
||||
void XPOIState()
|
||||
{
|
||||
Clean();
|
||||
}
|
||||
|
||||
//
|
||||
// Actions ...
|
||||
|
||||
/**
|
||||
* Cleanup all props ...
|
||||
*/
|
||||
void Clean()
|
||||
{
|
||||
//
|
||||
symbol = NULL;
|
||||
period = NULL;
|
||||
time = NULL;
|
||||
|
||||
//
|
||||
ticksZone = NULL;
|
||||
|
||||
//
|
||||
Clean(swingHighs);
|
||||
Clean(swingLows);
|
||||
Clean(bullishMomentumBars);
|
||||
Clean(bearishMomentumBars);
|
||||
Clean(bullishRejectionBars);
|
||||
Clean(bearishRejectionBars);
|
||||
Clean(supportZones);
|
||||
Clean(resistanceZones);
|
||||
Clean(supplyZones);
|
||||
Clean(demandZones);
|
||||
Clean(bullishOrderBlocks);
|
||||
Clean(bearishOrderBlocks);
|
||||
Clean(bullishFairValueGaps);
|
||||
Clean(bearishFairValueGaps);
|
||||
|
||||
//
|
||||
ZeroMemory(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool IsValid()
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
result =
|
||||
IsSpecifiedValid(symbol) &&
|
||||
IsSpecifiedValid(period) &&
|
||||
IsSpecifiedValid(time);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check State has Childs or not ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool HasChild()
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
result =
|
||||
//
|
||||
IsValidSize(CountSwingHighs()) ||
|
||||
IsValidSize(CountSwingLows()) ||
|
||||
IsValidSize(CountBullishMomentumBars()) ||
|
||||
IsValidSize(CountBearishMomentumBars()) ||
|
||||
IsValidSize(CountBullishRejectionBars()) ||
|
||||
IsValidSize(CountBearishRejectionBars()) ||
|
||||
IsValidSize(CountSupportZones()) ||
|
||||
IsValidSize(CountResistanceZones()) ||
|
||||
IsValidSize(CountSupplyZones()) ||
|
||||
IsValidSize(CountDemandZones()) ||
|
||||
IsValidSize(CountBullishOrderBlocks()) ||
|
||||
IsValidSize(CountBearishOrderBlocks()) ||
|
||||
IsValidSize(CountBullishFairValueGaps()) ||
|
||||
IsValidSize(CountBearishFairValueGaps())
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fill Dest State by Current State's Data ...
|
||||
*
|
||||
* @param dest: XPOIState instance, reference to specified dest ...
|
||||
*
|
||||
*/
|
||||
void Fill(XPOIState &dest)
|
||||
{
|
||||
//
|
||||
if (!IsValid() ||
|
||||
!HasChild())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
dest.symbol = symbol;
|
||||
dest.period = period;
|
||||
dest.time = time;
|
||||
|
||||
//
|
||||
Copy(
|
||||
swingHighs,
|
||||
dest.swingHighs,
|
||||
false //
|
||||
);
|
||||
Copy(
|
||||
swingLows,
|
||||
dest.swingLows,
|
||||
false //
|
||||
);
|
||||
Copy(
|
||||
bullishMomentumBars,
|
||||
dest.bullishMomentumBars,
|
||||
false //
|
||||
);
|
||||
Copy(
|
||||
bearishMomentumBars,
|
||||
dest.bearishMomentumBars,
|
||||
false //
|
||||
);
|
||||
Copy(
|
||||
bullishRejectionBars,
|
||||
dest.bullishRejectionBars,
|
||||
false //
|
||||
);
|
||||
Copy(
|
||||
bearishRejectionBars,
|
||||
dest.bearishRejectionBars,
|
||||
false //
|
||||
);
|
||||
Copy(
|
||||
supportZones,
|
||||
dest.supportZones,
|
||||
false //
|
||||
);
|
||||
Copy(
|
||||
resistanceZones,
|
||||
dest.resistanceZones,
|
||||
false //
|
||||
);
|
||||
Copy(
|
||||
supplyZones,
|
||||
dest.supplyZones,
|
||||
false //
|
||||
);
|
||||
Copy(
|
||||
demandZones,
|
||||
dest.demandZones,
|
||||
false //
|
||||
);
|
||||
Copy(
|
||||
bullishOrderBlocks,
|
||||
dest.bullishOrderBlocks,
|
||||
false //
|
||||
);
|
||||
Copy(
|
||||
bearishOrderBlocks,
|
||||
dest.bearishOrderBlocks,
|
||||
false //
|
||||
);
|
||||
Copy(
|
||||
bullishFairValueGaps,
|
||||
dest.bullishFairValueGaps,
|
||||
false //
|
||||
);
|
||||
Copy(
|
||||
bearishFairValueGaps,
|
||||
dest.bearishFairValueGaps,
|
||||
false //
|
||||
);
|
||||
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate Liquidity Percent for Specified Direction ...
|
||||
*
|
||||
* @param forDirection: ENUM_X_DIRECTION member, Specified Liquidity ...
|
||||
* @param price: Double, Specified Price ...
|
||||
*
|
||||
* @return ( double )
|
||||
*/
|
||||
double CalculateLiquidityPercent(
|
||||
ENUM_X_DIRECTION forDirection,
|
||||
double price = 0 //
|
||||
)
|
||||
{
|
||||
//
|
||||
double result = 0;
|
||||
|
||||
//
|
||||
if (!IsValid() ||
|
||||
ticksZone == NULL)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Normalize Price for Actions ...
|
||||
if (price <= 0)
|
||||
{
|
||||
//
|
||||
MqlTick mTick;
|
||||
bool isTickRetrieved = GetTick(
|
||||
symbol,
|
||||
mTick //
|
||||
);
|
||||
if (isTickRetrieved)
|
||||
{
|
||||
price = mTick.bid;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
result = ticksZone
|
||||
.CalculateLiquidityPercent(
|
||||
forDirection,
|
||||
price //
|
||||
);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Counters ...
|
||||
|
||||
//
|
||||
int CountSwingHighs()
|
||||
{
|
||||
//
|
||||
int result = 0;
|
||||
|
||||
//
|
||||
if (!IsValid())
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result = ArraySize(swingHighs);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool HasSwingHighs()
|
||||
{
|
||||
return IsValidSize(CountSwingHighs());
|
||||
}
|
||||
|
||||
//
|
||||
int CountSwingLows()
|
||||
{
|
||||
//
|
||||
int result = 0;
|
||||
|
||||
//
|
||||
if (!IsValid())
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result = ArraySize(swingLows);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool HasSwingLows()
|
||||
{
|
||||
return IsValidSize(CountSwingLows());
|
||||
}
|
||||
|
||||
//
|
||||
int CountBullishMomentumBars()
|
||||
{
|
||||
//
|
||||
int result = 0;
|
||||
|
||||
//
|
||||
if (!IsValid())
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result = ArraySize(bullishMomentumBars);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool HasBullishMomentumBars()
|
||||
{
|
||||
return IsValidSize(CountBullishMomentumBars());
|
||||
}
|
||||
|
||||
//
|
||||
int CountBearishMomentumBars()
|
||||
{
|
||||
//
|
||||
int result = 0;
|
||||
|
||||
//
|
||||
if (!IsValid())
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result = ArraySize(bearishMomentumBars);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool HasBearishMomentumBars()
|
||||
{
|
||||
return IsValidSize(CountBearishMomentumBars());
|
||||
}
|
||||
|
||||
//
|
||||
int CountBullishRejectionBars()
|
||||
{
|
||||
//
|
||||
int result = 0;
|
||||
|
||||
//
|
||||
if (!IsValid())
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result = ArraySize(bullishRejectionBars);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool HasBullishRejectionBars()
|
||||
{
|
||||
return IsValidSize(CountBullishRejectionBars());
|
||||
}
|
||||
|
||||
//
|
||||
int CountBearishRejectionBars()
|
||||
{
|
||||
//
|
||||
int result = 0;
|
||||
|
||||
//
|
||||
if (!IsValid())
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result = ArraySize(bearishRejectionBars);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool HasBearishRejectionBars()
|
||||
{
|
||||
return IsValidSize(CountBearishRejectionBars());
|
||||
}
|
||||
|
||||
//
|
||||
int CountSupportZones()
|
||||
{
|
||||
//
|
||||
int result = 0;
|
||||
|
||||
//
|
||||
if (!IsValid())
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result = ArraySize(supportZones);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool HasSupportZones()
|
||||
{
|
||||
return IsValidSize(CountSupportZones());
|
||||
}
|
||||
|
||||
//
|
||||
int CountResistanceZones()
|
||||
{
|
||||
//
|
||||
int result = 0;
|
||||
|
||||
//
|
||||
if (!IsValid())
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result = ArraySize(resistanceZones);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool HasResistanceZones()
|
||||
{
|
||||
return IsValidSize(CountResistanceZones());
|
||||
}
|
||||
|
||||
//
|
||||
int CountSupplyZones()
|
||||
{
|
||||
//
|
||||
int result = 0;
|
||||
|
||||
//
|
||||
if (!IsValid())
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result = ArraySize(supplyZones);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool HasSupplyZones()
|
||||
{
|
||||
return IsValidSize(CountSupplyZones());
|
||||
}
|
||||
|
||||
//
|
||||
int CountDemandZones()
|
||||
{
|
||||
//
|
||||
int result = 0;
|
||||
|
||||
//
|
||||
if (!IsValid())
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result = ArraySize(demandZones);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool HasDemandZones()
|
||||
{
|
||||
return IsValidSize(CountDemandZones());
|
||||
}
|
||||
|
||||
//
|
||||
int CountBullishOrderBlocks()
|
||||
{
|
||||
//
|
||||
int result = 0;
|
||||
|
||||
//
|
||||
if (!IsValid())
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result = ArraySize(bullishOrderBlocks);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool HasBullishOrderBlocks()
|
||||
{
|
||||
return IsValidSize(CountBullishOrderBlocks());
|
||||
}
|
||||
|
||||
//
|
||||
int CountBearishOrderBlocks()
|
||||
{
|
||||
//
|
||||
int result = 0;
|
||||
|
||||
//
|
||||
if (!IsValid())
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result = ArraySize(bearishOrderBlocks);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool HasBearishOrderBlocks()
|
||||
{
|
||||
return IsValidSize(CountBearishOrderBlocks());
|
||||
}
|
||||
|
||||
//
|
||||
int CountBullishFairValueGaps()
|
||||
{
|
||||
//
|
||||
int result = 0;
|
||||
|
||||
//
|
||||
if (!IsValid())
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result = ArraySize(bullishFairValueGaps);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool HasBullishFairValueGaps()
|
||||
{
|
||||
return IsValidSize(CountBullishFairValueGaps());
|
||||
}
|
||||
|
||||
//
|
||||
int CountBearishFairValueGaps()
|
||||
{
|
||||
//
|
||||
int result = 0;
|
||||
|
||||
//
|
||||
if (!IsValid())
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result = ArraySize(bearishFairValueGaps);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool HasBearishFairValueGaps()
|
||||
{
|
||||
return IsValidSize(CountBearishFairValueGaps());
|
||||
}
|
||||
|
||||
//
|
||||
};
|
||||
|
||||
//
|
||||
// Consolidation Zone ...
|
||||
struct XConsolidationZone
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1118,7 +1118,7 @@ struct XSignal
|
||||
|
||||
//
|
||||
// Traget ...
|
||||
double target; // Force Risk Free On Target ...
|
||||
double targets[]; // Force Risk Free On Targets ...
|
||||
bool ignoreEAVolume; // Ignore EA Volume ...
|
||||
|
||||
//
|
||||
@@ -1679,7 +1679,7 @@ struct XSignal
|
||||
conditions = NULL;
|
||||
|
||||
//
|
||||
target = 0;
|
||||
Clean(targets);
|
||||
ignoreEAVolume = false;
|
||||
|
||||
//
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user