ObjectSetInteger (current_chart_id, obj_name1, OBJPROP_COLOR, clr); ObjectSetInteger (current_chart_id, obj_name1, OBJPROP_STYLE, style); ObjectSetInteger (current_chart_id, obj_name1, OBJPROP_WIDTH, width); ObjectSetInteger (current_chart_id,obj_name1,OBJPROP_BACK,false); // WITHOUT THIS STROKE THE FILL IS NOT REACTIVE ObjectSetInteger (current_chart_id,obj_name1,OBJPROP_FILL,fill);
My profits are not affected by your comment to me and let's leave it at that.
Your hints to a beginner with a sub-optimal algorithm for constantly deleting and creating an object only hurt him. And it is his "profit" that suffers from it.
That's what gave me the right to correct you. No more.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
I got it. Are you there?
continue
I put false instead of back and it worked.
P.S.
This documentation is a kind of "Rebus", you constantly have to guess and search for something. No comments, no explanations.
How was I supposed to understand that function OBJPROP_BACK ??????? should be used together with function OBJPROP_FILL?
ok
Never mind, webmasters have a lot of work to do.
Your question will still be read and polished over timeThank you Renat!
This code worked:
#property indicator_chart_window
int start()
{
long current_chart_id=ChartID();
string obj_name1="Rectangle1";
double Price_Level_1 = 1296;
double Price_Level_2 = 1293;
datetime Left_Side_1 = Time[9];
datetime Right_Side_1 = Time[0] + PeriodSeconds() * 7;
color clr = clrRed;
ENUM_LINE_STYLE style = STYLE_SOLID;
int width = 2;
bool fill = false;
ObjectCreate (current_chart_id, obj_name1, OBJ_RECTANGLE, 0, Left_Side_1, Price_Level_1, Right_Side_1, Price_Level_2);
ObjectSetInteger (current_chart_id, obj_name1, OBJPROP_COLOR, clr);
ObjectSetInteger (current_chart_id, obj_name1, OBJPROP_STYLE, style);
ObjectSetInteger (current_chart_id, obj_name1, OBJPROP_WIDTH, width);
ObjectSetInteger (current_chart_id,obj_name1,OBJPROP_BACK,false); // WITHOUT THIS STROKE THE FILL IS NOT REACTIVE
ObjectSetInteger (current_chart_id,obj_name1,OBJPROP_FILL,fill);
return(0);
}
Agreed
first find
but if the object is deleted and recreated on every tick with the same name, searching for a known object is redundantIt's unnecessary to recreate on every tick.
Right again. It all depends on the algorithm.
You originally suggested an algorithm with a re-creation. That's redundant.
Let's put it this way.
My profits are not affected by your comment to me and let's leave it at that.
Let's put it this way.
My profits are not affected by your comment to me and let's leave it at that.