Problem: first order is closed by the tester - page 2

 

I think so, I'll recheck

about the Digits == 2 my broker uses 5 digits, as far as I can work out that only affects the stop and take profit arguments, I tried both of these with zeros and still had the problem, so I can exclude that, do you agree? I'm trying to find a definitive answer to how to deal with 5 digits

thanks for your help BTW

 
re-compiled, no difference
 

downloaded another couple of EAs from this site, compiled and tried running - same issue, it opens a trade and immediately closes it

beginning to think its something to do with my broker Smart Live Markets, maybe I'll raise a support issue, they advertise on their website that you can do back-testing so it should work

 

Just in case anyone has the same problem, I managed to resolve this with the help of the broker

Their response -

When you run the back testing using the Strategy Tester, click on the Expert
Properties button and then the Testing tab. The initial currency MUST be set to GBP, otherwise for spread betting it will not work.

thank you to Paul from Smart Live Markets - good job



 
emandell:
about the Digits == 2 my broker uses 5 digits,
OP said
Order opened : _SP500 Sell @ 1136.83000000
Which looks like 2 digits to me.
//++++ These are adjusted for 5 digit brokers.
int     pips2points;    // slippage  3 pips    3=points    30=points
double  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; }
    // OrderSend(... Slippage.Pips * pips2points, Bid - StopLossPips * pips2dbl
    /*++++ Constants*/{
Reason: