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

Rounding of stock prices #5

Open mayankrasu opened 6 years ago

mayankrasu commented 6 years ago

The returned bricks have rounded stock prices. Can the rounding be turned off/made optional by any chance? For a stock with lower notional stock price, this rounding can have significant impact on the P&L.

By the way...great job so far.

ChillarAnand commented 6 years ago

Did you try with a brick_size of 0.5 or smaller?

mayankrasu commented 6 years ago

yes I did. Refer below snapshot for example. Brick size is 0.25. The open, high, low and close prices have been rounded before adding the delta.

  date    open    high     low   close  uptrend

0 2018-10-08 03:55:00 216.75 217.00 216.75 217.00 True 1 2018-10-08 04:05:00 217.00 217.25 217.00 217.25 True 2 2018-10-08 04:15:00 217.00 217.00 216.75 216.75 False 3 2018-10-08 04:40:00 216.75 216.75 216.50 216.50 False 4 2018-10-08 04:40:00 216.50 216.50 216.25 216.25 False