arkochhar/Technical-Indicators

Incorrect ATR Calculation when same dataframe being passed with new rows

Opened this issue · 1 comments

if not 'TR' in df.columns:

Consider removing the above line as TR is not calculated if same dataframe is passed with new rows as it happens in realtime situation. Hence ATR gets calculated incorrectly. I am calling ST / ATR post creation of each 2 min candle (dataframe row), so every 2 mins ST / ATR function gets called with new dataframe rows appended.

hah...correct