feat: Add support for Three ATR EMA indicator configuration
This commit is contained in:
parent
55aafdb345
commit
0a4d5c2a5d
@ -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:
|
||||
|
||||
@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@ -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] = {}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user