MQL4、MQL5に関する初心者からの質問、アルゴリズムやコードに関するヘルプ、ディスカッションなど。 - ページ 446

 
Artyom Trishkin:

まだ理解できていません。何を探して表示したいのですか?コードを使わず、言葉でシンプルに。

書いているわけですね。

問題は、なぜ10本目のバーで探しているのか、ということです。


10小節目には、例として取り上げました。

呼び出されたインジケーターの矢印が表示されてから10本または「N」本後のポイントを設定する必要があります。

を、10本目のバーにポイントを置くだけでよいのなら、このようにします。

 if(NormalizeDouble(iCustom(NULL,0,"Arrow v.3",1,i+10),Digits)!=EMPTY_VALUE
        {
         BufferDN[i+1]=high[i+1]+distance*MyPoint;

        }

アルチョム・トリシキン

そして、OnCalculate()ではなく、インジケータ全体を添付してください。

これは最初のオプションです

#property copyright "Copyright 2017, 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_plots   2
//--- plot UP
#property indicator_label1  "UP"
#property indicator_type1   DRAW_ARROW
#property indicator_color1  clrLawnGreen
#property indicator_style1  STYLE_SOLID
#property indicator_width1  1
//--- plot DN
#property indicator_label2  "DN"
#property indicator_type2   DRAW_ARROW
#property indicator_color2  clrDeepPink
#property indicator_style2  STYLE_SOLID
#property indicator_width2  1

//--- indicator buffers
double         BufferUP[];
double         BufferDN[];

int distance=5;
double MyPoint;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {
//--- indicator buffers mapping
   SetIndexBuffer(0,BufferUP);
   SetIndexBuffer(1,BufferDN);
//--- setting a code from the Wingdings charset as the property of PLOT_ARROW
   SetIndexArrow(0,233);
   SetIndexArrow(1,234);

//---
   if(Digits()==5 || Digits()==3){MyPoint=Point*10;} else{MyPoint=Point;}
  
   return(INIT_SUCCEEDED);
  }
   // int ila;
int    vspread,num_buy=0,num_sell=0;
//+------------------------------------------------------------------+
//| 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<2) return(0);
   int limit=rates_total-prev_calculated;
   if(limit>1) 
     {
      limit=rates_total-2;
      ArrayInitialize(BufferUP,EMPTY_VALUE);
      ArrayInitialize(BufferDN,EMPTY_VALUE);
     }
   for(int i=limit; i>=0; i--) 
     {
     for(int il=i+1;il<=i+300;il++)
        {
         if(NormalizeDouble(iCustom(NULL,0,"Arrow v.3",0,il),Digits)!=EMPTY_VALUE
            )
           {
            num_buy=il;
            //Print()
           // break;
           }
        }
//
      if(num_buy==60)
        {
         BufferUP[i+1]=low[i+1]-distance*MyPoint;
         
        }
    
     for(int ila=i+1;ila<=i+300;ila++)
        {
         if(NormalizeDouble(iCustom(NULL,0,"Arrow v.3",1,ila),Digits)!=EMPTY_VALUE
            )
           {
            num_sell=ila;
           // break;
           }
        }
      if(num_sell==10)
        {
         BufferDN[i+1]=high[i+1]+distance*MyPoint;

        }
     
      Comment(num_buy,"num_sell",num_sell);
     }
//--- return value of prev_calculated for next call

   return(rates_total);
  }
//
.
 

グローバルに、最初のバーの安値と、呼び出されたインジケータ(最初のバッファ)の最初の矢印の後ろにある「n」の上部フラクタルを比較したいと思います。

そして、最初のバーと見つかったフラクタルのバーとの間の最大価格を 求めます。

条件は、最初のバーの安値(+-10ポイント)がインジケーターの矢印の後ろにあるフラクタルの価格(最初とする)と同じで、フラクタルのバーと最初のバーの間の最大価格から見つかったフラクタルの価格を引いたものが50ポイントより大きい場合、矢印を置く。

実は、フラクタルを見つけるには、矢印があるバーの番号が必要なんです。このバーから始まるフラクタルに目を通し、さらに歴史を紐解いていきたいと思います。

もしかしたら、私は間違ったところから出発してしまったかもしれませんので、別の解決策をお教えください。

 
mila.com:

グローバルに、最初のバーの安値と、呼び出されたインジケータ(最初のバッファ)の最初の矢印の後ろにある「n」の上部フラクタルを比較したいと思います。

そして、最初のバーと見つかったフラクタルのバーとの間の最大価格を 求めます。

条件は、最初のバーの安値(+-10ポイント)がインジケーターの矢印の後ろにあるフラクタルの価格(最初とする)と同じで、フラクタルのバーと最初のバーの間の最大価格から見つかったフラクタルの価格を引いたものが50ポイントより大きい場合、矢印を置く。

実は、フラクタルを見つけるには、矢印があるバーの番号が必要なんです。このバーから始まるフラクタルに目を通し、履歴に戻したい。

もしかしたら、私は間違ったところから始めたのかもしれませんし、別の解決方法を提案していただけるかもしれません。

これは、設定で設定した小節単位の距離で履歴にポイントを入れるだけです。

