Average in indicator returns flat spots

Forums ProRealTime English forum ProRealTime platform support Average in indicator returns flat spots

Viewing 11 posts - 1 through 11 (of 11 total)
  • #123156

    This simple indicator that just calculates an average of the closing position as a percentage of range returns flat spots on the indicator where the average is clearly not being calculated correctly and the value does not change over many candles.

    The attached images are of DJI daily.

     

    #123167

    Congratulations for being able to successfully recode a stochastic from scratch! 😆 (no offense)

    EDIT: topic is not in the right section! 😉

    #123171

    Vonasi, you’ll have to move it yourself to the correct support forum!

    #123180

    Congratulations for being able to successfully recode a stochastic from scratch!

    I actually hadn’t twigged that it was the same calculation!

    Interestingly if you put the two calculations on in the same indicator the stochastic one calculates just fine but my version doesn’t.

    I actually think this is the right place for this topic as it is clearly a data or calculation error which is a platform issue.

    #123182

    I’ve done a little more testing and the variable closeperc calculates correctly. The issue is with the exponential average calculation. If I use a simple average then it calculates correctly.

    1 user thanked author for this post.
    #123184

    More worrying revelations?

    #123185

    Your code works fine for me, both lines overlap.

    #123189

    Your code works fine for me, both lines overlap.

    Really? That is very odd. On the DJI daily?

    I feel a switch it off and back on again happening if so.

     

    #123192

    DAX Daily.

    #123196

    Dow Jones not DAX

    #123203

    DJI daily.

    The one below is your original code.

    The one above is this one (with modifications to avoid division by 0):

    Apart from a few candles, both blue and red lines overlap.

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

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