Course Name: Day Trading Strategies for Beginners, Section No: 11, Unit No: 10, Unit type: Notebook
msft['ATR'] = talib.ATR(msft['high'], msft['low'], msft['close'], timeperiod=30)
why timepriod = 30 means here? It means each minute?
Hi Levi,
The data we are using here is 1 minute data so here time timepriod = 30 means we are taking 30 minutes of data to calculate ATR. If we use 1 day data timepriod = 30 would mean 30 days.
You can think of timeperiod more as candles rather than time. Candle in a time-price chart could be 1 minute, 2 minute, 1 hour, 1 day, etc. So timeperiod=30 in talib.ATR function means we are using 30 candles to calculate ATR.
Hi Danish,
Got it! Thanks for your explanations.