Backtest and Trading without while loop

- remove while loop
- add Node JS production flag