찻주전자의 질문 - 페이지 105

 
uncleVic :
조금 더.. 로그의 다음 줄(여러 개)은 무엇입니까?

2012.02.22 12:51:15 st (EURUSD,H1) CExpertBase::SetOtherSeries: 시계열 변경 금지
2012.02.22 12:51:15 st (EURUSD,H1) CExpertBase::SetPriceSeries: 시계열 변경 금지

다른 아무것도

 
openlive :

2012.02.22 12:51:15 st (EURUSD,H1) CExpertBase::SetOtherSeries: 시계열 변경 금지
2012.02.22 12:51:15 st (EURUSD,H1) CExpertBase::SetPriceSeries: 시계열 변경 금지

다른 아무것도

어딘가에 구식 모듈이 끼었습니다. 마법사에서 얻은 어드바이저 코드를 첨부하십시오. 그는 비밀이 아니다, 그렇지?
 
uncleVic :
어딘가에 구식 모듈이 끼었습니다. 마법사에서 얻은 어드바이저 코드를 첨부하십시오. 그는 비밀이 아니다, 그렇지?
 //+------------------------------------------------------------------+
//|                                               Expert_Candles.mq5 |
//|                        Copyright 2010, MetaQuotes Software Corp. |
//|                                              http://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2010, MetaQuotes Software Corp."
#property link       "http://www.mql5.com"
#property version   "1.00"
//+------------------------------------------------------------------+
//| Include                                                          |
//+------------------------------------------------------------------+
#include <Expert\Expert.mqh>
#include <Expert\Signal\SignalCandles.mqh>
#include <Expert\Trailing\TrailingNone.mqh>
#include <Expert\Money\MoneyFixedLot.mqh>
//+------------------------------------------------------------------+
//| Inputs                                                           |
//+------------------------------------------------------------------+
//--- inputs for expert
input string Inp_Expert_Title              = "Expert_Candles" ;
int           Expert_MagicNumber            = 28148 ;
bool          Expert_EveryTick              = false ;
//--- inputs for signal
input int     Inp_Signal_Candles_Range      = 3 ;
input int     Inp_Signal_Candles_Minimum    = 50 ;
input double Inp_Signal_Candles_ShadowBig  = 0.5 ;
input double Inp_Signal_Candles_ShadowSmall= 0.2 ;
input double Inp_Signal_Candles_Limit      = 0.0 ;
input double Inp_Signal_Candles_StopLoss   = 2.0 ;
input double Inp_Signal_Candles_TakeProfit = 1.0 ;
input int     Inp_Signal_Candles_Expiration = 4 ;
//--- inputs for money
input double Inp_Money_FixLot_Percent      = 10.0 ;
input double Inp_Money_FixLot_Lots         = 0.1 ;
//+------------------------------------------------------------------+
//| Global expert object                                             |
//+------------------------------------------------------------------+
CExpert ExtExpert;
//+------------------------------------------------------------------+
//| Initialization function of the expert                            |
//+------------------------------------------------------------------+
int OnInit ()
  {
//--- Initializing expert
   if (!ExtExpert.Init( Symbol (), Period (),Expert_EveryTick,Expert_MagicNumber))
     {
       //--- failed
       printf ( __FUNCTION__ + ": error initializing expert" );
      ExtExpert.Deinit();
       return (- 1 );
     }
//--- Creation of signal object
   CSignalCandles *signal= new CSignalCandles;
   if (signal== NULL )
     {
       //--- failed
       printf ( __FUNCTION__ + ": error creating signal" );
      ExtExpert.Deinit();
       return (- 2 );
     }
//--- Add signal to expert (will be deleted automatically))
   if (!ExtExpert.InitSignal(signal))
     {
       //--- failed
       printf ( __FUNCTION__ + ": error initializing signal" );
      ExtExpert.Deinit();
       return (- 3 );
     }
//--- Set signal parameters
   signal.Range(Inp_Signal_Candles_Range);
   signal.Minimum(Inp_Signal_Candles_Minimum);
   signal.ShadowBig(Inp_Signal_Candles_ShadowBig);
   signal.ShadowSmall(Inp_Signal_Candles_ShadowSmall);
   signal.Limit(Inp_Signal_Candles_Limit);
   signal.StopLoss(Inp_Signal_Candles_StopLoss);
   signal.TakeProfit(Inp_Signal_Candles_TakeProfit);
   signal.Expiration(Inp_Signal_Candles_Expiration);
//--- Check signal parameters
   if (!signal.ValidationSettings())
     {
       //--- failed
       printf ( __FUNCTION__ + ": error signal parameters" );
      ExtExpert.Deinit();
       return (- 4 );
     }
//--- Creation of trailing object
   CTrailingNone *trailing= new CTrailingNone;
   if (trailing== NULL )
     {
       //--- failed
       printf ( __FUNCTION__ + ": error creating trailing" );
      ExtExpert.Deinit();
       return (- 5 );
     }
//--- Add trailing to expert (will be deleted automatically))
   if (!ExtExpert.InitTrailing(trailing))
     {
       //--- failed
       printf ( __FUNCTION__ + ": error initializing trailing" );
      ExtExpert.Deinit();
       return (- 6 );
     }
//--- Set trailing parameters
//--- Check trailing parameters
   if (!trailing.ValidationSettings())
     {
       //--- failed
       printf ( __FUNCTION__ + ": error trailing parameters" );
      ExtExpert.Deinit();
       return (- 7 );
     }
//--- Creation of money object
   CMoneyFixedLot *money= new CMoneyFixedLot;
   if (money== NULL )
     {
       //--- failed
       printf ( __FUNCTION__ + ": error creating money" );
      ExtExpert.Deinit();
       return (- 8 );
     }
//--- Add money to expert (will be deleted automatically))
   if (!ExtExpert.InitMoney(money))
     {
       //--- failed
       printf ( __FUNCTION__ + ": error initializing money" );
      ExtExpert.Deinit();
       return (- 9 );
     }
//--- Set money parameters
   money.Percent(Inp_Money_FixLot_Percent);
   money.Lots(Inp_Money_FixLot_Lots);
//--- Check money parameters
   if (!money.ValidationSettings())
     {
       //--- failed
       printf ( __FUNCTION__ + ": error money parameters" );
      ExtExpert.Deinit();
       return (- 10 );
     }
//--- Tuning of all necessary indicators
   if (!ExtExpert.InitIndicators())
     {
       //--- failed
       printf ( __FUNCTION__ + ": error initializing indicators" );
      ExtExpert.Deinit();
       return (- 11 );
     }
//--- ok
   return ( 0 );
  }
