EAやインジケータを作成するためのテンプレート - ページ 4

 

それが存在するかどうかわからない。 ここで一度だけ解決策を紹介します。 NotePadでテンプレートを開き、スクロールしてインジケータを紙にメモしてください。

 

いいえ

これはヒューマンパーサー ですが、ちょっと手抜きです...。

 

提案された方法よりも良い方法は、エキスパート/インジケータリストをコピーしてメモ帳に貼り付け、新しいチャートを開いてテンプレートを1つずつ投稿し、テンプレートで使用しているものにチェックマークを付けることです。エキスパート/インジケーターのフォルダに戻り、カスタムで使用していないものを削除してください。

18年間やってきて、以前はこの方法でやっていました。10分もかからずに完了します。また、スペースもかなり節約できます。

最近は、テストするシステムごとに別のMT4プラットフォームを1つずつ使っています。現在、私が取引しているシステムでは、実行するために80以上のテンプレートと約25のカスタムインディケータが 必要です(そう、一つのシステムです)。

 

パーサー

最終的にpspadで全てのテンプレートからindicators (name=)の行を抽出し、vimで編集して使用しないパターン (:g/pattern_toremove/d) を削除 し、pspadで再編集してロボコピーのコマンドを挿入しました(vimでも可能です)。

mt4ディレクトリからすべてのインジケータを削除し、使用するインジケータのみをバックアップからbatでコピーします。

そして、すべてOKです。

 

EAとインジケータを作成するためのテンプレート - MT4

フォーラム

  1. いくつかの良いテンプレート -スレッド
  2. mql4コード "の機能 -スレッド

記事

  1. MetaEditor:テンプレート という立ち位置
  2. 怠惰は進歩への刺激であるテンプレートの半自動マーク付け
  3. ユニバーサル・エキスパート・アドバイザーのテンプレート

コードベース

  1. トレーリングストップ付エキスパートアドバイザテンプレートv2- MetaTrader 4用エキスパート
  2. 基本的なATRベースのテイクアンドストップエキスパートアドバイザー- MetaTrader 4のためのエキスパート
  3. トレーリング ストップ付エキスパートアドバイザー - MetaTrader 4用エキスパート
  4. 基本的な移動平均のテンプレート- MetaTrader 4のための専門家
  5. 基本的な移動 平均のテンプレート - MetaTrader 4のための専門家
  6. グリッドテンプレートEA- MetaTrader 4のための専門家
  7. 基本的なRsiのテンプレートEA- MetaTrader 4のための専門家
  8. テンプレート名- MetaTrader 4のためのインジケータ
  9. DLLなしニュースEA テンプレート - MetaTrader 4のための専門家
  10. 2つのソースからのDLLなしニュースEA テンプレート - MetaTrader 4のための専門家
  11. EA テンプレート - MetaTrader 4のための専門家
  12. 堅牢なEA テンプレート - MetaTrader 4のための専門家

============

Basic Moving Average template
Basic Moving Average template
  • www.mql5.com
PricerEA PricerEA is a utility to help any trader to place pending orders (stop or limit) at a specific price. SpreadWatch This indicator watches and displays the biggest spread the pair generated. It is recommended to run at least 5 days, from Monday to Friday, to get a big picture of the broker's spread. My Trailing Simple Trailing...
 

基本的な移動平均のテンプレート - MetaTrader 4のための専門家

基本的な移動平均のテンプレート - MetaTrader 4のための専門家

基本的な移動平均のテンプレートEA - 移動平均インジケータからの信号とそれに応じて取引します。このテンプレートは、取引操作に必要な資金管理を含むすべての基本的な機能を備えています。

Basic Moving Average template
Basic Moving Average template
  • www.mql5.com
PricerEA PricerEA is a utility to help any trader to place pending orders (stop or limit) at a specific price. SpreadWatch This indicator watches and displays the biggest spread the pair generated. It is recommended to run at least 5 days, from Monday to Friday, to get a big picture of the broker's spread. My Trailing Simple Trailing...
 

基本的なATRベースのテイクアンドストップエキスパートアドバイザー - MetaTrader 4のための専門家

基本的なATRベースのテイクアンドストップエキスパートアドバイザー - MetaTrader 4用エキスパート

