초보자의 질문 MQL4 MT4 MetaTrader 4 - 페이지 12

 

누가 MT4 터미널에서 컴퓨터의 시스템 시간과 관련하여 바인딩하는 방법을 알고 있는지 알려주십시오.

- 차트

- 오픈 주문

- 거래 내역

- 잡지

- 로그

문제는 시간이 동기화되지 않는다는 것입니다.

무엇이 문제가 될 수 있습니까?

 

안녕하세요!

볼륨 표시기 중 하나를 기본으로 사용하여 매개변수에 맞게 변경하고 필요한 것만 남겨두었습니다. 이제 필요한 것만 화살표로 표시합니다.

하지만! 초록색 화살표나 빨간색 화살표가 켜지면 메시지가 뜨도록 ALERT를 어떤 식으로든 붙일 수는 없습니다.

도와주세요!

Z.Y. 다른 튜토리얼에서 무언가를 수행하는 방법을 보았지만 작동하지 않습니다.

 
Refresh052 :

안녕하세요!

볼륨 표시기 중 하나를 기본으로 사용하여 매개변수에 맞게 변경하고 필요한 것만 남겨두었습니다. 이제 필요한 것만 화살표로 표시합니다.

하지만! 초록색 화살표나 빨간색 화살표가 켜지면 메시지가 뜨도록 ALERT를 어떤 식으로든 붙일 수는 없습니다.

도와주세요!

Z.Y. 다른 튜토리얼에서 무언가를 수행하는 방법을 보았지만 작동하지 않습니다.

자, 여기에 전체 표시기 코드를 게시하십시오.
 
Stanislav Aksenov :
자, 여기에 전체 표시기 코드를 게시하십시오.

#속성엄격

#속성 표시기_차트_창


#속성 표시기_최소 0

#속성 표시기_버퍼 2

#property indicator_color1 빨간색

#property indicator_color2 라임




#속성 표시기_너비1 4

#속성 표시기_너비2 4


외부 ENUM_APPLIED_PRICE 가격 = PRICE_CLOSE;

extern 이중 과매수 = 80;

extern 더블 과매도 = 20;

외부 정수 NumberOfBars = 500;

extern string Note = "0은 모든 막대 표시를 의미합니다";

외부 정수 MAPeriod = 100;

외부 int 조회 = 20;

extern bool Alert=참;

더블 레드[],라임[];

//+----------------------------------------------- --------------------+

//| 사용자 지정 표시기 초기화 기능 |

//+----------------------------------------------- --------------------+

정수 초기화()

{

//---- 표시기

SetIndexBuffer(0, 빨간색);

SetIndexStyle(0,DRAW_ARROW, STYLE_SOLID,3);

SetIndexArrow(0.234);

SetIndexLabel(0,"최고 절정");

SetIndexBuffer(1, 라임);

SetIndexStyle(1,DRAW_ARROW, STYLE_SOLID,3);

SetIndexArrow(1,233);

SetIndexLabel(1,"낮은 절정");

SetIndexEmptyValue(0,0.0);

SetIndexEmptyValue(1,0.0);

SetIndexDrawBegin(0,0);

SetIndexDrawBegin(1,0);

IndicatorShortName("MKSP_볼륨");


//----

리턴(0);

}

//+----------------------------------------------- --------------------+

//| 사용자 지정 표시기 초기화 해제 기능 |

//+----------------------------------------------- --------------------+

정수 초기화()

{

//----

//----

리턴(0);

}

//+----------------------------------------------- --------------------+

//| 사용자 지정 표시기 반복 기능 |

//+----------------------------------------------- --------------------+

정수 시작()

