FORTS 도와주세요

 

안녕하세요!

다시 servicedex는 오류를 재현할 수 없습니다!

이 코드를 컴파일하고 MIX-6.15 기호에 표시기를 "던지십시오"

( 메타에디터에서 아님)

//+------------------------------------------------------------------+
//|                                                         Test.mq5 |
//|                        Copyright 2014, MetaQuotes Software Corp. |
//|                                              http://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2014, MetaQuotes Software Corp."
#property link      "http://www.mql5.com"
#property version   "1.00"
#property indicator_separate_window
#property indicator_buffers 1
#property indicator_plots   1
//
bool is_failed = false;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {
//--- indicator buffers mapping
  
  SymbolSelect( "RTS-6.15", true );
  SymbolSelect( "Si-6.15", true );
//---  
  ResetLastError();
//---
  if ( SymbolSelect( "MIX-6.15", true ) )
  {
    long total_bars = long( SeriesInfoInteger( "MIX-6.15", PERIOD_M1, SERIES_BARS_COUNT ) );
    if ( total_bars > 0 )
    {
      if ( SymbolSelect( "RTS-6.15", true ) )
      {
        total_bars = long( SeriesInfoInteger( "RTS-6.15", PERIOD_M1, SERIES_BARS_COUNT ) );
        if ( total_bars > 0 )
        {
          if ( SymbolSelect( "Si-6.15", true ) )
          {
            total_bars = long( SeriesInfoInteger( "Si-6.15", PERIOD_M1, SERIES_BARS_COUNT ) );
            if ( total_bars > 0 )
            {
              Print( "Init OK." );
            }
            else
            {
              is_failed = true;
              Print( "Get Bars failed RTS-6.15 Last error = ", string(GetLastError() ) );
            }    
          }
          else
          {
            is_failed = true;
            Print( "Symbol Si-6.15 not selected" );
          }
        }
        else
        {
          is_failed = true;
          Print( "Get Bars failed RTS-6.15 Last error = ", string(GetLastError() ) );
        }
      } 
      else
      {
        is_failed = true;
        Print( "Symbol RTS-6.15 not selected" );
      }
    }
    else
    {
      is_failed = true;
      Print( "Get Bars failed MIX-6.15 Last error = ", string(GetLastError() ) );
    }
  } 
  else
  {
    is_failed = true;
    Print( "Symbol MIX-6.15 not selected" );
  } 
//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
  {
//---
   if ( is_failed )
   {
     Print( "Sorry! Get Bars failed." );
   }
   else Print( "Bingo! We done.");
//--- return value of prev_calculated for next call
   return(rates_total);

결과(전문가 탭에 표시됨)는 여기에 게시하십시오.

 
2015.03.26 11:44:13.934	test (MIX-6.15,H1)	Bingo! We done.
2015.03.26 11:44:13.934	test (MIX-6.15,H1)	Init OK.

Market Watch의 도구는 모두 사용할 수 있습니다. 실제 계좌 개설

테스트를 다시 했습니다. 나머지 악기를 켠 상태에서 MIX에 던졌습니다.

다 괜찮아.

 

개설의 실제 계정. Ri 및 Si 차트도 열려 있습니다.

 
2015.03.26 13:56:05.487 테스트(MIX-6.15,M1) 빙고! 완료했습니다.
2015.03.26 13:56:05.020 테스트(MIX-6.15,M1) 빙고! 완료했습니다.
2015.03.26 13:56:02.566 테스트(MIX-6.15,M1) 빙고! 완료했습니다.
2015.03.26 13:56:02.566 테스트(MIX-6.15,M1) 빙고! 완료했습니다.
2015.03.26 13:56:02.560 테스트(MIX-6.15,M1) 빙고! 완료했습니다.
2015.03.26 13:56:01.232 테스트(MIX-6.15,M1) 빙고! 완료했습니다.
2015.03.26 13:56:01.232 테스트(MIX-6.15,M1) 빙고! 완료했습니다.
2015.03.26 13:56:01.144 테스트(MIX-6.15,M1) 빙고! 완료했습니다.
2015.03.26 13:56:01.024 테스트(MIX-6.15,M1) 빙고! 완료했습니다.

2015.03.26 13:56:01.024 테스트(MIX-6.15,M1) 초기화

실제 열기 win7 x64 C:\Program Files\OPENING-BROKER\terminal64.exe 빌드 1085


 

고맙습니다!

그리고 나는 가졌다:

Win7/64 Ultimate MT5 빌드 1085

 2015.03 . 26 15 : 30 : 37.229 Test (MIX- 6.15 ,M1)      Sorry! Get Bars failed.
2015.03 . 26 15 : 30 : 37.229 Test (MIX- 6.15 ,M1)      Get Bars failed RTS- 6.15 Last error = 4401
 

그리고 일반적으로 MIX-6.15, WIN 7-64 홈 프리미엄 MT5 빌드 1085에서 충돌합니다.

 2015.03 . 26 15 : 44 : 27.729 Test (MIX- 6.15 ,H1)      Get Bars failed MIX- 6.15 Last error = 4401
2015.03 . 26 15 : 44 : 27.729 Test (MIX- 6.15 ,H1)      Sorry! Get Bars failed.
 

FORTS 사용자!

3분만 투자해주세요. 시각!

"플로팅" 오류를 수정하려면 다음이 필요합니다.

더 많은 통계!

 
Mikalas :

FORTS 사용자!

3분만 투자해주세요. 시각!

"플로팅" 오류를 수정하려면 다음이 필요합니다.

더 많은 통계!

나는 3분을 보낸다))

