Download MetaTrader 5
To add comments, please log in or register
Write articles and earn money. We pay 200 USD for them!
Timerider
78
Timerider 2014.09.17 11: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";
Amir Yacoby
1126
Amir Yacoby 2014.09.17 12:50  
cant find the SRC button..
SYED NAUFAL GADDAFI
1401
SYED NAUFAL GADDAFI 2014.09.17 12: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.
Alain Verleyen
Moderator
28626
Alain Verleyen 2014.09.17 13: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.

whroeder1
13627
whroeder1 2014.09.17 17:12  
amir_avatar: cant find the SRC button..

Don't paste code
Play video
Please edit your post.
For large amounts of code, attach it.
/
To add comments, please log in or register