My trading system is fine on back test, but below error message appear when go live.
“The trading system was stopped due to a division by zero during the evaluation of the last candlestick. Please add protections to your code to prevent divisions by zero.”
Usually, this problem is because you have a variable that you initiate as zero, or simply do not give a set value to at first. When you try to divide a number or another variable with this zero variable, an error is returned. So my first suggestion, look at all points in the system where you divide something, then make sure nothing is ever divided by zero.
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.