마이클, 당신은 이것을 할 수 없습니다 - 인터넷에서 한 번의 요청으로 . 모든 데이터가 준비되었다는 보장은 없습니다.

그것이 당신이 그것을 하는 방법입니다 - 그것은 물론 의미가 있습니다.

 #property copyright "Copyright 2014, MetaQuotes Software Corp."
#property link        "http://www.mql5.com"
#property version    "1.00"
#property indicator_separate_window
#property indicator_buffers 1
#property indicator_plots    1
//
bool is_failed = false ;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit ()
  {
//--- indicator buffers mapping
   SymbolSelect ( "MIX-6.15" , true );
   SymbolSelect ( "RTS-6.15" , true );
   SymbolSelect ( "Si-6.15" , true );
//---  
   ResetLastError ();
//---  
   int total_bars = Bars ( "MIX-6.15" , PERIOD_M1 );
   if ( total_bars > 0 )
  {
    total_bars = Bars ( "RTS-6.15" , PERIOD_M1 );
     if ( total_bars > 0 )
    {
      total_bars = Bars ( "Si-6.15" , PERIOD_M1 );
      {
         if ( total_bars > 0 )
        {
           Print ( "Init OK." );
        }
         else
        {
          is_failed = true ;
           Print ( "Get Bars failed Si-6.15 Last error = " , string ( GetLastError () ) );
        }
      }
    }
     else
    {
      is_failed = true ;
       Print ( "Get Bars failed RTS-6.15 Last error = " , string ( GetLastError () ) );
    }
  }
   else
  {
    is_failed = true ;
     Print ( "Get Bars failed MIX-6.15 Last error = " , string ( GetLastError () ) );
  } 
//---
   return ( INIT_SUCCEEDED );
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int OnCalculate ( const int rates_total,
                 const int prev_calculated,
                 const datetime &time[],
                 const double &open[],
                 const double &high[],
                 const double &low[],
                 const double &close[],
                 const long &tick_volume[],
                 const long &volume[],
                 const int &spread[])
  {
   ResetLastError ();
//---  
   int total_bars = Bars ( "MIX-6.15" , PERIOD_M1 );
   if ( total_bars > 0 )
  {
    total_bars = Bars ( "RTS-6.15" , PERIOD_M1 );
     if ( total_bars > 0 )
    {
      total_bars = Bars ( "Si-6.15" , PERIOD_M1 );
      {
         if ( total_bars > 0 )
        {
           Print ( "Init OK." );
        }
         else
        {
          is_failed = true ;
           Print ( "Get Bars failed Si-6.15 Last error = " , string ( GetLastError () ) );
        }
      }
    }
     else
    {
      is_failed = true ;
       Print ( "Get Bars failed RTS-6.15 Last error = " , string ( GetLastError () ) );
    }
  }
   else
  {
    is_failed = true ;
     Print ( "Get Bars failed MIX-6.15 Last error = " , string ( GetLastError () ) );
  } 
//---
   if ( is_failed )
   {
     Print ( "Sorry! Get Bars failed." );
   }
   else Print ( "Bingo! We done." );
//--- return value of prev_calculated for next call
   return (rates_total);
  }
 

다중 통화 표시기 는 그렇게 간단하지 않습니다.

먼저 도구의 가용성을 확인하십시오.

 bool CorrectSymbol( string symbol )
{
         ResetLastError ();
         if ( SymbolInfoDouble ( symbol, SYMBOL_BID ) > DBL_EPSILON ) return ( true );

         // символ не выбран в "Обзоре рынка" (нет в списке доступных)
         if ( GetLastError () == 4302 )
        {
                 if ( SymbolSelect ( symbol, true ) && SymbolInfoInteger ( symbol, SYMBOL_SELECT ) ) return ( true );
        }

         return ( false );
}

그런 다음 기록이 정상적으로 로드되도록 사용된 모든 도구의 차트를 엽니다(보이지 않는 차트 개체로 충분함).

그런 다음에만 CheckLoadHistory를 사용하여 기록을 로드하십시오.

그러나 이것으로도 충분하지 않을 수 있습니다.

 
Dima_S :

나는 3분을 보낸다))

마이클, 당신은 이것을 할 수 없습니다 - 인터넷에서 한 번의 요청으로 . 모든 데이터가 준비되었다는 보장은 없습니다.

그것이 당신이 그것을 하는 방법입니다 - 그것은 물론 의미가 있습니다.

동의합니다. 약간 틀립니다. 코드를 다시 작성했습니다(소스 코드 참조). 하지만 결과는 동일합니다!

 2015.03 . 26 16 : 20 : 55.564 Test (MIX- 6.15 ,M1)      Sorry! Get Bars failed.
2015.03 . 26 16 : 20 : 55.564 Test (MIX- 6.15 ,M1)      Get Bars failed Si- 6.15 Last error = 4401
 
Mikalas :

동의합니다. 약간 틀립니다. 코드를 다시 작성했지만 결과는 동일합니다!

그들은 나를 어떻게 시험했는가?
사유: