初心者の方からの質問 MQL5 MT5 MetaTrader 5 - ページ 467 1...460461462463464465466467468469470471472473474...1504 新しいコメント Alena000 2015.11.01 15:06 #4661 正直、検索やソート機能のないターミナルで普通にライブラリーを使うのは理解できませんが...。ただバカみたいに何百行もスクロールするのか!!!! Vladimir Karputov 2015.11.01 15:16 #4662 Alena000: 正直なところ、検索やソートをせずにターミナルでライブラリを利用する方法が全く理解できないのですが...。ただバカみたいに何百行もスクロールするのか!!!!検索はMetaEditor(右上)に内蔵されています。でオカレンスを検索することができます。オープンドキュメント全ファイルを通じてMQL4/MQL5.community 検索は端末本体(右上)に内蔵されています。ターミナルから、MQL5.comのコミュニティ全体(記事、製品、ライブラリ、シグナル、フォーラム、ブログ、ドキュメント)を検索することができます。 Maxim Dobrovolskii 2015.11.01 15:18 #4663 という質問に対して、何か考えをお持ちの方はいらっしゃいますか?)) Victor Nikolaev 2015.11.01 15:34 #4664 Maxim Dobrovolskii: という質問に対して、何か考えをお持ちの方はいらっしゃいますか?))役立つかもしれません。 ファイル: Fractal.mq4 4 kb Maxim Dobrovolskii 2015.11.01 15:48 #4665 Victor Nikolaev:役立つかもしれません。 私のバリアントが機能しない理由を理解し、見つけたい。EA+インジケーターの組み合わせについてだと思うのですが、具体的に何が悪いのかがはっきりしません。 Alexey Viktorov 2015.11.01 16:00 #4666 Maxim Dobrovolskii: 私のバリアントが動作しない理由を理解し、見つけたいと思います。Expert Advisor+indicatorの組み合わせが原因だと思われますが、具体的にどのようなものかはわかりません。 もしかして、OnTick()ではゼロのバッファだけを読み、OnDeinit()ではゼロと最初のバッファの両方を読んでいることが問題なのでしょうか。 Victor Nikolaev 2015.11.01 16:00 #4667 Maxim Dobrovolskii: ありがとうございます。しかし、私のバージョンが動作しない理由を理解し、見つけたいと思います。Expert Advisor+indicatorの組み合わせのせいだと思います。あまり問題がないことを証明しろというのでしょうか。ただ、インジケーターのコードが必要です。コピーするのは好きではありません。もしかしたら、私はあなたのインジケーターの何かを変えるかもしれません(そして、何かもわかっています)。 Maxim Dobrovolskii 2015.11.01 16:04 #4668 Alexey Viktorov: OnTick()はゼロバッファのみを読み込み、OnDeinit()はゼロバッファとファーストバッファの両方を読み込むからでしょうか? Deinitは、バッファの 1つに値があることを示すためのものです。 Maxim Dobrovolskii 2015.11.01 16:06 #4669 Victor Nikolaev:あまり問題がないことを証明しろというのか。ただ、インジケーターのコードが必要です。コピーするのは好きではありません。もしかしたら、私はあなたのインジケーターの何かを変えるかもしれません(そして、何かもわかっています)。//+------------------------------------------------------------------+ //| modify_Fractal.mq4 | //| MoneyRobotics Copyright 2015, MetaQuotes Software Corp. | //| https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "MoneyRobotics Copyright 2015, MetaQuotes Software Corp." #property link "https://www.mql5.com" #property version "1.00" #property strict #property indicator_chart_window #property indicator_buffers 2 #property indicator_label1 "Up" #property indicator_label2 "Down" #property indicator_type1 DRAW_ARROW #property indicator_type2 DRAW_ARROW #property indicator_style1 STYLE_SOLID #property indicator_style2 STYLE_SOLID #property indicator_width1 1 #property indicator_width2 1 #property indicator_color1 Red #property indicator_color2 Blue //--- indicator buffers double ExtUpFractalsBuffer[]; double ExtDownFractalsBuffer[]; //+-----------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int OnInit() { //---- indicator buffers mapping SetIndexBuffer(0,ExtUpFractalsBuffer); SetIndexBuffer(1,ExtDownFractalsBuffer); //---- drawing settings SetIndexStyle(0,DRAW_ARROW); SetIndexArrow(0,217); SetIndexStyle(1,DRAW_ARROW); SetIndexArrow(1,218); //---- SetIndexEmptyValue(0,0.0); SetIndexEmptyValue(1,0.0); //---- name for DataWindow SetIndexLabel(0,"Modify_Fractal Up"); SetIndexLabel(1,"Modify_Fractal Down"); //---- initialization done 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[]) { //--- int i, nCountedBars; double dCurrent; nCountedBars=IndicatorCounted(); //---- last counted bar will be recounted if(nCountedBars<=8) i=Bars-nCountedBars-4; if(nCountedBars>8) { nCountedBars--; i=Bars-nCountedBars-4; } //----Up and Down Fractals while ( i >= 4 ) { //----Fractals up bFound=false; dCurrent=High[i]; if(dCurrent>High[i+1] && dCurrent>High[i+2] && dCurrent>High[i+3] && dCurrent>High[i-1] && dCurrent>High[i-2] && dCurrent>High[i-3] && dCurrent>High[i-4] ) { ExtUpFractalsBuffer[i]=NormalizeDouble(dCurrent + 1* Point,Digits); } //----Fractals down dCurrent=Low[i]; if(dCurrent<Low[i+1] && dCurrent<Low[i+2] && dCurrent<Low[i+3] && dCurrent<Low[i-1] && dCurrent<Low[i-2] && dCurrent<Low[i-3] && dCurrent<Low[i-4]) { ExtDownFractalsBuffer[i]=NormalizeDouble(dCurrent - 1* Point,Digits); } i--; } //--- return value of prev_calculated for next call return(rates_total); } //+------------------------------------------------------------------+ インジケーターのコードです。 Alexey Viktorov 2015.11.01 16:48 #4670 Maxim Dobrovolskii: Deinitは、1つのバッファの 中に値があることを示すことです。ゼロバッファ、ファーストバッファのどちらにも価値がある。M15では、現在5本と21本のバーでフラクタルが発生しています。このスクリプト /********************Script program start function*******************/ void OnStart() { Print("******************", iCustom(_Symbol, PERIOD_CURRENT, "modify_Fractal", 1, 5)); Print("******************", iCustom(_Symbol, PERIOD_CURRENT, "modify_Fractal", 0, 21)); }/*******************************************************************/ は、すべてを正しく検出し、印刷することができます。Expert Advisor では、iCustom() がスクリプトと Expert Advisor で同様に動作することがわかります。 1...460461462463464465466467468469470471472473474...1504 新しいコメント 取引の機会を逃しています。 無料取引アプリ 8千を超えるシグナルをコピー 金融ニュースで金融マーケットを探索 新規登録 ログイン スペースを含まないラテン文字 このメールにパスワードが送信されます エラーが発生しました Googleでログイン WebサイトポリシーおよびMQL5.COM利用規約に同意します。 新規登録 MQL5.com WebサイトへのログインにCookieの使用を許可します。 ログインするには、ブラウザで必要な設定を有効にしてください。 ログイン/パスワードをお忘れですか? Googleでログイン
正直なところ、検索やソートをせずにターミナルでライブラリを利用する方法が全く理解できないのですが...。ただバカみたいに何百行もスクロールするのか!!!!
検索はMetaEditor(右上)に内蔵されています。でオカレンスを検索することができます。
- オープンドキュメント
- 全ファイルを通じて
- MQL4/MQL5.community
検索は端末本体(右上)に内蔵されています。ターミナルから、MQL5.comのコミュニティ全体(記事、製品、ライブラリ、シグナル、フォーラム、ブログ、ドキュメント)を検索することができます。という質問に対して、何か考えをお持ちの方はいらっしゃいますか?))
役立つかもしれません。
役立つかもしれません。
私のバリアントが動作しない理由を理解し、見つけたいと思います。Expert Advisor+indicatorの組み合わせが原因だと思われますが、具体的にどのようなものかはわかりません。
ありがとうございます。しかし、私のバージョンが動作しない理由を理解し、見つけたいと思います。Expert Advisor+indicatorの組み合わせのせいだと思います。
あまり問題がないことを証明しろというのでしょうか。
ただ、インジケーターのコードが必要です。コピーするのは好きではありません。
もしかしたら、私はあなたのインジケーターの何かを変えるかもしれません(そして、何かもわかっています)。
OnTick()はゼロバッファのみを読み込み、OnDeinit()はゼロバッファとファーストバッファの両方を読み込むからでしょうか?
あまり問題がないことを証明しろというのか。
ただ、インジケーターのコードが必要です。コピーするのは好きではありません。
もしかしたら、私はあなたのインジケーターの何かを変えるかもしれません(そして、何かもわかっています)。
Deinitは、1つのバッファの 中に値があることを示すことです。
ゼロバッファ、ファーストバッファのどちらにも価値がある。M15では、現在5本と21本のバーでフラクタルが発生しています。このスクリプト
は、すべてを正しく検出し、印刷することができます。Expert Advisor では、iCustom() がスクリプトと Expert Advisor で同様に動作することがわかります。