Division zero error

Forums ProRealTime English forum ProOrder support Division zero error

Viewing 15 posts - 16 through 30 (of 35 total)
  • #212736

    I checked every division in the code by graphing it. None is 0

    some things pending between 0,005 and 1 but nothing is 0

    #212745

    Over how many bars is that you are checking for 0’s?

    #212754

    As it happend most recently 30th march I checked with bars only covering that trade. But Maybe I did not check the division for that only backtest. And I also checked different variations of bars to remove the options its not preloadbars.

    But I guess i should do the same for all division and check if they act different (Become 0) if the barset is different.

    I will check that tomorrow and get back here again. Thanks again!

    #212763

    An easier way – over for example 10K bars – would be to use …

    Then you should see a 1 when above is True.

     

    1 user thanked author for this post.
    #212765

    Thanks alot mate!

    #212767

    If above doesn’t work, try …

     

     

    #212781

    It is so wierd, the system stopped again today and I got the same message. When I backtest 200 units and check order list the trade is not there.

    #212782

    StochRSI = (myRSIMinRSI) / (MaxRSIMinRSI)

    Should I just not.. Graph stochRSI <= 0  ?

    Because “(myRSIMinRSI)” can also be 0?

    Well none of that works. I will just graph StochRSI and all the other division but still 0. I am getting nuts on this haha

    #212783

    Also I get nothing under in my orderlist under “cancelled/Rejected”

    #212784

    I have been running this system wihtout any problems for 3 years. I just tweaked some numbers and changed the trailingstop

     

    So as I thought it be some kind of preload bars thing as I have ran the system for long time in demo I tried backtesting with only the recent trade fitting (meaning bascily 0 preload bars) the trade still shows up. This means preloadbars is not the issue.

    I checked all the division none is 0. I checked if trialingstop somehow is below minimum no problem there also. I went through the code several times just to think of what it can be.

    #212786

    Try this …

     

     

    #212787

    I looked arround the forum for the same problem.. And I found this part

    “x = std[Period](close)
    if x=0 then
    x=1
    endif”

    which means I can do it on every divison to secure 0 not to come again. In this scenario I can just

    “if StochRSI = 0 then

    x=1

    endif”
    Right?

    #212788

    Hmm and also I use ODD numbers in Period in my code so I think that might be causing the errors I am not sure yet

    #212790

    I saw @robertgozzi write this

    “Check that all periods within brackets have a “normal” period number, such as 10, 20, 200 or 500 and not 10000 or 15000!

    This may happen if some period numbers are not simple constants but are the result of an expression, or use BARINDEX or the like incorrectly.”

    Means in my case 3 would cause a problem division 0 error?

    #212792

    and not 10000 or 15000!

    Robert said above because the max number of preload bars is 10000 and so any period >= 10000 would likely bring problems.

    3 would cause a problem division 0 error?

    Not in itself no, 3 can be fine, 3 can cause problems, but not because it is a value = 3.

    Re your div0 Rejection … try my max(1,??) suggestion I posted above … this is the one fix that works for me when I get div0 Rejections.

     

    1 user thanked author for this post.
Viewing 15 posts - 16 through 30 (of 35 total)

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