Topic: Operation error

Hello,

I would say I am in the final step to make the FST work but it not.

The synchronization of the MT4 and FST is good while all communication seems to be working fine.

But the problem is when I manually or automatically for FST to let MT4 buy or sell any amount, any price, any stop loss or take profit, it will display:

MT4-FST Expert USDJPY,M15: Error in FST Request OrderSend: Invalid stops

What can that kind of proble be?

Thanks

Re: Operation error

It seams your broker doesn't allow sending orders with SL or TP. Try sending manual order from Forex Strategy Builder without SL or TP (Set SL = 0 and TP = 0)
If it works, Set the LateStops = true when starting the expert (FST version 0.8.0.0).

Tell me who is your broker. I'll make the expert to adapt trades automatically to it. I know FXCM makes such  jokes and I already included it in the expert.

Another hint. Open the Orders dialog from MT. See if the SL and TP fields are grey.

Re: Operation error

The broker is FXOpen.

Yes. The SL or TP is gray and it seems the broker does not work with SL or TP with instant trade. With 0 SL and TP, the FST can trade successfully.

The late setting seems to be a new function, and I cannot find how to change it.

Can you briefly introduce what late setting's function?

Re: Operation error

When starting the expert go to the Inputs tab and change LateStops to true.


http://s1.postimage.org/yNU8A.jpg


PS.
What is written in the "Connection Status" window (Status tab of FST).
Connected to .... by ...
Send me this information and I'll show you how to make the expert able to recognize FXOpen alone.

Re: Operation error

[Edited]

Change line 125 from:

    string broker = TerminalCompany();

To:

    string broker = AccountCompany();

Add this code at line 131 before:
Server(); // It's OK. We start the server.

    // FXOpen
    if (StringSubstr(broker, 0, 6) == "FXOpen")
        LateStops = true; 

This part of the expert has to look like this:

    // Chek broker.
    string broker = AccountCompany();
    
    // FXCM
    if (StringSubstr(broker, 0, 4) == "FXCM")
        LateStops = true; 
    
    // FXOpen
    if (StringSubstr(broker, 0, 6) == "FXOpen")
        LateStops = true; 
    
    Server(); // It's OK. We start the server.

Compile the expert.
(If you are using Vista, this will be a little bit difficult because of UAC.)

Now run the expert without changing "LateStops" option to true. The code you added has to do this alone.