Skip to content

ramintkml/Forex_Advisor

Repository files navigation

Forex_Advisor

Overview

Forex_Advisor is a Python-based hybrid trading assistant designed for the Forex market, specifically optimized for EURUSD. It combines technical indicators, multi-timeframe analysis, sentiment from news and retail traders, and visual pattern analysis using VLM (Visual Language Models) to provide buy, sell, or neutral signals.

The project is modular, making it easy to extend and adapt to other currency pairs or assets like Gold (XAUUSD).

This project is in its very early stages

Features

  • Technical Indicators: RSI, MACD, EMA crossovers, and ATR for volatility. ✅ Completed
  • Multi-Timeframe Analysis: Incorporates higher timeframe trends for more reliable signals. ✅ Completed
  • News Sentiment Analysis: Analyzes Forex news to factor macroeconomic and geopolitical events. 🔄 To be enhanced with LLM
  • Retail Sentiment: Integrates trader positioning data from sources like Myfxbook or IG. 🔄 Incomplete
  • VLM Analysis: Uses Visual Language Models for chart pattern detection and trend insights. 🔄 Pending integration
  • Fusion Layer: Combines all indicators and signals into a final Buy/Sell/Neutral decision. ✅ Completed

Project Structure

Forex_Advisor/
│
├── data/
│   ├── charts/               # Chart image data for VLM
│   ├── processed/            # Preprocessed market data
│   └── raw/                  # Raw OHLCV data files
│
├── fusion/
│   └── fusion_engine.py      # Combines signals from all layers
│
├── indicators/
│   └── technicals.py         # Computes RSI, MACD, EMA, ATR and other indicators
│
├── news_analysis/
│   ├── scraper.py            # Collects news data
│   └── sentiment.py          # Analyzes news sentiment (to be extended with LLM)
│
├── sentiment/
│   └── retail_sentiment.py   # Integrates trader positioning data
│
├── utils/
│   ├── data_loader.py        # Loads and prepares datasets
│   └── resample.py           # Resamples data into different timeframes
│
├── vlm_analysis/
│   └── chart_analyser.py     # Visual analysis of charts using VLM
│
└── requirements.txt          # Required Python libraries

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/Forex_Advisor.git
cd Forex_Advisor
  1. Install dependencies:
pip install -r requirements.txt

Usage

  1. Prepare your EURUSD CSV data in data/eurusd_data.csv with the following columns: Date, Open, High, Low, Close, Volume.
  2. Run the main script:
python main.py
  1. The output will display the final signal for EURUSD (Buy/Sell/Neutral) based on all integrated layers.

Remaining Tasks

  1. Add VLM for visual analysis → integrate a visual language model for automatic chart pattern detection.
  2. Add LLM for news analysis → connect a large language model to interpret news headlines and economic releases.
  3. Complete retail_sentiment analysis → fetch and integrate real trader positioning data from external APIs.
  4. Add LLM for human interaction → enable natural language interaction with the trading assistant.
  5. Adjust for assets like Gold (XAUUSD) → extend logic and weighting system for commodities and other Forex pairs.

Extending the System

  • Adding other pairs or assets: Replace or add CSV data for other symbols and adapt input parameters accordingly.
  • VLM Integration: Connect your preferred Visual Language Model API to vlm.py for automated chart analysis.
  • News API Integration: Fetch live news feeds and sentiment data to sentiment.py for real-time updates.
  • Weight Adjustment: Modify the scoring logic in fusion.py to tweak layer priorities based on your strategy.

Contributing

Feel free to fork the repository and submit pull requests. For major changes, please open an issue first to discuss what you would like to change.

License

This project is open-source and available under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published