tradingview_screener.util
1from __future__ import annotations 2 3 4# see issue: https://github.com/shner-elmo/TradingView-Screener/issues/12 5def format_technical_rating(rating: float) -> str: 6 if rating >= 0.5: 7 return 'Strong Buy' 8 elif rating >= 0.1: 9 return 'Buy' 10 elif rating >= -0.1: 11 return 'Neutral' 12 elif rating >= -0.5: 13 return 'Sell' 14 # elif x >= -0.1: 15 else: 16 return 'Strong Sell'
def
format_technical_rating(rating: float) -> str: