t1user / haymaker

tools for interactive brokers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ATR calculation?

jamesliu1 opened this issue · comments

It seems that atr() function in indicators.py uses the current close (instead of the previous close) to calculate "B" and "C"
In this case, "A" is always the max value.
Is this intentional or just a typo? thanks.

https://en.wikipedia.org/wiki/Average_true_range

You're right. It was a stupid error. It's fixed now. Thanks for bringing it up.