anandanand84 / technicalindicators

A javascript technical indicators written in typescript with pattern recognition right in the browser
MIT License
2.13k stars 550 forks source link

ATR not correct? #238

Open Adam-Harte opened 3 years ago

Adam-Harte commented 3 years ago

backtesting a trading strategy that uses the ATR for stop loss and take profit but the ATR seems way too high. Its being calculated in the thousands here but when I go to trading view/binance it is only in the hundreds.

Adam-Harte commented 3 years ago

ok so think ive figured it out. If you are using something like the binance api you want to take the atr you get calculated here and multiply it by the tick size e.g. BTC tick size is 0.01 so a 1000 ATR from here multiplied by 0.01 BTC tick size gives you 10 which is the real ATR values you want to base your stop loss and take profits from