//+------------------------------------------------------------------+
//| Deinitialization function of the expert                          |
//+------------------------------------------------------------------+
void OnDeinit ( const int reason)
  {
   ExtExpert.Deinit();
  }
//+------------------------------------------------------------------+
//| Function-event handler "tick"                                    |
//+------------------------------------------------------------------+
void OnTick ()
  {
   ExtExpert. OnTick ();
  }
//+------------------------------------------------------------------+
//| Function-event handler "trade"                                   |
//+------------------------------------------------------------------+
void OnTrade ()
  {
   ExtExpert. OnTrade ();
  }
//+------------------------------------------------------------------+
//| Function-event handler "timer"                                   |
//+------------------------------------------------------------------+
void OnTimer ()
  {
   ExtExpert. OnTimer ();
  }
//+------------------------------------------------------------------+
 
mql5 :
감사합니다. 여전히 작은 질문이 있습니다. 두 프로세스가 한 섹션에서 읽는 것이 허용됩니까?
 
openlive :
이 코드가 컴파일된다는 것이 이상합니다.
 #include <Expert\Signal\SignalCandles.mqh> - это старый модуль


PS 파일은 그냥 첨부할 수 있습니다.

 
uncleVic :
이 코드가 컴파일된다는 것이 이상합니다.


PS 파일은 그냥 첨부할 수 있습니다.

사실은 테스터가 잘 작동한다는 것입니다. 그러나 거래 할 때 작동합니까?

내가 이해하는 한 새로운 모듈이 없습니까? 그렇다면 이것에 무엇을 전달해야합니까, 어렵지 않다면

 
openlive :

사실은 테스터가 잘 작동한다는 것입니다. 그러나 거래 할 때 작동합니까?

내가 이해하는 한 새로운 모듈이 없습니까? 그렇다면 이것에 무엇을 전달해야합니까, 어렵지 않다면

작동합니다. 맹세하지 않으려면 CSignalCandles::ValidationSettings() 메서드에서 맨 처음에 다음을 삽입합니다.

 //--- call of the method of the parent class
   if (!CExpertSignal::ValidationSettings()) return ( false );
 
uncleVic :

작동합니다. 맹세하지 않으려면 CSignalCandles::ValidationSettings() 메서드에서 맨 처음에 다음을 삽입합니다.

 bool CSignalCandles::ValidationSettings()
{
if (!CExpertSignal::ValidationSettings()) return ( false );

if (m_range<= 0 )
{
printf ( __FUNCTION__ + ": candles range must be greater than 0" );
return ( false );
}
//--- ok
return ( true );
}
그래서 그것은 이미 여기에있다
 
220Volt :
감사합니다. 여전히 작은 질문이 있습니다. 두 프로세스가 한 섹션에서 읽는 것이 허용됩니까?
예, 읽는 데 문제가 없습니다.
 
openlive :

그래서 그것은 이미 여기에있다
문제... 신호 모듈을 부착하십시오(저는 없습니다). 우리는 볼 것이다.