Building partial Stop Profit but impractial
-
Im building a sequence to let the trade run during high volatility and catch the move. The idea is worst case scenario every time there is 5 more pips starting from 80 pips (85, 90, 95, etc) and price retraces 5 pips, a % of the trade would be closed. Say the trade goes to 80 pips and then back to 75, it would close a %, if on the other hand there is a fast move and profit (pips) jumps from 80 pips to 110 and then retraces to 105, all the % that would have been closed at 75, 80, 85, 90, 95 and 100 would be closed at 105.
This structure is already built, but is very long and impractial. I would like to know if anybody has any ideas or solutions since I want to build this from 80 pips to 280 and then that structure 3 times more for different groups of trades, something that would be astronomical. I imagine there must be a more elegant way to build it but I havent been able to come up with it yet.
https://fxdreema.com/shared/Pv9ZiIDLb
I hope I made myself clear, please ask anything thats unclear.
Would appreciate a lot some help. -
@criptofuture Certainly a loop would make it much more elegant and efficient. However, that would required a lot of effort because it is not a trivial structure to create.
-
What do you mean? could you send a little example?
-
@criptofuture A loop is a block structure closed on itselfs in its execution so that several calculations are done by tick. In coding language it would be a subroutine (I think). Sadly, creating a loop for your EA would require a huge amount of time and effort and I'm afraid not many peaople here would be ready to do it...for free, at least.