Breakeven

Enivid

Administrator
Staff member
Nov 30, 2008
19,301
1,529
144
Odesa
www.earnforex.com
Will it calculate with Commission + Swap for position?. If No, Kindly implement

BR
No, it cannot do that. The problem with implementing that is that when the script runs, it can calculate the commission that has already been paid for the position and the swaps that have already been incurred and set the SL accordingly, but the SL will get triggered at some unknown point in the future, when more swaps might get applied, exit commission taken, and the currency pair's point value has changed, so the result might not be of the expected from a breakeven.
 

EnrichWave

Master Trader
May 15, 2018
382
97
74
India
the SL will get triggered at some unknown point in the future, when more swaps might get applied
Yeah, You are correct. So, The trader should drag the script again each end of the day (server time 00:00) to reset the SL. Which is fine Enivid.

BR
 

Jakey88

Trader
Sep 6, 2022
27
2
19
35
@Enivid , Sorry for posting here but I cant find the break even forum . I have been trying to install the break even script on MT5 but it will not work. I have deleted and tried again and again. Nothing I try is working. Please help .
 

Attachments

  • break even issue.PNG
    break even issue.PNG
    77.3 KB · Views: 2

Jakey88

Trader
Sep 6, 2022
27
2
19
35
@Enivid , Sorry for posting here but I cant find the break even forum . I have been trying to install the break even script on MT5 but it will not work. I have deleted and tried again and again. Nothing I try is working. Please help .
The same thing is happening with close all orders.
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,301
1,529
144
Odesa
www.earnforex.com
@Enivid , Sorry for posting here but I cant find the break even forum . I have been trying to install the break even script on MT5 but it will not work. I have deleted and tried again and again. Nothing I try is working. Please help .
You are supposed to copy the two folders from the zip-archive directly to your MQL5 folder. This will put all the files to their appropriate location.
 

Jakey88

Trader
Sep 6, 2022
27
2
19
35
ahhh a huge relief. That was driving me crazy lol. Thank You once again Enivid
You are supposed to copy the two folders from the zip-archive directly to your MQL5 folder. This will put all the files to their appropriate location.
Post automatically merged:

Oh ok that's good to know . Thank You
@Jakey88 You can also just delete the #property icon line, the icon is just cosmetic.
 

yoovie

Trader
Feb 9, 2022
21
22
14
Man,,, whether it is indicator, script or EA, it is the like we give credit to the developer
The script is open source, anyone can do as they like to the source code. Again, it's up to you (or Jakey88) to keep the icon or not, if your or anyone prefer to keep the icon for sake of respecting the author, then just keep the icon.
 
  • 👍
Reactions: EnrichWave

Enivid

Administrator
Staff member
Nov 30, 2008
19,301
1,529
144
Odesa
www.earnforex.com
Up to you, the script (not indicator) is free btw.
Man,,, whether it is indicator, script or EA, it is the like we give credit to the developer
I don't mind people removing the icon in the code for their personal use. Doing so to distribute it publicly would be an ass move though.
 
  • 🎉
Reactions: EnrichWave

HFTTrader

Trader
Dec 2, 2024
7
0
6
24
If I set the pips in profit in order to BE to 0, will it set my SL to break even immediately with $0 profit? Also does this work for pending orders?
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,301
1,529
144
Odesa
www.earnforex.com
If I set the pips in profit in order to BE to 0, will it set my SL to break even immediately with $0 profit?
It's a script, not an EA. It will attempt to apply the BE just when you run it. It will probably fail to set a BE for trades with $0 profit because the SL would be too close to the current price compared to the broker's minimum distance.
Also does this work for pending orders?
No. Pending orders do not have any profit value, so a BE script would be meaningless for them.
 

HFTTrader

Trader
Dec 2, 2024
7
0
6
24
It's a script, not an EA. It will attempt to apply the BE just when you run it. It will probably fail to set a BE for trades with $0 profit because the SL would be too close to the current price compared to the broker's minimum distance.

No. Pending orders do not have any profit value, so a BE script would be meaningless for them.
How do I get an EA that sets pending orders stoploss to BE?
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,301
1,529
144
Odesa
www.earnforex.com
Yes, I need an automated way for my pending orders SL to set at open price immediately after they are placed.
Why would anyone create something this horrible? As I've said, this would make the newly opened position will close immediately in loss as the closing price will be behind the SL.