Forums ProRealTime English forum ProOrder support Oil 15 minutes meanreverting strategy Reply To: Oil 15 minutes meanreverting strategy

#49061

As I posted many times, this is the solution fullness = abs((Dclose(0)-Dopen(0))/(Dhigh(0)-Dlow(0)+0.00001)

It’s a solution, I prefer something which can’t yield division by zero. I don’t think it’s likely to create any weird results either. I bet your solution works too with the underlying primitives, altough without the exact knowledge of how they work it still looks like possibly erroneous code.

abs((Dclose(0)-Dopen(0))/(Dhigh(0)-Dlow(0)+0.00001) cant yield to a division by zero as High -Low is bounded to zero, so high +low + 0,0000001 is strictly positive

2 users thanked author for this post.