Nice work Sleytus.
Here's another little insight...
On CJ, I was experimenting with SL level. I'd originally had both SL and TP at 95 pips. I'd noticed a couple of things over the last couple of days... SL was getting hit, not that often, but it was getting hit.
And the other thing was that the overnight spreads can go to 200 (checked it via ICMarkets downloading bars - max was 200 over the last month). Problem with that is that if you're short (it tends to be the Ask thats jacked up), and the spreads go beyond your SL, you get stopped out. Not good.
So, I modified Mr Popovs code for a test to see what happens when SL is moved out massively...my theory was that I'd write a script that moved my open short position stop losses to 250 pips when/if the spreads started to get towards my 95 (example only).
What I found was initially interesting.
If I moved SL out to 200-500 pips (huge yes I know), as you'd expect, they didn't get hit...but, what was surprising was that it didn't impact the results from the portfolio over the next 1-2 days.
What this was showing was that the reversal/close rules were working really well at closing trades (maybe for a loss yes) but not closing them too soon (i.e. getting stopped out to soon).
Note: I'm a huge advocate of SL and money management for sure.
So, I'm going to experiment some more, to make sure that this does actually happen over a longer period and I'll report back here.
I'll be watching equity drawdowns, length of open position and correlation between MAE and MFE.
When we launch a new portfolio, we set the Max Positions to 0, which still runs the exit signals, just won't open any new positions. So, unless you get a massive move in the market - which is possible - the exit rules should come into play and close out positions "on-time"...