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

 
Artyom Trishkin :

다른 표시기에서 전화하지 마세요 :)

또는 당신이 그것을하는 방법을 보여줍니다.

이 함수에서 호출


double GetPriceFractal( string symbol, ENUM_TIMEFRAMES timeframe, int mode_fractal, int count_find, int number_fractal, int &bar_fractal, int shift) {
   int n= 0 ;
   for ( int i=shift; i<count_find; i++) {
       //double price_fractal=iFractals(symbol,timeframe,mode_fractal,i);
       double price_fractal= NormalizeDouble ( iCustom (symbol,timeframe, "X-bars" ,InpLeftSide,InpRightSide,mode_fractal,i), Digits );
       if (price_fractal> 0 ) {
         n++;
         if (n==number_fractal) {
            bar_fractal=i;
             return (price_fractal);
            }
         }
      }
   return ( EMPTY_VALUE );
}

그리고 그녀는 차례로 이것에서

bool CheckOnePrices( string symbol, ENUM_TIMEFRAMES timeframe, int mode_fractal, int count_find, int count_fractals, int bar_fractal, double match_price, int delta_points, int shift) {
   if (count_fractals< 1 ) return ( false );
     double pt= SymbolInfoDouble (symbol, SYMBOL_POINT );
   int     n= 1 , dg=( int ) SymbolInfoInteger (symbol, SYMBOL_DIGITS );
   for ( int i=n; i<=count_fractals; i++) {
       double price_fractal=GetPriceFractal(symbol,timeframe,mode_fractal,count_find,n,bar_fractal,shift);
       double result_compare= fabs ( NormalizeDouble (price_fractal-match_price,dg));
       if (result_compare<delta_points*pt) {
         if (mode_fractal== 0 ) BufferFractalUp[bar_fractal]=price_fractal;
         else BufferFractalDn[bar_fractal]=price_fractal;
         /// Print("Цена бара с фракталом ",n," совпала с проверяемой ценой, возвращаем true");
         return ( true );
         }
      n++;
      }
   return ( false );
}

OnCalculate() 에 있습니다.

if (CheckOnePrices( Symbol (), PERIOD_CURRENT , 0 ,rates_total,numFractals,bar,low[i],delta,i+ 1 )) { BufferPointDn[i]=low[i]-distanc* Point ;}
 
mila.com :

이 함수에서 호출


double GetPriceFractal( string symbol, ENUM_TIMEFRAMES timeframe, int mode_fractal, int count_find, int number_fractal, int &bar_fractal, int shift) {
   int n= 0 ;
   for ( int i=shift; i<count_find; i++) {
       //double price_fractal=iFractals(symbol,timeframe,mode_fractal,i);
       double price_fractal= NormalizeDouble ( iCustom (symbol,timeframe, "X-bars" ,InpLeftSide,InpRightSide,mode_fractal,i), Digits );
       if (price_fractal> 0 ) {
         n++;
         if (n==number_fractal) {
            bar_fractal=i;
             return (price_fractal);
            }
         }
      }
   return ( EMPTY_VALUE );
}

글쎄... 당신은 그것을 올바르게 부르지 않고 있습니다 - 그것은 설정에 2개의 매개변수만 있고 이름 뒤에 3개를 입력했습니다.

왜 정규화를 합니까? 여기서는 필요하지 않습니다.

 
mila.com :

이 함수에서 호출


double GetPriceFractal( string symbol, ENUM_TIMEFRAMES timeframe, int mode_fractal, int count_find, int number_fractal, int &bar_fractal, int shift) {
   int n= 0 ;
   for ( int i=shift; i<count_find; i++) {
       //double price_fractal=iFractals(symbol,timeframe,mode_fractal,i);
       double price_fractal= NormalizeDouble ( iCustom (symbol,timeframe, "X-bars" ,InpLeftSide,InpRightSide,mode_fractal,i), Digits );
       if (price_fractal> 0 ) {
         n++;
         if (n==number_fractal) {
            bar_fractal=i;
             return (price_fractal);
            }
         }
      }
   return ( EMPTY_VALUE );
}

mode_fractal에서 이 사용자 지정 표시기의 버퍼 번호를 입력해야 합니다. 상위 0, 하위 1, 그렇지 않으면 표준 프랙탈에서 프랙탈에 대한 식별자 값이 이 사용자 정의 버퍼 값과 일치하지 않습니다. 지시자:

표준 도형:

끊임없는

의미

설명

MODE_UPPER

하나

탑 라인

MODE_LOWER

2

결론


사용자 지정 표시기 버퍼:

0 탑 라인
1 결론

 
Artyom Trishkin :

글쎄... 당신은 그것을 올바르게 부르지 않고 있습니다 - 그것은 설정에 2개의 매개변수만 있고 이름 뒤에 3개를 입력했습니다.

노멀라이제이션을 하는 이유는? 여기서는 필요하지 않습니다.

mode_fractal은 위 또는 아래 프랙탈 입니다.

마침표 뒤에 0이 삽입됨

 
mila.com :

mode_fractal은 없는 경우와 마찬가지로 위 또는 아래 프랙탈입니다.

마침표 뒤에 0 삽입

표준 지표와 사용자 지정 지표의 값이 일치하지 않는다고 위에서 썼습니다.
 
Artyom Trishkin :
표준 지표와 사용자 지정 지표의 값이 일치하지 않는다고 위에서 썼습니다.
잘못된 일치. 더 깊이 들여다봐야...
 
Meta Trader 4 앱에는 피보나치가 없는데 설명에 있는 이유는 무엇입니까?
 
SLANDOV :
Meta Trader 4 앱에는 피보나치가 없는데 설명에 있는 이유는 무엇입니까?
어때요? 예: 메뉴 항목 "삽입" --> "피보나치"
 
Artyom Trishkin :
어때요? 예: 메뉴 항목 "삽입" --> "피보나치"
PlayMarket의 MetaTrader4
 
SLANDOV :
PlayMarket의 MetaTrader4
안타깝게도 지금은 Android 기기나 iOS에서 MT4를 볼 수 없습니다...
사유: