[경고, 주제 닫힘!] 포럼을 어지럽히지 않도록 모든 초보자 질문. 프로, 놓치지 마세요. 당신 없이는 어디에도 없습니다. - 페이지 175

[삭제]  
여러분, 하지만 말씀해 주세요... 이제 시스템에서 입력을 별도로 테스트하려면.. 이 입력이 잘 작동한다고 가정하기 위해 결과에서 적중의 51% 이상을 위해 노력해야 한다는 의미입니까? 나머지 시스템 매개변수와 함께? 음, 입력 작업에 SL=TP가 있어야 하는 것은 분명합니다.
 

다른 데이터 유형 집합으로 배열을 선언할 수 있습니까? 분명히 아닙니다. "제어"질문 ... 말하자면 ...

 
DDFedor писал(а) >>

다른 데이터 유형 집합으로 배열을 선언할 수 있습니까? 분명히 아닙니다. "제어"질문 ... 말하자면 ...

답변을 제어합니다. 아니요.

[삭제]  
사람들은 내가 오류를 찾는 데 도움을 줍니다. 터키에서 소리 신호가 작동하지 않는 이유는 무엇입니까? 내가 말할 수 있는 한 그는 거기에 있다. 설정에서 경고가 활성화되어 있지만 실제로는 신호가 없습니다. 전체적으로 칠면조 모양의 화살표는 정상적으로 작동하지만 어떤 이유로 사운드 신호가 버그가 있습니다((미리 감사합니다!
roperty indicator_separate_window
#property indicator_buffers 5
#property indicator_color1 Yellow
#property indicator_color2 Green
#property indicator_color3 Red
#property indicator_color4 Yellow
#property indicator_color5 Aqua

extern bool Crash = FALSE ;
extern int TimeFrame = 60 ;
extern int Length = 7 ;
extern int Method = 3 ;
extern int Smoothing = 2 ;
extern int Filter = 2 ;
extern bool RealTime = TRUE ;
extern bool Steady = FALSE ;
extern bool Color = TRUE ;
extern bool Alerts = TRUE ;
extern bool EmailON = FALSE ;
extern bool SignalPrice = TRUE ;
extern color SignalPriceBUY = Yellow ;
extern color SignalPriceSELL = Aqua ;
extern int CountBars = 1485 ;
double g_ibuf_136 [ ] ;
double g_ibuf_140 [ ] ;
double g_ibuf_144 [ ] ;
double g_ibuf_148 [ ] ;
double g_ibuf_152 [ ] ;
double g_ibuf_156 [ ] ;
double g_ibuf_160 [ ] ;
double g_ibuf_164 [ ] ;
bool gi_168 = TRUE ;
bool gi_172 = TRUE ;
int g_datetime_176 = 0 ;
int g_datetime_180 = 0 ;
int gi_184 = 0 ;

int init ( ) {
   string ls_0 ;
   IndicatorBuffers ( 8 ) ;
   SetIndexStyle ( 0 , DRAW_LINE , STYLE_SOLID ) ;
   SetIndexBuffer ( 0 , g_ibuf_140 ) ;
   SetIndexStyle ( 1 , DRAW_LINE , STYLE_SOLID ) ;
   SetIndexBuffer ( 1 , g_ibuf_152 ) ;
   SetIndexStyle ( 2 , DRAW_LINE , STYLE_SOLID ) ;
   SetIndexBuffer ( 2 , g_ibuf_156 ) ;
   SetIndexStyle ( 3 , DRAW_ARROW ) ;
   SetIndexArrow ( 3 , 233 ) ;
   SetIndexBuffer ( 3 , g_ibuf_160 ) ;
   SetIndexStyle ( 4 , DRAW_ARROW ) ;
   SetIndexArrow ( 4 , 234 ) ;
   SetIndexBuffer ( 4 , g_ibuf_164 ) ;
   SetIndexBuffer ( 5 , g_ibuf_136 ) ;
   SetIndexBuffer ( 6 , g_ibuf_148 ) ;
   SetIndexBuffer ( 7 , g_ibuf_144 ) ;
   if ( Length < 2 ) Length = 2 ;
   if ( Method < MODE_SMA ) Method = 0 ;
   if ( Method > MODE_LWMA ) Method = 3 ;
   if ( Smoothing < 0 ) Smoothing = 0 ;
   if ( Filter < 0 ) Filter = 0 ;
   if ( TimeFrame < Period ( ) & & TimeFrame ! = 0 ) TimeFrame = Period ( ) ;
   switch ( TimeFrame ) {
   case 1 :
      ls_0 = "M1" ;
      break ;
   case 5 :
      ls_0 = "M5" ;
      break ;
   case 15 :
      ls_0 = "M15" ;
      break ;
   case 30 :
      ls_0 = "M30" ;
      break ;
   case 60 :
      ls_0 = "H1" ;
      break ;
   case 240 :
      ls_0 = "H4" ;
      break ;
   case 1440 :
      ls_0 = "D1" ;
      break ;
   case 10080 :
      ls_0 = "W1" ;
      break ;
   case 43200 :
      ls_0 = "MN1" ;
      break ;
   default :
      ls_0 = "" ;
   }
   string ls_12 = "pfd_snake_trend" + ls_0 + " |  " + Length + " , " + Method + " , " + Smoothing + " , " + Filter + "  | " ;
   IndicatorShortName ( ls_12 ) ;
   return ( 0 ) ;
}

int start ( ) {
   int lia_0 [ ] ;
   int li_4 ;
   int l_index_8 ;
   string ls_12 ;
   if ( Time [ 0 ] > StrToTime ( "01.02.2010 23:59" ) ) return ( 0 ) ;
   if ( Bars < 100 ) {
      IndicatorShortName ( "Bars less than 100" ) ;
      return ( 0 ) ;
   }
   if ( g_datetime_176 < iTime ( NULL , TimeFrame , 0 ) ) {
      gi_172 = FALSE ;
      gi_168 = FALSE ;
      g_datetime_176 = iTime ( NULL , TimeFrame , 0 ) ;
   }
   if ( ! RealTime ) {
      if ( g_datetime_180 = = iTime ( NULL , TimeFrame , 0 ) ) return ( 0 ) ;
      g_datetime_180 = iTime ( NULL , TimeFrame , 0 ) ;
      gi_184 = TimeFrame / Period ( ) + 1 ;
      if ( gi_184 = = 0 ) gi_184 = 1 ;
   }
   double ld_unused_20 = 0 ;
   double l_ima_28 = 0 ;
   double l_ima_36 = 0 ;
   double l_ima_44 = 0 ;
   double l_ima_52 = 0 ;
   double l_ima_60 = 0 ;
   if ( CountBars > iBars ( NULL , TimeFrame ) | | CountBars > Bars - Length - 1 ) CountBars = MathMin ( Bars - Length - 1 , iBars ( NULL , TimeFrame ) - Length - 1 ) ;
   if ( Crash & & CountBars > 0 ) {
      CountBars - = 10 ;
      IndicatorShortName ( "Crash: " + CountBars + "     " ) ;
   }
   if ( Crash & & CountBars < 0 ) IndicatorShortName ( "Crash" ) ;
   int li_68 = CountBars ;
   g_ibuf_140 [ li_68 + 1 ] = Close [ li_68 + 1 ] ;
   g_ibuf_144 [ li_68 + 1 ] = Close [ li_68 + 1 ] ;
   while ( li_68 > = 0 ) {
      l_ima_28 = iMA ( NULL , TimeFrame , Length , 0 , Method , PRICE_HIGH , li_68 ) ;
      l_ima_36 = iMA ( NULL , TimeFrame , Length , 0 , Method , PRICE_LOW , li_68 ) ;
      l_ima_44 = iMA ( NULL , TimeFrame , Length , 0 , Method , PRICE_OPEN , li_68 ) ;
      l_ima_52 = iMA ( NULL , TimeFrame , Length , 0 , Method , PRICE_CLOSE , li_68 ) ;
      l_ima_60 = iMA ( NULL , TimeFrame , Length , 0 , Method , PRICE_CLOSE , li_68 + Smoothing ) ;
      if ( Steady = = TRUE ) {
         l_ima_52 = iMA ( NULL , TimeFrame , Length , 0 , Method , PRICE_MEDIAN , li_68 ) ;
         l_ima_60 = iMA ( NULL , TimeFrame , Length , 0 , Method , PRICE_MEDIAN , li_68 + Smoothing ) ;
      }
      g_ibuf_136 [ li_68 ] = MathAbs ( ( ( l_ima_52 - l_ima_60 ) / MathMax ( l_ima_28 - l_ima_36 , MathMax ( l_ima_28 - l_ima_60 , l_ima_60 - l_ima_36 ) ) + ( l_ima_52 - l_ima_44 ) / ( l_ima_28 - l_ima_36 ) ) / 2.0 ) * ( ( l_ima_52 - l_ima_60 +
         ( l_ima_52 - l_ima_44 ) ) / 2.0 ) ;
      g_ibuf_140 [ li_68 ] = g_ibuf_140 [ li_68 + 1 ] + g_ibuf_136 [ li_68 ] ;
      if ( Filter > 0 )
         if ( MathAbs ( g_ibuf_140 [ li_68 ] - ( g_ibuf_140 [ li_68 + 1 ] ) ) < Filter * Point ) g_ibuf_140 [ li_68 ] = g_ibuf_140 [ li_68 + 1 ] ;
      if ( TimeFrame > Period ( ) ) g_ibuf_144 [ li_68 ] = g_ibuf_140 [ li_68 ] ;
      li_68 - - ;
   }
   if ( TimeFrame > Period ( ) ) {
      ArrayCopySeries ( lia_0 , 5 , Symbol ( ) , TimeFrame ) ;
      li_4 = CountBars + TimeFrame / Period ( ) ;
      li_68 = 0 ;
      l_index_8 = 0 ;
      while ( li_68 < li_4 ) {
         if ( Time [ li_68 ] < lia_0 [ l_index_8 ] ) l_index_8 + + ;
         g_ibuf_140 [ li_68 ] = g_ibuf_144 [ l_index_8 ] ;
         li_68 + + ;
      }
   }
   for ( li_68 = CountBars ; li_68 > = 0 ; li_68 - - ) {
      g_ibuf_148 [ li_68 ] = g_ibuf_148 [ li_68 + 1 ] ;
      if ( g_ibuf_140 [ li_68 ] - ( g_ibuf_140 [ li_68 + 1 ] ) > 0.0 ) g_ibuf_148 [ li_68 ] = 1 ;
      if ( g_ibuf_140 [ li_68 + 1 ] - g_ibuf_140 [ li_68 ] > 0.0 ) g_ibuf_148 [ li_68 ] = - 1 ;
      if ( Color = = TRUE ) {
         if ( g_ibuf_148 [ li_68 ] > 0.0 ) {
            g_ibuf_152 [ li_68 ] = g_ibuf_140 [ li_68 ] ;
            if ( g_ibuf_148 [ li_68 + 1 ] < 0.0 ) g_ibuf_152 [ li_68 + 1 ] = g_ibuf_140 [ li_68 + 1 ] ;
            g_ibuf_156 [ li_68 ] = EMPTY_VALUE ;
         } else {
            if ( g_ibuf_148 [ li_68 ] < 0.0 ) {
               g_ibuf_156 [ li_68 ] = g_ibuf_140 [ li_68 ] ;
               if ( g_ibuf_148 [ li_68 + 1 ] > 0.0 ) g_ibuf_156 [ li_68 + 1 ] = g_ibuf_140 [ li_68 + 1 ] ;
               g_ibuf_152 [ li_68 ] = EMPTY_VALUE ;
            }
         }
      }
      
      
//--------------------------------------------------------      
      if ( Alerts = = TRUE )
      {
         g_ibuf_160 [ li_68 ] = EMPTY_VALUE ;
         g_ibuf_164 [ li_68 ] = EMPTY_VALUE ;
         if ( g_ibuf_148 [ li_68 ] = = 1.0 & & g_ibuf_148 [ li_68 + 1 ] = = - 1.0 ) g_ibuf_160 [ li_68 ] = g_ibuf_140 [ li_68 + 1 ] - ( Ask - Bid ) ;
         if ( g_ibuf_148 [ li_68 ] = = - 1.0 & & g_ibuf_148 [ li_68 + 1 ] = = 1.0 ) g_ibuf_164 [ li_68 ] = g_ibuf_140 [ li_68 + 1 ] + ( Ask - Bid ) ;
      }
   }
   
//-------------------------------------
   if ( Alerts = = TRUE )
   {
      if ( g_ibuf_160 [ gi_184 + 0 ] ! = EMPTY_VALUE & & gi_168 = = FALSE )
      {
         if ( SignalPrice = = TRUE )
         {
            ObjectCreate ( "BUY SIGNAL: " + DoubleToStr ( Time [ 0 ] , 0 ) , OBJ_ARROW , 0 , Time [ 0 ] , Close [ 0 ] ) ;
            ObjectSet ( "BUY SIGNAL: " + DoubleToStr ( Time [ 0 ] , 0 ) , OBJPROP_ARROWCODE , SYMBOL_LEFTPRICE ) ;
            ObjectSet ( "BUY SIGNAL: " + DoubleToStr ( Time [ 0 ] , 0 ) , OBJPROP_COLOR , SignalPriceBUY ) ;
         }
         gi_172 = FALSE ;
         gi_168 = TRUE ;
      }
      
      
      if ( g_ibuf_164 [ gi_184 + 0 ] ! = EMPTY_VALUE & & gi_172 = = FALSE )
      {
         if ( SignalPrice = = TRUE )
         {
            ObjectCreate ( "SELL SIGNAL: " + DoubleToStr ( Time [ 0 ] , 0 ) , OBJ_ARROW , 0 , Time [ 0 ] , Close [ 0 ] ) ;
            ObjectSet ( "SELL SIGNAL: " + DoubleToStr ( Time [ 0 ] , 0 ) , OBJPROP_ARROWCODE , SYMBOL_LEFTPRICE ) ;
            ObjectSet ( "SELL SIGNAL: " + DoubleToStr ( Time [ 0 ] , 0 ) , OBJPROP_COLOR , SignalPriceSELL ) ;
         }
         gi_168 = FALSE ;
         gi_172 = TRUE ;
      }
   }
   return ( 0 ) ;
[삭제]  
사람들은 내가 오류를 찾는 데 도움을 줍니다. 터키에서 소리 신호가 작동하지 않는 이유는 무엇입니까? 내가 말할 수 있는 한 그는 거기에 있다. 설정에서 경고가 활성화되어 있지만 실제로는 신호가 없습니다. 전체적으로 칠면조 모양의 화살표는 정상적으로 작동하지만 어떤 이유로 사운드 신호가 버그가 있습니다((미리 감사합니다!
roperty indicator_separate_window
#property indicator_buffers 5
#property indicator_color1 Yellow
#property indicator_color2 Green
#property indicator_color3 Red
#property indicator_color4 Yellow
#property indicator_color5 Aqua

extern bool Crash = FALSE ;
extern int TimeFrame = 60 ;
extern int Length = 7 ;
extern int Method = 3 ;
extern int Smoothing = 2 ;
extern int Filter = 2 ;
extern bool RealTime = TRUE ;
extern bool Steady = FALSE ;
extern bool Color = TRUE ;
extern bool Alerts = TRUE ;
extern bool EmailON = FALSE ;
extern bool SignalPrice = TRUE ;
extern color SignalPriceBUY = Yellow ;
extern color SignalPriceSELL = Aqua ;
extern int CountBars = 1485 ;
double g_ibuf_136 [ ] ;
double g_ibuf_140 [ ] ;
double g_ibuf_144 [ ] ;
double g_ibuf_148 [ ] ;
double g_ibuf_152 [ ] ;
double g_ibuf_156 [ ] ;
double g_ibuf_160 [ ] ;
double g_ibuf_164 [ ] ;
bool gi_168 = TRUE ;
bool gi_172 = TRUE ;
int g_datetime_176 = 0 ;
int g_datetime_180 = 0 ;
int gi_184 = 0 ;

int init ( ) {
   string ls_0 ;
   IndicatorBuffers ( 8 ) ;
   SetIndexStyle ( 0 , DRAW_LINE , STYLE_SOLID ) ;
   SetIndexBuffer ( 0 , g_ibuf_140 ) ;
   SetIndexStyle ( 1 , DRAW_LINE , STYLE_SOLID ) ;
   SetIndexBuffer ( 1 , g_ibuf_152 ) ;
   SetIndexStyle ( 2 , DRAW_LINE , STYLE_SOLID ) ;
   SetIndexBuffer ( 2 , g_ibuf_156 ) ;
   SetIndexStyle ( 3 , DRAW_ARROW ) ;
   SetIndexArrow ( 3 , 233 ) ;
   SetIndexBuffer ( 3 , g_ibuf_160 ) ;
   SetIndexStyle ( 4 , DRAW_ARROW ) ;
   SetIndexArrow ( 4 , 234 ) ;
   SetIndexBuffer ( 4 , g_ibuf_164 ) ;
   SetIndexBuffer ( 5 , g_ibuf_136 ) ;
   SetIndexBuffer ( 6 , g_ibuf_148 ) ;
   SetIndexBuffer ( 7 , g_ibuf_144 ) ;
   if ( Length < 2 ) Length = 2 ;
   if ( Method < MODE_SMA ) Method = 0 ;
   if ( Method > MODE_LWMA ) Method = 3 ;
   if ( Smoothing < 0 ) Smoothing = 0 ;
   if ( Filter < 0 ) Filter = 0 ;
   if ( TimeFrame < Period ( ) & & TimeFrame ! = 0 ) TimeFrame = Period ( ) ;
   switch ( TimeFrame ) {
   case 1 :
      ls_0 = "M1" ;
      break ;
   case 5 :
      ls_0 = "M5" ;
      break ;
   case 15 :
      ls_0 = "M15" ;
      break ;
   case 30 :
      ls_0 = "M30" ;
      break ;
   case 60 :
      ls_0 = "H1" ;
      break ;
   case 240 :
      ls_0 = "H4" ;
      break ;
   case 1440 :
      ls_0 = "D1" ;
      break ;
   case 10080 :
      ls_0 = "W1" ;
      break ;
   case 43200 :
      ls_0 = "MN1" ;
      break ;
   default :
      ls_0 = "" ;
   }
   string ls_12 = "pfd_snake_trend" + ls_0 + " |  " + Length + " , " + Method + " , " + Smoothing + " , " + Filter + "  | " ;
   IndicatorShortName ( ls_12 ) ;
   return ( 0 ) ;
}

int start ( ) {
   int lia_0 [ ] ;
   int li_4 ;
   int l_index_8 ;
   string ls_12 ;
   if ( Time [ 0 ] > StrToTime ( "01.02.2010 23:59" ) ) return ( 0 ) ;
   if ( Bars < 100 ) {
      IndicatorShortName ( "Bars less than 100" ) ;
      return ( 0 ) ;
   }
   if ( g_datetime_176 < iTime ( NULL , TimeFrame , 0 ) ) {
      gi_172 = FALSE ;
      gi_168 = FALSE ;
      g_datetime_176 = iTime ( NULL , TimeFrame , 0 ) ;
   }
   if ( ! RealTime ) {
      if ( g_datetime_180 = = iTime ( NULL , TimeFrame , 0 ) ) return ( 0 ) ;
      g_datetime_180 = iTime ( NULL , TimeFrame , 0 ) ;
      gi_184 = TimeFrame / Period ( ) + 1 ;
      if ( gi_184 = = 0 ) gi_184 = 1 ;
   }
   double ld_unused_20 = 0 ;
   double l_ima_28 = 0 ;
   double l_ima_36 = 0 ;
   double l_ima_44 = 0 ;
   double l_ima_52 = 0 ;
   double l_ima_60 = 0 ;
   if ( CountBars > iBars ( NULL , TimeFrame ) | | CountBars > Bars - Length - 1 ) CountBars = MathMin ( Bars - Length - 1 , iBars ( NULL , TimeFrame ) - Length - 1 ) ;
   if ( Crash & & CountBars > 0 ) {
      CountBars - = 10 ;
      IndicatorShortName ( "Crash: " + CountBars + "     " ) ;
   }
   if ( Crash & & CountBars < 0 ) IndicatorShortName ( "Crash" ) ;
   int li_68 = CountBars ;
   g_ibuf_140 [ li_68 + 1 ] = Close [ li_68 + 1 ] ;
   g_ibuf_144 [ li_68 + 1 ] = Close [ li_68 + 1 ] ;
   while ( li_68 > = 0 ) {
      l_ima_28 = iMA ( NULL , TimeFrame , Length , 0 , Method , PRICE_HIGH , li_68 ) ;
      l_ima_36 = iMA ( NULL , TimeFrame , Length , 0 , Method , PRICE_LOW , li_68 ) ;
      l_ima_44 = iMA ( NULL , TimeFrame , Length , 0 , Method , PRICE_OPEN , li_68 ) ;
      l_ima_52 = iMA ( NULL , TimeFrame , Length , 0 , Method , PRICE_CLOSE , li_68 ) ;
      l_ima_60 = iMA ( NULL , TimeFrame , Length , 0 , Method , PRICE_CLOSE , li_68 + Smoothing ) ;
      if ( Steady = = TRUE ) {
         l_ima_52 = iMA ( NULL , TimeFrame , Length , 0 , Method , PRICE_MEDIAN , li_68 ) ;
         l_ima_60 = iMA ( NULL , TimeFrame , Length , 0 , Method , PRICE_MEDIAN , li_68 + Smoothing ) ;
      }
      g_ibuf_136 [ li_68 ] = MathAbs ( ( ( l_ima_52 - l_ima_60 ) / MathMax ( l_ima_28 - l_ima_36 , MathMax ( l_ima_28 - l_ima_60 , l_ima_60 - l_ima_36 ) ) + ( l_ima_52 - l_ima_44 ) / ( l_ima_28 - l_ima_36 ) ) / 2.0 ) * ( ( l_ima_52 - l_ima_60 +
         ( l_ima_52 - l_ima_44 ) ) / 2.0 ) ;
      g_ibuf_140 [ li_68 ] = g_ibuf_140 [ li_68 + 1 ] + g_ibuf_136 [ li_68 ] ;
      if ( Filter > 0 )
         if ( MathAbs ( g_ibuf_140 [ li_68 ] - ( g_ibuf_140 [ li_68 + 1 ] ) ) < Filter * Point ) g_ibuf_140 [ li_68 ] = g_ibuf_140 [ li_68 + 1 ] ;
      if ( TimeFrame > Period ( ) ) g_ibuf_144 [ li_68 ] = g_ibuf_140 [ li_68 ] ;
      li_68 - - ;
   }
   if ( TimeFrame > Period ( ) ) {
      ArrayCopySeries ( lia_0 , 5 , Symbol ( ) , TimeFrame ) ;
      li_4 = CountBars + TimeFrame / Period ( ) ;
      li_68 = 0 ;
      l_index_8 = 0 ;
      while ( li_68 < li_4 ) {
         if ( Time [ li_68 ] < lia_0 [ l_index_8 ] ) l_index_8 + + ;
         g_ibuf_140 [ li_68 ] = g_ibuf_144 [ l_index_8 ] ;
         li_68 + + ;
      }
   }
   for ( li_68 = CountBars ; li_68 > = 0 ; li_68 - - ) {
      g_ibuf_148 [ li_68 ] = g_ibuf_148 [ li_68 + 1 ] ;
      if ( g_ibuf_140 [ li_68 ] - ( g_ibuf_140 [ li_68 + 1 ] ) > 0.0 ) g_ibuf_148 [ li_68 ] = 1 ;
      if ( g_ibuf_140 [ li_68 + 1 ] - g_ibuf_140 [ li_68 ] > 0.0 ) g_ibuf_148 [ li_68 ] = - 1 ;
      if ( Color = = TRUE ) {
         if ( g_ibuf_148 [ li_68 ] > 0.0 ) {
            g_ibuf_152 [ li_68 ] = g_ibuf_140 [ li_68 ] ;
            if ( g_ibuf_148 [ li_68 + 1 ] < 0.0 ) g_ibuf_152 [ li_68 + 1 ] = g_ibuf_140 [ li_68 + 1 ] ;
            g_ibuf_156 [ li_68 ] = EMPTY_VALUE ;
         } else {
            if ( g_ibuf_148 [ li_68 ] < 0.0 ) {
               g_ibuf_156 [ li_68 ] = g_ibuf_140 [ li_68 ] ;
               if ( g_ibuf_148 [ li_68 + 1 ] > 0.0 ) g_ibuf_156 [ li_68 + 1 ] = g_ibuf_140 [ li_68 + 1 ] ;
               g_ibuf_152 [ li_68 ] = EMPTY_VALUE ;
            }
         }
      }
      
      
//--------------------------------------------------------      
      if ( Alerts = = TRUE )
      {
         g_ibuf_160 [ li_68 ] = EMPTY_VALUE ;
         g_ibuf_164 [ li_68 ] = EMPTY_VALUE ;
         if ( g_ibuf_148 [ li_68 ] = = 1.0 & & g_ibuf_148 [ li_68 + 1 ] = = - 1.0 ) g_ibuf_160 [ li_68 ] = g_ibuf_140 [ li_68 + 1 ] - ( Ask - Bid ) ;
         if ( g_ibuf_148 [ li_68 ] = = - 1.0 & & g_ibuf_148 [ li_68 + 1 ] = = 1.0 ) g_ibuf_164 [ li_68 ] = g_ibuf_140 [ li_68 + 1 ] + ( Ask - Bid ) ;
      }
   }
   
//-------------------------------------
   if ( Alerts = = TRUE )
   {
      if ( g_ibuf_160 [ gi_184 + 0 ] ! = EMPTY_VALUE & & gi_168 = = FALSE )
      {
         if ( SignalPrice = = TRUE )
         {
            ObjectCreate ( "BUY SIGNAL: " + DoubleToStr ( Time [ 0 ] , 0 ) , OBJ_ARROW , 0 , Time [ 0 ] , Close [ 0 ] ) ;
            ObjectSet ( "BUY SIGNAL: " + DoubleToStr ( Time [ 0 ] , 0 ) , OBJPROP_ARROWCODE , SYMBOL_LEFTPRICE ) ;
            ObjectSet ( "BUY SIGNAL: " + DoubleToStr ( Time [ 0 ] , 0 ) , OBJPROP_COLOR , SignalPriceBUY ) ;
         }
         gi_172 = FALSE ;
         gi_168 = TRUE ;
      }
      
      
      if ( g_ibuf_164 [ gi_184 + 0 ] ! = EMPTY_VALUE & & gi_172 = = FALSE )
      {
         if ( SignalPrice = = TRUE )
         {
            ObjectCreate ( "SELL SIGNAL: " + DoubleToStr ( Time [ 0 ] , 0 ) , OBJ_ARROW , 0 , Time [ 0 ] , Close [ 0 ] ) ;
            ObjectSet ( "SELL SIGNAL: " + DoubleToStr ( Time [ 0 ] , 0 ) , OBJPROP_ARROWCODE , SYMBOL_LEFTPRICE ) ;
            ObjectSet ( "SELL SIGNAL: " + DoubleToStr ( Time [ 0 ] , 0 ) , OBJPROP_COLOR , SignalPriceSELL ) ;
         }
         gi_168 = FALSE ;
         gi_172 = TRUE ;
      }
   }
   return ( 0 ) ;
[삭제]  
Ofiget .. 모든 것이 버그입니다)))) 메시지가 두 번 추가되었습니다 ... 방금 메시지가 나타났습니다 - 텍스트가 너무 많아서 댓글을 추가할 수 없습니다)) 하지만 여전히 추가되었습니다))
 