With this template i'm demonstrating the use of Average True Range based take profit and stop loss levels. Take profit and stop loss levels are calculated using ATR factor multipliers.

----------------

他のテンプレート

Basic ATR based take and stop expert adviser
Basic ATR based take and stop expert adviser
  • www.mql5.com
Trend flex x 2 Multi Currency Template This is Multi Currency Expert Advisor Template that can trade according to symbol list (default 6 symbols). For Example, Ichimoku Chinkou Span is used for entry logic. // Main input parameters input double Lots = 0.01; // Basic lot size input int StopLoss= 50; //Stoploss (in Pips) input int...
 
Sergey Golubev:

EAとインジケータを作成するためのテンプレート - MT4

フォーラム

  1. いくつかの良いテンプレート -スレッド
  2. mql4コード "の機能 -スレッド

記事

  1. MetaEditor:テンプレート という立ち位置
  2. 怠惰は進歩への刺激であるテンプレートの半自動マーク付け
  3. ユニバーサル・エキスパート・アドバイザーのテンプレート

コードベース

  1. トレーリングストップ付エキスパートアドバイザテンプレートv2- MetaTrader 4用エキスパート
  2. 基本的なATRベースのテイクアンドストップエキスパートアドバイザー- MetaTrader 4のためのエキスパート
  3. トレーリング ストップ付エキスパートアドバイザー - MetaTrader 4用エキスパート
  4. 基本的な移動平均のテンプレート- MetaTrader 4のための専門家
  5. 基本的な移動 平均のテンプレート - MetaTrader 4のための専門家
  6. グリッドテンプレートEA- MetaTrader 4のための専門家
  7. 基本的なRsiのテンプレートEA- MetaTrader 4のための専門家
  8. テンプレート名- MetaTrader 4のためのインジケータ
  9. DLLなしニュースEA テンプレート - MetaTrader 4のための専門家
  10. 2つのソースからのDLLなしニュースEA テンプレート - MetaTrader 4のための専門家
  11. EA テンプレート - MetaTrader 4のための専門家
  12. 堅牢なEA テンプレート - MetaTrader 4のための専門家

============

EAとインジケータを作成するためのテンプレート - MT5

フォーラム

N/A

