FTS Toolkit - Break Even EA - Minimize risk with setting break even automatically

Peter O

Special Consultant to the FPA
Messages
4,742
.
.
Quick update

For MT4 build 600 and above use this version - copy this to MQL4\Experts folder

View attachment FPA=BreakEven_v2.mq4

If you see only mq4 files there then you need to locate MT4 private folder somewhere here:

c:\Users\Peter\AppData\Roaming\MetaQuotes\Terminal\{whateverhorribleuniqueid}\MQL4\Experts

If you find more ugly IDs then you probably have more MT4's - you can copy the EA into each folder.​



Fellow Squad Members,


For those who use VPS or who are not at the PC all day this EA can lower risk significantly as it sets break even automatically.

Logic is quite simple: EA waits until the position gets to a significant profitable level (first parameter: Break_Even_Trigger_in_Pips) and then sets stop level to break even. Or more precisely to a predefined level specified in pips in profitable direction (second parameter: Break_Even_in_Pips).


Installation and starting:

Download source code from here:



This is an expert advisor code so you need to copy it to {MetaTrader4 folder}/experts folder and then start the trading platform (or close and restart if it was open). The tool will appear on Navigator panel (open from View menu) among Expert Advisors as FPA=BreakEven so just drag over your chart. (Old:10936)



Enable Expert Advisors:

To use it don't forget to enable Expert Advisors in terminal's Options (menu: Tools/Options - Expert Advisors tab first checkbox). This shows a smiley face on the upper right corner next to the EA's name (otherwise there is an x).










Settings and Parameters:

You can open Inputs tab right after starting EA when Properties come up or by pressing F7 if you switch from Common tab to Inputs.


Parameter: Break_Even_Trigger_in_Pips
Possible values: decimal numbers

Parameter: Break_Even_in_Pips
Possible values: decimal numbers

First parameter tells the EA how far the market price should go in positive before break even gets set (default value is 30.0 pips). Second parameter is break even level itself as you might want to calculate with spread and commission so break even would be in positive a bit (default value is 1.0 pip).


Operation:

Whenever an open buy or sell position gets to the predefined profit in pips (it doesn't affect limit or stop orders) EA sets stop loss to break even - only if stop loss is neither in break even nor further in positive. That is EA never widens stop level.

You can even set a two-step stop level adjustment if you use two charts and EAs with different parameters like setting break even (+1 pip) after 30 pips of profit and then on the other chart setting +20 pips when reaching 70 pips gain.

Keep in mind that EA will modify trades on the chart's currency pair.


You can participate:

Tell me and your fellow Squad Members how you like it.
Tell me and your fellow Squad Members how could it be better.
Tell me and your fellow Squad Members if you have any problem while installing or using it.


Who wants to enter the Laboratory:

Right click on Navigator panel/Expert Advisors/FPA=BreakEven and select Modify. MetaEditor opens up showing the full source code I've written for you.


On the first screen you can find two input parameters (Break_Even_Trigger_in_Pips and Break_Even_in_Pips) and you can change default values if you wish (30.0 and 1.0).


After modifying the code press F5 or Compile button on the top. If it writes "0 error(s),..." on the bottom, you have your own new version and you can start using it after going back to MT4 terminal.


Looking forward to hearing your feedback,

Peter
 
Last edited by a moderator:
I tested all source code links and eventually I replaced all of them because I saw downloading issue in Firefox.

Now I've tested new links and all worked fine for me in Firefox and Chrome as well.

Peter
 
That's very good to hear that it makes your trading environment better :)

If you have any idea that could be useful for you and for fellow traders as well don't hesitate to share. I have a quite long list of tools I want to make for you but any new idea can get to the top of my priority list right away :)
 
nice tools. but i am just wondering why there are not much tools in counting pips. since all traders are talking in pips. can we have a pip counter while the candle is going up or down showing how many pips gain or how much is in the negative? can you also make it for us to see on the chart in real time the total no. of pips of all the open currency? can we add pips on the terminal tab so that it will show the up and down pips in real time and show it also on the history tab how much pip is gained or lost. i think this will be of great help.
 
So you mean it would be a small table on the screen that shows gains and losses in pips for every trade on that currency? Or on all pairs?
 
I can't get this EA to work. It is shown in the Navigator panel but it is greyed-out and will not drag onto my chart. Any suggestions?
 
I can't get this EA to work. It is shown in the Navigator panel but it is greyed-out and will not drag onto my chart. Any suggestions?

hello there..
have same problems with installing this ea ... by now did you manage to find any solution around the installation?

good luck...
M
 
Back
Top