Trading system was stopped due to a division by zero

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #17386 quote
    BC
    Participant
    Master

    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 quote
    Wing
    Participant
    Veteran

    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 quote
    BC
    Participant
    Master

    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)
  • You must be logged in to reply to this topic.

Trading system was stopped due to a division by zero


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
BC @robin_chan Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by BC
9 years, 2 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 11/28/2016
Status: Active
Attachments: No files
Logo Logo
Loading...