Download MetaTrader 5

get rid from warning : about PlotIndexGetInteger & PLOT_LINE_COLOR

To add comments, please log in or register
Unable to find the right application? Order it!
Mehrdad Shiri
4480
Mehrdad Shiri 2015.06.26 17:17 

hi ;

i use this line in my code and have a warning:


for(int c=0;c<CURRENCY_COUNT-1;c++)  Currency_color[c+1]=PlotIndexGetInteger(c,PLOT_LINE_COLOR);
       

and have this warning :  " possible loss of data due to type conversion  "

 

how can fix it ?

Mehrdad Shiri
4480
Mehrdad Shiri 2015.06.27 10:50  

first try : https://www.mql5.com/en/forum/31130/unread#unread


and its done.

how can fix this warning for :

for(int c=0;c<CURRENCY_COUNT-1;c++)  Currency_color[c+1]=PlotIndexGetInteger(c,PLOT_LINE_COLOR);

and have this warning :  " possible loss of data due to type conversion  "

?

how can change color for indicator line & an object and they must have same color ?
how can change color for indicator line & an object and they must have same color ?
  • www.mql5.com
how can change color for indicator line & an object and they must have same color ? - - Category: general
Alain Verleyen
Moderator
30752
Alain Verleyen 2015.06.27 10:52  
Mehrdad Shiri:

hi ;

i use this line in my code and have a warning:

and have this warning :  " possible loss of data due to type conversion  "

 

how can fix it ?


for(int c=0;c<CURRENCY_COUNT-1;c++)  Currency_color[c+1]=(color)PlotIndexGetInteger(c,PLOT_LINE_COLOR);
Vladimir Karputov
Moderator
46160
Vladimir Karputov 2015.06.27 10:54  
Mehrdad Shiri :

hi ;

i use this line in my code and have a warning:

and have this warning :  " possible loss of data due to type conversion  "

 

how can fix it ?

What type has an array Currency_color []?
Mehrdad Shiri
4480
Mehrdad Shiri 2015.06.27 10:54  
Alain Verleyen:

:-)

thank you.

Mehrdad Shiri
4480
Mehrdad Shiri 2015.06.27 10:56  
Karputov Vladimir:
What type has an array Currency_color []?

thank you my friends.

problem solved with correction from alain.

thanks again.

To add comments, please log in or register