last ...
This commit is contained in:
@@ -426,7 +426,8 @@ class XCBarArrowObject : public XCBaseObject
|
||||
int window,
|
||||
int arrow,
|
||||
XOHCL &bar,
|
||||
ENUM_X_PRICE priceType //
|
||||
ENUM_X_PRICE priceType,
|
||||
double threshold = 5 //
|
||||
)
|
||||
{
|
||||
//
|
||||
@@ -448,6 +449,21 @@ class XCBarArrowObject : public XCBaseObject
|
||||
datetime time = bar.time;
|
||||
double price = bar.GetPrice(priceType);
|
||||
|
||||
//
|
||||
if (threshold > 0)
|
||||
{
|
||||
//
|
||||
double thresholdPrice = threshold * GetPoints(bar.symbol);
|
||||
if (priceType == X_PRICE_HIGH)
|
||||
{
|
||||
price += thresholdPrice;
|
||||
}
|
||||
else if (priceType == X_PRICE_LOW)
|
||||
{
|
||||
price -= thresholdPrice;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
result = mArrow.Create(
|
||||
chart_id,
|
||||
|
||||
Reference in New Issue
Block a user