Gemini AI Trading Bot FREE: MetaTrader 5 EA powered by Google Gemini API

347 lượt xem - Posted on
Gemini AI Bot





</p> <div id="ez-toc-container" class="ez-toc-v2_0_85 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction"> <div class="ez-toc-title-container"> <p class="ez-toc-title" style="cursor:inherit">Table of Contents</p> <span class="ez-toc-title-toggle"><a href="#" class="ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle" aria-label="Toggle Table of Content"><span class="ez-toc-js-icon-con"><span class=""><span class="eztoc-hide" style="display:none;">Toggle</span><span class="ez-toc-icon-toggle-span"><svg style="fill: #999;color:#999" xmlns="http://www.w3.org/2000/svg" class="list-377408" width="20px" height="20px" viewBox="0 0 24 24" fill="none"><path d="M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z" fill="currentColor"></path></svg><svg style="fill: #999;color:#999" class="arrow-unsorted-368013" xmlns="http://www.w3.org/2000/svg" width="10px" height="10px" viewBox="0 0 24 24" version="1.2" baseProfile="tiny"><path d="M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z"/></svg></span></span></span></a></span></div> <nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class="ez-toc-link ez-toc-heading-1" href="#Gemini_AI_Trading_Bot_%E2%80%93_User_Manual" >Gemini AI Trading Bot – User Manual</a></li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class="ez-toc-link ez-toc-heading-2" href="#21_Multi-Timeframe_MTF_Data_Ingestion" >2.1 Multi-Timeframe (MTF) Data Ingestion</a></li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class="ez-toc-link ez-toc-heading-3" href="#22_Smart_Reversal_Filter" >2.2 Smart Reversal Filter</a></li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class="ez-toc-link ez-toc-heading-4" href="#23_Dual-Chain_Dollar_Cost_Averaging_DCA_Hedge_Grid" >2.3 Dual-Chain Dollar Cost Averaging (DCA) Hedge Grid</a></li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class="ez-toc-link ez-toc-heading-5" href="#41_API_Configuration_Gemini_AI_Trading_Bot" >4.1 API Configuration: Gemini AI Trading Bot</a></li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class="ez-toc-link ez-toc-heading-6" href="#42_Trading_Strategy_Multi-Timeframe_Settings" >4.2 Trading Strategy & Multi-Timeframe Settings</a></li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class="ez-toc-link ez-toc-heading-7" href="#43_Execution_DCA_Parameters_Gemini_AI_Trading_Bot" >4.3 Execution & DCA Parameters: Gemini AI Trading Bot</a></li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class="ez-toc-link ez-toc-heading-8" href="#51_Pre-Flight_Safety_Inspections" >5.1 Pre-Flight Safety Inspections</a></li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class="ez-toc-link ez-toc-heading-9" href="#52_Top-Down_Analysis_Protocol" >5.2 Top-Down Analysis Protocol</a></li></ul></nav></div> <h2><span class="ez-toc-section" id="Gemini_AI_Trading_Bot_%E2%80%93_User_Manual"></span>Gemini AI Trading Bot – User Manual<span class="ez-toc-section-end"></span></h2> <p>


Gemini AI Trading Bot
Expert Advisor v1.00 – MetaTrader 5 User Manual
Developer: EA GALAXY
Website: https://eagalaxy.net
Engine: Google Gemini API (gemini-2.5)
Document Version: 1.0.1 (Updated)
Date: June 2026
Recommended Partner Broker
Register Exness Account:
Click Here to Register

1. Introduction

The Gemini AI Trading Bot v1.00 is an advanced hybrid Expert Advisor (EA) developed for the MetaTrader 5 platform. By bridging the powerful structural trading capabilities of MQL5 with cutting-edge Large Language Models via the Google Gemini API, this EA acts as an autonomous AI-driven market analyst and execution system.

Unlike traditional algorithmic bots that rely solely on rigid indicator math, this EA exports deep multi-timeframe market data into structured JSON objects, broadcasts them directly to Google Gemini, and receives an institutional-grade, natural-language price action analysis coupled with explicit programmatic trading instructions (Buy, Sell, Close, or Modify Orders).

2. Core Functional Architecture

The bot utilizes a sophisticated blend of AI reasoning and systemic safety measures to scan, filter, and execute market setups:

2.1 Multi-Timeframe (MTF) Data Ingestion

During each analysis cycle, the EA extracts an array of Open-High-Low-Close-Volume (OHLCV) candle definitions across three separate timeframes to establish a strict top-down technical approach:

  • H4 Timeframe: Establishes the primary market bias, macro structure, and institutional supply/demand zones.
  • H1 Timeframe: Detects medium-term swing alignment and serves as directional confirmation.
  • M15 Timeframe: Pinpoints the localized execution environment, micro liquidity sweeps, and immediate candlestick entries.

2.2 Smart Reversal Filter

To insulate your capital against aggressive stop-hunting and over-extended market cycles (especially prevalent on volatile instruments like Gold – XAUUSD), the EA embeds a native MQL5 Smart Reversal Filter. Before confirming an AI trade entry, it performs an algorithmic validation:

  • Impulse Leg Exhaustion: Measures the momentum of the recent impulse move over a specified lookback period against the Average True Range (ATR). A movement exceeding the defined threshold signifies an exhausted leg.
  • Wick Rejection Ratio: Analyzes the closest closed candle’s structural geometry. It checks if the lower wick (for Buy setups) or upper wick (for Sell setups) exceeds a specific percentage of the total candle range, filtering out generic breakouts.

2.3 Dual-Chain Dollar Cost Averaging (DCA) Hedge Grid

