last works ...

This commit is contained in:
2024-12-02 03:11:52 +03:30
parent 4d472bf7e8
commit de90f2d5fb
10 changed files with 5360 additions and 1374 deletions
+120
View File
@@ -1345,6 +1345,74 @@ struct XOHCL
return result;
}
//
bool BarAt(
int index,
XOHCL &bar //
)
{
//
bool result = false;
//
bar.Clean();
//
result = IsValid();
if (!result)
{
return result;
}
//
if (index < 0)
{
index = 0;
}
//
result = bar.Init(
symbol,
period,
index //
);
//
return result;
}
//
bool BarIn(
ENUM_TIMEFRAMES _period,
XOHCL &bar //
)
{
//
bool result = false;
//
bar.Clean();
//
result = IsValid() &&
IsSpecifiedValid(_period);
if (!result)
{
return result;
}
//
int index = Index(_period);
result = bar.Init(
symbol,
_period,
index //
);
//
return result;
}
//
// Find Current Bar Index on Chart ...
int Index()
@@ -1370,6 +1438,58 @@ struct XOHCL
return result;
}
//
int Index(datetime value)
{
//
int result = -1;
//
value = NormalizeTime(value);
//
result = IsValid();
if (!result)
{
return result;
}
//
result = iBarShift(
symbol,
period,
value //
);
//
return result;
}
//
int Index(ENUM_TIMEFRAMES value)
{
//
int result = -1;
//
result = IsValid() &&
IsSpecifiedValid(value);
if (!result)
{
return result;
}
//
result = iBarShift(
symbol,
value,
time //
);
//
return result;
}
//
bool GetNextBar(XOHCL &bar)
{
+54
View File
@@ -683,6 +683,24 @@ class XCBarZone : public XCZone
return result;
}
ENUM_TIMEFRAMES GetPeriod() {
//
ENUM_TIMEFRAMES result = NULL;
//
XOHCL bar;
bool isFilled = FillBar(bar);
if (!isFilled) {
return result;
}
//
result = bar.period;
//
return result;
}
/**
* Set From Date ...
*
@@ -1003,6 +1021,24 @@ class XCTwoBarZone : public XCZone
return result;
}
ENUM_TIMEFRAMES GetPeriod() {
//
ENUM_TIMEFRAMES result = NULL;
//
XOHCL bar;
bool isFilled = FillStartBar(bar);
if (!isFilled) {
return result;
}
//
result = bar.period;
//
return result;
}
//
// Overrides ...
@@ -1202,6 +1238,24 @@ class XCSwing : public XCBasePOI
//
return result;
}
ENUM_TIMEFRAMES GetPeriod() {
//
ENUM_TIMEFRAMES result = NULL;
//
XOHCL bar;
bool isFilled = FillBar(bar);
if (!isFilled) {
return result;
}
//
result = bar.period;
//
return result;
}
/**
* Check Swing High or not ...