This commit is contained in:
2024-05-23 07:46:43 +03:30
parent 5142f47de3
commit 25b027d2aa
6 changed files with 1661 additions and 72 deletions
+28 -1
View File
@@ -554,6 +554,7 @@ public:
void Clear()
{
//
Clean(bars);
Clean(tsCurrents);
Clean(tsNearests);
Clean(tsMediests);
@@ -585,6 +586,7 @@ public:
Clean(chlhHotStates);
//
ArraySetAsSeries(bars, true);
ArraySetAsSeries(tsCurrents, true);
ArraySetAsSeries(tsNearests, true);
ArraySetAsSeries(tsMediests, true);
@@ -2507,13 +2509,38 @@ public:
}
//
virtual void GetMarketConditions(
void GetMarketConditions(
X5MarketConditions &mConditions, // Market Conditions Result
int barIndex = 0 // Specified Bar Index
)
{
//
mConditions.Clear();
//
if (barIndex < 0)
{
barIndex = 0;
}
//
if (barIndex >= CountBars())
{
barIndex = CountBars() + 2;
}
//
int curr = barIndex + 1;
int prev = curr + 1;
//
GetBars(
mConditions.bars,
mConditions.symbol,
mConditions.period,
barIndex,
mNumberOfItems //
);
//
// XTM ...