help with division by 0 error

Forums ProRealTime English forum ProOrder support help with division by 0 error

Viewing 6 posts - 1 through 6 (of 6 total)
  • #168284

    Hi Guys,

    Im hoping someone can point me in the right direction with where my code is causing division by 0 error. i think its in the “DistPer” section of the code. essentially im trying to get 3 different averages from 3 candles back & compare to the current average. if there is an increase in percentage as at the “Per” value. it keeps throwing the div by 0 error which i cant seem to clear.

    I have reviewed other threads around div by 0 error but haven’t found a workable solution as yet.

    any help is appreciated.

    cheers

    #168289

    Post your topic in the correct forum:
    _ ProRealTime Platform Support: only platform related issues.
    _ ProOrder: only strategy topics.
    _ ProBuilder: only indicator topics.
    _ ProScreener: only screener topics
    _ General Discussion: any other topics.
    _ Welcome New Members: for new forum members to introduce themselves.

    Thank you 🙂

    #168290

    Don’t you need

    ?

    Try using GRAPH to monitor the variables involved in division:

    or this version:

     

    #168310

    Hello Mishap, the division by 0 error is due to

    I had exactly the same error when running a strategy live and I searched during a long time before finding the solution.

    Try to use at least

    as the parameter must be an integer greater than 1

    1 user thanked author for this post.
    #200609

    Hello Mishap, the division by 0 error is due to

    I had exactly the same error when running a strategy live and I searched during a long time before finding the solution.

    Try to use at least

    as the parameter must be an integer greater than 1

    is it true ? someone else has the same issue with [1] previous value ?

    🙂

    #200619

    Hi, you shouldn’t read [1] in RSI[1](close) as a previous value here, but as the RSI period.

    For  [1] to be a previous value, it would have to be at the end: RSI[period](close)[1]

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

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