포럼을 어지럽히 지 않도록 모든 초보자 질문. 프로, 놓치지 마세요. 너 없이는 아무데도 - 6. - 페이지 553

 
splxgf :
버그가 아니라 기능입니다. 당신은 여기 https://www.mql5.com/ru/articles/1388

감사합니다! 쓰레기. 클릭 한 번으로 문제가 해결되었습니다.
 
AlexeyVik :

수학에서 0은 0이고 귀하의 경우 0은 모든 것이 시작된 일종의 가격입니다.

시작 가격이 splxgf에서 제안한 대로 1.3926 이면 0은 1.3926/123*100=1.1322 또는 1.3926/1.23=1.1322가 됩니다.

이 가격 변동의 1%는 (1.3926-1.1322)/100=0.0026입니다.

또한, 스스로 해결하기를 바랍니다.


친애하는 - 완전한 넌센스. Fibo는 2점을 기반으로 합니다. 제가 조금 전에 쓴 것을 읽어보세요. 한 점 1.3926에서 아무 것도 계산할 수 없습니다. 당신은 적어도 유로가 1.13에 있었을 때를 봅니다 :)

기준가격은 건물 Fibo의 0 레벨(최소/최대 4H, 일, 주, 월, 년...)이며 이것은 수학적인 0이 아닌 매우 구체적인 가격입니다. 0과 100% Fibo는 최소 및 최대입니다. 기간 동안의 가격. 그런 다음 레벨 0에서 진입점으로 23%는 이해할 수 있고 TP는 38% 등입니다.

 
splxgf :


글쎄, 이것은 또 다른 대화이며 백분율로 초등 수학 수준에서 완전히 해결됩니다.

PercentStep=(OrderTakeProfit-OrderOpenPrice)/(138-23) - 이것은 앵무새 포인트에서 1%가 됩니다. 사실, 때때로 피연산자는 주문 유형이나 모듈로 채택에 따라 교체되어야 합니다.

더 나아가

StoplossLevel = OrderOpenPrice + PercentStep*(51-23) //Kim의 용어로 LevelWLoss이지만 각 주문에 대해 계산해야 합니다.

MoveStoplossLevel = OrderOpenPrice + PercentStep*(76-23) //LevelProfit - 위 참조.


답변과 공식 정말 감사합니다. 나는 노력할 것이다.
 

네 번째 버퍼의 값을 가져올 수 없습니다. 내가 무엇을 잘못하고 있지?

 #property indicator_separate_window
#property indicator_buffers 4
#property indicator_color1 Lime
#property indicator_color2 Yellow
#property indicator_color3 Red
#property indicator_color4 Aqua
//--- input parameters
extern int        Period_MA_1= 14 ;
extern int        p2          = 7 ;
//--- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
double ExtMapBuffer3[];
double ExtMapBuffer4[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
   SetIndexStyle ( 0 , DRAW_LINE );
   SetIndexBuffer ( 0 ,ExtMapBuffer1);
   SetIndexStyle ( 1 , DRAW_LINE );
   SetIndexBuffer ( 1 ,ExtMapBuffer2);
   SetIndexStyle ( 2 , DRAW_LINE );
   SetIndexBuffer ( 2 ,ExtMapBuffer3);
   SetIndexStyle ( 3 , DRAW_LINE );
   SetIndexBuffer ( 3 ,ExtMapBuffer4);
   IndicatorDigits ( Digits + 1 );
//----
   return ( 0 );
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
   return ( 0 );
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   int counted_bars= IndicatorCounted (),                      
    limit;
     double MA_1_t,MA_2_t;
     if (counted_bars> 0 )
    counted_bars--;
    limit= Bars -counted_bars;
    
   for ( int i= 0 ;i<limit;i++)
   {
   ExtMapBuffer1[i]= Close [i]- Close [i+Period_MA_1];
   ExtMapBuffer2[i]= MathAbs (ExtMapBuffer1[i]);
   ExtMapBuffer3[i]=ExtMapBuffer1[i]/ExtMapBuffer2[i];
   ExtMapBuffer4[i]= iMAOnArray (ExtMapBuffer3, 0 , p2, 0 , MODE_SMA ,i);
   }
   
   return ( 0 );
  }
 
Forexman77 :

네 번째 버퍼의 값을 가져올 수 없습니다. 내가 무엇을 잘못하고 있지?


내 예에는 여러 주기가 있었습니다. 불필요한 것을 제거 했습니까?
 

안녕하세요.

조언자의 설정 창에서 "DLL 호출 허용" 상자를 선택할 수 없는 이유를 알려주시겠습니까?

터미널 설정 에서 동일하게 활성화됩니다. 다른 고문 - 모든 것이 정상입니다.

이 Expert Advisor를 직접 작성하려고 합니다. 그것은 iCustom을 통한 외부 표시기 호출을 사용하며 차례로 DLL에 대한 호출이 필요합니다.

도와 주셔서 감사합니다.

 
Vinin :

내 예에는 여러 주기가 있었습니다. 불필요한 것을 제거합니까?
다양한 방법으로 시도했지만 이렇게 하면 다음과 같습니다.
 #property indicator_separate_window
#property indicator_buffers 4
#property indicator_color1 Lime
#property indicator_color2 Yellow
#property indicator_color3 Red
#property indicator_color4 Aqua

