forex software

Create and Test Forex Strategies

forex software

Skip to forum content

Forex Software

Create and Test Forex Strategies

You are not logged in. Please login or register.


Forex Software → Forex Strategy Builder Professional → ECN Account - set Stop Loss and Take profit

Pages 1

You must login or register to post a reply

RSS topic feed

Posts: 19

Topic: ECN Account - set Stop Loss and Take profit

Hi Popov Dear
I want to enable Experts on my ECN account but there is a problem.
In the ECN account it is not possible to open a position with a stop loss or take profit limit. That is, the position must first be opened, then the profit and loss limit set.And that's not the kind of structure of experts.
Do you have a way to solve this problem?
Thanks for your tips

Re: ECN Account - set Stop Loss and Take profit

Open your EA, find the line where it says "Separate_SL_TP" and change false to true. That should do the trick. I've included a screenshot for reference as well.

Post's attachments

bal.JPG 43.09 kb, 1 downloads since 2020-02-26 

You don't have the permssions to download the attachments of this post.

Re: ECN Account - set Stop Loss and Take profit

Thank you for your guidance
I'm testing it now

Re: ECN Account - set Stop Loss and Take profit

Dear Pooton
I tried your solution but there was a new problem. The position opens without sl and TP and does not cause any stop loss or take profit!
What should I do?

Re: ECN Account - set Stop Loss and Take profit

Upload your EA.

Re: ECN Account - set Stop Loss and Take profit

footon wrote:

Upload your EA.

I developed a simple EA for test to get a new position every 1 minute.
Attached is the separate and dont separate version

Post's attachments

separate.rar 64.41 kb, 14 downloads since 2020-02-27 

You don't have the permssions to download the attachments of this post.

Re: ECN Account - set Stop Loss and Take profit

Something is not right, but unfortunately I've hit some troubles that I can't do more back-to-back tests.
The best thing to do is wait for the developer to return and see it for himself.
I hope to resolve issues on my end by next week, so I can't do no more.

Re: ECN Account - set Stop Loss and Take profit

No one to help me and come up with a solution?
Can you help Mr. Popov?

Re: ECN Account - set Stop Loss and Take profit

The Expert Advisor detects automatically if the broker needs to set the protection separately. When the EA finds such a case, it shows a message in the MT log:  "BroekrName marked with separate stops setting." and changes over to separate SL execution.

What error message you get?

I see the expert uses TP and Trailing Stop. I just run it on my broker and found everything fine. Please post a screenshot of your terminal to be ably to find the problem.

Re: ECN Account - set Stop Loss and Take profit

Hi Popov Dear
Thanks for the guidance
I took a photo of the terminal
As you can see, it is just a trailer stop and there is no stoploss and take profit!!
broker name is FXTM .
ECN Account

Post's attachments

01.JPG 219.03 kb, file has never been downloaded. 

02.JPG 202.82 kb, file has never been downloaded. 

03.JPG 170.32 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Re: ECN Account - set Stop Loss and Take profit

I tested your expert and found it ok.

https://image-holder.forexsb.com/store/metatrader-set-sl-tp-thumb.png

I see that the SL is set correctly on your screenshots and there are no error messages. It means that the EA works well.
I don't know why it doesn't have a TP. Please be sure you use a unique magic number for this EA or that you have not removed the TP from the input panel. Anyway, if it sets SL, it must be able to set TP also.

Re: ECN Account - set Stop Loss and Take profit

Please note that what you see is not a SL but a trailing stop activated after the price move.
Stop Loss and TP are none but just a trailing stop that worked.

Re: ECN Account - set Stop Loss and Take profit

I sorted out my platform problems and just made a quick test with separate SL/TP turned to true and I'm not getting those set up either.

Something is not working, Miroslav, you should take a look.

I'm getting the following error message:

 Error with OrderSelect(1), LastError=4051, Invalid function parameter value

Re: ECN Account - set Stop Loss and Take profit

MHJ, do you have error messages in Journal/Experts tab?

Re: ECN Account - set Stop Loss and Take profit

yes footon
I also have an error message

separated XAUUSD,M1: Error with OrderSelect(1), LastError=4051, Invalid function parameter value

Post's attachments

dsfd.JPG 78.03 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Re: ECN Account - set Stop Loss and Take profit

I made an ECN demo account at FXTM.

Noted that the expert works out of the box. The expert sets SL and TP together with the order. The Trailing stop is properly moved.

https://image-holder.forexsb.com/store/fsxtm-ecn-demo-sl-tp-ok-thumb.png

Please test the expert on a demo. I'm curious is there is a difference between the demo and the real accounts execution.

...

When we set "bool Separate_SL_TP = true;" the expert gives error 4051. I'll expect the case.

Re: ECN Account - set Stop Loss and Take profit

I made corrections in one of the EA core files. Please download the file and place it in the
"C:\Program Files\Forex Strategy Builder Pro\User Files\MT4 Files\MQL\Forexsb.com" folder.

Restart FSB Pro and export your EA for testing.

Most likely this is a full fix of the problem.  I'll wait for your confirmation and will make a public update.

Post's attachments

ActionTrade4.mqh 63.65 kb, 11 downloads since 2020-03-16 

You don't have the permssions to download the attachments of this post.

Re: ECN Account - set Stop Loss and Take profit

Hi Popov Dear
I replaced your file and the problem was resolved
thanks for your attention

Re: ECN Account - set Stop Loss and Take profit

Very well!


I publish it as an update - EA code v50.

Please restart Forex Strategy Builder and it will download the new code automatically (20 sec after the restart).

I will introduce it as a silent update to the latest FSB Pro v 3.8.8.

Posts: 19

Pages 1

You must login or register to post a reply

Forex Software → Forex Strategy Builder Professional → ECN Account - set Stop Loss and Take profit

Similar topics in this forum