⭐ ajeet Posted May 20 Report Posted May 20 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, ⭐ option trader, KJs and 4 others 6 1
⭐ ajeet Posted May 20 Author Report Posted May 20 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) ⭐ goldeneagle1 1
trader88 Posted May 21 Report Posted May 21 T Quote This looks interesting. Do you have any stats about how reliable your forecasting system is (e.g win rate, profit factor, DD)? Gretta 1
⭐ ajeet Posted yesterday at 04:08 PM Author Report Posted yesterday at 04:08 PM In machine learning and AI development, predictive baselines often begin at a coin flip level (50%). Model successfully improved upon this, achieving a 57% directional accuracy rate. To further optimize performance, I integrated failure level logic to trigger opposing trades when an initial prediction invalidates. Additionally, as a risk mitigation safeguard, trades are not executed solely on predictive signals. Instead, execution relies on a 1-minute chart indicator that tracks divergence for precise entry points, placing the stop-loss at the most recent swing high or low. The end-to-end management of this trade setup is automated via Gemini.
⭐ FFRT Posted 22 hours ago Report Posted 22 hours ago (edited) where can i read and learn on my own for End of Day data, i have recently moved to python and just assembling the data and doing basic scanning work. no ML and output is just based on my discretionary candle pattern and closing strength . Nothing is on cloud, all on local machine Edited 22 hours ago by FFRT
⭐ ajeet Posted 9 hours ago Author Report Posted 9 hours ago 13 hours ago, FFRT said: where can i read and learn on my own for End of Day data, i have recently moved to python and just assembling the data and doing basic scanning work. no ML and output is just based on my discretionary candle pattern and closing strength . Nothing is on cloud, all on local machine This one is best to start: https://pythonfintech.com/
imfm Posted 1 hour ago Report Posted 1 hour ago You have to add some powerful indicators without lag, clear liquidity and volume readings, and you'll have a very good system.
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