Last works ...
This commit is contained in:
@@ -946,6 +946,77 @@ struct XBoxZone
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* At Bar Index ...
|
||||
*
|
||||
* @return ( int )
|
||||
*/
|
||||
int AtIndex(
|
||||
ENUM_TIMEFRAMES forPeriod = NULL //
|
||||
)
|
||||
{
|
||||
//
|
||||
int result = -1;
|
||||
|
||||
//
|
||||
if (!IsValid() || !IsXValid(at))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
if (!IsSpecifiedValid(forPeriod))
|
||||
{
|
||||
forPeriod = period;
|
||||
}
|
||||
|
||||
//
|
||||
result = GetBarIndex(
|
||||
symbol,
|
||||
forPeriod,
|
||||
at //
|
||||
);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve At Bar ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool AtBar(XOHCL &bar)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
bar.Clean();
|
||||
|
||||
//
|
||||
int idx = AtIndex();
|
||||
|
||||
//
|
||||
result =
|
||||
IsValid() &&
|
||||
IsValidIndex(idx);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result = bar.Init(
|
||||
symbol,
|
||||
period,
|
||||
idx //
|
||||
);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* From Bar Index ...
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user