Created
August 23, 2020 22:42
-
-
Save evanaze/70a68b58dea0c954b9c8c28f991d48cd to your computer and use it in GitHub Desktop.
Collecting all instances of large pending transactions, and group transactions close together as a single instance
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
i = 0 # initializing i | |
win_size = 7 # the window size after a large txn | |
windows = [] # an array for saving our windows | |
# iterate through the ohlcv data | |
while i <= len(ohlcv): | |
# if the transaction is a large transaction | |
if ohlcv.iloc[i, -1] == True: | |
# save the txn and the minutes after | |
windows.append(ohlcv.iloc[i:i+win_size]) | |
# increment the window to move past the current frame | |
i += win_size - 1 | |
# increment the window normally | |
i += 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment