Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions xiang.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,11 @@ def obtain_hist_data(tws, callback):
0,
1)
time.sleep(2)
data = pd.DataFrame(callback.historical_Data,
columns = ["reqId", "date", "open",
"high", "low", "close",
"volume", "count", "WAP",
"hasGaps"])
return data
return pd.DataFrame(callback.historical_Data,
columns = ["reqId", "date", "open",
"high", "low", "close",
"volume", "count", "WAP",
"hasGaps"])
Comment on lines -39 to +43
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function obtain_hist_data refactored with the following changes:

  • Inline variable that is only used once



def SMA(data, short_length, long_length):
Expand Down