{


이중 VolLowest, 범위, 값2, 값3, HiValue2, HiValue3, LoValue3, tempv2, tempv3, tempv;

정수 제한;

int counted_bars=IndicatorCounted();

//---- 마지막으로 계산된 막대가 다시 계산됩니다.

if(counted_bars>0) counted_bars--;

if ( NumberOfBars == 0 )

NumberOfBars = Bars-counted_bars;

limit=바 수; //바-카운트된_바;

for(int i=0; i<limit; i++)

{

빨간색[i] = 0; 라임[i] = 0;

값2=0; 값3=0; HiValue2=0; HiValue3=0; LoValue3=99999999;tempv2=0;tempv3=0;tempv=0;

VolLowest = 볼륨[iLowest(NULL,0,MODE_VOLUME,20,i)];

if (볼륨[i] == VolLowest)

{

}

범위 = (높음[i]-낮음[i]);

값2 = 부피[i]*범위;

if ( 범위 != 0 )

값3 = 부피[i]/범위;

( int n=i;n<i+MAPeriod;n++ )

{

tempv = 볼륨[n] + tempv;

}

for (int n=i;n<i+LookBack;n++)

{

tempv2 = 볼륨[n]*((높음[n]-낮음[n]));

if ( tempv2 >= HiValue2 )

HiValue2 = tempv2;

if ( 볼륨[n]*((높음[n]-낮음[n])) != 0 )

{

tempv3 = 볼륨[n] / ((높음[n]-낮음[n]));

if (tempv3 > HiValue3)

HiValue3 = tempv3;

if ( tempv3 < LoValue3 )

LoValue3=tempv3;

}

}

if ( Value2 == HiValue2 && Close[i] > (High[i] + Low[i]) / 2 )

{

빨간색[i] = 높음[i]+10*포인트;

}

if ( 값3 == HiValue3 )

{

NormalizeDouble(볼륨[i],0);

빨간색[i]=0;

}

if ( 값2 == HiValue2 && 값3 == HiValue3 )

{

NormalizeDouble(볼륨[i],0);

빨간색[i]=0;

}

if ( Value2 == HiValue2 && Close[i] <= (High[i] + Low[i]) / 2 )

{

석회[i] = 낮음[i]-10*점;

}

}

//----

//----

리턴(0);

}

//+----------------------------------------------- --------------------+

그리고 화면

파일:
 
Stanislav Aksenov :
자, 여기에 전체 표시기 코드를 게시하십시오.
경고를 어디에 넣어야 하는지 이해가 되지 않습니다.
 
Refresh052 :


그리고 화면

if ( Value2 == HiValue2  && Close [i] > ( High [i] + Low [i]) / 2 )

            {

               red[i] = High [i]+ 10 * Point ;

             Alert ( "===================" );  

            }  

            

           if ( Value3 == HiValue3 )

            {

               NormalizeDouble ( Volume [i], 0 );                

               red[i]= 0 ;

            }

           if ( Value2 == HiValue2 && Value3 == HiValue3 )

            {

               NormalizeDouble ( Volume [i], 0 );

               red[i]= 0 ;

              

            }

         if ( Value2 == HiValue2  && Close [i] <= ( High [i] + Low [i]) / 2 )

            {

               lime[i] = Low [i]- 10 * Point ;

               Alert ( "===================" );            

              }
 
Alekseu Fedotov :
if ( Value2 == HiValue2  && Close [i] > ( High [i] + Low [i]) / 2 )

            {

               red[i] = High [i]+ 10 * Point ;

             Alert ( "===================" );  

            }  

            

           if ( Value3 == HiValue3 )

            {

               NormalizeDouble ( Volume [i], 0 );                

               red[i]= 0 ;

            }

           if ( Value2 == HiValue2 && Value3 == HiValue3 )

            {

               NormalizeDouble ( Volume [i], 0 );

               red[i]= 0 ;

              

            }

         if ( Value2 == HiValue2  && Close [i] <= ( High [i] + Low [i]) / 2 )

            {

               lime[i] = Low [i]- 10 * Point ;

               Alert ( "===================" );            

              }
각 촛불은 매초 더 정확하게 신호음을 울립니다.
 

#property strict
#property indicator_chart_window
#property indicator_minimum 0
#property indicator_buffers 2
#property indicator_color1 Red
#property indicator_color2 Lime
#property indicator_width1 4
#property indicator_width2 4