例えば、10本と設定した場合、10本分のサイクルインデックスの左側にカスタムインディケータからのシグナルがあった場合、サイクルの現在のバー(インデックスi)にポイントを設定することになります

//+------------------------------------------------------------------+
//|                                                      ProjectName |
//|                                      Copyright 2012, CompanyName |
//|                                       http://www.companyname.net |
//+------------------------------------------------------------------+
#property copyright "Copyright 2017, 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_plots   2
//--- plot UP
#property indicator_label1  "UP"
#property indicator_type1   DRAW_ARROW
#property indicator_color1  clrLawnGreen
#property indicator_style1  STYLE_SOLID
#property indicator_width1  1
//--- plot DN
#property indicator_label2  "DN"
#property indicator_type2   DRAW_ARROW
#property indicator_color2  clrDeepPink
#property indicator_style2  STYLE_SOLID
#property indicator_width2  1
//--- input parameters
input uint     InpNumberOfBars   =  10;   // Количество баров отступа
input int      InpDistance       =  5;    // Отступ в пунктах
//--- indicator buffers
double         BufferUP[];
double         BufferDN[];
//---
int            num_bars;
double         distance;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {
//--- indicator buffers mapping
   SetIndexBuffer(0,BufferUP);
   SetIndexBuffer(1,BufferDN);
//--- setting a code from the Wingdings charset as the property of PLOT_ARROW
   SetIndexArrow(0,233);
   SetIndexArrow(1,234);
//--- setting variables
   num_bars=(int)InpNumberOfBars+1;
   distance=InpDistance*Point();
//---
   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<num_bars) return(0);
   int limit=rates_total-prev_calculated;
   if(limit>1)
     {
      limit=rates_total-num_bars-1;
      ArrayInitialize(BufferUP,EMPTY_VALUE);
      ArrayInitialize(BufferDN,EMPTY_VALUE);
     }
   for(int i=limit; i>=0; i--)   // 1000 - 11 - 1 = 999-11 = 988
     {
      double val_0=iCustom(NULL,0,"Arrow v.3",0,i+num_bars);   // rates_total=1000, i=988, val from 988+11=999
      double val_1=iCustom(NULL,0,"Arrow v.3",1,i+num_bars);   // rates_total=1000, i=988, val from 988+11=999
      if(val_0>0 && val_0<EMPTY_VALUE)
         BufferDN[i]=low[i]-distance;  // BufferDN[988]=val
      if(val_1>0 && val_1<EMPTY_VALUE)
         BufferUP[i]=high[i]+distance;
     }
//--- return value of prev_calculated for next call

   return(rates_total);
  }
//+------------------------------------------------------------------+
しかし、「しなければならない」というのは、「しなければならない」ということではありません。寝ている間に膝の上におぼろげながら描いてみました。カスタムしてないので確認できません。あのね...
 
ごあいさつ本当に助けてほしい。誰か取引履歴の 取引をハイライトして、これらの選択を履歴に保存するスクリプトや方法を知っていますか?例えば、https://yadi.sk/d/7aHIs_vh3RxLvW またはここです。
https://yadi.sk/i/Ft8yNn1e3RxMEH - よろしくお願いします。
ファイル:
2.jpg  481 kb
3.jpg  708 kb
 
civic111:
ごあいさつ本当に助けてほしい。どなたか、取引履歴 で取引をハイライトし、これらの選択を履歴に保存させるスクリプトや方法をご存じないでしょうか。https://yadi.sk/d/7aHIs_vh3RxLvW またはここです。
https://yadi.sk/i/Ft8yNn1e3RxMEH - よろしくお願いします。

これが


を写真に入れるのですか?

 
civic111:
ごあいさつ本当に助けてほしい。どなたかスクリプトや方法をご存知かもしれませんが、取引履歴で いくつかの取引を選択し、その選択を履歴に保存する方法を教えてください。例えば、https://yadi.sk/d/7aHIs_vh3RxLvW や here などです。
https://yadi.sk/i/Ft8yNn1e3RxMEH - よろしくお願いします。

標準パネルでは......ありえませんね。

しかし、CodeBaseや(たぶん)Marketには、注文履歴を扱うツールがあるはずです。あるいは、代替案として、フリーランスとして「ブラックジャックやデベロッパーとの代替受注履歴パネル」を作成、発注することも可能です :-)

あるいは、ごく簡単に言えば、CSVにエクスポートして、その中の履歴をExcelで分析することです。

 

ジョブ終了してください

フリースロットが欲しい

 
開発者Hooshang Nosratpanahが 確認したステップ "Work Acceptance"
 
اه مو مشكلة
يعني ممكن صفقة شرا لم تحق هدفها فلذلك مكن تعزيزها بصفقة اخرى شراء اذاا اعطى الاكسبيرت اشارة بذلك
 
انا اعتقد ان كل مسافه معينه افضل
لان ممكن نفتح شرا و السعر ينزل ويجيب اشاره بيع
ويفضل علي البيع كتير وينزلجامد واتحين كل دا ص فق واحده بس شرا ومنتظرين اشاره شرا تانيه عشان ندخل بلوت اكبر