Division by zero ERROR

Forums ProRealTime English forum ProOrder support Division by zero ERROR

Viewing 15 posts - 1 through 15 (of 20 total)
  • #135220

    Hey!

    as ive understod this error occurs when something is trying to divide itself with 0, but i cant find it….

    anyone thats a bit more skilled that would mind helping me?

    #135225

    Hope you don’t mind … code is below so that the wizards can see if they can spot anything to produce the divide by zero error.

    Is below similar to / a copy off here or your own code?

    How often are you getting the error and when?

    Is it when you try to start the System on Pro-Order or at random times?

    Has the System taken any trades at all on ProOrder / Auto-Trading??

     

    #135227

    The code below looks like it may be a possible source of divide by zero??

     

    1 user thanked author for this post.
    #135228

    Try also changing line 17 to:

    Try moving line 25 BEFORE the expression highlighted by GraHal, this might cause assign a correct value to yearinit before it’s evaluated.

    #135229

    You may want to do some research / reading back over Topics from which you got the ML parts of your code because below has been discussed and it is flawed re the i2 (see my comment below).

     

    should be as below  (3 instances of i that should be i2)

     

     

    #135231

    i dont believe the ML code is wrong, ive used it in multiple strategies with no errors

    #135233

    The ML code is copied from this forum

    i get the error very quick from the point i put it in the proorder auto and activate it

    #135236

    Yeah I recall same issue when I was involved with the ML code … best to read over any suggestions already made for a fix?

    But that i2 is flawed anyway as the code states

    but the code doesn’t have an i2 (it has i but not i2).

    The result is crosstalk / cross referring of values between the ValueX code and the ValueY code.

     

     

    #135237

    I have cleaned up the code now, and now it gives me a new error; “The trading system was stopped because it encountered an error. please send us a report to enable us to analyze the error….

    this is the code wich gave the error

     

     

    #135238

    Here you are … a good one to start with  … JuanJ is the Author of the ML code!

    https://www.prorealcode.com/topic/division-by-zero-error-solved/

    and another

    https://www.prorealcode.com/topic/division-by-zero-error/

    #135240

    it gives me a new error

    When … Is it when you try to start the System on Pro-Order or at random times?

    Also did you see the suggestion made higher up by Roberto … I only just noticed it.

    #135241

    It takes about 1 min after i start it in proorder until i get an error, as u can see the code now has nothing from the ML in it as i posted above

    #135242

    Might have found the problem, was a while ago i started it again in proorder now since i configured my VWAP indicator wich i think and hope was the problem.

    thanks GraHal and Robert for the help!

    #135247

    @snucke. Always use the ‘Insert PRT Code’ button when putting code in your posts. Please read the forum rules before posting anything else in the forums.

    I have edited your post.

    #135258

    Try to preloadbars when the strategy crash almost instantly, it is a sign that some calculation are made wrong and need more data history to be made.

    2 users thanked author for this post.
Viewing 15 posts - 1 through 15 (of 20 total)

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