Trading system was stopped due to a division by zero

Forums ProRealTime English forum ProOrder support Trading system was stopped due to a division by zero

  • This topic has 2 replies, 2 voices, and was last updated 7 years ago by avatarBC.
Viewing 3 posts - 1 through 3 (of 3 total)
  • #17386
    BC

    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.”

    Can anyone help on this issue? Thanks.

    #17397

    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.

    #17440
    BC

    Hi Wing

    Thanks for your advise, I fixed the problem, it caused by preloadbars issue, my previous setting is 150, its ok when change to 1000.

Viewing 3 posts - 1 through 3 (of 3 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login