I am trying to build a moving average crossover strategy that uses the entire bankroll for every trade (to compound previous gains), and not just a fixed size (e.g. 1 contract).
Unfortunately, I can’t make it work properly…
Is there a code snippet you could point me to that achieves this?
Dividing the capital by the price will tell you how many contracts to buy but in real life you can’t trade like this using spread betting or DFD’s. You need to keep some of your capital to cover margin otherwise as soon as price moves against you you will get a margin call and the position will be closed.
EDIT: Sorry Grahal but your reply saying the same thing got deleted when I deleted the double post in the ProBuilder forum.