I use the breakeven code a lot in my systems, however I find myself requiring an additonal levels in one of my systems as the breakeven level Vs the Profit level are very wide..
As below.. the points difference is 850 .. to optimise the system further I would like to be able to add another breakeven (or stop move) when the profit gets to 600 points (i.e. after the first breakeven has executed at startbreakeven =150).. many trades reach 600+ points but end up reverting to the 50 point stop.. which is costly..
I dont want to use a stepped trailing stop as its not flexible enough.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Stops and targets
SET STOPpLOSS160
SET TARGETpPROFIT1000
startBreakeven=150//how many point gain to activate the breakeven function
PointsToKeep=50//how many points profit above or below the entry price when the breakeven is activated
//reset the breakevenLevel when no trade are on market
IFNOTONMARKETTHEN
breakevenLevel=0
ENDIF
//test if the price have moved favourably of "startBreakeven" points already