extern ENUM_APPLIED_PRICE price = PRICE_CLOSE ;
extern double Overbought = 80 ;
extern double Oversold   = 20 ;
extern int      NumberOfBars = 500 ;
extern string   Note = "0 means Display all bars" ;
extern int      MAPeriod = 100 ;
extern int      LookBack = 20 ;
extern bool Alert = True ;
double red[],lime[];
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
       SetIndexBuffer ( 0 ,red);
       SetIndexStyle ( 0 , DRAW_ARROW , STYLE_SOLID , 3 );
       SetIndexArrow ( 0 , 234 );
       SetIndexLabel ( 0 , "Climax High " );
       SetIndexBuffer ( 1 ,lime);
       SetIndexStyle ( 1 , DRAW_ARROW , STYLE_SOLID , 3 );
       SetIndexArrow ( 1 , 233 );
       SetIndexLabel ( 1 , "Climax Low " );
       SetIndexEmptyValue ( 0 , 0.0 );
       SetIndexEmptyValue ( 1 , 0.0 );
       SetIndexDrawBegin ( 0 , 0 );
       SetIndexDrawBegin ( 1 , 0 );
       IndicatorShortName ( "MKSP_Volume" );
   return ( 0 );
  }
//+------------------------------------------------------------------+
int deinit()
  {
   return ( 0 );
  }
int start()
{
   double VolLowest,Range,Value2,Value3,HiValue2,HiValue3,LoValue3,tempv2,tempv3,tempv;
   int limit;
   int counted_bars= IndicatorCounted ();
//---- last counted bar will be recounted
   if (counted_bars> 0 ) counted_bars--;
   if ( NumberOfBars == 0 ) NumberOfBars = Bars -counted_bars;
   limit=NumberOfBars; //Bars-counted_bars;

   for ( int i= 0 ; i<limit; i++)  
      {
         red[i] = 0 ; lime[i] = 0 ;
         Value2= 0 ;Value3= 0 ;HiValue2= 0 ;HiValue3= 0 ;LoValue3= 99999999 ;tempv2= 0 ;tempv3= 0 ;tempv= 0 ;
         VolLowest = Volume [ iLowest ( NULL , 0 , MODE_VOLUME , 20 ,i)];
         if ( Volume [i] == VolLowest)
            {
                           }

         Range = ( High [i]- Low [i]);
         Value2 = Volume [i]*Range;

         if (  Range != 0 ) Value3 = Volume [i]/Range;

         for ( int n=i;n<i+MAPeriod;n++ )
            {
               tempv= Volume [n] + tempv;
            }

           for ( int n=i;n<i+LookBack;n++)
            {
               tempv2 = Volume [n]*(( High [n]- Low [n]));
               if ( tempv2 >= HiValue2 )
                  HiValue2 = tempv2;

               if ( Volume [n]*(( High [n]- Low [n])) != 0 )
                  {          
                     tempv3 = Volume [n] / (( High [n]- Low [n]));
                     if ( tempv3 > HiValue3 )  HiValue3 = tempv3;
                     if ( tempv3 < LoValue3 ) LoValue3 = tempv3;
                  }
            }
           if ( Value2 == HiValue2  && Close [i] > ( High [i] + Low [i]) / 2 )
            {
               red[i] = High [i]+ 10 * Point ;

if(i==0) Alert("Вроде бы красная стрелка"); 

            }  

           if ( Value3 == HiValue3 )
            {
               NormalizeDouble ( Volume [i], 0 );                
               red[i]= 0 ;
            }
           if ( Value2 == HiValue2 && Value3 == HiValue3 )
            {
               NormalizeDouble ( Volume [i], 0 );
               red[i]= 0 ;
            }
         if ( Value2 == HiValue2  && Close [i] <= ( High [i] + Low [i]) / 2 )
            {
               lime[i] = Low [i]- 10 * Point ;

if(i==0) Alert("Вроде бы зеленая стрелка");  

              }
      }
   return ( 0 );
  }

일반 텍스트로 메시지에 코드를 삽입하지 마십시오. 이를 위해 특수 디자인을 사용하십시오.

정말 이해하지 못했다

일반적으로 마지막 막대(0)에 신호가 있으면 경고가 발생합니다.

 
Stanislav Aksenov :

#property strict
#property indicator_chart_window
#property indicator_minimum 0
#property indicator_buffers 2
#property indicator_color1 Red
#property indicator_color2 Lime
#property indicator_width1 4
#property indicator_width2 4

