Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1957

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 need some help, please.
I want to allow a user to change the colours of trendlines to his preferred colours.
I have tried various combinations of ENUM_OBJECT_PROPERTY_INTEGER, OBJPROP_COLOR and clrRed (for example) but I can't get it to work.
Could somebody help me with the correct code, please?
Many thanks,
.
try this , i assume the objects exist and you have control of them :)
@Buckets #: I need some help, please. I want to allow a user to change the colours of trendlines to his preferred colours. I have tried various combinations of ENUM_OBJECT_PROPERTY_INTEGER, OBJPROP_COLOR and clrRed (for example) but I can't get it to work. Could somebody help me with the correct code, please? Many thanks. ... This is one of the combinations I tried.
Your code does not compile! Always reference the documentation when in doubt. And please paste code properly with the "</>" icon or Alt-S.
Here is an example of what it seems you are looking for (the code smaple is valid for both MQL4 and MQL5) ...
How to post code ...
It depends. If you want it on the Left hand side, then simply give the horizontal line a description and it will apear there.
On the right hand side however, it is not that easy. You have to place either a text object or a object label object depending on what you want to achieve.
If you want it always visible as you scroll the chart then a Label object will be best, but you will have to compensate for vertical shift of the chart.
If you only want it visible on the current most recent bar, then you can use a Text object, but you will have to update its position on every new bar.
Note for Fernando Carreiro and William Roeder - Thanks for your comments re my previous. I posted that non-compilable piece of code because I was requested to do so by Keith Watford, who I understand is a moderator.
I requested that you post your code, I didn't ask for you to post code that will not compile. You had not mentioned anything about getting compilation errors.
Is there a step by step guide for setting up a Signal Follow purchase? I've got to say there is very little current info or videos that is readily available to guide that journey. The one "detailed" video for starting the subscription is a link to a 6-yr old Youtube video. Very disappointing.
TCB
All sorted thanks to the references. Used text not label.