//--- input parameters
extern int        Period_MA_1= 14 ;
extern int        p2          = 7 ;
extern int        p3          = 5 ;
extern int        p4          = 3 ;
//--- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
double ExtMapBuffer3[];
double ExtMapBuffer4[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
   SetIndexStyle ( 0 , DRAW_NONE );
   SetIndexBuffer ( 0 ,ExtMapBuffer1);
   SetIndexStyle ( 1 , DRAW_LINE );
   SetIndexBuffer ( 1 ,ExtMapBuffer2);
   SetIndexStyle ( 2 , DRAW_LINE );
   SetIndexBuffer ( 2 ,ExtMapBuffer3);
   SetIndexStyle ( 3 , DRAW_LINE );
   SetIndexBuffer ( 3 ,ExtMapBuffer4);
   IndicatorDigits ( Digits + 1 );
//----
   return ( 0 );
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
   return ( 0 );
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   int counted_bars= IndicatorCounted (),
   i,limit1,limit2,limit3,limit4;
   limit1= Bars -counted_bars- 1 ;
   limit2=limit1;
   limit3=limit2;
   limit4=limit3;
   if (limit1> 0 ) 
     {
      limit1= Bars -Period_MA_1- 1 ;
      limit2=limit1-p2;
      limit3=limit2-p3;
      limit4=limit3-p4;
     }

   for (i=limit1;i>= 0 ;i--) ExtMapBuffer1[i]= Close [i]- Close [i+Period_MA_1];
   for (i=limit2;i>= 0 ;i--) ExtMapBuffer2[i]= MathAbs (ExtMapBuffer1[i]);
   for (i=limit3;i>= 0 ;i--) ExtMapBuffer3[i]=ExtMapBuffer1[i]/ExtMapBuffer2[i];
   for (i=limit4;i>= 0 ;i--) ExtMapBuffer4[i]= iMAOnArray (ExtMapBuffer3, 0 , p2, 0 , MODE_SMA ,i);

   return ( 0 );
  }

그런 다음 세 번째 및 네 번째 버퍼는 계산되지 않습니다. 어디가 오류인지 이해가 되지 않습니다. 이 분야에서 나의 지식은 충분하지 않습니다.

모든 것을 다른 버퍼로 조각하지 않고 다음과 같이 주요 부분을 계산하는 것이 좋을 것입니다.

 ExtMapBuffer1[i]=( Close [i]- Close [i+Period_MA_1])/ MathAbs ( Close [i]- Close [i+Period_MA_1]);
그러나 이 경우 모든 곳이 비어 있습니다.
 
Forexman77 :
다양한 방법으로 시도했지만 이렇게 하면 다음과 같습니다.

그런 다음 세 번째 및 네 번째 버퍼는 계산되지 않습니다. 어디가 잘못되었는지 이해가 안됩니다. 이 분야에서 나의 지식은 충분하지 않습니다.

모든 것을 다른 버퍼로 조각하지 않고 다음과 같이 주요 부분을 계산하는 것이 좋을 것입니다.

그러나 이 경우 모든 곳이 비어 있습니다.


공식에 따르면 결과는 1 또는 -1이 됩니다. 이것이 사실입니까 아니면 다른 결과를 기대하고 있습니까?
 
Vinin :

공식에 따르면 결과는 1 또는 -1이 됩니다. 이것이 사실입니까 아니면 다른 결과를 기대하고 있습니까?

예, 세 번째 버퍼에는 1 또는 -1이 있습니다. 그리고 네 번째에서는 이러한 매개 변수의 이동 평균 이 계산됩니다.

세 번째 버퍼에도 100을 곱한 값이 있지만 이것은 문제가 되지 않습니다.

 
Forexman77 :

예, 세 번째 버퍼에는 1 또는 -1이 있습니다. 그리고 네 번째에서는 이러한 매개 변수의 이동 평균이 계산됩니다.

세 번째 버퍼에도 100을 곱한 값이 있는데 이는 문제가 되지 않는다.


 //+------------------------------------------------------------------+
//|                                                      ProjectName |
//|                                      Copyright 2012, CompanyName |
//|                                       http://www.companyname.net |
//+------------------------------------------------------------------+
#property indicator_separate_window
#property indicator_buffers 2
#property indicator_color1 Lime
#property indicator_color2 Yellow

//--- input parameters
extern int        Period_MA_1= 14 ;
extern int        p2= 7 ;
//--- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
   SetIndexStyle ( 0 , DRAW_HISTOGRAM );
   SetIndexBuffer ( 0 ,ExtMapBuffer1);
   SetIndexStyle ( 1 , DRAW_LINE );
   SetIndexBuffer ( 1 ,ExtMapBuffer2);
//----
   return ( 0 );
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
   return ( 0 );
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   int counted_bars= IndicatorCounted (),
   i,limit1,limit2;
   limit1= Bars -counted_bars- 1 ;
   limit2=limit1;
   if (limit1> 0 )
     {
      limit1= Bars -Period_MA_1- 1 ;
      limit2=limit1-p2;
     }

   for (i=limit1;i>= 0 ;i--) 
     {
      ExtMapBuffer1[i]= 1 ;
       if ( Close [i]< Close [i+Period_MA_1])
         ExtMapBuffer1[i]=- 1 ;
     }
   for (i=limit2;i>= 0 ;i--) ExtMapBuffer2[i]= iMAOnArray (ExtMapBuffer1, 0 ,p2, 0 , MODE_SMA ,i);

   return ( 0 );
  }
//+------------------------------------------------------------------+
사유: