File size: 2,655 Bytes
99bf63f
b009c0a
99bf63f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b009c0a
 
 
99bf63f
b009c0a
99bf63f
b009c0a
99bf63f
b009c0a
99bf63f
b009c0a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
99bf63f
b009c0a
 
 
99bf63f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# utils/prompts.py

def create_analysis_prompt(patterns, indicators, expertise_level="Novice"):
    """Create the analysis prompt template based on user expertise"""
    
    expertise_adjustments = {
        "Novice": {
            "intro": "Explain in simple, easy-to-understand terms with minimal technical jargon.",
            "technical_depth": "Focus on basic patterns and clear explanations.",
            "language": "Use everyday language and explain any technical terms."
        },
        "Intermediate": {
            "intro": "Provide a balanced analysis with moderate technical detail.",
            "technical_depth": "Include both basic and advanced patterns with brief explanations.",
            "language": "Use a mix of technical and simple terms, explaining complex concepts."
        },
        "Expert": {
            "intro": "Provide detailed technical analysis with advanced concepts.",
            "technical_depth": "Include complex patterns and sophisticated analysis.",
            "language": "Use full technical terminology and advanced trading concepts."
        }
    }

    adj = expertise_adjustments[expertise_level]
    
    prompt = f"""You are an expert financial analyst. {adj['intro']}
    Please analyze this financial chart and provide insights in the following structured format:

    1. VISUAL ANALYSIS
    - First identify the type of chart (candlestick, line, OHLC, area, etc.)
    - Identify and describe the main trend ({adj['technical_depth']})
    - Note key price levels visible in the chart
    - Describe any significant patterns: {', '.join(patterns) if patterns else 'all visible patterns'}
    - Comment on volume trends if visible
    - Analyze these technical indicators: {', '.join(indicators) if indicators else 'visible indicators'}

    2. TECHNICAL INTERPRETATION ({adj['language']})
    - Current market structure and trend strength
    - Key support and resistance levels with price points
    - Any visible divergences or convergences
    - Pattern reliability assessment

    3. RISK ANALYSIS
    - Potential risk levels
    - Risk/reward scenarios
    - Warning signs or red flags
    - Market context considerations

    4. ACTIONABLE INSIGHTS
    - Potential trading scenarios
    - Key price targets
    - Suggested stop-loss levels
    - Timeframe considerations

    5. SIMPLIFIED EXPLANATION
    {'Provide a basic summary in simple terms for reference.' if expertise_level == 'Expert' else 'Provide a 2-3 sentence summary in simple terms for novice traders.'}

    IMPORTANT: Clearly mark this as AI-generated analysis for informational purposes only.
    """
    return prompt