Problem: first order is closed by the tester

 

Hi,

I am trying to test a strategy in SP500 index. after openning the first order (sell) the tester is closing the possition Immediately and close the testing session.

where can i get the reason for this action? in the log file I see the following:

11:24:54 2001.12.12 00:00 MarketLib _SP500,Daily: open #1 sell 0.10 _SP500 at 1136.83 ok
11:24:54 2001.12.12 00:00 loglib _SP500,Daily: Order opened : _SP500 Sell @ 1136.83000000 SL @ 0.00000000 TP @0.00000000 ticket =1 Volume @0.10000000
11:24:54 2001.12.13 00:00 Tester: order #1 is closed

the initiat deposite is: 1000000 USD.

thanks for your help.

Assaf

 

it's seem's to me the problem in the code of the EA

 

I get a similar problem on all symbols on 1 particular broker demo account. Test starts, chart shows progress (so it's not a data history issue) then at the first trade opening the tester quits. I never did get to the bottom of it and simply tested on a different broker. In my experience, it's not the EA, nor could I see any settings issues with terminal.... interestingly (or maybe not), it would forward test on demo without issue. Maybe it's a broker setting?

V

 
Viffer:

I get a similar problem on all symbols on 1 particular broker demo account. Test starts, chart shows progress (so it's not a data history issue) then at the first trade opening the tester quits. I never did get to the bottom of it and simply tested on a different broker. In my experience, it's not the EA, nor could I see any settings issues with terminal.... interestingly (or maybe not), it would forward test on demo without issue. Maybe it's a broker setting?

V

In some cases it can be caused when there is not enough free equity. In this case increase the initial deposit in the tester.

 
Viffer:

I get a similar problem on all symbols on 1 particular broker demo account. Test starts, chart shows progress (so it's not a data history issue) then at the first trade opening the tester quits. I never did get to the bottom of it and simply tested on a different broker. In my experience, it's not the EA, nor could I see any settings issues with terminal.... interestingly (or maybe not), it would forward test on demo without issue. Maybe it's a broker setting?

V


I see this problem only in two symbols. the rest are working properly

 

If the tester decides to close all orders and session where can one fined the reason. In the log there is no reason for that action.

 

did you ever get to the bottom of this issue?

I'm trying to write my own simple EA and I cant get it to work because of this problem, its not my code because I get the same problem with the sample EA's include with MT4

 
  1. It isn't a problem with equity, the tester would log "EA: stopped because of Stop Out"
  2. It could be the code if it's not adjusting for Digits==2.
  3. Don't install in \program files in Vista/Win7
 

It is installed in a sub directory from Program Files and it is on Vista, why should that be a problem? some sort of write protection?

 
I re-installed MT4 into a root directory but that didnt fix it, so thats not the problem
 
and recompiled?
Reason: