AI 一本釣り EURJPY MT5

AI 一本釣り EURJPY MT5

AI 一本釣り EURJPY MT5 Auto Trading
Comments(0)
Expert Advisors
MetaTrader 5
Last Updated At
5/30/2024
Version
8.00
My Profile
mao_fx
  • Whole period
  • 2 years
  • 1 year
  • 6 months
  • 3 months
  • 1 month
Profit
-248,373JPY
Profit Factor
0.46
Rate of return risk  ?
-0.86
Average Profit
23,133JPY
Average Loss
-22,662JPY
Balance  ?
751,627JPY
Rate of return (all periods)?
-28.27%
Win Rate
31.25% (10/32)
Maximum Position  ?
1
Maximum Drawdown  ?
31.35% (287,894JPY)
Maximum Profit
78,628JPY
Maximum Loss
-41,140JPY
Recommended Margin  ?
878,695JPY
Unrealized P/L
0JPY
Deposit  ?
1,000,000JPY
Currency
JPY- Account
Operable Brokers
Usable with MT5-adopting brokers.

Forward testing (Profit)

Product Statistics
Product Comments

Monthly Statistics

2024
2023
2022
2021
2020
  • Jan
  • Feb
  • Mar
  • Apr
  • May
  • Jun
  • Jul
  • Aug
  • Sep
  • Oct
  • Nov
  • Dec

Calendar for Months

About EA's Strategy

Translating...

Currency Pairs
[EUR/JPY]
Trading Style
[Swing Trading]
Maximum Number Position
2
Maximum Lot
50
Chart Time Frame
H1
Maximum Stop Loss
0
Take Profit
0
Straddle Trading
No
Application Type
Metatrader Auto Trading
Other File Usages
No

AI

一本釣り

EURJPY MT5

 


1.        概要

AIで相場分析を行い、AIでソースコードの大部分を開発したMT5用のEAです。ナンピンやマーチンゲールは行わず、ポジションは1つだけしか取りません。相場のボラティリティのある時だけを狙って、まるで「一本釣り」の用に、相場の大海から利益を釣り上げるEAです。

ポジションを建てるのは、売りと買い、それぞれで毎週1回(合計2回)だけです。年間約100回程度のトレードしか行いません。

しかし、8年間のバックテスト(Auto Lotsモード)において、プロフィットファクター1.99、リカバリーファクター9.69、残高最大ドローダウン10%、勝率39.10%という驚くべき数値を叩き出しています。しかも、初期証拠金100万円のスタートで、純益が26,099万円に達した2億超えEAになっています。

トレーダーなら、是非一本持っていると良いと考えられるEAです。

なお、「AI 一本釣り EA 」は、一連のシリーズEAとして、今後随時リリースしていく予定ですので、ご期待ください。また、MT5用とMT4EAの双方を発売して行く予定です。

 

 

相場の荒波からAIで利益を釣り上げるイメージ図です。

 

2.        AIによる相場分析
 大規模言語モデルLLMLarge language Models)としてChatGPT4を使用しました。最初は、ローソク足の1分足データ、10年分をChatGPTに投げてみたのですが、さすがに、1分足では、データ量が多すぎて、ChatGPTが固まってしまいました。数十行までは、データを読み込んで、分析を開始してくれるのですが、「分析中にエラーが発生しました・・・」を繰り返し、前へ進めません。
 そこで、データ量を減らして、2年分の1時間足データでAI分析を実施することにしました。
 結果は次の通りです。

曜日別の価格変動範囲
週の中では、木曜日が一番価格変動幅が多く、次に金曜日が多くなっています。逆に月曜日の変動幅が最も少ない傾向にあるようです。

時間別の価格変動範囲

 上の図は、時間別のグラフですが、大きな山が3つあることが明らかです。これは、東京市場、欧州市場、ニューヨーク市場の、それぞれのオープン時間に、市場売買が活発となり、価格変動幅が増えたものと考えられます。(なお、サーバーの時間としてGMT-3を使用しています。日本時間(GMT-9)は、6を加えて換算してください。)
 日本時間で読み替えると、朝9時の東京市場オープンで価格変動が増大、午後4時の欧州市場、夜9時から11時のニューヨーク市場にそれぞれ対応して変動幅が増えているのが確認できます。


