⭐ ajeet Posted 55 minutes ago Report Posted 55 minutes ago Introducing BARFI: My Fully Automated, Multimodal AI Trading System for XAUUSD (Qwen 2.5/3 + Gemini 3.1 + NT8/MT5) Hey everyone, I wanted to share a project I've been building and backtesting over the last few months. It's now fully automated from market analysis to trade execution. I call it BARFI (Bullion Analytics Research & Forecasting Intelligence). The core goal of BARFI is to solve a massive problem in algorithmic trading: combining raw data (OHLCV) with visual context (Footprint/Order Flow charts) to understand market regimes. Here is exactly how the architecture works, from ingestion to execution. 1. The Data Foundation & Local FineTuning Before automating live data, I built a heavy training dataset to teach a local Small Language Model (SLM) what specific market regimes look like: The Dataset: 1,000+ intraday 5-minute order flow footprint charts and over 1 million rows of historical OHLCV data in CSV format. The Local Brain: I used this data to train/finetune an open source Qwen 2.5 model. Its sole job is pattern matching n recognizing current market regimes by matching live setups against my historical database. 2. The Hourly Ingestion Pipeline Every hour, on the hour, a dual platform bridge triggers: NinjaTrader 8 (NT8): Automatically takes and saves a screenshot of the live 5-minute footprint/order flow chart. MetaTrader 5 (MT5): Automatically exports the last 500 rows of 5min OHLCV data. 3. Layer 1: Local Screening (The SLM) Instead of throwing raw data blindly at an expensive cloud API, BARFI uses the local finetuned Qwen 2.5 model first. The local SLM ingests the new hourly data. It scans the historical database to find the 5 most mathematically and visually matched historical scenarios. It compiles these 5 scenarios into an initial structured analysis report. 4. Layer 2: Deep Reasoning (Qwen 3-Max-Thinking) Once the local report is ready, BARFI calls the Qwen 3-Max-Thinking API. This layer handles the heavy cognitive lifting. Inputs sent: The live 5-minute footprint screenshot + the 500 rows of OHLCV data + the local SLM’s 5 scenario matching report. The Output: Qwen 3-Max conducts an in-depth reasoning analysis, predicts the trend for the upcoming 1 hour, and establishes exact, decisive price levels (Support, Resistance, Invalidation). 5. Layer 3: Agentic Execution & Management (Gemini 3.1 Flash Lite) Once Qwen 3-Max outputs the trend and levels, an agentic AI workflow takes over utilizing Gemini 3.1 Flash Lite for fast, low-latency execution: Broadcast: It formats the trend and levels and instantly sends a broadcast to a private Telegram channel via API. Execution: It parses the decisive levels, calculates risk management metrics (position sizing, risk/reward ratio), and triggers a live trade directly into MT5. Trade Management: Gemini doesn't just "fire and forget." The agent stays active, watching the trade in real-time on MT5 until either the Target Profit or Stop Loss is met. Why This Hybrid Approach Works What I love most about this setup is the efficiency vs. capability balance. Running everything through a massive thinking model every hour is slow and expensive. By utilizing a highly specialized, locally trained model to do the initial "heavy lifting" filter, the cloud model only has to reason across highly curated, relevant data. So far, the multimodal approach (giving the AI both the visual footprint chart and the hard numbers of the OHLCV) has vastly outperformed my old numbers, only models, especially on XAUUSD where volume profile and order flow shifts dictate the intraday trend. Would love to hear your thoughts on this multi model architecture! kimsam 1
⭐ ajeet Posted 44 minutes ago Author Report Posted 44 minutes ago you can evaluate decisions by Qwen-3 here. https://t.me/passion_trades (Don't go by timing mentioned in message, just follow time of message)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now