You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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.