1,525 アクセス
Welcome! This website shows how to build MT5 Expert Advisors using Excel + ChatGPT, without writing MQL code by hand. All examples are based on real trading ideas. Even if you don’t speak Japanese, you can follow the Excel files and screenshots.
ノーコードで作る MT5 EA:Excel と ChatGPT の実践ガイド No-Code MT5 EA- Excel + ChatGPT Walkthrough
以下はプログラムができるまでの道のりです 楽しみながらやりましょう
This is the journey to creating the program — let’s have fun along the way.
1,日本語でプログラムをエクセルに書き出す 1,Write the program in English using Excel.
↓下の文章の「FXのEA~初めに戻り繰り返す」までをコピペですよ
FXのEA MT5(エキスパートアドバイザー)で、プログラム作成してください
プログラムはコンパイルエラーが出ないようにしてください
プログラム開始時に1回だけAに50を代入する
Aは最低値0から最高値100の範囲とする
最大ポジション数1(パラメーター化)
スプレッドが200Point以上になったらプログラム一時停止(パラメーター化)
レバレッジが3000以下になったらプログラム一時停止(パラメーター化)
スリッページ10000(パラメーター化)
プログラム一時停止時は新規ポジションは取得しないが決済は実行する
もしAが50以上の場合(パラメーター化)
Buy0.01Lot取得(パラメーター化)
もしAが50未満の場合(パラメーター化)
Sell0.01Lot取得(パラメーター化)
BUYポジションの含み益が2000Pointで決済(パラメーター化)
Aに10を加算(パラメーター化)
BUYポジションの含み損が1900Pointで決済(パラメーター化)
Aに-10を加算(パラメーター化)
Sellポジションの含み益が2000Pointで決済(パラメーター化)
Aに-10を加算(パラメーター化)
Sellポジションの含み損が1900Pointで決済(パラメーター化)
Aに10を加算(パラメーター化)
初めに戻り繰り返す
↓Please copy and paste the part of the text below from "Create an FX EA" through "Return to the beginning and repeat".
Create an FX EA for MT5.
Make sure the program compiles without errors.
On startup, assign A = 50 only once.
Keep A clamped between a minimum of 0 and a maximum of 100.
Maximum number of positions = 1 (parameterized).
If the spread is ≥ 200 points, pause the program (parameterized).
If the account leverage is ≤ 3000, pause the program (parameterized).
Slippage = 10000 (parameterized).
While the program is paused: do not open new positions, but do execute position closes.
Trade rules (all parameterized where noted):
If A >= 50: open a Buy of 0.01 lot.
If A < 50: open a Sell of 0.01 lot.
Next, I'll explain assuming the parameters have been changed
Close BUY positions when unrealized profit reaches 2000 points (parameterized).
Add 10 to A (parameterized) .
Close BUY positions when unrealized loss reaches 1900 points (parameterized).
Add -10 to A (parameterized).
Close SELL positions when unrealized profit reaches 2000 points (parameterized).
Add -10 to A (parameterized).
Close SELL positions when unrealized loss reaches 1900 points (parameterized).
Add 10 to A (parameterized).
Return to the beginning and repeat.
2,チャットGPTにコード化を依頼(MT5) 2.Request ChatGPT to write code (for MT5)
↓エクセルから文章をコピーしてChatGPTに質問した答えがこれです、コードの内容は理解しなくても良いです This is the answer I got from ChatGPT after copying the text from Excel and asking a question. You don’t need to understand the code.

コードをChatGPTからMQL5にコピーペーストします I'll copy and paste the code from ChatGPT into MQL5.

ここまでの内容を「VIDEO1」で説明しています
The content covered so far is explained in "VIDEO1.
VIDEO1 Japanese
VIDEO1 English
「コンパイル」というボタンを押すとエラーが4つ発見されました(Video2で詳しく説明します)When you click the "Compile" button, four errors were found (I’ll explain them in detail in the video2).

エラーの修正方法はVIDEO2で説明します
I'll explain how to fix the errors in a video2.
VEDEO2 Japanese
VIDEO2 English
FXライフを楽しみましょう
この活動を応援して頂けたら嬉しいです
Let’s enjoy the forex life! I’d be happy if you could support this activity.
エラーを修正したらバックテストでプログラムの動作を確認します、この段階では利益がでてなくても良いです、プログラムが正常動作するかを確認します
確認事項1、プログラムが動作するか?パラメーター(スプレッド、レバレッジなど)の設定によってはプログラムが全く動かない事があります。
確認事項2,取得Lot数、最大ポジション数、利益確定、損切など予定通りの動作をしているか?
After you fix the errors, we'll run a backtest to check the program's behavior. It's okay if there's no profit at this stage — the goal is to confirm the program is operating correctly.
Check 1: Does the program run? Depending on parameter settings (spread, leverage, etc.), the program may not run at all.
Check 2: Are the lot sizes, maximum number of positions, take-profit, stop-loss, etc., operating as planned?
バックテストの設定画面(例)
Backtest Settings (Example)

パラメーター設定画面(例) Parameter Settings (Example)

バックテストの結果画面(例) Backtest Results(Example)

利益グラフ画面(例) Profit Chart (Example)
↓作ったばかりのプログラムのバックテストのグラフはこんな感じになると思います ここからオプティマイズを実行して最適に近づく様に各パラメーターを調整していきます
最適なパラメーター調整とは
1,利益がほどほどに出る事(年率10%~50%)
2,安全な運用である事(破産しない事)
This is what I expect the backtest results of a newly created program to look like. From here we will run an optimization and adjust each parameter to approach the optimal settings.What optimal parameter tuning means:
1,Generating moderate profits (annual rate 10%–50%).
2,Operating safely (not going bankrupt)."