記事

  1. C++テンプレートに代わる擬似テンプレートの使用
  2. MetaTrader用の高度なEAコンストラクタ - botbrains.app- 記事(MT5)
  3. EAコンストラクタ開発の試み- 記事(MT5)
  4. カスタムインジケーターに基づくトレーディングシグナルジェネレーター
  5. MQL4からMQL5へのインジケータの移管
  6. UMLツールを使用したExpert Advisorの開発方法
  7. MQL5によるデジタルフィルタの実践的な実装(初級
  8. オブジェクト指向を利用したEAのモードプログラミング

コードベース

  1. Expert Advisor テンプレート- MetaTrader 5 用エキスパート
  2. トレーディングエンジン4- MetaTrader 5用エキスパート
  3. インジケータコード- MetaTrader 5用エキスパート
  4. テンプレートの適用- MetaTrader 5用スクリプト
  5. 市場分析のためのスクリプトと テンプレート - MetaTrader 5のためのスクリプト
An attempt at developing an EA constructor
An attempt at developing an EA constructor
  • www.mql5.com
In this article, I offer my set of trading functions in the form of a ready-made EA. This method allows getting multiple trading strategies by simply adding indicators and changing inputs.
 

トレーディング、自動売買システム、トレーディング戦略のテストに関するフォーラム

MQL5を始めるには

ウラジミール・カルプトフ, 2020.09.07 18:10

iCustomの操作例 - EAの[data folder]にあるインジケーターのデータを取得します。 \MQL5Indicators↵Examples↵MACD.mq5

コード:iCustom iMACD value on chart.mq5

カスタムMACDインジケータは、このフォルダの中にあります。

MQL5でインジケータを扱う際のルールを覚えておいてください:インジケータハンドルはOnInitで作成されます。今後、CopyBufferを使用して、インジケータハンドルは、インジケータからデータを受信するために使用されます。

//+------------------------------------------------------------------+
//|                                 iCustom iMACD value on chart.mq5 |
//|                              Copyright © 2020, Vladimir Karputov |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2020, Vladimir Karputov"
#property version   "1.000"
#property tester_indicator "Examples\\MACD"
//--- input parameters
input int                  Inp_MACD_fast_ema_period= 8;           // MACD: period for Fast average calculation
input int                  Inp_MACD_slow_ema_period= 17;          // MACD: period for Slow average calculation
input int                  Inp_MACD_signal_period  = 9;           // MACD: period for their difference averaging
input ENUM_APPLIED_PRICE   Inp_MACD_applied_price  = PRICE_CLOSE; // MACD: type of price
//---
int      handle_iCustom;                     // variable for storing the handle of the iCustom indicator
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
//--- create handle of the indicator iMACD ([data folder]\MQL5\Indicators\Examples\MACD.mq5)
   handle_iCustom=iCustom(Symbol(),Period(),"Examples\\MACD",Inp_MACD_fast_ema_period,Inp_MACD_slow_ema_period,
                          Inp_MACD_signal_period,Inp_MACD_applied_price);
//--- if the handle is not created
   if(handle_iCustom==INVALID_HANDLE)
     {
      //--- tell about the failure and output the error code
      PrintFormat("Failed to create handle of the iMACD indicator for the symbol %s/%s, error code %d",
                  Symbol(),
                  EnumToString(Period()),
                  GetLastError());
      //--- the indicator is stopped early
      return(INIT_FAILED);
     }
//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
//---
   if(handle_iCustom!=INVALID_HANDLE)
      IndicatorRelease(handle_iCustom);
  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
//---
   double main[],signal[];
   ArraySetAsSeries(main,true);
   ArraySetAsSeries(signal,true);
   int start_pos=0,count=3;
   if(!iGetArray(handle_iCustom,MAIN_LINE,start_pos,count,main) ||
      !iGetArray(handle_iCustom,SIGNAL_LINE,start_pos,count,signal))
     {
      return;
     }
//---
   string text_main="Main |",text_signal="Signal |";
   for(int i=count-1; i>=0; i--)
     {
      text_main=text_main+" #"+IntegerToString(i)+" "+DoubleToString(main[i],Digits()+1)+" | ";
      text_signal=text_signal+" #"+IntegerToString(i)+" "+DoubleToString(signal[i],Digits()+1)+" | ";
     }
   Comment(text_main,"\n",text_signal);
  }
//+------------------------------------------------------------------+
//| Get value of buffers                                             |
//+------------------------------------------------------------------+
bool iGetArray(const int handle,const int buffer,const int start_pos,
               const int count,double &arr_buffer[])
  {
   bool result=true;
   if(!ArrayIsDynamic(arr_buffer))
     {
      PrintFormat("ERROR! EA: %s, FUNCTION: %s, this a no dynamic array!",__FILE__,__FUNCTION__);
      return(false);
     }
   ArrayFree(arr_buffer);
//--- reset error code
   ResetLastError();
//--- fill a part of the iBands array with values from the indicator buffer
   int copied=CopyBuffer(handle,buffer,start_pos,count,arr_buffer);
   if(copied!=count)
     {
      //--- if the copying fails, tell the error code
      PrintFormat("ERROR! EA: %s, FUNCTION: %s, amount to copy: %d, copied: %d, error code %d",
                  __FILE__,__FUNCTION__,count,copied,GetLastError());
      //--- quit with zero result - it means that the indicator is considered as not calculated
      return(false);
     }
   return(result);
  }
//+------------------------------------------------------------------+
コードは投稿番号106に 添付されています
How to start with MQL5
How to start with MQL5
  • 2020.09.06
  • www.mql5.com
This thread discusses MQL5 code examples. There will be examples of how to get data from indicators, how to program advisors...
 

インジケータコード- MetaTrader 5用エキスパート

EAコンストラクタの記事の開発の試みに基づいて います。

この非トレーディングEAは、単に指標で作業するための既製のコードのコレクションです。インジケータの入力パラメータ(Expert Advisorの「ヘッダ」に記述)、ハンドルの 宣言 (Expert Advisorの「ヘッダ」に記述)、ハンドルの作成(OnInitに 記述)が含まれています。

理由: