購入以来どっぷり嵌っている格安EA"SteadyWinner"のカスタマイズですが、1月18日記事に書いた方法以降、あまり良いカスタイマイズ内容が見つかりませんでした。ここ1週間程はやや諦めモードでオリジナルEAの作成に注力していたのですが、FX自動売買ポートフォリオさんで紹介されていたのを見て奮起。SteadyWinner稼動の動きを確認したところ、すごく簡単で効果的な方法が見つかりましたので紹介します。
紹介前に、これまでのカスタマイズ内容でのバックテスト結果を確認します。前回まではバックテスト期間を2007年1月からスタートしていましたが、面倒なので2008年1月からに変更しています。
通貨ペア EURUSD
期間 1時間足(H1) 2008.01.02 - 2011.01.28
Lots 0.1
Initial deposit 1000.00
Total net profit 2727.01
Gross profit 5871.80
Gross loss -3144.78
Profit factor 1.87
Expected payoff 3.56
Absolute drawdown 5.40
Maximal drawdown 230.90 (12.16%)
Relative drawdown 15.34% (198.82)
Total trades 766
Short positions (won %) 344 (72.67%)
Long positions (won %) 422 (84.12%)
Profit trades (% of total) 605 (78.98%)
Loss trades (% of total) 161 (21.02%)
Largest profit trade 53.00 / loss trade -92.52
Average profit trade 9.71 / loss trade -19.53

さて、カスタマイズ内容。
ソースコードの「// Stop SteadyWinner from trading if・・・」のコメント下にあるエントリー条件「lFlagBuyOpen」と「lFlagSellOpen」にそれぞれ次の条件を付加します。
lFlagBuyOpen = ((diATR ・・・(略)・・・
&& (diWPR1< X) && (diStochastic82<diStochastic84)
&& ・・・(以下略);
lFlagSellOpen = ((diATR ・・・(略)・・・
&& (diWPR1> Y) && (diStochastic82>diStochastic84)
&& ・・・(以下略);
※「X」と「Y」の値は、それぞれデフォルトのままです。
これだけ。
使用されているストキャスティクスのシグナルラインの位置関係を定義してやるだけです。トレンドが明確でない環境下でのポジションテイクをカットしてしまおうという趣旨です。しかし、結果的にはトレード回数が増えています・・・アレ?
Initial deposit 1000.00
Total net profit 3003.67
Gross profit 6070.83
Gross loss -3067.16
Profit factor 1.98
Expected payoff 3.87
Absolute drawdown 4.50
Maximal drawdown 203.62 (15.25%)
Relative drawdown 15.25% (203.62)
Total trades 776
Short positions (won %) 354 (73.45%)
Long positions (won %) 422 (84.60%)
Profit trades (% of total) 617 (79.51%)
Loss trades (% of total) 159 (20.49%)
Largest profit trade 51.90 / loss trade -92.22
Average profit trade 9.84 / loss trade -19.29

総利益、PF、最大ドローダウン幅、勝率のいずれも改善。すばらしい。もう少し細かくテストして、来週から実弾投入します。
※皆さんも試される場合は、まず、ご自身の環境でのバックテストをお薦めします。
通貨ペア EURUSD
期間 1時間足(H1) 2008.01.02 - 2011.01.28
Lots 0.1
Initial deposit 1000.00
Total net profit 2727.01
Gross profit 5871.80
Gross loss -3144.78
Profit factor 1.87
Expected payoff 3.56
Absolute drawdown 5.40
Maximal drawdown 230.90 (12.16%)
Relative drawdown 15.34% (198.82)
Total trades 766
Short positions (won %) 344 (72.67%)
Long positions (won %) 422 (84.12%)
Profit trades (% of total) 605 (78.98%)
Loss trades (% of total) 161 (21.02%)
Largest profit trade 53.00 / loss trade -92.52
Average profit trade 9.71 / loss trade -19.53
さて、カスタマイズ内容。
ソースコードの「// Stop SteadyWinner from trading if・・・」のコメント下にあるエントリー条件「lFlagBuyOpen」と「lFlagSellOpen」にそれぞれ次の条件を付加します。
lFlagBuyOpen = ((diATR ・・・(略)・・・
&& (diWPR1< X) && (diStochastic82<diStochastic84)
&& ・・・(以下略);
lFlagSellOpen = ((diATR ・・・(略)・・・
&& (diWPR1> Y) && (diStochastic82>diStochastic84)
&& ・・・(以下略);
※「X」と「Y」の値は、それぞれデフォルトのままです。
これだけ。
使用されているストキャスティクスのシグナルラインの位置関係を定義してやるだけです。トレンドが明確でない環境下でのポジションテイクをカットしてしまおうという趣旨です。しかし、結果的にはトレード回数が増えています・・・アレ?
Initial deposit 1000.00
Total net profit 3003.67
Gross profit 6070.83
Gross loss -3067.16
Profit factor 1.98
Expected payoff 3.87
Absolute drawdown 4.50
Maximal drawdown 203.62 (15.25%)
Relative drawdown 15.25% (203.62)
Total trades 776
Short positions (won %) 354 (73.45%)
Long positions (won %) 422 (84.60%)
Profit trades (% of total) 617 (79.51%)
Loss trades (% of total) 159 (20.49%)
Largest profit trade 51.90 / loss trade -92.22
Average profit trade 9.84 / loss trade -19.29
総利益、PF、最大ドローダウン幅、勝率のいずれも改善。すばらしい。もう少し細かくテストして、来週から実弾投入します。
※皆さんも試される場合は、まず、ご自身の環境でのバックテストをお薦めします。
これまでの改良アイデアだけでも、結構結果がでていたのですが、、、
さっそく試してみます。
ありがとうございます!!