.
.
Quick update
For MT4 build 600 and above use this version - copy this to MQL4\Experts folder
View attachment 13786
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