extern ENUM_APPLIED_PRICE price = PRICE_CLOSE ;
extern double Overbought = 80 ;
extern double Oversold   = 20 ;
extern int      NumberOfBars = 500 ;
extern string   Note = "0 means Display all bars" ;
extern int      MAPeriod = 100 ;
extern int      LookBack = 20 ;
extern bool Alert = True ;
double red[],lime[];
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
       SetIndexBuffer ( 0 ,red);
       SetIndexStyle ( 0 , DRAW_ARROW , STYLE_SOLID , 3 );
       SetIndexArrow ( 0 , 234 );
       SetIndexLabel ( 0 , "Climax High " );
       SetIndexBuffer ( 1 ,lime);
       SetIndexStyle ( 1 , DRAW_ARROW , STYLE_SOLID , 3 );
       SetIndexArrow ( 1 , 233 );
       SetIndexLabel ( 1 , "Climax Low " );
       SetIndexEmptyValue ( 0 , 0.0 );
       SetIndexEmptyValue ( 1 , 0.0 );
       SetIndexDrawBegin ( 0 , 0 );
       SetIndexDrawBegin ( 1 , 0 );
       IndicatorShortName ( "MKSP_Volume" );
   return ( 0 );
  }
//+------------------------------------------------------------------+
int deinit()
  {
   return ( 0 );
  }
int start()
{
   double VolLowest,Range,Value2,Value3,HiValue2,HiValue3,LoValue3,tempv2,tempv3,tempv;
   int limit;
   int counted_bars= IndicatorCounted ();
//---- last counted bar will be recounted
   if (counted_bars> 0 ) counted_bars--;
   if ( NumberOfBars == 0 ) NumberOfBars = Bars -counted_bars;
   limit=NumberOfBars; //Bars-counted_bars;

   for ( int i= 0 ; i<limit; i++)  
      {
         red[i] = 0 ; lime[i] = 0 ;
         Value2= 0 ;Value3= 0 ;HiValue2= 0 ;HiValue3= 0 ;LoValue3= 99999999 ;tempv2= 0 ;tempv3= 0 ;tempv= 0 ;
         VolLowest = Volume [ iLowest ( NULL , 0 , MODE_VOLUME , 20 ,i)];
         if ( Volume [i] == VolLowest)
            {
                           }

         Range = ( High [i]- Low [i]);
         Value2 = Volume [i]*Range;

         if (  Range != 0 ) Value3 = Volume [i]/Range;

         for ( int n=i;n<i+MAPeriod;n++ )
            {
               tempv= Volume [n] + tempv;
            }

           for ( int n=i;n<i+LookBack;n++)
            {
               tempv2 = Volume [n]*(( High [n]- Low [n]));
               if ( tempv2 >= HiValue2 )
                  HiValue2 = tempv2;

               if ( Volume [n]*(( High [n]- Low [n])) != 0 )
                  {          
                     tempv3 = Volume [n] / (( High [n]- Low [n]));
                     if ( tempv3 > HiValue3 )  HiValue3 = tempv3;
                     if ( tempv3 < LoValue3 ) LoValue3 = tempv3;
                  }
            }
           if ( Value2 == HiValue2  && Close [i] > ( High [i] + Low [i]) / 2 )
            {
               red[i] = High [i]+ 10 * Point ;

if(i==0) Alert("Вроде бы красная стрелка"); 

            }  

           if ( Value3 == HiValue3 )
            {
               NormalizeDouble ( Volume [i], 0 );                
               red[i]= 0 ;
            }
           if ( Value2 == HiValue2 && Value3 == HiValue3 )
            {
               NormalizeDouble ( Volume [i], 0 );
               red[i]= 0 ;
            }
         if ( Value2 == HiValue2  && Close [i] <= ( High [i] + Low [i]) / 2 )
            {
               lime[i] = Low [i]- 10 * Point ;

if(i==0) Alert("Вроде бы зеленая стрелка");  

              }
      }
   return ( 0 );
  }

일반 텍스트로 메시지에 코드를 삽입 하지 말고 코드 디자인을 사용하십시오.

정말 이해하지 못했다

원칙적으로 내가 그 위치에 삽입한 것처럼 마지막 막대에 신호가 있으면 경고가 발생합니다...

네, 감사합니다. 교육 프로그램도 별도로 시도해 보겠습니다.)))
 
Stanislav Aksenov :

#property strict
#property indicator_chart_window
#property indicator_minimum 0
#property indicator_buffers 2
#property indicator_color1 Red
#property indicator_color2 Lime
#property indicator_width1 4
#property indicator_width2 4

