Line color of the trades

 

Is it possible to display the trade line as green for wins and red for loss? Right now, my trade lines are just displayed as blue or red randomly. Thanks!

 
Yep, create an Indicator or add code to your EA to change the colour of the lines.
 
RaptorUK:
Yep, create an Indicator or add code to your EA to change the colour of the lines.

Hi RaptorUK, how to change the colour of the lines? I don't know know how to refer them. I only see them as 'Trendline' in 'Objects list'.
 

hi, forget what I asked. I manage to find your previous answer here:

https://www.mql5.com/en/forum/138599

I will follow through. Thanks!

 
lingwuchung:

Hi RaptorUK, how to change the colour of the lines? I don't know know how to refer them. I only see them as 'Trendline' in 'Objects list'.
Yep . . . each trendline has a name . . . you use the name (it includes the trade number) in ObjectSet() and OBJPROP_COLOR as the property you want to change.
Reason: