TradingView interview question

How would you improve this program?