Created
May 4, 2021 10:14
-
-
Save joeng03/f24a5ee76fea9ec4f379010c4ef1e195 to your computer and use it in GitHub Desktop.
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
local_min_idx=argrelextrema(prices_low,np.less)[0] | |
local_max_idx=argrelextrema(prices_high,np.greater)[0] | |
local_min_idx=np.array(local_min_idx) | |
local_max_idx=np.array(local_max_idx) | |
local_min=[] | |
local_max=[] | |
for loc in local_min_idx: | |
local_min.append(prices_low[loc]) | |
for loc in local_max_idx: | |
local_max.append(prices_high[loc]) | |
local_min=np.array(local_min) | |
local_max=np.array(local_max) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment