How it works:
The strategy will buy when the close price crosses above the 200-period EMA.
It will exit the position when the close price crosses below the 200-period EMA.
The position size will be dynamically adjusted based on the remaining capital (equity) after each trade.
You can paste this script into Trading View, and it will now calculate the 200-period moving average using the EMA