ポジションを建てる時間と保有する時間の最適解を求める

 何曜日の何時にポジションを建てた場合に、何時間保有すれば、最も利益が得られるかをAIに分析してもらいました。
 AIが無かった頃は、Excelにデータを落とし込んでから、ピボットテーブルでグリグリと手動で何度もパラメータを変えながら最適解を求めたものです。AIなら、かなり複雑な組み合わせであっても、難なく最適解を教えてくれます。(本当に、良い時代になったものです。)

 一例ですが、「買いポジションを建てるのであれば、月曜の4時にポジションを建て、決済は96時間後にすると良い。」という情報をAIが短時間で教えてくれるのです。

 

3.        最適解からEAを作る
 次に、EAのソースコードそのものをAIに作成してもらうことにします。
 ところが、ここが、かなり試行錯誤した部分となりました。AIは、はっきり言って「バカ」なのです。ちゃんとしたプロンプトを与えないと、とんでもないミスを犯します。ChatGPT側も、毎回必ず次のメッセージを出してきます。
ChatGPT が間違いを犯す可能性があります。重要な情報を確認するようにしてください。」
 以前ChatGPT3が発表された頃に、ソースコードを生成させてみたのですが、はっきり言って、そのままでは全く使い物にならない代物でした。しかしChatGPT4になり、日々改善され、進化してきたので、結構使える物にはなってきています。

 AIがコード生成   → エラー発生 → AIにエラー修正指示

AIが修正コード生成 → エラー発生 → AIにエラー再修正指示

 これを延々と繰り返すことになりますが、しかし、ここに大きな落とし穴があり、負のスパイラルループに嵌ってしまうことがあります。AIは、結局のところ、ロジックを正しく認識しているのではなく、大規模言語モデルの中から、それらしい回答を出してくるだけなのです。プロンプターがロジックを正しく認識して、AIに伝えるという技術が必須になります。

さんざん悪戦苦闘して、EAのコンパイルエラーも無くなったので、いざEAを走らせてみると、全く違った予想外の挙動をすることもありました。       総じて、AIによるEAの作成は、使いかたによっては、ものすごく省力化になるものであると評価しています。

このAI 一本釣り EA MT5は、ソースコードの90%以上は、AIが作成したものをそのまま使用しています。残りの10%は、手作業で直した部分になります。

 

4.        EAの設定パラメータ


 [買いトレード 有効][売りトレード 有効]は独立してon/offできます。買いトレードのみを行う場合は、[売りトレード 有効]falseにしてください。買い、売りともfalseになっていると、トレードを行いません。

[自動ロット 有効] trueで自動ロットが有効になります。固定ロットで運用される方は、ここをfalseにしてください。

