last ...
This commit is contained in:
@@ -3474,11 +3474,14 @@ struct XOHCL
|
||||
while (!isEnough)
|
||||
{
|
||||
//
|
||||
bool isInited = cBar.Init(
|
||||
result = cBar.Init(
|
||||
symbol,
|
||||
period,
|
||||
cIDX //
|
||||
);
|
||||
if (!result) {
|
||||
break;
|
||||
}
|
||||
|
||||
//
|
||||
result = cBar.IsBullish();
|
||||
|
||||
@@ -626,6 +626,10 @@ bool MoveArrow(
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normalize Name ...
|
||||
string objName = drawPrefix + "_" + name;
|
||||
|
||||
//
|
||||
// if point position is not set, move it to the current bar having Bid price ...
|
||||
@@ -642,7 +646,7 @@ bool MoveArrow(
|
||||
|
||||
//
|
||||
// move the anchor point ...
|
||||
result = ObjectMove(chartID, name, 0, time, price);
|
||||
result = ObjectMove(chartID, objName, 0, time, price);
|
||||
|
||||
//
|
||||
return result;
|
||||
@@ -657,10 +661,14 @@ bool DeleteArrow(
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normalize Name ...
|
||||
string objName = drawPrefix + "_" + name;
|
||||
|
||||
//
|
||||
// delete an arrow ...
|
||||
result = !ObjectDelete(chartID, name);
|
||||
result = !ObjectDelete(chartID, objName);
|
||||
|
||||
//
|
||||
return result;
|
||||
@@ -676,10 +684,14 @@ bool ArrowCodeChange(
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normalize Name ...
|
||||
string objName = drawPrefix + "_" + name;
|
||||
|
||||
//
|
||||
// change the arrow code ...
|
||||
result = ObjectSetInteger(chartID, name, OBJPROP_ARROWCODE, code);
|
||||
result = ObjectSetInteger(chartID, objName, OBJPROP_ARROWCODE, code);
|
||||
|
||||
//
|
||||
return result;
|
||||
@@ -695,10 +707,14 @@ bool ArrowAnchorChange(
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normalize Name ...
|
||||
string objName = drawPrefix + "_" + name;
|
||||
|
||||
//
|
||||
// change anchor type ...
|
||||
result = !ObjectSetInteger(chartID, name, OBJPROP_ANCHOR, anchor);
|
||||
result = !ObjectSetInteger(chartID, objName, OBJPROP_ANCHOR, anchor);
|
||||
|
||||
//
|
||||
return result;
|
||||
@@ -815,6 +831,10 @@ bool MoveHorizontalLine(
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normalize Name ...
|
||||
string objName = drawPrefix + "_" + name;
|
||||
|
||||
//
|
||||
// if the line price is not set, move it to the current Bid price level ...
|
||||
@@ -825,7 +845,7 @@ bool MoveHorizontalLine(
|
||||
|
||||
//
|
||||
// move a horizontal line ...
|
||||
result = ObjectMove(chartID, name, 0, 0, price);
|
||||
result = ObjectMove(chartID, objName, 0, 0, price);
|
||||
|
||||
//
|
||||
return result;
|
||||
@@ -840,10 +860,14 @@ bool DeleteHorizontalLine(
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normalize Name ...
|
||||
string objName = drawPrefix + "_" + name;
|
||||
|
||||
//
|
||||
// delete a horizontal line ...
|
||||
result = ObjectDelete(chartID, name);
|
||||
result = ObjectDelete(chartID, objName);
|
||||
|
||||
//
|
||||
return result;
|
||||
@@ -937,6 +961,10 @@ bool MoveVerticalLine(
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normalize Name ...
|
||||
string objName = drawPrefix + "_" + name;
|
||||
|
||||
//
|
||||
// if line time is not set, move the line to the last bar ...
|
||||
@@ -947,7 +975,7 @@ bool MoveVerticalLine(
|
||||
|
||||
//
|
||||
// move the vertical line ...
|
||||
result = ObjectMove(chartID, name, 0, time, 0);
|
||||
result = ObjectMove(chartID, objName, 0, time, 0);
|
||||
|
||||
//
|
||||
return result;
|
||||
@@ -962,10 +990,14 @@ bool DeleteVerticalLine(
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normalize Name ...
|
||||
string objName = drawPrefix + "_" + name;
|
||||
|
||||
//
|
||||
// delete the vertical line ...
|
||||
result = ObjectDelete(chartID, name);
|
||||
result = ObjectDelete(chartID, objName);
|
||||
|
||||
//
|
||||
return result;
|
||||
@@ -1001,11 +1033,15 @@ bool DrawRectangle(
|
||||
// Set anchor points' coordinates if they are not set ...
|
||||
ChangeRectangleEmptyPoints(time1, price1, time2, price2);
|
||||
|
||||
//
|
||||
// Normalize Name ...
|
||||
string objName = drawPrefix + "_" + name;
|
||||
|
||||
//
|
||||
// Create a rectangle by the given coordinates ...
|
||||
result = ObjectCreate(
|
||||
chartID,
|
||||
name,
|
||||
objName,
|
||||
OBJ_RECTANGLE,
|
||||
subWindow,
|
||||
time1,
|
||||
@@ -1020,41 +1056,41 @@ bool DrawRectangle(
|
||||
|
||||
//
|
||||
// Set rectangle color ...
|
||||
ObjectSetInteger(chartID, name, OBJPROP_COLOR, clr);
|
||||
ObjectSetInteger(chartID, objName, OBJPROP_COLOR, clr);
|
||||
|
||||
//
|
||||
// Set the style of rectangle lines
|
||||
ObjectSetInteger(chartID, name, OBJPROP_STYLE, style);
|
||||
ObjectSetInteger(chartID, objName, OBJPROP_STYLE, style);
|
||||
|
||||
//
|
||||
// Set width of the rectangle lines ...
|
||||
ObjectSetInteger(chartID, name, OBJPROP_WIDTH, width);
|
||||
ObjectSetInteger(chartID, objName, OBJPROP_WIDTH, width);
|
||||
|
||||
//
|
||||
// Enable (true) or disable (false) the mode of filling the rectangle ...
|
||||
ObjectSetInteger(chartID, name, OBJPROP_FILL, fill);
|
||||
ObjectSetInteger(chartID, objName, OBJPROP_FILL, fill);
|
||||
|
||||
//
|
||||
// Display in the foreground (false) or background (true) ...
|
||||
ObjectSetInteger(chartID, name, OBJPROP_BACK, back);
|
||||
ObjectSetInteger(chartID, objName, OBJPROP_BACK, back);
|
||||
|
||||
//
|
||||
// Enable (true) or disable (false) the mode of highlighting the rectangle for moving
|
||||
// when creating a graphical object using ObjectCreate function, the object cannot be
|
||||
// highlighted and moved by default. Inside this method, selection parameter
|
||||
// is true by default making it possible to highlight and move the object
|
||||
ObjectSetInteger(chartID, name, OBJPROP_SELECTABLE, selection);
|
||||
ObjectSetInteger(chartID, objName, OBJPROP_SELECTABLE, selection);
|
||||
|
||||
//
|
||||
ObjectSetInteger(chartID, name, OBJPROP_SELECTED, selection);
|
||||
ObjectSetInteger(chartID, objName, OBJPROP_SELECTED, selection);
|
||||
|
||||
//
|
||||
// Hide (true) or display (false) graphical object name in the object list ...
|
||||
ObjectSetInteger(chartID, name, OBJPROP_HIDDEN, hidden);
|
||||
ObjectSetInteger(chartID, objName, OBJPROP_HIDDEN, hidden);
|
||||
|
||||
//
|
||||
// Set the priority for receiving the event of a mouse click in the chart ...
|
||||
ObjectSetInteger(chartID, name, OBJPROP_ZORDER, zOrder);
|
||||
ObjectSetInteger(chartID, objName, OBJPROP_ZORDER, zOrder);
|
||||
|
||||
//
|
||||
// Successful execution
|
||||
@@ -1073,6 +1109,10 @@ bool RectanglePointChange(
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normalize Name ...
|
||||
string objName = drawPrefix + "_" + name;
|
||||
|
||||
//
|
||||
// if point position is not set, move it to the current bar having Bid price ...
|
||||
@@ -1089,7 +1129,7 @@ bool RectanglePointChange(
|
||||
|
||||
//
|
||||
// Move the anchor point ...
|
||||
result = ObjectMove(chartID, name, pointIndex, time, price);
|
||||
result = ObjectMove(chartID, objName, pointIndex, time, price);
|
||||
|
||||
//
|
||||
return result;
|
||||
@@ -1104,9 +1144,13 @@ bool DeleteRectangle(
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normalize Name ...
|
||||
string objName = drawPrefix + "_" + name;
|
||||
|
||||
//
|
||||
result = ObjectDelete(chartID, name);
|
||||
result = ObjectDelete(chartID, objName);
|
||||
|
||||
//
|
||||
return result;
|
||||
@@ -1263,17 +1307,21 @@ bool MoveRectangleLabel(
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normalize Name ...
|
||||
string objName = drawPrefix + "_" + name;
|
||||
|
||||
//
|
||||
// move the rectangle label ...
|
||||
result = ObjectSetInteger(chartID, name, OBJPROP_XDISTANCE, x);
|
||||
result = ObjectSetInteger(chartID, objName, OBJPROP_XDISTANCE, x);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result = ObjectSetInteger(chartID, name, OBJPROP_YDISTANCE, y);
|
||||
result = ObjectSetInteger(chartID, objName, OBJPROP_YDISTANCE, y);
|
||||
|
||||
//
|
||||
return result;
|
||||
@@ -1288,10 +1336,14 @@ bool DeleteRectangleLabel(
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normalize Name ...
|
||||
string objName = drawPrefix + "_" + name;
|
||||
|
||||
//
|
||||
// delete the label ...
|
||||
result = ObjectDelete(chartID, name);
|
||||
result = ObjectDelete(chartID, objName);
|
||||
|
||||
//
|
||||
return result;
|
||||
@@ -1308,17 +1360,21 @@ bool ChangeSizeRectangleLabel(
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normalize Name ...
|
||||
string objName = drawPrefix + "_" + name;
|
||||
|
||||
//
|
||||
// change label size ...
|
||||
result = ObjectSetInteger(chartID, name, OBJPROP_XSIZE, width);
|
||||
result = ObjectSetInteger(chartID, objName, OBJPROP_XSIZE, width);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result = ObjectSetInteger(chartID, name, OBJPROP_YSIZE, height);
|
||||
result = ObjectSetInteger(chartID, objName, OBJPROP_YSIZE, height);
|
||||
|
||||
//
|
||||
return result;
|
||||
@@ -1334,10 +1390,14 @@ bool RectLabelChangeBorderType(
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normalize Name ...
|
||||
string objName = drawPrefix + "_" + name;
|
||||
|
||||
//
|
||||
// change border type ...
|
||||
result = ObjectSetInteger(chartID, name, OBJPROP_BORDER_TYPE, border);
|
||||
result = ObjectSetInteger(chartID, objName, OBJPROP_BORDER_TYPE, border);
|
||||
|
||||
//
|
||||
return result;
|
||||
@@ -1442,6 +1502,10 @@ bool ChangeTrendLinePoint(
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normalize Name ...
|
||||
string objName = drawPrefix + "_" + name;
|
||||
|
||||
//
|
||||
// if point position is not set, move it to the current bar having Bid price ...
|
||||
@@ -1458,7 +1522,7 @@ bool ChangeTrendLinePoint(
|
||||
|
||||
//
|
||||
// move trend line's anchor point ...
|
||||
result = ObjectMove(chartID, name, pointindex, time, price);
|
||||
result = ObjectMove(chartID, objName, pointindex, time, price);
|
||||
|
||||
//
|
||||
return result;
|
||||
@@ -1473,10 +1537,14 @@ bool DeleteTrendLine(
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normalize Name ...
|
||||
string objName = drawPrefix + "_" + name;
|
||||
|
||||
//
|
||||
// delete a trend line ...
|
||||
result = ObjectDelete(chartID, name);
|
||||
result = ObjectDelete(chartID, objName);
|
||||
|
||||
//
|
||||
return result;
|
||||
@@ -1628,6 +1696,10 @@ bool MoveText(
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normalize Name ...
|
||||
string objName = drawPrefix + "_" + name;
|
||||
|
||||
//
|
||||
//
|
||||
@@ -1645,7 +1717,7 @@ bool MoveText(
|
||||
|
||||
//
|
||||
// move the anchor point ...
|
||||
result = ObjectMove(chartID, name, 0, time, price);
|
||||
result = ObjectMove(chartID, objName, 0, time, price);
|
||||
|
||||
//
|
||||
return result;
|
||||
@@ -1661,10 +1733,14 @@ bool ChangeText(
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normalize Name ...
|
||||
string objName = drawPrefix + "_" + name;
|
||||
|
||||
//
|
||||
// change object text ...
|
||||
result = ObjectSetString(chartID, name, OBJPROP_TEXT, text);
|
||||
result = ObjectSetString(chartID, objName, OBJPROP_TEXT, text);
|
||||
|
||||
//
|
||||
return result;
|
||||
@@ -1679,10 +1755,14 @@ bool DeleteText(
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normalize Name ...
|
||||
string objName = drawPrefix + "_" + name;
|
||||
|
||||
//
|
||||
// delete the object ...
|
||||
result = ObjectDelete(chartID, name);
|
||||
result = ObjectDelete(chartID, objName);
|
||||
|
||||
//
|
||||
return result;
|
||||
@@ -1920,10 +2000,14 @@ bool FibonacciLevelsSet(
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Normalize Name ...
|
||||
string objName = drawPrefix + "_" + name;
|
||||
|
||||
//
|
||||
// set the number of levels ...
|
||||
ObjectSetInteger(chartID, name, OBJPROP_LEVELS, levels);
|
||||
ObjectSetInteger(chartID, objName, OBJPROP_LEVELS, levels);
|
||||
|
||||
//
|
||||
// set the properties of levels in the loop ...
|
||||
@@ -1931,24 +2015,24 @@ bool FibonacciLevelsSet(
|
||||
{
|
||||
//
|
||||
// level value ...
|
||||
ObjectSetDouble(chartID, name, OBJPROP_LEVELVALUE, i, values[i]);
|
||||
ObjectSetDouble(chartID, objName, OBJPROP_LEVELVALUE, i, values[i]);
|
||||
|
||||
//
|
||||
// level color ...
|
||||
ObjectSetInteger(chartID, name, OBJPROP_LEVELCOLOR, i, colors[i]);
|
||||
ObjectSetInteger(chartID, objName, OBJPROP_LEVELCOLOR, i, colors[i]);
|
||||
|
||||
//
|
||||
// level style ...
|
||||
ObjectSetInteger(chartID, name, OBJPROP_LEVELSTYLE, i, styles[i]);
|
||||
ObjectSetInteger(chartID, objName, OBJPROP_LEVELSTYLE, i, styles[i]);
|
||||
|
||||
//
|
||||
// level width ...
|
||||
ObjectSetInteger(chartID, name, OBJPROP_LEVELWIDTH, i, widths[i]);
|
||||
ObjectSetInteger(chartID, objName, OBJPROP_LEVELWIDTH, i, widths[i]);
|
||||
|
||||
//
|
||||
// level description ...
|
||||
// ObjectSetString(chartID, name, OBJPROP_LEVELTEXT, i, DoubleToString(100 * values[i], 1));
|
||||
ObjectSetString(chartID, name, OBJPROP_LEVELTEXT, i, descriptions[i]);
|
||||
ObjectSetString(chartID, objName, OBJPROP_LEVELTEXT, i, descriptions[i]);
|
||||
}
|
||||
|
||||
//
|
||||
@@ -1968,6 +2052,10 @@ bool FibonacciPointChange(
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normalize Name ...
|
||||
string objName = drawPrefix + "_" + name;
|
||||
|
||||
//
|
||||
// if point position is not set, move it to the current bar having Bid price ...
|
||||
@@ -1984,7 +2072,7 @@ bool FibonacciPointChange(
|
||||
|
||||
//
|
||||
// move the anchor point ...
|
||||
result = ObjectMove(chartID, name, pointIndex, time, price);
|
||||
result = ObjectMove(chartID, objName, pointIndex, time, price);
|
||||
|
||||
//
|
||||
return result;
|
||||
@@ -1999,10 +2087,14 @@ bool DeleteFibonachi(
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normalize Name ...
|
||||
string objName = drawPrefix + "_" + name;
|
||||
|
||||
//
|
||||
// delete the object ...
|
||||
result = ObjectDelete(chartID, name);
|
||||
result = ObjectDelete(chartID, objName);
|
||||
|
||||
//
|
||||
return result;
|
||||
@@ -2081,9 +2173,13 @@ bool EventCreate(
|
||||
{
|
||||
time = TimeCurrent();
|
||||
}
|
||||
|
||||
//
|
||||
// Normalize Name ...
|
||||
string objName = drawPrefix + "_" + name;
|
||||
|
||||
//
|
||||
result = ObjectCreate(chartID, name, OBJ_EVENT, subWindow, time, 0);
|
||||
result = ObjectCreate(chartID, objName, OBJ_EVENT, subWindow, time, 0);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
@@ -2091,32 +2187,32 @@ bool EventCreate(
|
||||
|
||||
//
|
||||
// set event text
|
||||
ObjectSetString(chartID, name, OBJPROP_TEXT, text);
|
||||
ObjectSetString(chartID, objName, OBJPROP_TEXT, text);
|
||||
|
||||
//
|
||||
// set color
|
||||
ObjectSetInteger(chartID, name, OBJPROP_COLOR, clr);
|
||||
ObjectSetInteger(chartID, objName, OBJPROP_COLOR, clr);
|
||||
|
||||
//
|
||||
// set anchor point width if the object is highlighted
|
||||
ObjectSetInteger(chartID, name, OBJPROP_WIDTH, width);
|
||||
ObjectSetInteger(chartID, objName, OBJPROP_WIDTH, width);
|
||||
|
||||
//
|
||||
// display in the foreground false or background true
|
||||
ObjectSetInteger(chartID, name, OBJPROP_BACK, back);
|
||||
ObjectSetInteger(chartID, objName, OBJPROP_BACK, back);
|
||||
|
||||
//
|
||||
// enable true or disable false the mode of moving event by mouse
|
||||
ObjectSetInteger(chartID, name, OBJPROP_SELECTABLE, selection);
|
||||
ObjectSetInteger(chartID, name, OBJPROP_SELECTED, selection);
|
||||
ObjectSetInteger(chartID, objName, OBJPROP_SELECTABLE, selection);
|
||||
ObjectSetInteger(chartID, objName, OBJPROP_SELECTED, selection);
|
||||
|
||||
//
|
||||
// hide true or display false graphical object name in the object list
|
||||
ObjectSetInteger(chartID, name, OBJPROP_HIDDEN, hidden);
|
||||
ObjectSetInteger(chartID, objName, OBJPROP_HIDDEN, hidden);
|
||||
|
||||
//
|
||||
// set the priority for receiving the event of a mouse click in the chart
|
||||
ObjectSetInteger(chartID, name, OBJPROP_ZORDER, zOrder);
|
||||
ObjectSetInteger(chartID, objName, OBJPROP_ZORDER, zOrder);
|
||||
|
||||
//
|
||||
// successful execution
|
||||
@@ -2133,10 +2229,14 @@ bool EventTextChange(
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normalize Name ...
|
||||
string objName = drawPrefix + "_" + name;
|
||||
|
||||
//
|
||||
// change object text
|
||||
result = ObjectSetString(chartID, name, OBJPROP_TEXT, text);
|
||||
result = ObjectSetString(chartID, objName, OBJPROP_TEXT, text);
|
||||
|
||||
//
|
||||
return result;
|
||||
@@ -2152,6 +2252,10 @@ bool EventMove(
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normalize Name ...
|
||||
string objName = drawPrefix + "_" + name;
|
||||
|
||||
//
|
||||
// if time is not set, move event to the last bar
|
||||
@@ -2162,7 +2266,7 @@ bool EventMove(
|
||||
|
||||
//
|
||||
// move the object
|
||||
result = ObjectMove(chartID, name, 0, time, 0);
|
||||
result = ObjectMove(chartID, objName, 0, time, 0);
|
||||
|
||||
//
|
||||
return result;
|
||||
@@ -2177,10 +2281,14 @@ bool EventDelete(
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normalize Name ...
|
||||
string objName = drawPrefix + "_" + name;
|
||||
|
||||
//
|
||||
// delete the object
|
||||
result = ObjectDelete(chartID, name);
|
||||
result = ObjectDelete(chartID, objName);
|
||||
|
||||
//
|
||||
return result;
|
||||
@@ -2215,10 +2323,14 @@ bool ButtonCreate(
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normalize Name ...
|
||||
string objName = drawPrefix + "_" + name;
|
||||
|
||||
//
|
||||
// create the button
|
||||
result = ObjectCreate(chartID, name, OBJ_BUTTON, subWindow, 0, 0);
|
||||
result = ObjectCreate(chartID, objName, OBJ_BUTTON, subWindow, 0, 0);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
@@ -2226,62 +2338,62 @@ bool ButtonCreate(
|
||||
|
||||
//
|
||||
// set button coordinates
|
||||
ObjectSetInteger(chartID, name, OBJPROP_XDISTANCE, x);
|
||||
ObjectSetInteger(chartID, name, OBJPROP_YDISTANCE, y);
|
||||
ObjectSetInteger(chartID, objName, OBJPROP_XDISTANCE, x);
|
||||
ObjectSetInteger(chartID, objName, OBJPROP_YDISTANCE, y);
|
||||
|
||||
//
|
||||
// set button size
|
||||
ObjectSetInteger(chartID, name, OBJPROP_XSIZE, width);
|
||||
ObjectSetInteger(chartID, name, OBJPROP_YSIZE, height);
|
||||
ObjectSetInteger(chartID, objName, OBJPROP_XSIZE, width);
|
||||
ObjectSetInteger(chartID, objName, OBJPROP_YSIZE, height);
|
||||
|
||||
//
|
||||
// set the chart's corner, relative to which point coordinates are defined
|
||||
ObjectSetInteger(chartID, name, OBJPROP_CORNER, corner);
|
||||
ObjectSetInteger(chartID, objName, OBJPROP_CORNER, corner);
|
||||
|
||||
//
|
||||
// set the text
|
||||
ObjectSetString(chartID, name, OBJPROP_TEXT, text);
|
||||
ObjectSetString(chartID, objName, OBJPROP_TEXT, text);
|
||||
|
||||
//
|
||||
// set text font
|
||||
ObjectSetString(chartID, name, OBJPROP_FONT, font);
|
||||
ObjectSetString(chartID, objName, OBJPROP_FONT, font);
|
||||
|
||||
//
|
||||
// set font size
|
||||
ObjectSetInteger(chartID, name, OBJPROP_FONTSIZE, fontSize);
|
||||
ObjectSetInteger(chartID, objName, OBJPROP_FONTSIZE, fontSize);
|
||||
|
||||
//
|
||||
// set text color
|
||||
ObjectSetInteger(chartID, name, OBJPROP_COLOR, clr);
|
||||
ObjectSetInteger(chartID, objName, OBJPROP_COLOR, clr);
|
||||
|
||||
//
|
||||
// set background color
|
||||
ObjectSetInteger(chartID, name, OBJPROP_BGCOLOR, bgColor);
|
||||
ObjectSetInteger(chartID, objName, OBJPROP_BGCOLOR, bgColor);
|
||||
|
||||
//
|
||||
// set border color
|
||||
ObjectSetInteger(chartID, name, OBJPROP_BORDER_COLOR, borderColor);
|
||||
ObjectSetInteger(chartID, objName, OBJPROP_BORDER_COLOR, borderColor);
|
||||
|
||||
//
|
||||
// display in the foreground false or background true
|
||||
ObjectSetInteger(chartID, name, OBJPROP_BACK, back);
|
||||
ObjectSetInteger(chartID, objName, OBJPROP_BACK, back);
|
||||
|
||||
//
|
||||
// set button state
|
||||
ObjectSetInteger(chartID, name, OBJPROP_STATE, state);
|
||||
ObjectSetInteger(chartID, objName, OBJPROP_STATE, state);
|
||||
|
||||
//
|
||||
// enable true or disable false the mode of moving the button by mouse
|
||||
ObjectSetInteger(chartID, name, OBJPROP_SELECTABLE, selection);
|
||||
ObjectSetInteger(chartID, name, OBJPROP_SELECTED, selection);
|
||||
ObjectSetInteger(chartID, objName, OBJPROP_SELECTABLE, selection);
|
||||
ObjectSetInteger(chartID, objName, OBJPROP_SELECTED, selection);
|
||||
|
||||
//
|
||||
// hide true or display false graphical object name in the object list
|
||||
ObjectSetInteger(chartID, name, OBJPROP_HIDDEN, hidden);
|
||||
ObjectSetInteger(chartID, objName, OBJPROP_HIDDEN, hidden);
|
||||
|
||||
//
|
||||
// set the priority for receiving the event of a mouse click in the chart
|
||||
ObjectSetInteger(chartID, name, OBJPROP_ZORDER, zOrder);
|
||||
ObjectSetInteger(chartID, objName, OBJPROP_ZORDER, zOrder);
|
||||
|
||||
//
|
||||
return result;
|
||||
@@ -2301,16 +2413,20 @@ bool ButtonMove(
|
||||
|
||||
//
|
||||
// move the button
|
||||
|
||||
//
|
||||
// Normalize Name ...
|
||||
string objName = drawPrefix + "_" + name;
|
||||
|
||||
//
|
||||
result = ObjectSetInteger(chartID, name, OBJPROP_XDISTANCE, x);
|
||||
result = ObjectSetInteger(chartID, objName, OBJPROP_XDISTANCE, x);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result = ObjectSetInteger(chartID, name, OBJPROP_YDISTANCE, y);
|
||||
result = ObjectSetInteger(chartID, objName, OBJPROP_YDISTANCE, y);
|
||||
|
||||
//
|
||||
return result;
|
||||
@@ -2330,16 +2446,20 @@ bool ButtonChangeSize(
|
||||
|
||||
//
|
||||
// change the button size
|
||||
|
||||
//
|
||||
// Normalize Name ...
|
||||
string objName = drawPrefix + "_" + name;
|
||||
|
||||
//
|
||||
result = ObjectSetInteger(chartID, name, OBJPROP_XSIZE, width);
|
||||
result = ObjectSetInteger(chartID, objName, OBJPROP_XSIZE, width);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result = ObjectSetInteger(chartID, name, OBJPROP_YSIZE, height);
|
||||
result = ObjectSetInteger(chartID, objName, OBJPROP_YSIZE, height);
|
||||
|
||||
//
|
||||
return result;
|
||||
@@ -2355,10 +2475,14 @@ bool ButtonChangeCorner(
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normalize Name ...
|
||||
string objName = drawPrefix + "_" + name;
|
||||
|
||||
//
|
||||
// change anchor corner
|
||||
result = ObjectSetInteger(chartID, name, OBJPROP_CORNER, corner);
|
||||
result = ObjectSetInteger(chartID, objName, OBJPROP_CORNER, corner);
|
||||
|
||||
//
|
||||
return result;
|
||||
@@ -2374,10 +2498,14 @@ bool ButtonTextChange(
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normalize Name ...
|
||||
string objName = drawPrefix + "_" + name;
|
||||
|
||||
//
|
||||
// change object text
|
||||
result = ObjectSetString(chartID, name, OBJPROP_TEXT, text);
|
||||
result = ObjectSetString(chartID, objName, OBJPROP_TEXT, text);
|
||||
|
||||
//
|
||||
return result;
|
||||
@@ -2392,10 +2520,14 @@ bool ButtonDelete(
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normalize Name ...
|
||||
string objName = drawPrefix + "_" + name;
|
||||
|
||||
//
|
||||
// delete the button
|
||||
result = ObjectDelete(chartID, name);
|
||||
result = ObjectDelete(chartID, objName);
|
||||
|
||||
//
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user