DualVision AI
- Yardımcı programlar
-
Andres Eduardo Rodriguez Fortunato
I am a software developer and independent quantitative trading researcher with a passion for understanding how markets behave beyond traditional indicators. - Sürüm: 1.24
- Etkinleştirmeler: 10
Overview
DualVision AI is a MetaTrader 5 Expert Advisor for vision-based chart analysis. The user selects a candle range with two vertical lines and runs an AI analysis on demand. DualVision AI builds an optimized candlestick image and normalized OHLC data for that range, then sends them to Claude (Anthropic) or ChatGPT (OpenAI). The model returns a structured signal with trend, local pattern, conflict flag, confidence, take profit, and stop loss.
DualVision AI is an analysis assistant. It does not place orders and it does not replace risk management.
Before you start
Enable WebRequest URLs in MetaTrader 5:
- Open Tools > Options > Expert Advisors.
- Enable Allow WebRequest for listed URL.
- Add these URLs (one per line):
- https://api.anthropic.com — required for Claude
- https://api.openai.com — required for ChatGPT
Attach DualVision AI as an Expert Advisor (not as an indicator). WebRequest is not available from indicators. Algo Trading must be enabled on the chart.
You need your own API key from Anthropic and/or OpenAI. API usage is billed by the provider according to your account.
Chart objects
Vertical lines:
- Start line — beginning of the selected candle range
- End line — end of the selected candle range
Both lines can be dragged. Analysis uses only the candles between Start and End.
After a successful analysis with an approved signal:
- Entry line — last close of the selected range, with confidence and risk/reward label
- Take profit line
- Stop loss line
Left panel:
- Provider name and candle count
- Status / signal / confidence / risk-reward
- Trend, conflict, local pattern, and short cause text
Button:
- Analyze AI — runs one vision request for the current range
How to use
- Allow the provider URLs as described above.
- Attach DualVision AI to a live chart (Expert Advisors).
- Set provider and model, then paste your API key once in Inputs (or use a key file).
- Drag Start and End to the structure you want to study.
- Click Analyze AI.
- Review Entry / TP / SL and the panel before making any trading decision.
Useful ranges are typically one clear structure. Very short ranges give little context; very wide ranges increase tokens and cost.
How the AI request works
For each Analyze call, DualVision AI sends:
- A compressed candlestick PNG of the selected range (low file weight)
- Normalized OHLC values (0 = window minimum, 1 = window maximum) with 6 decimal precision
- Real price anchors: period, last close, window min, window max
The model answers through a forced structured schema (tool/function output), so the result fields stay consistent: trend, localPattern, conflict, signal, tpPrice, slPrice, confidence, cause.
Stable instructions live in the system prompt. Variable data (anchors + OHLC + image) live in the user message. This keeps requests cleaner and reduces malformed JSON.
Signal filters
- Signal — BUY, SELL, or NONE
- Conflict — true when the signal goes against the window trend (for example SELL while trend is UP)
- Min confidence (conflicts) — conflicting signals are approved only if confidence is at or above this value (default 0.75)
- Low confidence mark — signals below this value are still shown when approved, but marked as LOW (default 0.55)
Entry, TP, and SL lines are drawn only when the signal is approved by those rules.
Providers and models
- Claude (Anthropic) — default. Example model: claude-sonnet-4-6
- ChatGPT (OpenAI) — example model: gpt-5.4
In practice, ChatGPT often returns shorter explanations and responds faster. Claude often writes a longer cause text and may take longer to answer. Quality and confidence can differ even on the same range; treat both as analysis assistants.
Typical token use (reference)
Measured on DualVision AI with optimized image + normalized OHLC. Values vary with symbol digits, image width, and model verbosity.
Claude · claude-sonnet-4-6
- 100 candles — input ≈ 4835 · output ≈ 326
- 150 candles — input ≈ 6555 · output ≈ 308
- 200 candles — input ≈ 8147 · output ≈ 333
ChatGPT · gpt-5.4
- 100 candles — input ≈ 3963 · output ≈ 138
- 150 candles — input ≈ 5579 · output ≈ 113
- 200 candles — input ≈ 7177 · output ≈ 119
Token growth is not strictly linear with candle count because image width is capped. Provider billing uses each provider’s current price per million tokens.
API key handling
- Paste the key once in Inputs and confirm. DualVision AI saves it under Common\Files\VisionClaude\ for reuse.
- Default files:
- Claude — api_key_anthropic.txt
- OpenAI — api_key_openai.txt
- After the file is saved, clear the API Key field in Inputs and press OK so the key is not visible in the settings dialog.
- New charts with an empty key field load the saved file automatically.
MetaTrader cannot mask input fields as passwords. Keeping the key in a local file is the practical approach for chart-to-chart reuse.
Inputs
- AI Provider — Claude (Anthropic) or OpenAI (ChatGPT)
- API Key — optional paste field; leave empty to load from file
- API Key file — optional custom path under Common Files; empty uses the provider default file
- Model ID — provider model name
- Initial period — candles used for the first Start/End placement
- Min confidence — minimum confidence to approve a conflicting signal
- Low confidence mark — threshold used to mark approved signals as LOW
- Timeout — WebRequest timeout in milliseconds
- Max tokens — maximum generation tokens for the provider call
- Temperature — sampling temperature (0 recommended for more stable results)
- Save debug files — optional PNG / OHLC / raw response dump under MQL5\Files\VisionClaude\
- Clean abnormal gaps — optional: close outlier open gaps (for example strong Monday/session gaps) before building the image and OHLC; normal small gaps are kept
- Gap percentile — threshold used when cleaning abnormal gaps (default 0.925)
- Color settings for vertical lines, BUY/SELL, SL, conflict, and low-confidence accents
Notes
DualVision AI is intended for chart analysis with external AI providers. Results depend on the selected range, image, OHLC, model, and provider policy. Market conditions change. Always apply your own confirmation rules and risk controls before making trading decisions.
This product does not include API credits. You are responsible for provider account setup, billing, and URL permissions in MetaTrader 5.