[固定ロット数] 上の[自動ロット 有効]false設定にした場合に、ここで指定した固定ロット数でトレードを行います。

 [最大損失割合%]  SLの設定値と、この最大損失割合設定値から自動ロット計算を行います。(デフォルトは1.8%

 [最小維持率%] SLの値が極端に小さい場合、自動ロット計算でロット数を計算すると、計算結果が大きくなりすぎる場合があります。証拠金維持率の下限値%を設定します。

なお、固定ロットの場合であっても、指定したロット数が大きすぎて、証拠金維持率下限%を下回る場合は、ロット数を自動的に縮小修正される仕様にしてあります。

 [SL/TP  有効ストップロスと利確幅を有効にするかどうかの設定です。通常はtrueにしておきます。

  [By Stop loss] 買いのストップロス設定値(point

  [By Take profit] 買いの利益幅設定値(point

  [Sell Stop loss] 売りのストップロス設定値(point

  [Sell Take profit] 売りの利益幅設定値(point
     [
トレーリングストップ 有効] トレーリングストップの有効on/off

     [トレーリングを開始する利益幅] これ以上の含み益が発生してから、トレーリングを開始します。(point)

     [トレール幅] トレーリングストップの幅を設定します。(point)
買いの場合、現行レートより下に離して(売りの場合、現行レートより上に離して)SLを設定します。

     [トレール刻み幅] この刻み幅以上にレートが離れてから新しいSLを設定します。(これ以下の小さなレートの変動に対してトレールをしません。)

※トレール刻み幅を0に設定することもできますが、トレールの更新頻度がテック毎になることがあります。

  [直近勝率ファクター有効] Auto_Lotsモードで、これをonにすると、直近の勝率に応じて、ロット数を自動調整する機能が有効になります。なお、固定ロット(Auto_Lots=false)の場合は、これがonになっていても機能しない仕様になっています。

     [直近勝率の計算範囲] 直近何回のトレードの結果を反映させるかの回数指定です。指定範囲は1から20までです。

     [想定平均勝率] 長期トレードの平均勝率を指定します。この勝率よりも短期勝率が高い(または低い)場合に、ロット数を自動調整します。

     [直近勝率による倍率係数] この係数で、ロット数が自動調整されます。値が1より大きい場合は、短期勝率が平均勝率よりも高い場合にロット数を増やすように作用します。値が1より小さい場合は、短期勝率が平均勝率よりも高い場合にロット数を減らすように作用します。


     [Buy Entry hour]
 買いトレードのエントリー時間

  [Buy Hold time] 買いトレードのポジション保有時間

[Sell Entry hour] 売りトレードのエントリー時間

  [Sell Hold time] 売りトレードのポジション保有時間

  [スリッページ]  スリッページを指定します。

  [マジックナンバー] マジックナンバーを指定します。

  [フォントサイズ]  フォントサイズを指定します。

  [行の幅] データ表示の行の幅を指定します。

  [Buy  表示色] 買いデータの表示色です。

[Sell 表示色] 売りデータの表示色です。

[Buy  含み益表示色] 買いが含み益になった場合の表示色です。

[Sell 含み益表示色] 売りが含み益になった場合の表示色です。

[ポジション無し 表示色] ポジション無しの場合の表示色です。

[無効 表示色] false設定にした場合の表示色です。

   [累積損益 表示色] 累積損益行の表示色です。


画面表示説明図

1行目が、買いポジション情報です。

2行目が売りポジション情報です。

3行目が通算利益、最大ドローダウン、通算勝率を表示します。

 4行目が短期勝率を表示します。

 

5.        バックテスト結果(固定ロット)

ロット数を0.1に固定して、2016.1.1から2024.4.30の期間(84ヶ月)でバックテストを行いました。結果は以下の通りです。

     初期証拠金                             \1,000,000

     プロフィットファクター                   1.48

     純益                                        \ 1,091,857

     残高最大ドローダウン                 \112,74110%

     勝率                                             39.10%


     ロット                                            0.10(固定)

     リカバリーファクター                          8.01

     推奨証拠金                               \300,000
    
ロット0.01の場合なら、1/10になるので、資金\30,000からトレードができます。


固定ロットによるバックテストの結果

※GogoJungle計算式(一万通貨単位×取引通貨の日本円レート÷25×ロット数平均÷0.1×最大ポジション数+最大損失(含み損込み)×2

1EUR=\167.75と仮定して

10,000×167.75÷25×0.1÷0.1×1 + 112,741×2 = 292,582

     GogoJungleの計算式から、推奨証拠金が30万円となるので、初期ロットが0.01からスタートするのであれば、必要な資金は約3万円になります。

 

 

6.        バックテスト結果(自動ロット)

ロット数を自動にして、同様に2016.1.1から2024.4.30の期間(84ヶ月)のバックテストを行いました。結果は以下の通りです。なお、最大損失を資金の1.8%にする設定で、自動ロット計算を行っています。

 

初期証拠金                            \1,000,000

     プロフィットファクター                   1.99

     純益                                     \ 260,999,828 (2億超え)

     残高最大ドローダウン                \ 23,398,600 (10%)

     勝率                                                39.10%

     ロット                                            Auto(自動設定)

     リカバリーファクター                              9.69

自動ロットでは、総利益が26,099万円となり、初期証拠金の260倍に増えています。プロフィットファクターとリカバリーファクターも、自動ロットの方が、固定ロットより良い値になっています。

 

自動ロットによるバックテストの結果

 

 

7.        EAの特徴(その1)
EAの特徴その1は、「買い」「売り」などのパラメータをそれぞれ独立に選択できることです。
 買いをtrue、売りをfalseにすると、買い動作だけのEAになります。  買いをfalse、売りをtrueにすると、売り動作だけのEAになります。

  両方がfalseだと、売買を行いません。

パラメータ設定によっては、買いと売りの両方のポジションを一時的に同時に持つ場合があります。両建てができない証券会社の場合には、[売りトレード 有効]falseにして、買いだけのトレードを行うこともできます。


バックテスト(始値のみの条件)で、[買いトレード 有効] [売りトレード 有効]true,falseに変えた場合の4通りの結果です。
 買いだけですと、総取引回数が半減しますが、プロフィットファクターやドローダウンの値が良い結果となっています。


SLTP
falseだと、SL/TPを設定しません。(0に設定されます)

SLTPtrue設定の方が、良い結果が得られます。

 

 TRAIL_ONfalseだと、トレーリングストップ動作を行いません。

TRAIL_ON true設定の方が、良い結果が得られます。

 


SRWR_ON
falseだと、直近の勝率に応じたロット数変更を行いません。
SRWR_ON
は、true設定の方が、良い結果が得られます。
SRWR_ON
の効果は著しく、
falseの場合の約8倍の損益になります。

8.        EAの特徴(その2)

EAの特徴は、「動的にパラメータを変えるEAであることです。自動ロット(Auto_Lots)の場合で、SRWR_ONに設定すると、直近の勝率に応じて、ロット数をEAが動的に変更する機能があります。

元々は、直近の相場状況にEAが適合しない場合に、ロット数を自動で減らすことを意図してこの機能を付加したものです。ドローダウンが大きくなった場合に、ロット数を減らし損失を抑えて、次のチャンスが来るまでEAが待つ、言わば「冬眠モード」の発動を想定していました。

しかし、バックテストでパラメータの最適化を行ってみると、係数が0.12になりました。係数が1よりも小さいということは、直近の勝率が想定した平均勝率よりも良い場合には、ロット数を減らし、逆に勝率が低い場合に、ロット数を増やすことになります。想定した「冬眠モード」の動作とは、真逆になるのですが、過去8回のトレードで結果が良い場合は、ロット数を抑え、結果が悪い場合にはロット数を増やすような動作になります。


 

9.        直近の攻めのバックテスト

直近(2024/01/012024/05/10)のバックテストを、総資金10万円で始めて、ギリギリに攻めてみたらどうなるかをテストしてみました。

 パラメータはデフォルトのままで、最小維持率%のみ、102%のギリギリまで落としました。マージンコールの発生を防ぐ為、証拠金維持率が100%を割らないロット数になるように自動調整しています。

 結果は、次の通りです。

期間     1時間足(H1)  (2024.01.01 - 2024.05.24)

モデル 全ティック (利用可能な最小時間枠による最も正確な方法)

 

初期証拠金                              \100,000

     プロフィットファクター                   2.73

     純益                                       \ 93,053

     残高最大ドローダウン               \ 18,331 (18%)

     勝率                                           43.90%

     ロット                                        Auto_Lots

     リカバリーファクター                      4.02

  純益が9万円超で、総資金が\193,053となり、元の資金の約2倍弱に増えました。最大ドローダウンが約18千円に対し、純益が9万3千円というのは、嬉しいですね


この例は、あくまでもギリギリに攻めたらどうなるかというテスト結果です。実際のトレードに関しては、自己責任でお願いします。

 

 

10.  最後に

AIで作成」した、「2億超えEAはいかがでしたか。
少額資金の方でも、十分使用に耐える汎用性の高いEAに仕上がっていると思います。「ぜひ、欲しい!」という方は、ご購入をご検討ください。

 なお、本EAに関するサポートは、一人一人に対応した懇切丁寧で、かつ、回数無制限のサポートを行っていきますので、ご安心ください。ご質問はいつでも、何度でもお受けします。

¥1,500 coupon applicable.
The coupon expires today.
×
Sales from :  06/10/2024 22:04
Purchased: 0times

Price:¥99,800 (taxed)

?About 1-Click Order

Payment

Forward Test
Back Test
¥1,500 coupon applicable.
The coupon expires today.
×

Sales from :  06/10/2024 22:04
Purchased: 0times

Price:¥99,800 (taxed)

?About 1-Click Order

Payment

About Forex Automated Trading
Forex Automated Trading refers to trading that is automated through programming, incorporating predetermined trading and settlement rules. There are various methods to conduct automated trading, but at GogoJungle, we deal with Experts Advisors (hereinafter referred to as EA) that operate on a trading platform called MT4.
There are various types of EAs (Expert Advisors) for different trading types that can be used on MT4.
Just like discretionary trading, there are those that decide trading and settlement timings by combining indicators, those that repeatedly buy or sell at certain price (pips) intervals, and trading methods that utilize market anomalies or temporal features. The variety is as rich as the methods in discretionary trading.

To categorize simply,
・Scalping (Type where trades are completed within a few minutes to a few hours),
・Day Trading (Type where trades are completed within several hours to about a day),
・Swing Trading (Type where trades are conducted over a relatively long period of about 1 day to 1 week)
・Grid/Martingale Trading (Holding multiple positions at equal or unequal intervals and settling all once a profit is made. Those that gradually increase the lot number are called Martingale.)
・Anomaly EA (Mid-price trading, early morning scalping)

When engaging in Forex, there are risks in automated trading just as there are in discretionary trading.
However, a substantial advantage of automated trading is its ability to limit and predict risks beforehand.

[Risk]
Inherent to forex trading are the trading risks that undeniably exist in automated trading as well.
・Lot Size Risk
Increasing the lot size forcibly due to a high winning rate can, in rare instances, depending on the EA, lead to substantial Pips loss when a loss occurs. It is crucial to verify the SL Pips and the number of positions held before operating with an appropriate lot.

・Rapid Market Fluctuation Risk
There are instances where market prices fluctuate rapidly due to index announcements or unforeseen news. System trading does not account for such unpredictable market movements, rendering it incapable of making decisions on whether to settle in advance or abstain from trading. As a countermeasure, utilizing tools that halt the EA based on indicator announcements or the VIX (fear index) is also possible.

[Benefits]
・Operates 24 hours a day
If there is an opportunity, system trading will execute trades on your behalf consistently. It proves to be an extremely convenient tool for those unable to allocate time to trading.

・Trades dispassionately without being swayed by emotions
There is an absence of self-serving rule modifications, a common human tendency, such as increasing the lot size after consecutive losses in discretionary trading or, conversely, hastily securing profits with minimal gains.

・Accessible for beginners
To engage in Forex trading, there is no prerequisite to study; anyone using system trading will achieve the same results.


[Disadvantages]
・Cannot increase trading frequency at will
Since system trading operates based on pre-programmed conditions, depending on the type of EA, it might only execute trades a few times a month.

・Suitability may vary with market conditions
Depending on the trading type of the EA, there are periods more suited to trend trading and periods more suited to contrarian trading, making consistent results across all periods unlikely. While the previous year might have yielded good results, this year's performance might not be as promising, necessitating some level of discretion in determining whether it is an opportune time to operate.
The requirements for operating automated trading (EA) on MT4 are as follows:
・MT4 (MetaTrader 4. An account needs to be opened with a Forex company that offers MT4.)
・EA (A program for automated trading)
・The operating deposit required to run the EA
・A PC that can run 24 hours or a VPS (Virtual Private Server), where a virtual PC is hosted on a cloud server to run MT4.
If you open an account with a forex broker that supports MT4, you can use MT4 as provided by that forex broker. MT4 is a stand-alone type of software that needs to be installed on your computer, so you download the program file from the website of the FX company where you opened the account and install it on your computer.

Additionally, there are both demo and real accounts available. You can experience trading with virtual money by applying for a demo account. After opening a real account, you select the connection server assigned by the Forex broker, enter the password, and log in to the account.
When you deposit money into your account using the method specified by the forex broker, the funds will be reflected in your MT4 account, and you can trade.
To set up an EA when you purchase it through GogoJungle, follow the steps below:
Firstly, download the purchased EA file from your My Page on GogoJungle. You will download a zip (compressed) file, so right-click to extract it and retrieve the file named ‘◯◯◯ (EA name)_A19GAw09 (any 8 alphanumeric characters).ex4’ from inside.

Next, launch MT4 and navigate to ‘File’ → ‘Open Data Folder’ → ‘MQL4’ → ‘Experts’ folder, and place the ex4 file inside. Once done, close MT4 and restart it. Then, go to the upper menu ‘Tools’ → ‘Options’, and under ‘Expert Advisors’, ensure ‘Allow automated trading’ and ‘Allow DLL imports’ are checked, then press OK to close.

The necessary currency pair and time frame for the correct operation of the EA are specified on the EA sales page. Refer to this information and open the chart of the correct currency pair time frame (e.g., USDJPY5M for a USD/Yen 5-minute chart).

Within the menu navigator, under ‘Expert Advisors’, you will find the EA file name you placed earlier. Click to select it, then drag & drop it directly onto the chart to load the EA. Alternatively, you can double-click the EA name to load it onto the selected chart.

If ‘Authentication Success’ appears in the upper left of the chart, the authentication has been successful. To operate the EA, you need to keep your PC running 24 hours. Therefore, either disable the automatic sleep function or host MT4 on a VPS and operate the EA.
EAs from GogoJungle can be used with one real account and one demo account per EA.
If you want to use it with an account other than the authenticated one, you need to reset the registered account.

To reset the account, close the MT4 where the Web authentication is registered, then go to My Page on GogoJungle > Use > Digital Contents > the relevant EA > press the ‘Reset’ button for the registration number, and the registered account will be released.

When the account is in a reset state, using the EA with another MT4 account will register a new account.
Also, you can reset the account an unlimited number of times.
If you encounter an error with Web authentication, or if the EA is trading on GogoJungle's forward performance page but not on your own account, there could be various reasons. For more details, please refer to the following link:
 → Items to Check When EA is Not Operating
In Forex trading, the size of a lot is usually:

1 lot = 100,000 currency units
0.1 lot = 10,000 currency units
0.01 lot = 1,000 currency units

For USD/JPY, 1 lot would mean holding 100,000 dollars.
The margin required to hold lots is determined by the leverage set by the Forex broker.
If the leverage is 25 times, the margin required to hold 10,000 currency units of USD/JPY would be:
10000*109 (※ at a rate of 109 yen per dollar) ÷ 25 = 43,600 yen.
・Profit Factor: Total Profit ÷ Total Loss
・Risk-Return Ratio: Total Profit and Loss during the period ÷ Maximum Drawdown
・Maximum Drawdown: The largest unrealized loss during the operation period
・Maximum Position Number: This is the maximum number of positions that the EA can theoretically hold at the same time
・TP (Take Profit): The set profit-taking Pips (or specified amount, etc.) in the EA's settings
・SL (Stop Loss): The set maximum loss pips (or specified amount, etc.) in the EA's settings
・Trailing Stop: Instead of settling at a specified Pips, once a certain profit is made, the settlement SL is raised at a certain interval (towards the profit), maximizing the profit. It is a method of settlement.
・Risk-Reward Ratio (Payoff Ratio): Average Profit ÷ Average Loss
・Hedging: Holding both buy and sell positions simultaneously (Some FX companies also have types where hedging is not allowed)
GogoJungle Corporation
Registration Number for Financial Instruments Business: No. 1960 - Kanto Finance Bureau (Gold Trading)
A member of General Incorporated Association and Japan Investment Advisers Association
GogoJungle Corporation
Registration Number for Financial Instruments Business:
No. 1960 - Kanto Finance Bureau (Gold Trading)
A member of General Incorporated Association
Japan Investment Advisers Association
Financial Services AgencyJapan Investment Advisers AssociationFinancial Instruments Mediation Assistance CenterSecurities and Exchange Surveillance Commission

Copyright © 2024 GogoJungle Inc. All Rights Reserved.