지표: Bollinger Bandwidth 1.0 for MetaTrader 5

 

Bollinger Bandwidth 1.0 for MetaTrader 5:

지표는 볼린저 밴드 ® 사이의 거리를 측정하여 단일 지표로 제공하며, 메타트레이더 5 기술을 사용하여 볼린저 계산을 단순화합니다.

Bollinger Bandwidth 1.0 for MetaTrader 5

Author: Larry

 
Automated-Trading писал(а)  :

MT5용 볼린저 대역폭 1.0:

저자: 래리

BB 사이의 거리 = 2 * RMS...
 

마지막으로, 볼린저 밴드와 몇 년 동안 거래 한 후 ... 이제 상한-하한 BB 범위를 계산하는 간단하고 유용한 지표를 찾았습니다.....

주요 쌍에서는 잘 작동하지만 4 자리 브로커,,,,, 너비 값이 잘못되었을 때 JPY (EURJPY 및 USDJPY)에 연결할 때 여전히 버그가 있습니다.

이 문제를 해결하기 위해 v2.0이 있기를 바랍니다.

파일:
JPY_Value.jpg  38 kb
 

안녕하세요 래리님, 표시해 주셔서 감사합니다. 모든 데이터를 항상 복사하면 성능이 크게 저하되므로 복사하지 않는 것이 좋습니다.

다음은 OnCalculate() 메서드의 재검토 사본입니다:


  {
//--- 변수
   double upper_band[];
   double lower_band[];

// --- 배열을 동적 계열 배열로 전환합니다. 
// ArraySetAsSeries(lower_band,true);
// ArraySetAsSeries(upper_band,true);
// ArraySetAsSeries(BBandwidthBuffer,true);

//--- 모든 데이터가 계산되었는지 확인
   if(BarsCalculated(BBHandle)<rates_total) return(0);
//--- 모든 데이터를 복사할 수 있습니다.
   
   int barstocopy = 0;
   if(prev_calculated>rates_total||prev_calculated<=0) {
      barstocopy = rates_total;
   } else {
      barstocopy = rates_total-prev_calculated;
      if(prev_calculated>0) barstocopy++;
   }

   if(IsStopped()) return(0);
   
   if(CopyBuffer(BBHandle,1,0,barstocopy,upper_band) <=0) return(0);
   if(CopyBuffer(BBHandle,2,0,barstocopy,lower_band) <=0) return(0);

   for(int i=0;i<barstocopy-1;i++)
     {
         BBandwidthBuffer[i]=upper_band[i]-lower_band[i];
     }

//--- 다음 호출을 위한 prev_calculated의 반환 값
   return(rates_total);
  }
 
안녕하세요 이 공식으로 버전을 만들었습니다: 대역폭 = (((상위 대역 - 하위 대역)/중간 대역) / 100 * 100
파일: