MQL4 및 MQL5에 대한 초보자 질문, 알고리즘 및 코드에 대한 도움말 및 토론 - 페이지 446

 
Artyom Trishkin :

이해가 되지 않습니다. 무엇을 찾아 표시하고 싶습니까? 단어만 있으면 됩니다. 코드가 없습니다.

여기에 다음과 같이 씁니다.

그것은 바로 질문입니다. 왜 정확히 10번째 막대를 보고 있습니까?


열 번째 마디에서 나는 이것을 예로 들었다.

호출된 표시기의 화살표가 나타난 후 기록 10 또는 "N" 막대 전체에 점을 넣어야 합니다.

열 번째에만 필요한 것처럼 나는 그렇게 할 것입니다.

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

        }

Artyom Trishkin :

그리고 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 " 번째 위쪽 프랙탈과 비교하고 싶습니다.

그리고 발견된 프랙탈의 첫 번째 막대와 막대 사이 의 최대 가격 을 찾으십시오.

전체 조건은 다음과 같습니다. 첫 번째 막대의 저가(+-10pp)가 표시 화살표 뒤에 있는 프랙탈의 가격(첫 번째 막대가 되게 함)과 같으면 프랙탈 막대와 프랙탈 막대 사이의 최대 가격 첫 번째 막대에서 발견된 프랙탈의 가격을 뺀 값이 50pp 이상이면 화살표를 설정합니다.

사실, 프랙탈을 찾으려면 화살표가 있는 막대의 번호가 필요합니다. 이 막대에서 시작하여 이야기 속으로 프랙탈을 반복하고 싶습니다.

어쩌면 나는 거기에서 시작하지 않았으며 그것을 해결하는 다른 방법을 제안할 수 있습니다.

 
mila.com :

전체적으로, 나는 첫 번째 막대의 낮은 값을 호출된 표시기(첫 번째 버퍼)의 첫 번째 화살표 뒤에 있는 " n " 번째 위쪽 프랙탈과 비교하고 싶습니다.

그리고 발견된 프랙탈의 첫 번째 막대와 막대 사이 의 최대 가격 을 찾으십시오.

전체 조건은 다음과 같습니다. 첫 번째 막대의 저가(+-10pp)가 표시 화살표 뒤에 있는 프랙탈의 가격(첫 번째 막대가 되게 함)과 같으면 프랙탈 막대와 프랙탈 막대 사이의 최대 가격 첫 번째 막대에서 발견된 프랙탈의 가격을 뺀 값이 50pp 이상이면 화살표를 설정합니다.

사실, 프랙탈을 찾으려면 화살표가 있는 막대의 번호가 필요합니다. 이 막대에서 시작하여 이야기 속으로 프랙탈을 반복하고 싶습니다.

어쩌면 나는 거기에서 시작하지 않았으며 그것을 해결하는 다른 방법을 제안할 수 있습니다.

이것은 설정에서 설정한 막대의 거리에서 기록 전체에 점을 표시해야 합니다.

즉, 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 또는 여기:
https://yadi.sk/i/Ft8yNn1e3RxMEH - 미리 감사드립니다

표준 패널에서 - 방법이 없습니다.

그러나 CodeBase 또는 (아마도) Market에는 주문 내역 작업을 위한 도구가 있어야 합니다. 또는 직접 하거나 프리랜서 "블랙잭과 처녀가 있는 대체 주문 내역 패널"을 주문하는 옵션으로 :-)

또는 매우 간단하게 CSV로 내보낸 다음 Excel을 사용하여 기록을 분석합니다.

 

직장을 닫아주세요

무료 슬롯이 필요합니다

 
개발자 Hooshang Nosratpanah 는 "작업 수락" 단계를 확인했습니다.
 
اه مو مشكلة
슬립 ← 위
 
انا اعتقد ان كل مسافه معينه افضل
لان ممكن نفتح شرا و السعر ينزل ويجيب اشاره بيع
ويضل علي الل influternitive