I have looked at all the code examples found through others post but what i am looking to code is slightly different, so I am hoping it is not too difficult for me to do myself.
If I have two trades going. I have set ticks I would like to exit for profit target and stop loss. My goal is to test and see how it would impact my strategy by adding this piece of breakeven in to see if has any true value.
Both: Enter off the same entry
Trade 1: Exits 160 ticks profit or 65 ticks stop loss
Trade 2: Exits 40 ticks profit or 65 ticks stop loss
This is the logic I am thinking: If Trade 1 is in trade and trade 2 has exited trade only through its profit target, move the stop loss of trade 1 to average position price + 2 ticks.
Any insight would be greatly appreciated. If this could cause issues in an automated code, I might just have to forget it.
Comment