unable to use expert advisor with MT4 demo account

 

I'm using a demo account in MT4 when I use the tester to test the EA it works fine and when I use it with the demo account to test it cant make any trade and gives me the following message

2017.11.23 22:14:07.716 '39005040': order sell market 0.01 NZDUSD sl: 0.00000 tp: 0.68847

2017.11.23 22:14:07.905 '39005040': order sell 0.01 NZDUSD opening at market sl: 0.00000 tp: 0.68847 failed [Invalid S/L or T/P]

all advisors I tested gives the same results ,also I tried other pairs, but the same result

can anyone help me?

 
SheriefSaad:

I'm using a demo account in MT4 when I use the tester to test the EA it works fine and when I use it with the demo account to test it cant make any trade and gives me the following message

2017.11.23 22:14:07.716 '39005040': order sell market 0.01 NZDUSD sl: 0.00000 tp: 0.68847

2017.11.23 22:14:07.905 '39005040': order sell 0.01 NZDUSD opening at market sl: 0.00000 tp: 0.68847 failed [Invalid S/L or T/P]

all advisors I tested gives the same results ,also I tried other pairs, but the same result

can anyone help me?

  1. Is this your own code, from the CodeBase or from the Market?
  2. If it is your code (or from CodeBase), is it checking the Broker's "Stops Level" (minimum stop size)?
  3. Are you respecting using the correct opening and closing prices (as well as the spread) for your calculations of the stops (i.e. T/P and/or S/L)?
    1. Buy Orders open at Ask price and close as Bid price.
    2. Sell Orders open at Bid price and close at Ask price.
  4. In all these cases:
    1. ... print out what the Market prices and spreads are at the time, so you can see if the stops are valid or not.
    2. ... print out the error code to see what the exact nature of the problem.
    3. ... check both the "Journal" as well as the "Experts" log for information.
 

Please don't double post. 

Post your message or create or own topic, in the appropriate section of the forum, and wait for an answer.