I'm still struggling with autotrail breakeven. I drew a picture in paint of my idea.
I've noticed that many of my trades start as winners, but turn out as losers. I'm trying to turn that as much as possible.
The picture explains 3 sorts of trades:
A: pure Winners
B: pure Losers
C: Losers that start out as winners
I would like the stoploss to move to breakeven when a trade reaches 100 points on the DAX future (0.5 tick). I tried this with the command:
if (Close[0] > Position.AvgPrice + 200 * TickSize)
{
SetStopLoss(CalculationMode.Price, Position.AvgPrice);
}
But it did not work. What's wrong with this code?
Second as the winner trade A reaches a certain point, not only do I want to move the stoploss to breakeven, I would like to save some of profit by raising the stoploss to the green line.
How do I implement this?
Thanks,
Comment