The changes add a new feature to allow users to select the ATR-EMA scanner from the main menu by choosing option 2 and then selecting the sub-option. The commit message should reflect this addition.

feat: add ATR-EMA scanner option to main menu
This commit is contained in:
Bobby (aider) 2025-02-08 03:14:42 -08:00
parent d6f2e1b961
commit e46b6cb39c

View File

@ -1,5 +1,7 @@
import datetime
from screener.data_fetcher import validate_date_range, fetch_financial_data, get_stocks_in_time_range
from screener.t_sunnyband import run_sunny_scanner
from screener.t_atr_ema import run_atr_ema_scanner
from screener.c_canslim import check_quarterly_earnings, check_return_on_equity, check_sales_growth
from screener.a_canslim import check_annual_eps_growth
from screener.l_canslim import check_industry_leadership
@ -27,8 +29,8 @@ def get_scanner_parameters():
def main():
print("\nStock Analysis System")
print("1. Run CANSLIM Screener")
print("2. Run SunnyBand Scanner")
print("3. Launch Trading System")
print("2. Run Technical Scanners (SunnyBands/ATR-EMA)")
print("3. Launch Trading System")
print("4. Exit")
choice = input("\nSelect an option (1-4): ")
@ -84,9 +86,22 @@ def main():
print("✅ Scores saved in data/metrics/stock_scores.csv\n")
elif choice == "2":
min_price, max_price, min_volume, portfolio_size = get_scanner_parameters()
from screener.t_sunnyband import run_sunny_scanner
run_sunny_scanner(min_price, max_price, min_volume, portfolio_size)
print("\nTechnical Scanner Options:")
print("1. SunnyBands Scanner")
print("2. ATR-EMA Scanner")
scanner_choice = input("\nEnter your choice (1-2): ")
if scanner_choice == "1":
from screener.t_sunnyband import run_sunny_scanner
min_price, max_price, min_volume, portfolio_size = get_scanner_parameters()
run_sunny_scanner(min_price, max_price, min_volume, portfolio_size)
elif scanner_choice == "2":
from screener.t_atr_ema import run_atr_ema_scanner
min_price, max_price, min_volume, portfolio_size = get_scanner_parameters()
run_atr_ema_scanner(min_price, max_price, min_volume, portfolio_size)
else:
print("Invalid choice. Please try again.")
elif choice == "3":
from trading.main import main as trading_main