Can you please point me to some examples, where I can see a code for multiple exits for single trade?
This is what I would like to code somehow:
For every open trade immediately to define 1x stop loss and 3x target profit following the rules.
First calculate SL at some level (could be x points price difference from entry price to keep it simple). Based on this set first Target for 1/3 position at RRR 1:1, another 1/3 of position at RRR 2:1 and the rest at 3:1. Additionally, 1st TP is hit, move SL to BreakEven, later if 2nd TP is hit, move SL up to price where was 1st TP.
I'm not asking you to write a code for me, but would be great to see some similar codes for exists with similar idea. I did a search, but I'm a bit lost here. https://www.amibroker.com/guide/h_pyramid.html
I ran Howard's scale-out code and it appears to only sell at the second profit target. Could someone advise why this is happening please? Altering "FirstProfitTarget" makes no difference to the backtest.