These samples are copied from programs I actually use.
if (ObjectFind(obj_name) < 0) { ObjectCreate(obj_name, OBJ_HLINE, 0, time[1], price); ObjectSet(obj_name, OBJPROP_STYLE, Line_Style); ObjectSet(obj_name, OBJPROP_WIDTH, Line_Width); ObjectSet(obj_name, OBJPROP_COLOR, Line_Color); ObjectSet(obj_name, OBJPROP_BACK, true); ObjectSetString(0, obj_name, OBJPROP_TEXT, DoubleToStr(price, Digits - 2)); }
You need to check the "Show object description" checkbox in the settings panel to show this.
if (ObjectFind(objname) < 0) { dText = " " + text + " " + DoubleToString(value, 4); ObjectCreate(objname, OBJ_TEXT, index, Time[0], value); ObjectSetText(objname, dText, TxtSize, font, col); }
These samples are copied from programs I actually use.
You need to check the "Show object description" checkbox in the settings panel to show this.
thanks. I will try that and get back to you.
Is there anyway you can make the text to show on the right side and not the left (Show description)?
thanks,
I also would like to delete the line when hit.
ObjectSetText( objName, "Remove", 10 ); remove = ObjectDescription(objName); DeleteLines(); void DeleteLines() { Print("Remove "+remove); if(ObjectDescription(remove) == OBJ_HLINE || ObjectDescription(remove) == OBJ_VLINE) ObjectDelete(remove); }
but it doesn't delete the lines
I want to delete only the lines that have Remove in the description.
Or if I can change the obj name to remove and then delete obj with Remove in the name..
What the hell is this? You don't know how to open a reference?
bool ObjectDelete( string object_name // object name );
What the hell is this? You don't know how to open a reference?
Wow. that was a bit rude..
What makes you think I don't know how to use reference?
I have tried everything and I am only stuck on one thing, everything else works fine.
If you can't help, pls don't respond.
Wow. that was a bit rude..
What makes you think I don't know how to use reference?
I have tried everything and I am only stuck on one thing, everything else works fine.
If you can't help, pls don't respond.
Nagisa did help.
Read the documentation.
Nagisa did help.
Read the documentation.
Wow.. seriously, I thought this was a forum to help people.
I have been reading and researching many hours of documentation and managed to get 99% of what I wanted working, but I was just stuck with deleting an object with a specific description.
The documentation is very limited on examples, so sometimes it is hard to decipher what is the correct coding.
replying with "What the hell is this? You don't know how to open a reference?"
is not helping, but just rude.
All in all. I have figured it out myself.. Thanks for your help.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
i am trying to add a label to my H_Line
I have tried OBJPROP_NAME AND OBJ_LABEL, but nothing is quite working correctly.
or i tried OBJ_LABEL
I want the word "Close All" to show on the top of the Horizontal line or drawn line on the Right.
I also tried Drawlable, but still got something wrong. Not showing up
any guidance would be greatly appreciated.