diff --git a/src/main.py b/src/main.py index ee6768a..bd2dc50 100644 --- a/src/main.py +++ b/src/main.py @@ -7,6 +7,7 @@ from screener.i_canslim import check_institutional_sponsorship from screener.csv_appender import append_scores_to_csv from screener.screeners import SCREENERS from screener.user_input import get_user_screener_selection +from indicators.three_atr_ema import ThreeATREMAIndicator def get_float_input(prompt: str) -> float: while True: diff --git a/src/screener/screeners.py b/src/screener/screeners.py index 25084f7..6caa088 100644 --- a/src/screener/screeners.py +++ b/src/screener/screeners.py @@ -14,6 +14,7 @@ SCREENERS = { }, "Technical": { "SMA_Cross_Score": "Checks if short-term SMA crosses above long-term SMA", - "RSI_Score": "Evaluates RSI to identify overbought/oversold conditions" + "RSI_Score": "Evaluates RSI to identify overbought/oversold conditions", + "Three_ATR_EMA_Score": "Analyzes price action using ATR and EMA bands" } } diff --git a/src/screener/user_input.py b/src/screener/user_input.py index 9a39e7c..7a191b8 100644 --- a/src/screener/user_input.py +++ b/src/screener/user_input.py @@ -21,6 +21,32 @@ def get_user_screener_selection(): for category in selected_categories: print(f"\nCategory: {category}") use_defaults = input(f"Use default settings for {category}? (y/n): ").strip().lower() + + # Add Three_ATR_EMA_Score to Fundamentals or Technical categories + if category == "Fundamentals": + if "Three_ATR_EMA_Score" not in selected_screeners[category]: + selected_screeners[category]["Three_ATR_EMA_Score"] = "default" + else: + use_three_atr_ema = input(f"Would you like to use Three ATR EMA as a screener? (y/n): ").strip().lower() + if use_three_atr_ema == 'y': + custom_value = input(f"Three_ATR_EMA_Score - Enter custom threshold or press Enter to use default: ").strip() + selected_screeners[category]["Three_ATR_EMA_Score"] = float(custom_value) if custom_value else "default" + elif use_three_atr_ema == 'n': + # Remove Three_ATR_EMA_Score if they don't want it + if "Three_ATR_EMA_Score" in selected_screeners[category]: + del selected_screeners[category]["Three_ATR_EMA_Score"] + elif category == "Technical": + if "Three_ATR_EMA_Score" not in selected_screeners[category]: + selected_screeners[category]["Three_ATR_EMA_Score"] = "default" + else: + use_three_atr_ema = input(f"Would you like to use Three ATR EMA as a screener? (y/n): ").strip().lower() + if use_three_atr_ema == 'y': + custom_value = input(f"Three_ATR_EMA_Score - Enter custom threshold or press Enter to use default: ").strip() + selected_screeners[category]["Three_ATR_EMA_Score"] = float(custom_value) if custom_value else "default" + elif use_three_atr_ema == 'n': + # Remove Three_ATR_EMA_Score if they don't want it + if "Three_ATR_EMA_Score" in selected_screeners[category]: + del selected_screeners[category]["Three_ATR_EMA_Score"] selected_screeners[category] = {}