
分かっていたことだが・・・

何が分かっていたのさ、レシンソン君?

サンプルEAを使ってもなかなか利益を上げられないってことだ

ああ、前回やったMACD Sampleのことね・・
まぁそれ使って勝ててたらその中にごまんとあるEAが出回ったりしないからね・・
でもそれを少しでも改善する方法が実がMT4には搭載されているんだよ!

な、何ぃぃぃ!!
それって何なんだい?

EAの最適化さ!

EAの最適化?

そう、最適化!
EAのバックテストを行う方法は「MT4の使い方⑩ストラテジーテスターウィンドウの基本操作」で
説明したんだけど、そのバックテストに合わせて、自動的にパラメータを変更しながら検証していって
、そのEAに対してどんなパラメータが最適なパフォーマンスに適しているかを教えてくれる機能だよ!

ああ、デフォルト値での取引より、「このEAにはこのパラメータがいいですよ」って検証してくれる機能ってことか。なるほどなあ

そうだね!やりかたもシンプルだし今回はその方法につてい説明していくよ!
デモ口座開設とMT4のダウンロードはこちらから(詳しいやり方は参考記事「デモ口座開設とMT4をインストールしよう!」をご確認ください)
「XM Trading MT4ダウンロードページ」
自動売買システム(EA)の最適化

・・の概要は冒頭でも説明した通りなんだけど、これはEAを使ってい取引している人にとって
よく使うことになる設定でもあるからよく覚えておこうね

そんなにか

例え無料でも有料であっても、それが本当に信頼に値するEAなのか・・
業者が出しているバックテストやフォワードテストの結果をそのまま鵜呑みにして購入してダウンロードしてそのまま使うか・・
人それぞれなんだけど、レシンソン君はどうだい?

たしかにリアル口座だとちょっと怖いわな・・

でしょ!だから今のうちに理解しておくことは大切なんだよ!
自動売買システム(EA)の最適化の設定方法

今回は、前回説明したMACD Sampleで試してみよう!
まずは「MT4の使い方⑩ストラテジーテスターウィンドウの基本操作」で説明したとおり、
ストラテジーテスターウィンドウを開いてね!
一度、バックテストしておこうか、期間は一か月、一時間足でやってみよう!


普通に勝率高いんだよなあ

まああくまでバックテストだからね・・


じゃあまず「セッティング」タブの「最適化」にチェックを入れて「エキスパートの設定」をクリックして
テスト設定画面を開こう!


囲ってある「最適化パラメータ」と「遺伝的アルゴリズム」って何だ?

「最適化パラメータ」はどの項目を基準に最適化を行うかを変更できるんだ。
「遺伝的アルゴリズム」はそれを行いますか?って意味でのチェック欄ってだけだよ、難しく考えなくて大丈夫!
最初は「Balance(口座残高)」でいいからここはそのままの状態でやってみよう。
次はパラメーターの入力だよ!


ここで重要なのは「スタート」「ステップ」「ストップ」の設定だね!

どういうことなんだい

ここで重要なのは「スタート」「ステップ」「ストップ」の設定だね!
「スタート」はテスト開始時の最初の値、「ステップ」は検証す段階の値、「ストップ」はテストを終える値だよ!
つまりスタートを10、ステップを5、ストップを50だとしたら5、10、15、20、25・・・50って感じに5刻みで10から50までの値を検証していくってことだよ!

なるほどな、でどうすりゃいいんだい?

検証する変数の数が増えれば増えるほどMT4に負荷がかかってそれこそ時間がかかったり、もしかしたら途中で止まっちゃったりもあるから・・今回がトレーリングストップに絞ってやってみようか!


こんなもんかな・・じゃあ次は「最適化」タブね!


ここは表示されてるそれぞれの値に達した時にテストを止めるって機能なんだけど・・
制限なしにした方が検証としてはスムーズに進むからここはそのままでいいよ!
そしたら「OK」をクリックして設定完了!
入力した値や項目が反映されているかどうか確認するために再度設定画面を開いてよく確認しようね!
そこまでが完了したら初期画面の「スタート」をクリックして最適化検証開始だよ!
自動売買システム(EA)の最適化検証後の確認

検証が終了すると、通常のバックテストの結果と違って「最適化結果」と「最適化グラフ」の項目が追加されるよ!
まずは「最適化結果」のタブの説明からね!


「最適化結果」のタブをクリックすると上の画面のように結果の良かった順で表示されるよ!
じゃあ次は「最適化グラフ」のタブね!


「最適化グラフ」のタブをクリックすると上の画面のように各検証値での残高が表示されるよ!

この場合だとトレーリングストップ50が最適解ということか?

まぁ今回はトレーリングストップに値だけだし、今回の結果だけで言うとそうなっちゃうけど、業者や、FX中級者くらいの投資家の人たちはこれを幾度となく検証しているからね!たった一回の最適化結果だとほとんど参考にならないから何度も何度もテストして最適解を見つけることが大事なんだよ!
だからレシンソン君も色々と今のうちに試しておいてね!
たいていの業者のはそういう手間を省くためにEAのテストレポート結果をこれが売り文句か!ってくらい
ドドーン!と表示してるけどね!

なるほどなあ・・今回もまたひとつ賢くなってしまったか・・

というところで今回はここまで!また次回会おうね!