Horizontal line has no X, Y or corner.
Those values applie to OBJ_LABEL only.
phy:
Thanks!Horizontal line has no X, Y or corner.
Those values applie to OBJ_LABEL only.
And I how can i make,giving labels to line?
ObjectSetText("a", "SOME TEXT");
and on chart properties, "Show Object Descriptions"
That's one way.
Another is to create OBJ_TEXT
It has Price and Time coordinates.
phy:
It's works! Thanks You!!
ObjectSetText("a", "SOME TEXT");
and on chart properties, "Show Object Descriptions"
That's one way.
Another is to create OBJ_TEXT
It has Price and Time coordinates.
Phy:
Can you help me,what is wrong in this code?
The first method that you wrote me working great (ObjectSetText("a", "SOME TEXT");and on chart properties, "Show Object Descriptions")
ObjectCreate("alabel",OBJ_TEXT,0,0,PRICE);
ObjectSetText("alabel", "Here is Label");
Thanks for your help!
Can you help me,what is wrong in this code?
The first method that you wrote me working great (ObjectSetText("a", "SOME TEXT");and on chart properties, "Show Object Descriptions")
But when I Create OBJ_TEXT don't work for me
ObjectCreate("alabel",OBJ_TEXT,0,0,PRICE);
ObjectSetText("alabel", "Here is Label");
Thanks for your help!
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
What is problem with this code?The line draw is good,but i would get XDISTANCE while i would make a label to this line,And i must know the "a" line coordinate.
ObjectCreate("a",OBJ_HLINE,0,0,price);
ObjectSet("a",OBJPROP_COLOR,Red);
ObjectSet("a",OBJPROP_WIDTH,1);
int XDISTANCE=ObjectGet("a", OBJPROP_XDISTANCE);
Print("Xdistance:",XDISTANCE);
And i get: "0"
Thanks for help!