Attempting to plot tick chart gives error <= not supported between instances of 'str' and 'float' #537
Replies: 1 comment
-
|
For one, this is not the code you're running (as it has syntax errors, and would fail there before trying to plot). Secondly, open, close, high and low needs to be numbers. Not strings. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I downloaded tick data of a weeks worth from dukascopy
After reading the pandas
I did
week_df = pd.concat([df0,df1,df2,df3,df4,df5])
week_df['Open'] = week_df['Bid']
week_df['Close'] = week_df['Bid']
week_df['High'] = week_df['Bid']
week_df['Low'] = week_df['Bid']
week_df = week_df.rename(columns=['Local time':'Date'])
week_df['Date'] = pd.to_datetime(week_df['Date']).view('int64')
ax=fplt.create_plot('tick chart',rows=1)
fplt.candlestick_ochl(week_df[['Date','Close','Open','High','Low']],ax=ax)
fplt.show()
it returns <= not supported between instances of 'str' and 'float'
when comparing
is_up = df[opencol] <= [closecol]
How do you realistically plot a tick chart in this case?
Beta Was this translation helpful? Give feedback.
All reactions