1. Introduction
What is OpenAi Japan Exo Scalp EA?
OpenAi Japan Exo Scalp EA is an Expert Advisor (EA) for MetaTrader 5 (MT5) that incorporates the latest GPT-4.5 technology, developed by a creator with experience in Japanese financial engineering. It uses a unique algorithm in conjunction with ChatGPT to automate short-term scalping strategies.
Features and Advantages of This EA
- ChatGPT Integration: Utilizes the latest GPT-4.5 model to comprehensively analyze market conditions.
- Scalping Optimization: Combines indicators such as ATR (volatility indicator) and RSI (oscillator) to automate optimal entries and exits for short-term trades.
- Spread Management: Avoids entries in situations with high spreads, thereby reducing trading costs.
- Fast Backtesting Not Generally Possible: Because it relies on an external API (ChatGPT) for communication, it does not function correctly with the standard strategy tester (backtesting feature).
As mentioned later, testing on a demo account is recommended. - Error Control: Includes logging functionality for errors and a stable trade management logic.
Basic Operation of the EA
The EA operates on an MT5 chart.
Specifically, it periodically checks technical indicators, spreads, etc., and sends real-time analysis requests to the ChatGPT API. Based on the judgment (BUY/SELL/NO SIGNAL, etc.) returned from ChatGPT, the final buy/sell decision is made using filters such as ATR and RSI.
2. Installation and Setup
System Requirements
- MetaTrader 5: Version 5.0 or later (latest recommended)
- Stable internet connection: A continuous online environment is necessary due to web requests
- OpenAI API Key: Required for ChatGPT integration. Please acquire it yourself.
- VPS Recommended: For continuous operation and stable network availability, a VPS is suggested
How to Install to MT5
- Open MetaTrader 5.
- Click [File] → [Open Data Folder].
- In the opened folder, locate the MQL5/Experts folder.
- Copy the EA file (e.g., OpenAi_Japan_ExoScalp_EA.ex5) into the Experts folder.
- Return to MetaTrader 5, right-click on “Expert Advisors” in the [Navigator] window, and select [Refresh]. If the EA appears in the list, the installation is complete.
Initial Launch Settings
- Drag and drop the EA named “OpenAi Japan Exo Scalp EA” from the [Navigator] window onto a chart.
- When the EA’s “Properties” screen appears, check under the [Common] tab to ensure “Allow algorithmic trading” and “Allow DLL imports” are enabled.
- Regarding the WebRequest permission settings, in MetaTrader 5, go to [Tools] → [Options] → [Expert Advisors] tab, and select “Allow WebRequest for listed URL:” (in Japanese environments, “指定URLへのWebリクエストを許可する”).
Then add https://api.openai.com to the list.
Example: Adding this URL allows the EA to send requests to OpenAI's servers.
4. In the [Inputs] tab, enter your OpenAI API key under InpAPIKey.
*Refer to the following URL for information on how to obtain the API key from OpenAI.
https://www.mql5.com/ja/blogs/post/761191
5. Once the settings are complete, click “OK” to launch the EA. If the icon at the top-right of the chart is a smiling face (smiley), it is running normally.
3. Parameter Details
This EA has many parameters, but the main ones are summarized in the table below.
Parameter Name | Description | Recommended Values / Notes |
---|---|---|
InpChatGptEndpoint | API endpoint for ChatGPT | Usually set to https://api.openai.com/v1/chat/completions |
InpAPIKey | OpenAI API Key | Enter the key you obtained. (e.g., sk-**************) |
InpChatGptModel | ChatGPT model to be used | Default is o1-mini-2024-09-12 The latest GPT-4.5 Preview is also available (be mindful of token usage fees) |
EnableTrading | Whether to enable trade (order placement) | “true” for real trading, “false” for analysis only |
MaxTradesPerDay | Number of entries allowed per day | Prevents excessive trading. Default is 30 times |
UseATRForSLTP | Automatic SL/TP calculation using ATR | “true” is recommended. Also set ATR Period, etc. |
ATR_SL_Multiplier | SL set to ATR × this multiplier | A guideline is around 1.5–2.0 |
ATR_TP_Multiplier | TP set to ATR × this multiplier | A guideline is around 2.0–3.0 |
RiskPercent | Risk tolerance (%) What percent of account balance is risked per trade | 1.0 (i.e., 1%) is recommended |
UseRSIFilter | Use RSI to assess overbought/oversold | “true” to use RSI as a filter |
InpSpreadThreshold | Spread threshold (pips) | e.g., 10.0 Avoids entries when spread is high |
By adjusting these parameters according to your environment and broker conditions, you can optimize trading to suit your style.
However, making excessive changes to the parameters may cause instability, so it is recommended to start with the default settings.
4. How to Use
4.1 Actual Trading Flow
- Apply the EA, set the parameters, and run it on your chart.
- The EA periodically obtains technical indicators and spread conditions.
- It sends a Web request to ChatGPT for trade signals.
- After passing through internal filters such as ATR, RSI, and spread checks, it decides on the final buy/sell action.
- When a qualifying signal is detected, it automatically places a buy or sell order. Stop loss and take profit levels are automatically set using ATR, etc.
- If signals occur consecutively, MaxTradesPerDay or other constraints limit the number of trades per day.
4.2 How to Run a Backtest (Notes)
For most EAs, you can use the strategy tester for backtesting. However, since OpenAi Japan Exo Scalp EA requires communication with ChatGPT,
the external WebRequest may be blocked or may not function properly in MetaTrader’s strategy tester environment, making backtesting essentially impossible.
Therefore, to confirm the actual behavior, always run the EA on a demo account. On a demo account, all features, including Web requests and ChatGPT signal generation, will function normally.
4.3 Precautions for Live Trading
- If your internet connection is unstable, requests to the ChatGPT API may fail, resulting in missed signals.
- Because spreads can fluctuate frequently depending on the broker, a low-spread account suitable for scalping is preferable.
- The EA operates trades in real time, so be aware of unexpected market movements (e.g., major economic announcements).
5. Troubleshooting
Common Problems and Solutions
- The EA does not operate:
- Check if “Algorithmic Trading” is enabled.
- Check if Tools → Options → Expert Advisors → “Allow WebRequest...” is enabled.
- Check if the correct OpenAI API key is entered under InpAPIKey.
- No entries:
- The spread is always higher than the threshold.
- RSI or other filter conditions are not met, and the signal is judged as “NO SIGNAL.”
- The EA may have already reached the MaxTradesPerDay limit.
- Error messages:
- “HTTP error code = 401” → The API key is incorrect or has expired.
- “NO SIGNAL” or “error” → No valid signal was received from ChatGPT.
Error Message List and Corresponding Actions
Error Message | Cause / Response |
---|---|
INVALID_HANDLE | Failed to obtain indicator handle. ⇒ Restart MT5 or change the timeframe. |
Network error (no response) | Communication with the API server failed. ⇒ Check your network connection. |
ChatGPT Error ⇒ code=400 or 401 | The OpenAI API key is incorrect, or the API limit has been reached. |
6. Best Practices
6.1 Money Management Strategy
Scalping involves a high frequency of trades, which can increase costs and drawdowns.
Set RiskPercent (the percentage of your account at risk per trade) to a low level to limit losses on individual trades.
6.2 Application According to Market Conditions
- High Volatility Market: Increase ATR_SL_Multiplier and ATR_TP_Multiplier.
- Range Market: Adjust RSI filters and spread thresholds to reduce entry frequency.
- News Events: Spreads often widen significantly before and after major news releases. Consider stopping the EA or limiting the number of positions.
6.3 Risk Management
Scalping EAs accumulate small profits repeatedly, but if consecutive losses occur, they can rapidly deplete capital.
Minimizing losses and avoiding overtrading are key to improving long-term success.
7. FAQ
Q1. Is it compatible with MT4?
A. It is currently developed exclusively for MetaTrader 5. While an MT4 version is possible in special cases, MT5 is recommended to fully utilize the latest GPT API and advanced backtesting capabilities.
Q2. Is backtesting completely impossible?
A. Because ChatGPT communication is required, the standard strategy tester cannot validate it.
You can try rough functional checks in the strategy tester, but the signal portion (external API communication) will not work correctly.
Please make sure to test on a demo account.
Q3. What happens if I change the RSI threshold?
A. Loosening RSI filtering increases signal frequency but can also increase false entries. Adjust accordingly based on market volatility.
Q4. What VPS specifications are required?
A. Web requests do not create heavy load, but stable network speed is crucial. 1GB–2GB of memory and 1–2 CPU cores are generally sufficient.
8. Additional Information
Related Links
- Official MQL Documentation: https://www.mql5.com/ja/docs
- OpenAI API Documentation: https://platform.openai.com/docs/introduction
- MQL5 Forum: https://www.mql5.com/ja/forum
- Installation & Setup Guide:
How to Obtain and Pay for OpenAI API
To use OpenAI’s API, you first need to create an account on OpenAI’s official site and register your payment information (credit card, etc.). After signing up, you can generate an API key on your dashboard, and you should then set that key in this EA’s parameter “InpAPIKey.”
For initial billing (deposit), around 5 USD is sufficient.
For instance, using the o1-mini model, 5 USD typically allows for about 500 queries. (Exact numbers vary depending on the model and token usage.)
Refer to the OpenAI Billing page for usage and charges. You can check your current balance and usage history in real time.
How to Contact Support
- Send a message through the MQL5 Market “Contacts” or “Messages” feature.
- When requesting support, please provide log files (debug CSV, etc.), error messages, and broker information to facilitate prompt assistance.
Important Notes
- Since an external API is used, the EA will not function normally in a backtest environment. Please always test on a demo account.
- It is strongly recommended to perform a thorough risk assessment before live trading and to start with small lot sizes.
- This EA does not guarantee any profits. There is a risk of substantial losses depending on market conditions and network issues.
Disclaimer
-
Trading Risk Disclaimer
This EA and its scripts do not guarantee success. Any losses caused by market fluctuations are solely your responsibility. -
Past Performance Does Not Guarantee Future Results
Even if past performance was good, it does not guarantee the same results in the future. -
Limitations of Individual Support
The product is provided “as is,” and there is no guarantee that all issues can be fully resolved. While support is offered, not all customizations may be feasible. -
Dependence on Third Parties
Unexpected errors may occur due to the MT4/MT5 platform or broker conditions. -
Prohibition of Resale and Duplication
This product is intended for individual use only. Unauthorized reproduction, modification, and resale are prohibited. -
Responsibility for Using Automated Trading
When using automated trading, always conduct sufficient testing in a demo environment. All risks are borne by the user. -
Compliance with Local Laws
When using this product, abide by the laws of your region. -
Disclaimer of Data Provision Guarantee
No guarantee is provided for the accuracy of the data and signals offered. Use them as reference only. -
Non-Investment Advisory Disclaimer
This product does not serve as investment advice; final trade decisions are your own responsibility. -
Refund Policy
Due to MQL Market policy, refunds are not available after purchase.
OpenAi Japan Exo Scalp EA © Copyright AI Trader Shino 2025