-
Notifications
You must be signed in to change notification settings - Fork 950
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EBSW indicator #350
Comments
Hello @Squigglez2, Interesting. I will add it to the list of things. Have you tried exporting data and it's indicator values from TradingView and run a correlation test to see how inline your version is with TradingView? If not, that would help you see if there are bugs in your code. How to do a TV Correlation TestAre you using a different data source for Pandas TA and then visually comparing the numbers displayed from TradingView? If so, then that can cause deviations in calculation because they are not the same data source. You can Export Chart Data from TradingView data for comparison by using the hamburger menu in the upper left corner; select the ISO format. Once you have exported your chart data from TradingView, try the following: import pandas as pd
import pandas_ta as ta
# Load the TV export data or whatever you saved it as
data = pd.read_csv("path/to/tradingview_data.csv")
data.ta.chop(length=14, append=True) # Example using the choppiness index. Replace with your indicator
# data.drop() # https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.drop.html
print(data.corr()) # Check their correlation Also, @rengel8 would you mind taking a look at this Issue when you have a moment? Kind Regards, |
I'll give it a try. The graph I posted was the version in Pandas_TA and my custom function both run on the same EURUSD data. I just compared the tradingview and prorealcode to make sure I didn't miss any steps since I've never used either of those languages and figured it help prevent mistakes. EDIT: Sadly, it seems that exporting chart data requires a premium account which I don't have. |
Understandable. Thanks for providing links to the TradingView source so I can do it. Unfortunately, I do not have a time frame on the resolution of this Issue. Kind Regards, |
Understandable, the code I posted should be runnable at least, if anyone else with a premium account has the chance. Or can somehow give me a copy of the close data and indicator output. |
@Squigglez2 Thank you very much for providing the function of the EBSW. That made it easy to look into it. With the data, @twopirllc provided, I made a comparison between TradingView and the updated version, which is now very close (despite some bars 4 to 6 decimal places are identical) to TradingView. |
Has the code been updated for this then? |
Hello @Squigglez2, Please test the updated version using by installing the development branch and let us know if it is working better. $ pip install -U git+https://github.com/twopirllc/pandas-ta.git@development Kind Regards, |
I don't know if this goes anywhere really, I tried using the Even Better Sine Wave indicator and noticed the note in the docs about the logic. So I made the function below based off the code in the two links:
The outputs are pretty different so this code could be bugged, either way I think the original code could be changed slightly to not calculate the constants on every loop as they don't change. Sorry if this serves no purpose, I just signed up to post this so I don't know how any of this works.
I realized after posting this graph is pretty ambiguous, but it's the result of both indicator types on 100 days of EURUSD data I have saved to my computer. Blue line is the one in this library and the orange one is my test function.
The text was updated successfully, but these errors were encountered: