Rep Trick Trader
- ユーティリティ
- Zhi Zi Ma Chang
- バージョン: 1.3
- アップデート済み: 1 1月 2024
- アクティベーション: 20
リピートトレードのためのサポートツール
パラメーターで売買方向および任意の価格範囲とリピート回数(またはpips幅)を設定。
あとは設定に従ってEAが自動的に売買を繰り返します。
売り、買いそれぞれに範囲設定できますので戦略の幅も広がります。
売買条件の判断はユーザーで行う半裁量ツールです。EA内部ではインジケーター等での状況判断は行いません。
機能と使い方
通常のEAと同様にMQL4/Expertsフォルダ内にダウンロードしたファイルを保存し、トレードしたいシンボルのチャートに適用してください。
基本動作
-
パラメーターで任意の価格範囲とリピート回数(またはpips幅)を設定。
TP・SLの設定に従って自動的に売買を行います。 -
EA内部でエントリーレベルの情報を保持し、成行でポジションを構築します。
(ピンポイントでは約定しない場合があるためプラスマイナス5ポイントの範囲を許容します) -
設置時間足は1分足~5分足程度を想定して作成しています。(ただし制限はありません)
- EAによる全ての取引は成行で行われます。
チャート上のボタンによる操作
チャート左下部の各ボタンで一時停止、全決済などを行うことができます。(画像を参照してください)
-
開始/一時停止ボタン
クリックで新規ポジション構築の開始/一時停止を切り替えることができます。
EA自体は停止しないため、既存ポジションはTP/SLの設定に従って決済されます。
デフォルトでは グリーン=動作中(Running)、オレンジ=一時停止中(Pausing)となります。 -
BUYボタン / SELLボタン
Trade DirectionでBothを選択した場合に開始/一時停止ボタンの横に表示されます。
機能は開始/一時停止ボタンと同様で、Bは買い方向のみ、Sは売方向のみに適用されます。
デフォルトでは グリーン=動作中(Running)、オレンジ=一時停止中(Pausing)となります。 -
CLOSEボタン
クリックするとオープンポジションの全決済の確認ダイアログが表示され、OKを押下で全決済が実行されます。
決済後の意図しないエントリーを防ぐため、一時停止中のみ動作します。
ペンディングオーダーによるリモート操作
VPSで稼働させている場合でも、ローカルPCやスマホアプリのMT4から指値注文を送信することで一時停止、全決済などの操作を行うことができます。
ただし、非EAからの注文(マジックナンバーやコメントが使用できない)を利用している都合上、 同一口座かつ同一シンボルで複数のパターンを稼働させているような場合は誤作動する可能性がありますのでチャート上のボタン操作をご利用ください。
オーダータイプと価格の組み合わせをコマンドとして実行します。(画像を参照してください。)
なるべく覚えやすいように、使用するオーダーはMT4の指値注文リストの一番上BuyLimitと一番下SellStopとしています。
-
シンボルの価格0に上表の価格(ポイント)を加算した値を発注価格として送信します。
例:
USDJPYの場合 「BuyLimit / 価格 0.001」 で発注 → 一時停止(全体)
EURUSDの場合 「BuyLimit / 価格 0.00012」 で発注 → 一時停止(売りのみ)BuyLimit注文は動作後も削除されません。また、注文が残った状態で再開コマンドが送信されても再度一時停止状態となります。再開前に手動で削除してください。
-
全決済させる場合は一時停止後にSellStopを送信します。
例:
EURUSDの場合 「BuyLimit / 価格 0.00011」 で発注 → 一時停止(買いのみ)
さらに 「SellStop / 価格 0.00001」 で発注 → 全決済(買いのみ)一時停止されていない方向のポジションはSellStopを送信しても決済されません。
決済処理完了後、自動的にSellStop注文は削除されます。 -
稼働状況の問い合わせを利用する場合は、EAを稼働しているMT4の[ツール]-[オプション]-[通知機能]からプッシュ通知を許可してください。
スマホアプリのプッシュ通知を許可している場合はほぼリアルタイムで受信されますが、許可していない場合はアプリの再起動時に受信されます。
オープンポジションを保有した状態での初期化(設定変更など)について
可能な限り読込後にポジション情報を再取得するようにしていますが、値幅やリピート回数を変更した場合、また約定時にブローカー側のスリッページが発生したポジションなどはすべてを反映することが難しいため、設定変更後に近い価格帯でポジションが重複する場合があります。 重複させたくない場合は、下記の「初期化で取得から漏れてしまったオープンポジションの引き継ぎ方法」をご参照ください。
※CSVに反映されていないポジションでもTP/SLなどのクローズ処理やブレークイーブン、トレールの動作には影響ありません。
CSVからの読み込み
価格範囲・リピート設定はそのままでその他のパラメーターを変更したい場合はCSVからの読み込みを利用することができます。
パラメーターによる初期化と比較して直近のオープンポジションの状態をそのまま引き継げるところが利点です。
-
CSVは「MQL4\Files\RepeatTrader_UsrData」 フォルダ内に、買いは「シンボル名マジックナンバー_PriceB」売りは「シンボル名マジックナンバー_PriceS」として保存されます。
-
読み込まれる情報は、[ 分割されたエントリーレベル ] と [ 対応するポジションのチケットナンバー ] です。
初期化で取得から漏れてしまったオープンポジションの引き継ぎ方法
裏技的ですが、パラメーターによる初期化で取得から漏れてしまったオープンポジションのチケットナンバーを直接CSVに書き込んで読み込みし直すことでポジション情報を引き継ぐことが可能です。
< 手順 >
-
MT4の自動売買アイコンをオフにする(EA全体を停止)
-
漏れているポジションのチケットナンバーをCSV内の対応するエントリーレベルの行の-999と差し替え→保存
-
パラメーターの「Initializing Rate Level by」を「CSV」にして適用
-
MT4の自動売買アイコンをオンにする
※CSVを手動で変更する場合は必ずEA全体を停止してください(稼働中はEAが上書きするため変更が反映されません。)
※チケットナンバーはオープンポジションとして存在するものを記入してください。存在しないナンバーが記入されたエントリーレベルでは以降のポジションが構築されません。
パラメーター
BASE SETTINGS
-
Comment
コメント -
Run/Pause Button's Initial State
EA設置時の開始/一時停止ボタンの初期状態 デフォルトでは設置直後のエントリーを防ぐため一時停止(Pausing)としています。
バックテストの際はRunningにしてください。 -
Trade Direction
買いのみ(BUY Only)/売りのみ(SELL Only)/売り買い両方向(Both)のいずれかを選択。 -
Slippage(pips)
スリッページ(ブローカーで設定が許可されている場合に有効) -
Max Spread ( points )
最大スプレッド。指定値以下の時のみ発注されます。 -
Max Positions ( per One Side )
片側あたりの最大ポジション数 -
Max Trade ( Daily / Closed Base / per One Side )
一日あたりの最大ポジション数(クローズベース/片側あたり) -
Trade Interval ( Bars )
次のポジションをオープンするまでのインターバルを、設置時間足の本数で設定します。
(0とした場合、急変動があった際に短時間で連続してポジションがオープンされる可能性があります。)
REPEAT SETTINGS
-
Initializing Rate Level by
Parameter パラメーターからエントリーレベルを設定(初期化)します。 CSV 保存済みのCSVからエントリーレベルおよび既存ポジションの情報を読み込みます。直近に保存された状態が反映されます。 -
Repeat Set Type
Set by Times 指定範囲内でのリピート回数で指定します。 Set by Pips pips幅で指定します。 - Magic Number
マジックナンバー
買いポジション用、売りポジション用にそれぞれ設定します。 -
Lots
ロット
買いポジション用、売りポジション用にそれぞれ設定します。 -
Upper Rate
上限価格
買いポジション用、売りポジション用にそれぞれ設定します。売り買いの範囲が重複しても問題ありません。 -
Lower Rate
下限価格
買いポジション用、売りポジション用にそれぞれ設定します。売り買いの範囲が重複しても問題ありません。 -
Repeat Count ( Times )
リピート回数
Repeat Set Typeで「Set by Times」を選択した場合こちらの値が参照されます。 買いポジション用、売りポジション用にそれぞれ設定します。 -
Repeat Span ( pips )
リピート幅
Repeat Set Typeで「Set by Pips」を選択した場合こちらの値が参照されます。 買いポジション用、売りポジション用にそれぞれ設定します。 -
Rangeout Behavior
上限・下限価格を逸脱した場合の挙動を設定します。No Action 設定なし。範囲内に戻ってきた場合ポジションの構築が再開されます。 Pause 新規ポジションの構築を停止します。既存のポジションは通常通りTP/SLまで維持されます。 Close All & Pause 既存のポジションを全決済(売り/買い別)した上で、新規ポジションの構築を停止します。
TP / SL SETTINGS
-
Takeprofit : Behavior
テイクプロフィットの動作タイプIndividual 各ポジションごと個別に指定pipsで決済されます。 Total 現在のオープンポジション×指定pips分の利益となった時点でまとめて決済されます。 -
Takeprofit : Pips
テイクプロフィットの値 -
Stoploss : Behavior
ストップロスの動作タイプIndividual 各ポジションごと個別に指定pipsで決済されます。 Total 現在のオープンポジション×指定pips分の損失となった時点でまとめて決済されます。 -
Stoploss : Pips
ストップロスの値
BREAKEVEN / TRAILING STOP
-
Starting Count of Position
この項目で設定したポジション数に達した時点からブレークイーブン・トレールの動作がスタートします。 -
Break Even
ブレークイーブンを使用する場合はtrueとします。 -
Break Even : Distance ( pips )
この設定値まで有利に価格が変動した場合にブレークイーブンが作動します。 -
Trail : Start Distance ( pips )
この設定値まで有利に価格が変動した場合にトレールを開始します。 -
Trail : Loss Distance ( pips )
トレールで使用するストップロスの幅を設定します。 -
Trail : Modifying Span ( pips )
トレール開始後、この設定値分有利に価格が変動するごとにストップの位置を更新します。
EA START OPTION
-
Trading Term
期間を指定してEAを動作させたい場合trueとします。 -
Start Date ( Server Time )
開始日時をサーバータイムで設定します。 -
End Date ( Server Time )
終了日時をサーバータイムで設定します。
TRADE DAY SETTINGS
-
Day/Time Filter
日時フィルターを使用する場合trueとします。 -
Day Filter : Trade Month ( Server time )
トレードを有効にする月を設定します。 -
Day Filter : Trade Day ( Server time )
トレードを有効にする日を設定します。 -
Day Filter : Trade Weekday ( Server time )
トレードを有効にする曜日を設定します。
月曜=1、火曜=2、水曜=3、木曜=4、金曜=5 -
Time Filter : Trade Hour ( Server time )
トレードを有効にする時間を設定します。(サマータイムに対応。) -
Time Filter : Trade Minute ( Server time )
トレードを有効にする分を設定します。Day/Time Filter共通書式
「1,2,3,4,5」のように個別に記述する方法と「1-30」のように期間をまとめて記述する方法を採用しています。(「-」は半角ハイフン)
両方の書式は「1,2,5-10,15,20-31」のように混在させることができます。 全項目がマッチした時のみ有効になります。(例えば曜日指定のみ使用したい時も日付は1-31のままで構いません)
設定に使用する日時はすべてサーバータイム(MT4上の表示と同じ)となります。 -
Summer Time
OFF / ON : Type USA / ON : Type UK から選択します。サマータイム使用時の時間入力欄は冬時間基準となります。 (GMT2/GMT3の場合、入力「1」=冬「サーバータイム1時(JST8時)」=夏「サーバータイム2時(JST8時)」)
GMTオフセットは自動取得されます。(バックテスト除く。また、市場が閉まっている場合は正確な値が取得されません)
欧州(UK)は2022年に廃止になるという話でしたが残したままとしています。 -
GMT Offset ( for backtest )
バックテスト用のGMTオフセット。
DISPLAY SETTINGS
-
Show Upper/Lower Line ( BUY )
買い方向の上限・下限価格のラインを表示 -
Upper Line Color ( BUY )
買い方向の上限ラインの色 -
Lower Line Color ( BUY )
買い方向の下限ラインの色 -
Show Upper/Lower Line ( SELL )
売方向の上限・下限価格のラインを表示 -
Upper Line Color ( SELL )
売り方向の上限ラインの色 -
Lower Line Color ( SELL )
売り方向の下限ラインの色 -
Show Average Price Level
全オープンポジションの平均建値ラインを表示 -
Average Level Color
平均建値ラインの色 -
Button(Run) : Background Color
開始ボタンの背景色 -
Button(Run) : Border Color
開始ボタンの枠線の色 -
Button(Run) : Text Color
開始ボタンの文字色 -
Button(Pause) : Background Color
一時停止ボタンの背景色 -
Button(Pause) : Border Color
一時停止ボタンの枠線の色 -
Button(Pause) : Text Color
一時停止ボタンの文字色 -
Button(CLOSE) : Background Color
全決済ボタンの背景色 -
Button(CLOSE) : Border Color
全決済ボタンの枠線の色 -
Button(CLOSE) : Text Color
全決済ボタンの文字色