This little and simple code allows you to draw an indicator, which show you when buy or sell conditions are met.
For "buy" conditions, I did just set :
close > MM200
RSI7 > 50
For "sell" conditions : the opposite.
Of course, you can set what you want, in order to test your strategies.
Of course, to be profitable, you must also set your trading rules (entry, stop loss, trailing stop, take profit, etc.)
It's only an indicator, which doesn't show entry or exit rules.