This strategy is a proof of concept only, there are obvious weaknesses in the code, the main one being that stops do not function as a real risk manager at the moment and are only included to enable the system to trade at size using guaranteed stops provided by IG markets.
I will also state the obvious, my coding skills are very limited so i work in a way that makes sense to me but may not be efficient.
This system uses scaling to reduce the impact of accuracy, a key principle to successful trading.
This system uses a risk ratio to determine trade size and will exponentially increase risk as the account grows, once it is trading 500 contracts ($1 per point CFDs) it will half risk by doubling the equity to contract ratio.
the system is designed to be given a certain amount of capital and then risk 50% of equity exponentially on every trade, it does work this way with a (0.5*strategyprofit+startingcapital) cash stop loss however these cannot be used with accumulating strategies.
It is a decent example of trading concepts that are more important than entries or exits, if you apply some of these principles to even a weak system of entries and exits you should see an increase in profitability.
the INPROFIT command is also pretty useful, separating exits and take profits, and allowing to scale into already winning positions and scaling down into strength looking to buy back cheaper.