The EA features three flexible entry models, managing risk independently across parallel sequences via distinct tracking tokens (Magic Numbers):

  • Single Shot: Executes a single order profile and enters a standby state until the trade is fully resolved via SL or TP before seeking the next entry.
  • DCA by Step (Auto): Programmatically executes structural add-on orders based on a strict price-step model when an active trade runs into temporary drawdowns, operating entirely offline without demanding recurring AI confirmation calls.
  • DCA Step + AI Confirmation: Merges grid mathematics with LLM oversight. Add-on grid tiers will only activate if the latest live Gemini API direction aligns with the running grid chain’s profile.
Hedge & Break-Even Grid Management

When grid structures are deployed, the EA automatically aggregates position metrics to recalculate an unified mathematical break-even point, projecting the chain’s overall Take Profit (TP) parameters at an explicit point distance away from the net volume average.

3. Step-by-Step Google Gemini API Key Setup

To enable communication between MetaTrader 5 and the Google Gemini models, you must obtain a valid API key and authorize the endpoint within your MT5 Terminal settings.

  1. Access Google AI Studio: Open your web browser and navigate to the official Google AI Studio developer portal at https://aistudio.google.com/.
  2. Authenticate with Google Account: Sign in using your standard Google or Google Workspace credentials. Review and accept the platform terms of service.
  3. Generate the API Key: Click on the prominent “Get API Key” button located in the sidebar or top navigation header. Select “Create API Key”, then allocate the key to either a new or existing Google Cloud Project.
  4. Securely Copy Your Key: A modal window will display a unique alphanumeric string beginning with AIzaSy.... Copy this string immediately and store it securely. Treat this key like a private financial password; anyone possessing it can utilize your processing budget.
  5. Configure MetaTrader 5 Security Options: Launch your MT5 Terminal. Navigate to the top menu and select Tools → Options (or press Ctrl + O). Open the Expert Advisors tab.
  6. Whitelist the Gemini Endpoint: Check the box labeled “Allow WebRequest for listed URL:”. Double-click the empty addition row and precisely paste the following endpoint address:
    https://generativelanguage.googleapis.com
    Click OK to save the configuration changes.
Critical Technical Requirement

If you skip whitelisting this URL inside the MetaTrader 5 options, the terminal’s security engine will block all outgoing WebRequest packets, generating an execution error code 4014 (WebRequest internal error) in the Experts log window.

4. Parameter Reference Guide

The input parameters control the operational logic, risk profiles, and communication configurations of the EA:

4.1 API Configuration: Gemini AI Trading Bot

Parameter Name Default Value Functional Description
InpApiKey “” Paste your alphanumeric Google Gemini API key here (starts with AIzaSy).
InpModel MODEL_FLASH Selects the processing core model: gemini-2.5-flash, gemini-2.5-pro, or gemini-2.5-flash-lite.
InpThinkingBudget 0 Allocates thinking tokens for models supporting reasoning capabilities. Set to 0 to disable, or -1 for dynamic budgeting.
InpHttpTimeoutMs 20000 Maximum timeout window in milliseconds for the WebRequest API response.

4.2 Trading Strategy & Multi-Timeframe Settings

Parameter Name Default Value Functional Description
InpStrategyType STRAT_TREND The structural ruleset context passed to the AI: Trend Following, Scalping, Swing Trading, etc.
InpRiskLevel RISK_CONSERVATIVE Configures the risk profile: Conservative, Moderate, or Aggressive.
InpCandleCountH4 20 Total historical candles extracted from the H4 timeframe to analyze primary trend bias.
InpCandleCountH1 20 Total historical candles extracted from the H1 timeframe for structural confirmation.
InpCandleCountM15 30 Total historical candles extracted from the M15 timeframe for entry optimization.

4.3 Execution & DCA Parameters: Gemini AI Trading Bot

Parameter Name Default Value Functional Description
InpEnableAutoTrade true Enables or disables order execution.
InpAutoUpdateMinutes 15 The execution frequency (in minutes) for recurring AI market evaluation cycles.
InpDefaultLot 0.01 Initial volume sizing allocation for baseline positions.
InpEntryMode ENTRY_SINGLE_SHOT Determines entry grid logic: Single Shot, DCA by Step (auto), or DCA Step + AI Confirm.
InpDcaStepPoints 3000 The explicit minimum spacing distance measured in points required between active positions.
InpHedgeTpPoints 2000 Take Profit offset distance in points applied to a grid sequence relative to its break-even point.

5. Operational Workflow & Core Rules

5.1 Pre-Flight Safety Inspections

Before spending API resources, local verification processes validate current market conditions. The cycle immediately halts if the real-time spread exceeds InpMaxSpread, or if the current account drawdown crosses your InpMaxDailyLossMoney circuit breaker.

5.2 Top-Down Analysis Protocol

  1. Macro Identification: The model maps out underlying structures on the H4 data, identifying the core trend.
  2. Intermediate Alignment Check: The model moves down to the H1 context to verify if medium-term structural swings align with the broader H4 bias.
  3. Localized Entry Execution: The model evaluates the lower M15 structure exclusively to refine structural entries.

6. Charts Display & Graphical Interface: Gemini AI Trading Bot

  • Header Control Status: Displays live operational readouts (e.g., Ready, Analyzing..., OK).
  • Account Performance Monitor: Tracks metrics like total running tickets relative to your caps, alongside real-time calculations tracking net daily currency returns.
  • Interactive Synchronization Engine: Features an embedded “UPDATE” button. Clicking this element overrides the automated timer grid, capturing an immediate market snapshot.

Dowloads Gemini AI Trading Bot

https://t.me/boteafxdotcom/2/1358
More EA: https://eagalaxy.net/ea-bot/

Rebate Backcom

Register, trade, and earn your cashback at: https://one.exnessonelink.com/a/zhd53zgj4o