GBPUSD was making a nice profit but something in the profit locking is not quite right. I discovered that ZzBb3 has been running without a breakeven setting for sometime, which I hadn't noticed because generally the short range trades have been reaching their targets but with ATR picking up and quite a bit of swinging its time to address some leaks in the profit locking. The extra-profit-lock works well on many trades if price gets close enough to the target but shorter trades were not part of the older trailing-stop methods designed for 90 pip swings. So I am just revising lock-by-percent-profit code and here is what currently happens when we get close to the target in a short USDJPY trade:
Code: Select all
04:32 USDJPY: : 3 $MxPf:57.66 $RPf: 55.28 Pips:14.00 $DdBp:0.00 $DdAp:-15.15 GapTp:5.20 MnGpTp:4.70
04:32 USDJPY: : done: updateStopLossToXplSl(): bExtraProfitLockSL bUpdatedXplSlOk: 0
04:32 USDJPY: : manageTrailingSymbol()...
04:32 USDJPY: : iCPTicketNum : 3, dSymSumCashProfit 55.28, symbolPercentUp : 0.55
04:33 USDJPY: : 3 $MxPf:63.86 $RPf: 63.86 Pips:15.80 $DdBp:0.00 $DdAp:-15.15 GapTp:3.40 MnGpTp:3.40
04:33 USDJPY: : done: updateStopLossToXplSl(): bExtraProfitLockSL bUpdatedXplSlOk: 0
04:33 USDJPY: : updateStopLoss(): , iDirection: -1
, dOldStopLoss: 107.47100, dNewStopLoss: 0.00000
, bSetStopLossToBreakEven: 1, bSlValidGap: 1, bNewSlIsCloser: 1
04:33 USDJPY: : updateStopLoss(): Changed stoploss to breakeven!
04:33 USDJPY: : manageTrailingSymbol()...
04:33 USDJPY: : iCPTicketNum : 3, dSymSumCashProfit 63.86, symbolPercentUp : 0.63
04:33 USDJPY: : Previous symbolLockAccPercent : 0.00
04:33 USDJPY: : ((symbolPercentUp - symbolTrailPercent) > symbolLockAccPercent)
04:33 USDJPY: : Updated symbolLockAccPercent : 0.32
04:34 USDJPY: : 3 $MxPf:63.86 $RPf: 59.57 Pips:14.90 $DdBp:0.00 $DdAp:-15.15 GapTp:4.30 MnGpTp:3.40
04:34 USDJPY: : done: updateStopLossToXplSl(): bExtraProfitLockSL bUpdatedXplSlOk: 0
04:34 USDJPY: : manageTrailingSymbol()...
04:34 USDJPY: : iCPTicketNum : 3, dSymSumCashProfit 59.57, symbolPercentUp : 0.59
04:34 USDJPY: : GlobalVariableCheck : sLockName: USDJPY600323_trailingSymbol, symbolLockAccPercent 0.32
[/size]
The first thing I noticed was that losing trades correctly consume about 1%, but recent profits are often coming in at just over 50% even when getting close to the target. So is this just the cost of profit-locking and trailing-stops?
There is a disparity in the risk-to-reward-ratio which could be due to a minimum stop loss or inefficient profit locking.
In this back-test trade we only saved a quarter of the risk:
Code: Select all
9 2014.10.13 03:35 sell 3 0.51 107.259 0.000 0.000 0.00 10132.36
10 2014.10.13 03:35 modify 3 0.51 107.259 107.471 107.087 0.00 10132.36
First SL: 107.471 - 107.259 => 21 pips
First TP: 107.259 - 107.087 => 17 pips
12 2014.10.13 04:44 close3 0.51 107.197 107.259 107.087 27.66 10160.02
Final SL: 107.259 - 107.197 => 6.20 pips
Final TP: 107.259 - 107.197 => 6.20 pips
[/size]
6 pips is better than breakeven, which in turn is much much better than a $99 loss.
In the following M1 chart we see that the full profit was there for the taking.
Using breakeven without trailing would have given better result in this one particular case:
usdjpy-M1-profit-leakage-0440-13Oct2014.png
Both percent-lock and extra-profit-lock had the same exit point by different methods, in a longer trade the results would be different. Extra-profit-lock is ideal for longer trades and not as useful on short trades.
Percent-lock could kill-off a longer trade too soon so we need to be careful to get the settings right:
Code: Select all
04:44 USDJPY: : USDJPY, orders closed at: 0.32 ,Symbol trailing percent level
04:44 USDJPY: : manageExits(): ExitByExtraProfitLock
[/size]
In conclusion, we can try different settings for percent-lock and extra-profit-locking to find the best return over a given period of time, but these settings are short lived. We can also try to accommodate individual trade settings based on volatility and the range of the trade.
I'm considering an additional extra-profit-lock of 5 pips when price gets within 1.5 pips of the target price.
You do not have the required permissions to view the files attached to this post.