Interesting: Not pinpointed, it will draw in normal mode if the values are correct. In render mode there will probably be problems with BMP-graphics (I'm 90% sure).
At the weekend I was fiddling with the objects. If everything is not specified explicitly and unambiguously, begins to stumble - no objects, and no errors.
Initialisation - inside the function, values - from global? Hmm.
From the help, for comparison
You're taking very literally what's written in the help. )) Initialization within function for local variables. I, on the other hand, initialized them globally.
Silent: I was fiddling with objects over the weekend. If you don't specify everything explicitly and unambiguously, it starts to stall - no objects, and no errors.
Did you manage to display BMP objects in visualization mode in the tester or not, I still don't understand? There is no problem with it outside the tester.
tol64: Did you manage to display BMP objects in the visualisation mode in the tester or not, I still don't understand? There is no problem with it outside the tester.
Answered above - haven't tried it, I'm not up to it yet. I just saw something in the code with which I didn't even draw objects, what bpm.
Silent: At the weekend I was fiddling just with objects. If everything is not specified explicitly and unambiguously, it starts to stall - no objects, and no errors.
The original question was not about the possibility to display graphical objects, but about the fact that in normal mode it happens, but not in visualization mode.
Silent:
Initialisation - inside the function, values - from global? Hmm.
From the help, by way of comparison
If you consider a function separately, it's just a function. Which, for example, can be stuffed into library and worked with from any place.
But the example from help shows rendering of object by script.
PS
As for the function itself, I think it lacks check of parameters for correctness (of course it is developer's personal opinion).
Also, I'd make type bool, not void (with error handling of object creation).
As for the function itself, in my opinion it lacks parameter checking for correctness of parameters (in principle, this is of course the developer's own business)
That's a good point. I'm just still in the process of studying mql4/mql5 and will improve the code as I go deeper into this environment)). Or until a rake hits me)).
tol64: ChartRedraw(); set in the right places inside OnInit(), OnChartEvent() and OnTick() functions. I don't have any name matches.)
So no values are assigned either.
void Create_BMP_Label(long chart_id, // id графикаstring bmp_nm, // имя объектаstring bmp_path, // путь к обектуlong anchor, // точка привязки инициализировалиlong corner, // угол привязкиint x_dist, // координата по шкале Xint y_dist) // координата по шкале Y
{
ObjectCreate(chart_id,bmp_nm,OBJ_BITMAP_LABEL,0,0,0); // создание объектаObjectSetString(chart_id,bmp_nm,OBJPROP_BMPFILE,0,bmp_path); // BMP файлObjectSetInteger(chart_id,bmp_nm,OBJPROP_ANCHOR,anchor); // установка точки привязки использовали, а где взяли значение?ObjectSetInteger(chart_id,bmp_nm,OBJPROP_CORNER,corner); // установка угола привязкиObjectSetInteger(chart_id,bmp_nm,OBJPROP_XDISTANCE,x_dist); // установка координаты XObjectSetInteger(chart_id,bmp_nm,OBJPROP_YDISTANCE,y_dist); // установка координаты YObjectSetInteger(chart_id,bmp_nm,OBJPROP_SELECTABLE,false); // нельзя выделить объект, если FALSEObjectSetString(chart_id,bmp_nm,OBJPROP_TOOLTIP,"\n"); // нет всплывающей подсказки, если "\n"
}
Not pinpointed, it will draw in normal mode if the values are correct. In render mode there will probably be problems with BMP-graphics (I'm 90% sure).
Initialisation - inside the function, values - from global? Hmm.
From the help, for comparison
I was fiddling with objects over the weekend. If you don't specify everything explicitly and unambiguously, it starts to stall - no objects, and no errors.
You're taking what's written in the help very literally. )) Initialization within function for local variables. I initialized them globally.
I.e., global values are used when names match? Is that correct?
PS add a redraw at the end though.
Did you manage to display BMP objects in the visualisation mode in the tester or not, I still don't understand? There is no problem with it outside the tester.
I.e., global values are used when names match? Is that correct?
PS Add a redraw at the end though.
At the weekend I was fiddling just with objects. If everything is not specified explicitly and unambiguously, it starts to stall - no objects, and no errors.
Initialisation - inside the function, values - from global? Hmm.
From the help, by way of comparison
If you consider a function separately, it's just a function. Which, for example, can be stuffed into library and worked with from any place.
But the example from help shows rendering of object by script.
PS
As for the function itself, I think it lacks check of parameters for correctness (of course it is developer's personal opinion).
Also, I'd make type bool, not void (with error handling of object creation).
As for the function itself, in my opinion it lacks parameter checking for correctness of parameters (in principle, this is of course the developer's own business)
ChartRedraw(); set in the right places inside OnInit(), OnChartEvent() and OnTick() functions. I don't have any name matches.)
So no values are assigned either.
So no values are assigned either. Where did you get the value?