Forum

how can i avoid repetations in grid style ea?

I planned an EA trading with grid.i explained grid like this: bool buypoints() { double m[ 201 ]; for ( int k= 0 ;k<= 200 ;k++) {m[k]= NormalizeDouble (((uppervalue* 1000 -steppips*(k+ 1 ))/ 1000 ), Digits ()); //uppervalue and steppips are external values for usd/jpy. if (m[k]== Ask ) return ( 1 );

help please

double sellpoints() {if (fmod(Bid,0.500)==0 && Bid>a) {return (1);}else return (0);} i have this function .but the problem is that i cant set it to fmod(Bid,0.200).my ea doesnt do any action while it s working in 0.500 or 1.000.what is wrong with that fmod function