(...)
The candle is locally-longest if it is longer than 3 candles in both sides. The locally-longest candle dominates the said candles in either side of it and they don't count no matter the color.
(...)
Interesting strategy, Risto.
But I have one doubt:
You can't know the 3 candles in the future.
So you have to wait 3 periods to determine wether a candle is locally dominant.
Have you simulated what's the rentability of your strategy if you place the buy/sell order 3 periods later than the locally dominant candle?