Download MetaTrader 5

why can't change the color

To add comments, please log in or register
All activity of the MQL5.community members is displayed on a single page!
wslwhd
40
wslwhd 2014.04.27 15:02 

i want to draw some vertical line displayed on k line.

the first time i write the code and use the color clrRed.

Then now matter how i change the color like"clrBlue,clrGreen,clrYellow" ,the line always diaplayed in red. how to slove this problem?

 here is my code

 void OnStart()
  {
  
   ObjectCreate(1,"object_name",OBJ_VLINE,Time[0],Open[0]);
   ObjectSetInteger(1,"object_name",OBJPROP_COLOR,clrBlue);
  
  }
Alain Verleyen
Moderator
30723
Alain Verleyen 2014.04.27 17:03  

Forum on trading, automated trading systems and testing trading strategies


Hello,

Please use the SRC button when you post code. Thank you.


This time, I edited it for you.

https://www.mql5.com/en/forum/23522
To add comments, please log in or register