=============================================================================== ULTRA AI POWER MT5 - PARAMETER GUIDE =============================================================================== This document explains every input parameter of the EA: what it does, how to configure it, and the recommended values per instrument. Please read this guide before changing any parameters. =============================================================================== 1. AI SETTINGS =============================================================================== 1.1 InpGroqKey ------------------------------------------------------------------------------- Purpose : API key for connecting to the Groq AI service. The EA uses this key to send technical indicator data to the Llama 3.3 70B model and receive BUY/SELL/HOLD signals in return. Get it : console.groq.com > Sign Up > API Keys > Create API Key Format : Starts with gsk_, approximately 56 characters Cost : Free. Daily limit of ~14,400 requests. Important: This key is REQUIRED. Without it, AI analysis will not work and the panel will only display raw indicator values. Do not share your key with anyone. 1.2 InpGeminiKey ------------------------------------------------------------------------------- Purpose : Backup API key for Google Gemini AI service. When the Groq server is unresponsive or returns an error, the EA automatically switches to Gemini (fallback). Get it : aistudio.google.com > Get API Key > Create API Key Format : Starts with AIzaSy, approximately 39 characters Cost : Free. Daily limit of 1,000 requests. Important: Optional but strongly recommended. Groq can occasionally become overloaded. With a Gemini key, the EA never runs without AI coverage. 1.3 InpAIInterval ------------------------------------------------------------------------------- Purpose : How often (in seconds) the AI analysis is refreshed. Each refresh consumes one API call. Default : 120 (2 minutes) Range : 30 - 600 Unit : Seconds Low value (30-60): - More frequent AI updates, faster signal changes - Higher daily API usage (e.g. 60s = ~1,440 calls/day) - Suitable for scalping or short timeframes (M5-M15) High value (180-600): - Lower API usage, more stable signals - Sufficient for longer timeframe analysis (H1-H4) - Saves quota when running the EA on multiple charts Recommended: Scalping (M5-M15) : 60-90 Intraday (M30-H1) : 90-120 Swing (H4-D1) : 180-300 1.4 InpAIEnabled ------------------------------------------------------------------------------- Purpose : Turns AI analysis on or off entirely. When set to false, the EA works as a technical indicator panel only and makes no API calls. Default : true Values : true / false Usage : Set to false if you have no internet connection or only want to monitor indicator values. You can also use false to test the EA before entering your API keys. =============================================================================== 2. TRADING SETTINGS =============================================================================== 2.1 InpTradeEnabled ------------------------------------------------------------------------------- Purpose : Enables or disables automatic order execution. When false, the EA works as a DISPLAY ONLY dashboard and sends no trade requests. When true, the EA opens and manages positions automatically based on AI signals. Default : false (disabled for safety) Values : true / false WARNING : Always test on a demo account before setting this to true on a live account. Never risk more than you can afford to lose. AI signals are advisory, not guaranteed. 2.2 InpRiskPercent ------------------------------------------------------------------------------- Purpose : The percentage of your account balance to risk on each trade. The EA uses this value to calculate the lot size automatically. Default : 1.0 Range : 0.1 - 5.0 Unit : Percent (%) Calculation example: Balance = $1,000, Risk = 1.5%, AI SL = 40 pips Risk amount = $1,000 x 0.015 = $15 Lot = $15 / (40 pips x pip value) Recommended: Conservative : 0.5 - 1.0 Normal : 1.0 - 2.0 Aggressive : 2.0 - 3.0 Maximum : 5.0 (high risk, not recommended) Important: The higher the value, the larger the lot size. Larger lots mean higher profit potential BUT also higher loss potential. 2.3 InpMaxLots ------------------------------------------------------------------------------- Purpose : The maximum lot size allowed for a single trade. Regardless of how large the risk calculation suggests, the lot size will never exceed this cap. Default : 0.1 Range : 0.01 - 100.0 Unit : Lots Recommended: $500 account : 0.05 - 0.10 $1,000 account : 0.10 - 0.30 $5,000 account : 0.50 - 1.00 $10,000 account : 1.00 - 3.00 Important: High-value instruments like BTC carry much more value per lot than forex pairs. Use lower max lots for BTC (e.g. 0.1-0.5). 2.4 InpMinConfidence ------------------------------------------------------------------------------- Purpose : The minimum AI confidence percentage required to open a trade. If the AI returns "BUY 62%" and this value is set to 55, the trade opens. If the AI returns "BUY 48%" and this is 55, the trade is skipped. Default : 70 Range : 40 - 95 Unit : Percent (%) Low value (40-55): - More trades are opened - Lower quality signals also become trades - Suitable for aggressive strategies and scalping High value (70-90): - Fewer but higher quality trades - The AI only trades when it is very confident - Suitable for conservative strategies and swing trading Recommended: GOLD (volatile) : 55-65 FOREX (stable) : 65-75 BTC (very volatile) : 60-70 2.5 InpMagicNumber ------------------------------------------------------------------------------- Purpose : A unique identifier assigned to all trades opened by this EA. If you run multiple EAs on the same account, each must have a different magic number. Default : 78420 Range : 1 - 2147483647 Unit : Integer Usage : When loading the EA on multiple charts, always use different magic numbers. Otherwise the EAs may interfere with each other's positions. Example : GOLD EA = 8084, BTCUSD EA = 8085, EURUSD EA = 8086 2.6 InpMaxSpreadPips ------------------------------------------------------------------------------- Purpose : The maximum spread allowed for opening a trade. If the current spread exceeds this value, the EA will not open a trade and logs "Spread too high". Default : 50 Range : 1 - 200 Unit : Pips Why it matters: Trading during high spread conditions means starting each trade at a loss. Spreads widen during news events, night sessions, and low liquidity periods. Recommended: EURUSD : 15-25 GBPUSD : 20-30 GOLD/XAUUSD : 40-60 BTCUSD : 80-150 2.7 InpAllowReverse ------------------------------------------------------------------------------- Purpose : Allows the EA to close the current position and open a new one in the opposite direction when the AI gives a strong reversal signal. Default : true Values : true / false Example : You have a BUY position. The AI gives a strong SELL. true : BUY is closed, SELL is opened. false : BUY stays open, SELL signal is ignored. Important: Reversal requires the AI confidence to be at least 10 points higher than MinConfidence. For example, if MinConfidence is 55, a reversal needs at least 65. 2.8 InpTestMode ------------------------------------------------------------------------------- Purpose : A special mode for MQL5 Market validation testing. When true, the EA opens and closes random trades to pass the automated validation checks. Default : false Values : true / false WARNING : NEVER set this to true on a live or demo account. This mode is designed exclusively for pre-upload validation. It activates automatically inside the Strategy Tester. =============================================================================== 3. TRAILING STOP SETTINGS =============================================================================== The trailing stop system protects your profits by automatically moving the stop-loss in the direction of price movement. As price moves in your favor, the SL follows. When price reverses, the SL is hit and the position closes IN PROFIT. Sequence of operation: 1. Trade opens (SL/TP set by AI) 2. Price moves BreakEvenPips in your favor -> SL moves to entry price plus BreakEvenOffset (small profit locked) 3. Price continues -> SL trails (ATR x TrailATRMult) behind price 4. Price reverses -> SL is hit, position closes in profit 3.1 InpTrailingOn ------------------------------------------------------------------------------- Purpose : Enables or disables the trailing stop system. When false, SL/TP remain at the levels initially set by the AI and never move. Default : true Values : true / false Important: Keeping this enabled is strongly recommended. Without trailing, profitable trades may reverse before reaching TP and the profit opportunity is lost. 3.2 InpBreakEvenPips ------------------------------------------------------------------------------- Purpose : How many pips of profit must be reached before the SL is moved to the entry price. After this trigger, the trade closes at worst with a small profit. Default : 20 Range : 0 - 200 (0 = disabled) Unit : Pips How it works (GOLD example, BreakEvenPips=8): Entry: 5032.57 (BUY) Price reaches 5033.37 (+8 pips = +80 points) SL moves to 5032.57 + offset level automatically Low value (3-8): - Very early break-even, profit locked quickly - But small pullbacks may trigger unnecessary closes - Suitable for scalping and aggressive strategies High value (20-50): - Gives price room to breathe - Prevents premature closes during normal pullbacks - Suitable for swing trading Recommended: GOLD : 6-10 (60-100 points) FOREX : 5-15 (50-150 points) BTC : 15-30 ($15-30 movement) 3.3 InpBreakEvenOffset ------------------------------------------------------------------------------- Purpose : When break-even is triggered, how many pips ABOVE the entry price the SL is placed. This value is the guaranteed profit at break-even. Default : 2 Range : 0 - 50 Unit : Pips Example (GOLD, BUY, Offset=5): Entry : 5032.57 SL moves to : 5032.57 + (5 x 0.10) = 5033.07 Locked profit : 5 pips = 50 points If set to 0 : SL moves to exact entry. Due to spread, the trade may close with a tiny loss. 2-5 range : Covers spread plus small slippage, guarantees a small profit. 10+ : Locks a reasonable profit, but requires a larger move before break-even triggers. Recommended: GOLD : 3-5 FOREX : 2-3 BTC : 5-10 3.4 InpTrailATRMult ------------------------------------------------------------------------------- Purpose : Determines the trail distance as a multiple of the ATR (Average True Range) value. Trail distance = ATR(14) x InpTrailATRMult ATR measures the average price movement range. As volatility increases, ATR grows and the trail distance automatically widens. Default : 1.5 Range : 0.1 - 5.0 Unit : Multiplier Calculation examples: GOLD ATR(H1) = 31 -> 31 x 0.3 = 9.3 price = 93 pips EURUSD ATR(H1) = 0.004 -> 0.004 x 0.4 = 0.0016 = 16 pips BTC ATR(H1) = 800 -> 800 x 0.35 = 280 price = 280 pips Low value (0.1 - 0.4): - Very tight trailing, SL close to price - Captures small profits quickly - But small pullbacks may close the position early - AGGRESSIVE: "Exit every trade with profit" strategy Medium value (0.5 - 1.0): - Balanced trailing - SL at a reasonable distance from price - Suitable for most strategies High value (1.5 - 3.0): - Wide trail distance, SL far from price - Stays in position for large trends - But significant profit can be lost on reversals !!! THIS IS THE MOST CRITICAL PARAMETER !!! Recommended: GOLD aggressive : 0.20 - 0.35 GOLD balanced : 0.40 - 0.60 FOREX aggressive : 0.30 - 0.50 FOREX balanced : 0.60 - 1.00 BTC aggressive : 0.25 - 0.40 BTC balanced : 0.50 - 0.80 3.5 InpTrailStepPips ------------------------------------------------------------------------------- Purpose : The minimum pip increment for moving the SL. The SL is not updated on every tick, only when the price has moved at least this many pips since the last SL update. Default : 5 Range : 1 - 50 Unit : Pips Why it matters: Updating SL on every tick sends unnecessary modify requests to the server. The step value filters these updates. Low value (1-2): - Very responsive tracking, SL updates on small moves - More aggressive, but generates more server requests - Suitable for scalping and short-term trades High value (5-10): - Fewer updates, smoother tracking - Suitable for swing trading and longer-term positions Recommended: GOLD : 2-3 FOREX : 1-3 BTC : 3-5 =============================================================================== 4. DATA API SETTINGS =============================================================================== 4.1 InpFinnhubKey ------------------------------------------------------------------------------- Purpose : API key for connecting to the Finnhub.io news service. The EA pulls forex news headlines from this service and displays them on the panel. Get it : finnhub.io > Free account > API Key Format : Approximately 30 characters Cost : Free. Limit of 60 requests per minute. Important: Optional. If not provided, the news section of the panel will be empty. All other EA functions are unaffected. =============================================================================== 5. DASHBOARD SETTINGS =============================================================================== 5.1 InpPanelX / InpPanelY ------------------------------------------------------------------------------- Purpose : The position of the panel on the chart in pixels. X = distance from left edge, Y = distance from top. Default : X=10, Y=25 Unit : Pixels Note : The panel width is approximately 440 pixels. If your chart window is wide enough, X=10 works well. 5.2 InpTimeframe ------------------------------------------------------------------------------- Purpose : The timeframe used for AI analysis. The EA reads technical indicators from this timeframe and sends them to the AI model. Default : PERIOD_H1 (16385) Values : Standard MT5 timeframe codes Timeframe codes: M1 = 1 M5 = 5 M15 = 15 M30 = 30 H1 = 16385 H4 = 16388 D1 = 16408 W1 = 32769 MN1 = 49153 Recommended: Scalping : M15 (15) or M30 (30) Intraday : H1 (16385) Swing : H4 (16388) Position : D1 (16408) Important: The chart timeframe and this value can be different. For example, you can open an M15 chart but run H1 analysis. The AI always uses the timeframe specified here. 5.3 InpFontSize / InpFont ------------------------------------------------------------------------------- Purpose : The font size and typeface for panel text. Default : 8 / Consolas Notes : Sizes between 7-9 look best. Consolas is a monospace font and provides the best alignment for the panel. Courier New is an acceptable alternative. =============================================================================== 6. WEBREQUEST WHITELIST (REQUIRED SETUP) =============================================================================== For the EA to access APIs over the internet, the following URLs must be added to the MT5 WebRequest whitelist: Steps: Tools > Options > Expert Advisors Check "Allow WebRequest for listed URL" Add each of the following URLs: REQUIRED: https://api.groq.com (Primary AI engine) RECOMMENDED: https://generativelanguage.googleapis.com (Fallback AI - Gemini) OPTIONAL: https://fcsapi.com (Supplementary price data) https://finnhub.io (News data) https://api.frankfurter.dev (ECB exchange rates) =============================================================================== 7. PRESET PROFILES AND RECOMMENDED VALUES =============================================================================== 7.1 GOLD / XAUUSD - AGGRESSIVE ------------------------------------------------------------------------------- InpAIInterval = 90 InpRiskPercent = 1.5 InpMaxLots = 1.0 InpMinConfidence = 55 InpMaxSpreadPips = 50 InpBreakEvenPips = 8 (break-even at 80 points) InpBreakEvenOffset= 5 (50 points profit locked) InpTrailATRMult = 0.30 (ATR~31 -> ~93 pip trail) InpTrailStepPips = 2 (20 point step) Scenario: Entry 5032, price rises to 5040 (+80pt) -> SL = 5033 (BE) Price rises to 5050 -> SL = 5050 - 9.3 = 5040.7 Price rises to 5060 -> SL = 5060 - 9.3 = 5050.7 Price pulls back to 5052 -> SL hit at 5050.7 Result: closed with +187 points PROFIT 7.2 BTC / BTCUSD - AGGRESSIVE ------------------------------------------------------------------------------- InpAIInterval = 90 InpRiskPercent = 1.0 (lower for BTC volatility) InpMaxLots = 0.5 (lot cap for BTC) InpMinConfidence = 60 (higher filter for BTC noise) InpMaxSpreadPips = 100 (BTC spread is wide) InpBreakEvenPips = 20 (break-even at $20 move) InpBreakEvenOffset= 10 ($10 profit locked) InpTrailATRMult = 0.35 (ATR~800 -> ~$280 trail) InpTrailStepPips = 5 ($5 step) Scenario: Entry 97000, price rises to 97020 (+$20) -> SL = 97010 (BE) Price rises to 97500 -> SL = 97500 - 280 = 97220 Price rises to 98000 -> SL = 98000 - 280 = 97720 Price pulls back to 97600 -> SL hit at 97720 Result: closed with +$720 PROFIT 7.3 FOREX (EURUSD, GBPUSD) - AGGRESSIVE ------------------------------------------------------------------------------- InpAIInterval = 120 InpRiskPercent = 1.5 InpMaxLots = 1.0 InpMinConfidence = 55 InpMaxSpreadPips = 30 InpBreakEvenPips = 5 (break-even at 50 points) InpBreakEvenOffset= 3 (30 points profit locked) InpTrailATRMult = 0.40 (ATR~0.004 -> ~16 pip trail) InpTrailStepPips = 1 (10 point step) Scenario: Entry 1.08500, price rises to 1.08550 (+5 pip) -> SL = 1.08530 (BE) Price rises to 1.08700 -> SL = 1.08700 - 0.0016 = 1.08540 Price rises to 1.08900 -> SL = 1.08900 - 0.0016 = 1.08740 Price pulls back to 1.08800 -> SL hit at 1.08740 Result: closed with +24 pips PROFIT =============================================================================== 8. FREQUENTLY ASKED QUESTIONS =============================================================================== Q: Can I load the EA on multiple charts at the same time? A: Yes. Use a DIFFERENT MagicNumber on each chart. API keys can be the same, but keep the AI interval at 120 or higher so you do not exceed the daily API limit. Q: The AI signal says HOLD but I want to trade. What should I do? A: Lower the MinConfidence value (e.g. to 50). But be aware that lower confidence signals carry more risk. Q: The trailing stop does not seem to be working. Why? A: Check your TrailATRMult value. High values like 1.5 create a trail distance of 465 pips on GOLD, which means the trailing never activates on most profitable trades. Lower it to 0.3-0.5. Q: BTC trades are opening with very large lots. How do I fix this? A: Lower the MaxLots value (e.g. 0.1-0.3). BTC pip value is much higher than forex pairs. Q: I am getting "Spread too high" and no trades open. Why? A: Increase MaxSpreadPips or avoid trading during high spread periods (night session, news events). Q: AI analysis is not working. No signal appears on the panel. A: Check the following in order: 1) Is InpGroqKey entered correctly? 2) Is api.groq.com added to the WebRequest whitelist? 3) Is InpAIEnabled set to true? 4) Do you have an active internet connection? The Status line at the bottom of the panel shows "AI:Groq" or "AI:Gemini" when AI is operational. Q: Where should I place the .set files? A: In MT5, go to File > Open Data Folder > MQL5 > Profiles > Tester. Place the .set files there. When loading the EA, click the "Load" button in the Inputs tab to select a profile. For live usage, drag the EA onto a chart and use the "Load" button in the Inputs tab to apply the same .set file. =============================================================================== 9. RISK DISCLAIMER =============================================================================== This EA generates signals using artificial intelligence and can execute trades automatically. No AI model can predict the future. Past performance is not a guarantee of future results. - Do not use on a live account without thorough demo testing - Never risk more than you can afford to lose - Do not allocate your entire balance to a single instrument - Be cautious during high-impact news (NFP, FOMC, ECB) - API services may not always be available ===============================================================================