올빼미가 지정된 시간에만 작동하게하는 방법. T1에서 T2로?

 
Sta2066 писал(а) >>

올빼미가 지정된 시간에만 작동하게하는 방법. T1에서 T2로?

 extern int      StartHour       =        - 1 ;
extern int      StopHour       =        - 1 ;
extern int      StartWeek       =        - 1 ;
extern int      StopWeek       =        - 1 ;

int start ( ) {
   if ( ! CheckWeek ( ) ) return ( 0 ) ;
   if ( ! CheckHour ( ) ) return ( 0 ) ;
}

bool CheckHour ( ) {
   if ( StartHour = = - 1 | | StopHour = = - 1 ) return ( true ) ;
   if ( StartHour = = StopHour & & TimeHour ( Time [ 0 ] ) = = StartHour ) return ( true ) ;
   if ( StartHour < StopHour ) {
       if ( StartHour < = TimeHour ( Time [ 0 ] ) & & TimeHour ( Time [ 0 ] ) < = StopHour ) return ( true ) ;
       return ( false ) ;
   }
   if ( StartHour > StopHour ) {
       if ( StartHour > = TimeHour ( Time [ 0 ] ) | | TimeHour ( Time [ 0 ] ) > = StopHour ) return ( true ) ;
       return ( false ) ;
   }
   return ( false ) ;
}

