Forum

Why am I getting an Error 4051?

I'm somewhat frustrated but I'm getting the a. m. error but I can't find the souce. Proboblyblind to from staring so long. Here is the code that is causing it: //+ Select long positions + for ( i= OrdersTotal ()- 1 ;i>= 0 ;i--) { if ( OrderSelect (i, SELECT_BY_POS , MODE_TRADES ))

Odd warning using iADX in an EA

Hi, I'm working on my first complete EA and when compiling I get the following warning: implicit conversion from 'number' to 'string' The line it refers to is: ADXmain = iADX(0,0,14,PRICE_CLOSE,MODE_MAIN,1); where ADXMain is declared as a double. According to the help file iADX is type double so I