extern ENUM_APPLIED_PRICE price = PRICE_CLOSE ;
extern double Overbought = 80 ;
extern double Oversold   = 20 ;
extern int      NumberOfBars = 500 ;
extern string   Note = "0 means Display all bars" ;
extern int      MAPeriod = 100 ;
extern int      LookBack = 20 ;
extern bool Alert = True ;
double red[],lime[];
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
       SetIndexBuffer ( 0 ,red);
       SetIndexStyle ( 0 , DRAW_ARROW , STYLE_SOLID , 3 );
       SetIndexArrow ( 0 , 234 );
       SetIndexLabel ( 0 , "Climax High " );
       SetIndexBuffer ( 1 ,lime);
       SetIndexStyle ( 1 , DRAW_ARROW , STYLE_SOLID , 3 );
       SetIndexArrow ( 1 , 233 );
       SetIndexLabel ( 1 , "Climax Low " );
       SetIndexEmptyValue ( 0 , 0.0 );
       SetIndexEmptyValue ( 1 , 0.0 );
       SetIndexDrawBegin ( 0 , 0 );
       SetIndexDrawBegin ( 1 , 0 );
       IndicatorShortName ( "MKSP_Volume" );
   return ( 0 );
  }
//+------------------------------------------------------------------+
int deinit()
  {
   return ( 0 );
  }
int start()
{
   double VolLowest,Range,Value2,Value3,HiValue2,HiValue3,LoValue3,tempv2,tempv3,tempv;
   int limit;
   int counted_bars= IndicatorCounted ();
//---- last counted bar will be recounted
   if (counted_bars> 0 ) counted_bars--;
   if ( NumberOfBars == 0 ) NumberOfBars = Bars -counted_bars;
   limit=NumberOfBars; //Bars-counted_bars;

   for ( int i= 0 ; i<limit; i++)  
      {
         red[i] = 0 ; lime[i] = 0 ;
         Value2= 0 ;Value3= 0 ;HiValue2= 0 ;HiValue3= 0 ;LoValue3= 99999999 ;tempv2= 0 ;tempv3= 0 ;tempv= 0 ;
         VolLowest = Volume [ iLowest ( NULL , 0 , MODE_VOLUME , 20 ,i)];
         if ( Volume [i] == VolLowest)
            {
                           }

         Range = ( High [i]- Low [i]);
         Value2 = Volume [i]*Range;

         if (  Range != 0 ) Value3 = Volume [i]/Range;

         for ( int n=i;n<i+MAPeriod;n++ )
            {
               tempv= Volume [n] + tempv;
            }

           for ( int n=i;n<i+LookBack;n++)
            {
               tempv2 = Volume [n]*(( High [n]- Low [n]));
               if ( tempv2 >= HiValue2 )
                  HiValue2 = tempv2;

               if ( Volume [n]*(( High [n]- Low [n])) != 0 )
                  {          
                     tempv3 = Volume [n] / (( High [n]- Low [n]));
                     if ( tempv3 > HiValue3 )  HiValue3 = tempv3;
                     if ( tempv3 < LoValue3 ) LoValue3 = tempv3;
                  }
            }
           if ( Value2 == HiValue2  && Close [i] > ( High [i] + Low [i]) / 2 )
            {
               red[i] = High [i]+ 10 * Point ;

if(i==0) Alert("Вроде бы красная стрелка"); 

            }  

           if ( Value3 == HiValue3 )
            {
               NormalizeDouble ( Volume [i], 0 );                
               red[i]= 0 ;
            }
           if ( Value2 == HiValue2 && Value3 == HiValue3 )
            {
               NormalizeDouble ( Volume [i], 0 );
               red[i]= 0 ;
            }
         if ( Value2 == HiValue2  && Close [i] <= ( High [i] + Low [i]) / 2 )
            {
               lime[i] = Low [i]- 10 * Point ;

if(i==0) Alert("Вроде бы зеленая стрелка");  

              }
      }
   return ( 0 );
  }

일반 텍스트로 메시지에 코드를 삽입하지 마십시오. 이를 위해 특수 디자인을 사용하십시오.

정말 이해하지 못했다

일반적으로 마지막 막대(0)에 신호가 있으면 경고가 발생합니다.

매 초마다 경고가 있습니다