Why won't it trade? - page 2

 
Yeah it seems OK, try it in your EA to find out whether it does work!
 
EuroTrader:
Yeah it seems OK, try it in your EA to find out whether it does work!

It works like a charm. Thanks again.

 
int init() {
MyPoint = Point;
tickvalue = (MarketInfo(Symbol(),MODE_TICKVALUE));
if(Digits == 5 || Digits == 3) {
   MyPoint = MyPoint*10;
   slippage = slippage*10;
}
This is unsafe. If you change pairs or timeframe while the EA is running, then the deinit/re-init cycle will multiply slippage by 10 AGAIN. My version:
//++++ These are adjusted for 5 digit brokers.
double  pips2points,    // slippage  3 pips    3=points    30=points
        pips2dbl;       // Stoploss 15 pips    0.0015      0.00150
int     Digits.pips;    // DoubleToStr(dbl/pips2dbl, Digits.pips)
int init() {
    if (Digits == 5 || Digits == 3) {   // Adjust for five (5) digit brokers.
                pips2dbl    = Point*10; pips2points = 10;   Digits.pips = 1;
    } else {    pips2dbl    = Point;    pips2points =  1;   Digits.pips = 0; }
 

Dear All,
plz attach acomplet EA to try it after modification

THNX