Add Supports for Consolidation Range Founder ...

- [] required to Complete Supply and Demand Zone Retrieve in XConsolidation Zone Struct ...
This commit is contained in:
2024-12-11 02:14:37 +03:30
parent b5cec1f52a
commit a64430a28c
6 changed files with 1256 additions and 151 deletions
+113
View File
@@ -8486,6 +8486,119 @@ bool DetectMomentumChange(
return result;
}
//
// Fill Specified Applied Prices ...
int FillPrice(
double &buffer[],
ENUM_APPLIED_PRICE _mAppliedTo = PRICE_CLOSE,
string _mSymbol = NULL,
ENUM_TIMEFRAMES _mPeriod = NULL,
int _mStart = 0,
int _mLoopback = 10 //
)
{
//
int result = 0;
//
if (_mStart < 0)
{
_mStart = 0;
}
//
if (_mLoopback < 7)
{
_mLoopback = 7;
}
//
_mSymbol = NormalizeSymbol(_mSymbol);
_mPeriod = NormalizePeriod(_mPeriod);
//
Clean(buffer);
ArraySetAsSeries(buffer, true);
//
double open[];
result = CopyOpen(
_mSymbol,
_mPeriod,
_mStart,
_mLoopback,
open //
);
if (!IsValidSize(result)) {
return result;
}
//
double high[];
result = CopyHigh(
_mSymbol,
_mPeriod,
_mStart,
_mLoopback,
high //
);
if (!IsValidSize(result)) {
return result;
}
//
double low[];
result = CopyLow(
_mSymbol,
_mPeriod,
_mStart,
_mLoopback,
low //
);
if (!IsValidSize(result)) {
return result;
}
//
double close[];
result = CopyClose(
_mSymbol,
_mPeriod,
_mStart,
_mLoopback,
close //
);
if (!IsValidSize(result)) {
return result;
}
//
for (int i = 0; i < result; i++)
{
//
double iPrice = GetAppliedPrice(
_mAppliedTo,
open,
high,
low,
close,
i //
);
//
Add(
iPrice,
buffer //
);
}
//
result = ArraySize(buffer);
//
return result;
}
//
// Symbols ...