I got the idea of an algorithm using a gap, which would behave a bit like RSI, therefore I called it momentum. Don't know if it's very useful or how to improve it, it can keeps you in trends, however it suffers from whipsawing. My first attempt in programming a strategy.