Comments (10)
Hey guys, I think the issue is from the ATR function, called in the renko_DF function.
df2.brick_size = round(ATR(DF,120)[-1],0)
The reason for the NaNs is because of the ATR for the Malaysian ticker.
Try the below
print(round(ATR(ohlc,120)[-1],0))
print(ATR(ohlc,120)[-1])
Output is 0, when rounded and 0.0594166616598765
So in the renko_DF function, just change df2.brick_size = round(ATR(DF,120)[-1],0)
to df2.brick_size = round(ATR(DF,120)[-1],1)
Which gives an ATR of 0.1 and the NaN doesnt appear anymore.
Alternately, just assign a df2.brick_size =
with a fixed value (to get the fixed brick size) and it will work.
Also note that you will get NaN's whenever a stock price < 1. I think by simply adding an if/else statement within the function to check if price is > 1 or < 1 and set the rounding to 0 or 1 will help resolve the issue. closes #18
from stocktrends.
Thanks, @tys203831
Can you please provide a sample csv file that you were using for this?
from stocktrends.
Hello @tys203831
have you resolved this issue ? as I am facing a similar problem in my project. It would be very helpful if you can guide me thanks
from stocktrends.
Related to #23
from stocktrends.
Is there a way to fix this @ChillarAnand?
Also it will be great if you can let us know why this issue is arising. So that we can avoid such cases for the timebeing
from stocktrends.
I am not able to reproduce the issue. @Prasanna28Devadiga
If someone can share sample data to reproduce this issue, it will be helpful.
from stocktrends.
@ChillarAnand Here is a sample data that i was facing the issue with:
https://drive.google.com/file/d/1mt_T3wH2ICaqCG6UcR9kkyEWpH-hV9dB/view?usp=sharing
It is the Intraday (1 minute) data for 'IDEA' stock downloaded from the yfinance api.
from stocktrends.
@ChillarAnand were you able to find out what exactly is going wrong/ ways to workaround ?
from stocktrends.
@chranga Thanks for submitting detailed report.
Would you like to send pull request for the same?
from stocktrends.
@chranga Thanks for submitting detailed report.
Would you like to send pull request for the same?
Hi, a bit new to this. But I edited the above comment with closes #18 but it doesnt seem to work?
from stocktrends.
Related Issues (20)
- renko.PRICE_MOVEMENT giving error HOT 1
- Key not found error when I pass tail items to Renko
- how can i draw renko chart on atr base HOT 2
- R/Sir, whenever Renko started always first trade uptrend column showing 'True' always Why?? HOT 1
- getting repetitive value of date and time column in renko HOT 2
- Legacy/Deprecated code warnings HOT 6
- Issue with renko charts in 0.1.5 version HOT 4
- How to get the chart to work? HOT 2
- linebreak stock price HOT 3
- Add supertrend indicator
- get_bricks() is missing HOT 1
- Hello Sir, how to convert renko code to range bar code? HOT 5
- Valueerror: HOT 1
- hl- Hilo not fetching any data . HOT 1
- Not getting correct renko OHLC HOT 1
- Doesn't it calculate the wicks in renko? HOT 1
- Renko data generated using stocktrends does not match to chart in tradingview , investing.com and zerodha HOT 2
- AttributeError: 'Renko' object has no attribute 'get_bricks' HOT 1
- Speed/Performance HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stocktrends.