インジケータを無償で作成します - ページ 103 1...96979899100101102103104105106107108109110...129 新しいコメント Tretyakov Rostyslav 2020.11.27 12:31 #1021 エラーを発見するためのヘルプ インジケータに2つのバッファを追加したが、チャート上に表示されない //+------------------------------------------------------------------+ //| MTF_Moving.mq4 | //| Copyright 2017, MetaQuotes Software Corp. | //| https://www.mql5.com/ru/users/melnik | //+------------------------------------------------------------------+ #property copyright "Copyright 2017, MetaQuotes Software Corp." #property link "https://www.mql5.com/ru/users/melnik" #property version "1.00" #property strict #property indicator_chart_window #property indicator_buffers 4 #property indicator_width1 2 #property indicator_width2 2 #property indicator_width3 2 #property indicator_width4 2 #property indicator_color1 Red #property indicator_color2 Blue #property indicator_color3 Black #property indicator_color4 Black #property indicator_type1 DRAW_LINE #property indicator_type2 DRAW_LINE #property indicator_type3 DRAW_LINE #property indicator_type4 DRAW_LINE double ma_buffer_slow[]; double ma_buffer_fast[]; double ma_buffer_s_01[]; double ma_buffer_s_02[]; //--- input parameters input int PeriodMaSlow =21; //Period slow Ma input int PeriodMaFast =13; //Pertiod fast Ma input int Points =50; //Отклонение input ENUM_APPLIED_PRICE PriceMa = 0; //Applied price input ENUM_MA_METHOD MethodMa = 0; //Method Ma input ENUM_TIMEFRAMES Timeframe =60; //Timeframe for calculate ENUM_TIMEFRAMES prd; int index=-1; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int OnInit() { //--- indicator buffers mapping SetIndexBuffer(0, ma_buffer_slow, INDICATOR_DATA); SetIndexBuffer(1, ma_buffer_fast, INDICATOR_DATA); SetIndexBuffer(2, ma_buffer_s_01, INDICATOR_DATA); SetIndexBuffer(3, ma_buffer_s_02, INDICATOR_DATA); //--- return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int OnCalculate(const int rates_total, const int prev_calculated, const datetime &time[], const double &open[], const double &high[], const double &low[], const double &close[], const long &tick_volume[], const long &volume[], const int &spread[]) { //--- if((rates_total-prev_calculated-PeriodMaSlow)<=0)return(0); if(Period()>Timeframe) prd=PERIOD_CURRENT; if(Period()<=Timeframe) prd=prd=Timeframe; for(int i=rates_total-prev_calculated-PeriodMaSlow-1;i>=0;i--) { if(TimeMinute(time[i])==0)index=iBarShift(Symbol(), prd, time[i], false); ma_buffer_fast[i]=iMA(Symbol(), prd, PeriodMaFast, 0, MethodMa, PriceMa, index); ma_buffer_slow[i]=iMA(Symbol(), prd, PeriodMaSlow, 0, MethodMa, PriceMa, index); if(ma_buffer_fast[i+1]>=ma_buffer_slow[i+1] && ma_buffer_fast[i]<ma_buffer_slow[i]) {ma_buffer_s_01[i]=ma_buffer_slow[i]+Points*Point;} if(ma_buffer_fast[i+1]<=ma_buffer_slow[i+1] && ma_buffer_fast[i]>ma_buffer_slow[i]) {ma_buffer_s_02[i]=ma_buffer_slow[i]-Points*Point;} } //--- return value of prev_calculated for next call return(rates_total); } //+------------------------------------------------------------------+ 削除済み 2020.11.27 12:46 #1022 MakarFX:エラーを発見するためのヘルプインジケータにバッファを2つ追加しましたが、チャートに表示されません。 試してみたが、このような結果になったhttps://www.mql5.com/ru/code/32179 Semaphore MAMA www.mql5.com Cигнальный Индикатор - при пересечении двух МА Tretyakov Rostyslav 2020.11.27 12:54 #1023 SanAlex:試してみたが、このような結果になったhttps://www.mql5.com/ru/code/32179 MT4用のものはありますか? 削除済み 2020.11.27 12:57 #1024 MakarFX: mt4用のものはないのでしょうか? これはmt4でも動作するはずです - 何かあれば、今確認します。 -------------------- mt4が6つのエラーを出すのを直してみます。 Tretyakov Rostyslav 2020.11.27 13:03 #1025 SanAlex:これはmt4でも動作するはずです - 何かあれば、今確認します。--------------------mt4が6つのエラーを出すのを直してみます。 私のコードを見てください、その方が解りやすいと思います。私はプログラマーではありません。 削除済み 2020.11.27 17:48 #1026 MakarFX: 私のコードをご覧になってください、その方が解りやすいと思います。私はプログラマーではありません。 あなたのコードを理解しようとしましたが、2つのMAを使用してmt4とmt5用のシグナルインジケータを作る方法がまだわかっていません。 https://www.mql5.com/ru/forum/356653#comment_19450441 Индикаторы: Semaphore MAMA 2020.11.27www.mql5.com Статьи и техническая библиотека по автоматическому трейдингу: Индикаторы: Semaphore MAMA Renat Akhtyamov 2020.11.27 17:53 #1027 MakarFX:エラーを発見するためのヘルプインジケータにバッファを2つ追加しましたが、チャート上に表示されません #property indicator_color3 Black#property indicator_color4 Black 色を変える - 黒地に黒はあまりいい感じではありません。 削除済み 2020.11.27 18:55 #1028 MakarFX: 私のコードを見てください、その方が解りやすいと思います。私はプログラマーではありません。 これは作業用バージョンですが、もしかしたら他のものをお持ちかもしれませんね。 //+------------------------------------------------------------------+ //| MTF_Moving.mq4 | //| Copyright 2017, MetaQuotes Software Corp. | //| https://www.mql5.com/ru/users/melnik | //+------------------------------------------------------------------+ #property copyright "Copyright 2017, MetaQuotes Software Corp." #property link "https://www.mql5.com/ru/users/melnik" #property version "1.00" #property strict #property indicator_chart_window #property indicator_buffers 4 #property indicator_width1 2 #property indicator_width2 2 #property indicator_width3 2 #property indicator_width4 2 #property indicator_color1 Wheat #property indicator_color2 LightSeaGreen #property indicator_color3 Red #property indicator_color4 Blue #property indicator_type1 DRAW_ARROW #property indicator_type2 DRAW_ARROW #property indicator_type3 DRAW_LINE #property indicator_type4 DRAW_LINE double ma_buffer_slow[]; double ma_buffer_fast[]; double ma_buffer_s_01[]; double ma_buffer_s_02[]; //--- input parameters input int PeriodMaSlow =21; //Period slow Ma input int PeriodMaFast =13; //Pertiod fast Ma input ENUM_APPLIED_PRICE PriceMa = 0; //Applied price input ENUM_MA_METHOD MethodMa = 0; //Method Ma input ENUM_TIMEFRAMES Timeframe =60; //Timeframe for calculate ENUM_TIMEFRAMES prd; int index=-1; //--- right input parameters flag bool flag_buy = false; bool flag_sell = false; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int OnInit() { string short_name; IndicatorDigits(Digits+1); IndicatorBuffers(4); //--- indicator buffers mapping SetIndexBuffer(2, ma_buffer_slow, INDICATOR_DATA); SetIndexBuffer(3, ma_buffer_fast, INDICATOR_DATA); SetIndexBuffer(0, ma_buffer_s_01, INDICATOR_DATA); SetIndexBuffer(1, ma_buffer_s_02, INDICATOR_DATA); //--- setting the indicator to be drawn as a line SetIndexStyle(0,DRAW_ARROW,EMPTY,2,clrWheat); SetIndexArrow(0,72); SetIndexBuffer(0,ma_buffer_s_01); SetIndexStyle(1,DRAW_ARROW,EMPTY,2,clrLightSeaGreen); SetIndexArrow(1,71); SetIndexBuffer(1,ma_buffer_s_02); //--- setting the indicator to be drawn as a line SetIndexStyle(2,DRAW_LINE,EMPTY,2,clrRed); SetIndexBuffer(2,ma_buffer_slow); SetIndexStyle(3,DRAW_LINE,EMPTY,2,clrBlue); SetIndexBuffer(3,ma_buffer_fast); //--- setting a name in the DataWindow window and a label short_name="MTF_Moving"; IndicatorShortName(short_name); SetIndexLabel(0,short_name); //--- return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int OnCalculate(const int rates_total, const int prev_calculated, const datetime &time[], const double &open[], const double &high[], const double &low[], const double &close[], const long &tick_volume[], const long &volume[], const int &spread[]) { //--- if((rates_total-prev_calculated-PeriodMaSlow)<=0) return(0); if(Period()>Timeframe) prd=PERIOD_CURRENT; if(Period()<=Timeframe) prd=prd=Timeframe; for(int i=rates_total-prev_calculated-PeriodMaSlow-1; i>=0; i--) { if(TimeMinute(time[i])==0) index=iBarShift(Symbol(), prd, time[i], false); ma_buffer_fast[i]=iMA(Symbol(), prd, PeriodMaFast, 0, MethodMa, PriceMa, index); ma_buffer_slow[i]=iMA(Symbol(), prd, PeriodMaSlow, 0, MethodMa, PriceMa, index); { if(flag_sell==false) //--- check for short position (SELL) possibility if(ma_buffer_fast[i]>ma_buffer_slow[i]) { ma_buffer_s_02[i]=Low[i]; flag_buy=false; flag_sell=true; } if(flag_buy==false) //--- check for long position (BUY) possibility if(ma_buffer_fast[i]<ma_buffer_slow[i]) { ma_buffer_s_01[i]=High[i]; flag_buy=true; flag_sell=false; } } } //--- return value of prev_calculated for next call return(rates_total); } //+------------------------------------------------------------------+ -------------------------------------------------------- そして、指標からのシグナルが届いている gioter 2020.12.15 07:47 #1029 Stochastic-3インジケータを MT 4からMT 5に変換する方法 ALEXEY NIKOLAEV 2020.12.27 16:16 #1030 リスペクトされたコミュニティに敬意を表します どなたか、設定で指定した一定期間の現在のバー番号の情報をチャートに表示するインジケーターを書いて いただけませんか?例えば、指標は日単位で実行され、報告期間は設定で指定された月です。これは、口座によると、カレンダー月の初めからゼロバーである数字をチャート上に表示することを意味します。MT4で、お願いします) ハッピーホリデー(Happy Holidays to all) ハッピーハンティング) 1...96979899100101102103104105106107108109110...129 新しいコメント 取引の機会を逃しています。 無料取引アプリ 8千を超えるシグナルをコピー 金融ニュースで金融マーケットを探索 新規登録 ログイン スペースを含まないラテン文字 このメールにパスワードが送信されます エラーが発生しました Googleでログイン WebサイトポリシーおよびMQL5.COM利用規約に同意します。 新規登録 MQL5.com WebサイトへのログインにCookieの使用を許可します。 ログインするには、ブラウザで必要な設定を有効にしてください。 ログイン/パスワードをお忘れですか? Googleでログイン
エラーを発見するためのヘルプ
インジケータに2つのバッファを追加したが、チャート上に表示されない
エラーを発見するためのヘルプ
インジケータにバッファを2つ追加しましたが、チャートに表示されません。
試してみたが、このような結果になったhttps://www.mql5.com/ru/code/32179
試してみたが、このような結果になったhttps://www.mql5.com/ru/code/32179
mt4用のものはないのでしょうか?
これはmt4でも動作するはずです - 何かあれば、今確認します。
--------------------
mt4が6つのエラーを出すのを直してみます。
これはmt4でも動作するはずです - 何かあれば、今確認します。
--------------------
mt4が6つのエラーを出すのを直してみます。
私のコードをご覧になってください、その方が解りやすいと思います。私はプログラマーではありません。
あなたのコードを理解しようとしましたが、2つのMAを使用してmt4とmt5用のシグナルインジケータを作る方法がまだわかっていません。
https://www.mql5.com/ru/forum/356653#comment_19450441
エラーを発見するためのヘルプ
インジケータにバッファを2つ追加しましたが、チャート上に表示されません
#property indicator_color3 Black
#property indicator_color4 Black
色を変える - 黒地に黒はあまりいい感じではありません。
私のコードを見てください、その方が解りやすいと思います。私はプログラマーではありません。
これは作業用バージョンですが、もしかしたら他のものをお持ちかもしれませんね。
--------------------------------------------------------
そして、指標からのシグナルが届いている
リスペクトされたコミュニティに敬意を表します
どなたか、設定で指定した一定期間の現在のバー番号の情報をチャートに表示するインジケーターを書いて いただけませんか?例えば、指標は日単位で実行され、報告期間は設定で指定された月です。これは、口座によると、カレンダー月の初めからゼロバーである数字をチャート上に表示することを意味します。MT4で、お願いします)
ハッピーホリデー(Happy Holidays to all)
ハッピーハンティング)