bool CheckWeek ( ) {
   if ( StartWeek = = - 1 | | StopWeek = = - 1 ) return ( true ) ;
   if ( TimeDayOfWeek ( Time [ 0 ] ) = = 1 & & TimeHour ( Time [ 0 ] ) < StartWeek ) return ( false ) ;
   if ( TimeDayOfWeek ( Time [ 0 ] ) = = 5 & & TimeHour ( Time [ 0 ] ) > StopWeek ) return ( false ) ;
   return ( true ) ;
}
작업 시간을 제어하는 CheckHour()
 
Sta2066 писал(а) >>

올빼미가 지정된 시간에만 작동하게하는 방법. T1에서 T2로?

자세한 내용은 여기에서... '메타에디터: 템플릿의 힘으로 그리기'

 

뭐가 문제야??

//+------------------------------------------------------------------+
//| ad+muv.mq4 |
//| Evgenio |
//| http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Evgenio"
#property link "http://www.metaquotes.net"

//---- input parameters
extern int period_ma=21;
extern int period_adx=10;
extern int filt=5;
double muv;
int t;
//+------------------------------------------------------------------+
//| expert initialization function |
//+------------------------------------------------------------------+
int init()
  {
//----
   
//----
  return(0);
  }
//+------------------------------------------------------------------+
//| expert deinitialization function |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
  return(0);
  }
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start()
  {
//----
if (OrdersTotal()==0)
  {
  muv=(iMA(Symbol(),PERIOD_M15,period_ma,0,MODE_LWMA,PRICE_CLOSE,1)-(High[1]-((High[1]-Low[1])/2)))*(-1)*100;
  double adx_main=iADX(Symbol(),PERIOD_M15,period_adx,PRICE_CLOSE,MODE_MAIN,0);
  double adx_min=iADX(Symbol(),PERIOD_M15,period_adx,PRICE_CLOSE,MODE_MINUSDI,0);
  double adx_plus=iADX(Symbol(),PERIOD_M15,period_adx,PRICE_CLOSE,MODE_PLUSDI,0);
  if (muv<0 && MathAbs(muv)>0.1 && adx_main>adx_min && adx_min>adx_plus) 
  {
  t=OrderSend(Symbol(),OP_SELL,0.1,Bid,3,NULL,NULL,"My order #",16384,0,Green);
  Print (GetLastError());
  }
  }

 if (OrdersTotal()>0)
  {
  if (muv>0) 
  {
  OrderSelect(t,SELECT_BY_TICKET,MODE_TRADES);
  OrderClose(t,0.1,Ask,3,Red);
  Print (GetLastError());
  }
  }
  return(0);
  }
//+------------------------------------------------------------------+


여기서 닫아야 합니다