1 (edited by Shr1k 2011-07-04 05:15:00)

Topic: Break Even Offset

is there a way to offset the breakeven.
example:long trade
break even is set to trigger at 25 pips profit offset is +5 pips
price moves up 40 pips breakeven is triggered, price moves down 50 pips, trade is closed at +5 pips profit.

EDIT>>>>>>>>>


testing this now it looks like it might works

extern int Breakeven_Offset = 0;
// and 
 SetStopLossAndTakeProfit(symbol, breakprice + Point * Breakeven_Offset , PositionTakeProfit);
                Print("Break Even (", BreakEven, " pips) set Stop Loss to ",  breakprice, ", Bid = ", bid);

Re: Break Even Offset

the above changes to the MT4 fst EA seem to work fine of course on a short trade the offset is subtracted from the breakprice. on a 5 didgit broker the offset needs the trailing zero.

http://i55.tinypic.com/2j4r2mb.jpg

Re: Break Even Offset

here is the changed MT4-FST Expert. the breakeven can not be backtested!!! be careful!!! and this mod is not well tested use it at your own risk.
When you attach the MT4-FST expert to a chart look at the the expert properties window. the input field is Breakeven_Offset. see the pic above about the trailing zero on 5 digit brokers.  For this to be active breakeven must be active and set with a trigger distance in FST.
rename the file MT4-FST Expert and drop it in your MT4 experts folder.  this will replace your current expert you may want to save it first with a different name so you can revert after testing.

Post's attachments

MT4-FST ExpertBEOffset.mq4 65.31 kb, 3 downloads since 2011-07-06 

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

Re: Break Even Offset

using the expert above I seem to be losing my TP when the breakeven is triggered. not sure why. just a warning I will try and fix it this week end.