just check the help (press F1 when you select ObjectSet)
bool ObjectSet( string name, int index, double value) name - Object name. index - Object value index. It can be any of Object properties enumeration values. value - New value of the given property.
clicking for more info on "object properties" you see:
OBJPROP_STYLE 7 int Value is one of STYLE_SOLID, STYLE_DASH, STYLE_DOT, STYLE_DASHDOT, STYLE_DASHDOTDOT constants to set/get object line style.
e.g.
ObjectSet("First Short Target", OBJPROP_STYLE, STYLE_DASHDOT)
Honestly. I've never done that before.. I just looked in the help and pasted the answer. You should do the same instead of asking here.
bool ObjectSet( string name, int index, double value) Changes the value of the specified object property. If the function succeeds, the returned value will be TRUE. Otherwise, it will be FALSE. To get the detailed error information, one has to call the GetLastError() function. See also ObjectGet() function. Parameters: name - Object name. index - Object value index. It can be any of Object properties enumeration values. value - New value of the given property."Value" - as far as I was concerned, was the value where the object will be changed too (i.e. price / movement of that object). I personally perceived "STYLE_DASHDOT" as a property... not a value...
So although I press F1 on everything, sometimes it is not that clear to me.
thanks for helping.
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 know I'm obviously doing this wrong. I can't work out how ObjectSet works with changing the properties of ObjectCreate?
Wanting to choose STYLE_DASHDOT and changing the colour? I have got it working in terms of just a horizontal red line where and when I want it (as well as deleting it when I want it deleted too). Just stuck with editing its properties.