English

## implicit conversion from 'number' to 'string' warning

 26 Timerider 2014.09.17 13:28   Hey guys,Ive got a little problem with my mql4 script. I wanted to detect the market for special candlestick patterns. So I wrote a code with a specific condition(1). To keep it easy and short, Ive declared period[x] with all the different timeframes and witha specific chart symbol(2). To check several symbols a time, i thaught that it would be clever to write a and b in one condition with &&. That would save a lot of time and I shouldnt write the whole condition for every symbol. But, as you can probably imagine: It didnt work. It always says: implicit conversion from 'number' to 'string'.I hope for your help.if(iClose(a && b,period[x],1)>iOpen(a && b,period[x],0)... string a="NZDJPY"; string b="GBPUSD";
 53 amir_avatar 2014.09.17 14:50 #   cant find the SRC button..
 1211 deysmacro 2014.09.17 14:55 #   If you are trying to use an array like logic, you failed miserably. Write an array so that it would check the symbol correctly.
 Moderator3206 angevoyageur 2014.09.17 15:50 #   Timerider: Hey guys,Ive got a little problem with my mql4 script. I wanted to detect the market for special candlestick patterns. So I wrote a code with a specific condition(1). To keep it easy and short, Ive declared period[x] with all the different timeframes and witha specific chart symbol(2). To check several symbols a time, i thaught that it would be clever to write a and b in one condition with &&. That would save a lot of time and I shouldnt write the whole condition for every symbol. But, as you can probably imagine: It didnt work. It always says: implicit conversion from 'number' to 'string'.I hope for your help.What is the meaning of "NZDJPY" && "GBPUSD" ? By the way : "a && b" give you a bool (true or false), but iClose and iOpen first parameter is a string.
13116
WHRoeder 2014.09.17 19:12 #

amir_avatar: cant find the SRC button..

 Play video Please edit your post. For large amounts of code, attach it.