last ...
This commit is contained in:
@@ -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 ...
|
||||
|
||||
Reference in New Issue
Block a user