ChillarAnand / stocktrends

A python package to calculate trends in stocks, derivates(Futures & Options) using Renko, PnF, LineBreak etc
GNU General Public License v3.0
247 stars 74 forks source link

Legacy/Deprecated code warnings #15

Closed Pilipets closed 3 years ago

Pilipets commented 3 years ago

FutureWarning: Slicing a positional slice with .loc is not supported, and will raise TypeError in a future version. Use .loc with labels or .iloc with positions instead. self.cdf.loc[0, 1:] = [close - brick_size, close, close - brick_size, close]

This ticket is a reminder that the issue needs to be fixed in the upcoming releases.

from stocktrends import Renko
...
    renko = Renko(df)
    renko.brick_size = min(atr_brick_size, brick_size)
    renko_df = renko.get_ohlc_data()
...
ChillarAnand commented 3 years ago

Thanks for creating this issue, @Pilipets

I will try to push a fix this week.

ChillarAnand commented 3 years ago

This issue is fixed in the latest release. Https://pypi.org/project/stocktrends/#history

KemarReid commented 3 years ago

I tried the new update and now the get_ohlc_data function produces a dataframe with only one row of data

ChillarAnand commented 3 years ago

There are multiple get_ohlc_data functions. For which indicator are you using? @KemarReid

KemarReid commented 3 years ago

I am having that issue with the get_ohlc_data belonging to the Renko Class. I haven't had any issues with the others

ChillarAnand commented 3 years ago

@KemarReid Created separate issue for this at https://github.com/ChillarAnand/stocktrends/issues/16.