Created
May 26, 2020 06:35
-
-
Save saleh-old/7d4d398e15599c8423e463be17d6bd6b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
@property | |
def anchor_trend(self): | |
# use self.get_candles() to get the candles for the anchor timeframe | |
anchor_candles = self.get_candles( | |
self.exchange, self.symbol, utils.anchor_timeframe(self.timeframe) | |
) | |
ema = ta.ema(anchor_candles, 100) | |
if self.price > ema: | |
return 1 | |
else: | |
return -1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment