-
Notifications
You must be signed in to change notification settings - Fork 25
Description
Firstly, i would like to thanks that you are doing great job and stuff regarding trading
i go through your youtube channel and socials i found your work amazing
i try to run this pattern this will calculate and give dataframe which i attach above and testing on your given dataset it give me this error when i try to look it visually
if __name__ == "__main__":
# read in your ohlc data
ohlc = pd.read_csv("eurusd-4h.csv") # headers must include - open, high, low, close
# Find the head and shoulers pattern
ohlc = find_head_and_shoulders_pattern(ohlc)
ohlc.to_csv('new.csv')
print(ohlc)
# Plot the results
display_chart_pattern(ohlc, pattern="hs")
the error is from plotly lib where something is wrong in placement i try to solve but i can't
Error logs in terminal :
(venv) E:\projects\chart_patterns\chart_patterns>py head_and_shoulders.py
Date open high low close Volume hs_lookback chart_type hs_idx hs_point pivot pivot_pos short_pivot short_pivot_pos
0 04.05.2003 21:00:00.000 1.12354 1.12354 1.12166 1.12274 95533.0976 60 [] [] 0 NaN 0 NaN
1 05.05.2003 01:00:00.000 1.12242 1.12276 1.12067 1.12126 93778.5996 60 [] [] 0 NaN 0 NaN
2 05.05.2003 05:00:00.000 1.12139 1.12255 1.12030 1.12113 90924.6992 60 [] [] 0 NaN 0 NaN
3 05.05.2003 09:00:00.000 1.12092 1.12331 1.12049 1.12174 91254.6992 60 [] [] 0 NaN 0 NaN
4 05.05.2003 13:00:00.000 1.12194 1.12900 1.12130 1.12712 308003.4083 60 [] [] 0 NaN 0 NaN
... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
28855 15.10.2021 01:00:00.000 1.15940 1.16120 1.15938 1.16082 5738.6300 60 [] [] 0 NaN 0 NaN
28856 15.10.2021 05:00:00.000 1.16082 1.16189 1.15995 1.16034 13149.6600 60 [] [] 0 NaN 0 NaN
28857 15.10.2021 09:00:00.000 1.16033 1.16124 1.15892 1.15923 14914.3300 60 [] [] 0 NaN 0 NaN
28858 15.10.2021 13:00:00.000 1.15923 1.16103 1.15893 1.15953 20002.5300 60 [] [] 0 NaN 0 NaN
28859 15.10.2021 17:00:00.000 1.15952 1.16060 1.15933 1.16040 5620.0500 60 [] [] 0 NaN 0 NaN
[28860 rows x 14 columns]
E:\projects\chart_patterns\venv\lib\site-packages\pandas\core\frame.py:5039: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
return super().rename(
E:\projects\chart_patterns\venv\lib\site-packages\pandas\core\frame.py:5039: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
here is the result dataframe save named as new.csv
P.S : i saw test folder havvivng all pattern test.py files it would be great if you save with tests but those files are empty