上のグラフと下のグラフの違う所はプログラムのパラメーターを数か所手動で調整した事です
手動でパラメーターを調整するだけでも成績の良いプログラムに変わる事があります
この作業は私がもっとも楽しめる時間です
ここまでプログラムの動作の内容はVIDEO1で説明しましたがプログラムコードについては
一切触れていません ここまでたどり着くことができたのはChatGPTのおかげと
何度もコンパイルエラーと戦って勝利した皆さんの努力によるものです
ここまでの内容をVIDEO3で説明しています
The difference between the top graph and the bottom graph is that I manually adjusted several of the program’s parameters.
Even just manually tuning the parameters can sometimes turn it into a better-performing program.
This is the part I enjoy the most.
Up to this point, I explained how the program behaves in VIDEO1, but I haven’t touched on the program code at all.
Getting this far has been thanks to ChatGPT and to everyone’s efforts—those of you who fought compile errors again and again and came out victorious.
I cover all of this in VIDEO3.
VIDEO3 is currently in production.
VIDEO3 Japanese
VIDEO3 English
これは経験をもとにやっている事ですが経験の少ない方でも わかりやすく簡単に パラメーターの設定ができるのが 1,「オプティマイズ」と 2,オプティマイズのデータを見える化した「MIERUN」の活用です This is based on my own experience, but even those with little experience can set parameters clearly and easily by: using “Optimization,” and leveraging “MIERUN,” which visualizes the optimization data.

次はオプティマイズ(最適化)を行います
オプティマイズは初めに簡単な数値設定をすれば、後は自動で計算してくれます
1.各パラメーターの数値の組み合わせが数千~数万パターン作られます
2.それぞれのパラメーターの組み合わせで1回づつバックテストをしてデータ表が作られます
例 損切Pointのパラメーター(200,800,1400・・・30000)など設定します
利益確定Pointのパラメーター(200,800,1400・・・30000)など設定します
Lot数のパラメーター(0.01,0.02,0.03・・・0.05)など設定します
イメージとしては、損切Point200、利益確定Point200、Lot数0.01の組み合わせの場合、過去1年間のバックテストをしたら
利益は○○$、ドローダウンは○○%、取引回数は〇〇回だった・・・という作業を、設定したすべての組み合わせで数千~数万パターン自動で行います
これにより安全に利益が出るパラメーターの組み合わせを把握する事ができます
Next we'll run an optimization. After you enter a few simple numeric settings, the optimizer does the rest automatically.
Thousands to tens of thousands of parameter-value combinations are generated.
A backtest is run once for each parameter combination, producing a data table.
For example:
Set stop-loss (points) parameter values (200, 800, 1400, …, 30000).
Set take-profit (points) parameter values (200, 800, 1400, …, 30000).
Set lot-size parameter values (0.01, 0.02, 0.03, …, 0.05).
For example, using stop-loss = 200 points, take-profit = 200 points and lot size = 0.01, a one-year backtest might report a profit of $XXX, a drawdown of XX% and XXX trades. We automatically run this backtest across every parameter combination you specify — from thousands to tens of thousands of variations — allowing you to find parameter sets that can safely generate profits.
以下は「MIERUN」の画面の一部です(ドローダウンが表示されています)
縦軸がドローダウンの%で横軸がパラメーターの組み合わせナンバーです
詳細はVIDEO4で説明します
「MIERUN」の使い方、オプティマイズの落とし穴など(すごく大切な事)
Below is a portion of the MIERUN screen (drawdown is displayed).
The vertical axis shows drawdown (%) and the horizontal axis shows the parameter-combination number.
How to use MIERUN and optimization pitfalls (very important) will be explained in detail in VIDEO 4.

VIDEO4 (Japanese)
VIDEO4 (English)

MIERUN 下のボタンからダウンロードしてください 何回でも無料でダウンロード可能です
Click the button below to download
it's free and you can download it unlimited times.
「MIERUN」はマクロの入っていないエクセルブックです、安心してダウンロードできます MIERUN is an Excel workbook that contains no macros, so you can download it safely.
※ 皆さんのPCにエクセルが入ってないとファイルを開く事ができません
※ If Excel is not installed on your PC, you will not be able to open the file.
MIERUN Ver2
↓このMIERUN Ver2にはオプティマイズデータ(2025年10日~10月31日)が添付してあります
↓This MIERUN Ver2 comes with attached optimization data (from October 1, 2025 to October 31, 2025).
↓このMIERUN Ver2にはオプティマイズデータ(2025年11月1日~11月28日)が添付してあります ↓This MIERUN Ver2 comes with attached optimization data (from November 1, 2025 to November 28, 2025). 12月のパラメーター設定の参考にしてください Please use this as a reference for your parameter settings in December.
DEMO取引とMIERUN,YOMERUNの利益の差について
MIERUN,YOMERUNは月ごとのデータで、月初に「A」の値が50からスタートしますが、DEMO取引では月初にリセットされず、Sell,Buyに影響する為、利益の値が多少違ってきます
DEMO trading and MIERUN/YOMERUN profit differences MIERUN and YOMERUN use monthly data, and at the start of each month the “A” value resets to 50. However, in DEMO trading it does not reset at the beginning of the month, which affects Sell/Buy decisions, so the profit figures can differ slightly.

VIDEO5(Japanese)
YOMERUNの検索結果はEXNESSの口座条件で検証しています 同じ条件で再現する場合はこちらから YOMERUN’s search results are verified under Exness account conditions. “If you want to reproduce it under the same conditions, click here.
このリンクはアフィリエイトです このリンクから口座開設しても皆さんには不利益はありません
私はこのアフィリエイトから得た資金でサーバー代と検証環境を維持しています
This is an affiliate link. There is no disadvantage for you if you open an account through it.
The affiliate income is used to support server costs and the testing environment.