I keep on getting error 130 on FXCM demo, pls help

 

My EA worked well on FXDD demo, now I moved it to FXCM demo where fractional pips are offered. So I put in the following code to suit the frational pips:

if (Digits == 5||Digits == 3)

pt = 10*Points;

else

pt = Points;


sl = price - 30*pt;

tp = price + 90*pt;


but I am still getting error 130, I have no clue, Anybody pls help. Thanks a lot.

 
marshall318:

My EA worked well on FXDD demo, now I moved it to FXCM demo where fractional pips are offered. So I put in the following code to suit the frational pips:

if (Digits == 5||Digits == 3)

pt = 10*Points;

else

pt = Points;


sl = price - 30*pt;

tp = price + 90*pt;


but I am still getting error 130, I have no clue, Anybody pls help. Thanks a lot.

Can you give the part of your code which actually executes the trades ?

 

Is FXCM all ECN now - even for demo?

If so your order would have to go in without SL or TP

You then modify the order for SL & TP on next tick

-BB-

 
int ticket = OrderSend(Symbol(), OP_BUY, Lot, Ask, slip, sl, tp, '',Magic, 0, Green);
 
marshall318 wrote >>

My EA worked well on FXDD demo, now I moved it to FXCM demo where fractional pips are offered. So I put in the following code to suit the frational pips:

if (Digits == 5||Digits == 3)

pt = 10*Points;

else

pt = Points;

sl = price - 30*pt;

tp = price + 90*pt;

but I am still getting error 130, I have no clue, Anybody pls help. Thanks a lot.

i faced the same problem, and it is nothing to do with yr code. I think BarrowBoy is correct - the only orders that went thru are those where tp and sl are set to zero