그리고 마켓 리뷰에서 심볼이 선택되고 심볼의 히스토리가 전문가에 의해 유지되는 한 동기화된 상태로 유지됩니다. 전문가가 보유한다는 것은 예를 들어 하나의 막대를 복사하여 2분에 한 번 이상 이 기록에 액세스하는 것을 의미합니다. 히스토리가 동기화되면 하나의 막대를 복사하는 데 시간이 소요되지 않습니다. 단 몇 번의 프로세서 주기입니다. 또는 방금 말했듯 이 막대의 수와 몇 사이클을 요청하십시오.
그리고 Market Watch에서 심볼을 선택하고 Expert Advisor가 심볼의 이력을 유지하는 한 동기화된 상태로 유지됩니다. 전문가가 보유한다는 것은 예를 들어 하나의 막대를 복사하여 2분에 한 번 이상 이 기록에 액세스하는 것을 의미합니다. 히스토리가 동기화되면 하나의 막대를 복사하는 데 시간이 소요되지 않습니다. 단 몇 번의 프로세서 주기입니다.
매 틱마다 이 작업을 수행할 것을 제안합니까?
나는 모든 OnBookEvent() 화재에 동기화를 유지합니다 :(
여기에는 질문이 없습니다. 질문은 이것 외에도 매번 CopyRates() 함수를 호출하도록 제안된다는 것입니다. .... 이것은 제가 보기에 일종의 주석입니다...
:)
{
if (symbol == Symbol ())
{
GetBars( Symbol (), time_frame);
}
}
그게 그들이 나를 SD로 가르친 방식이야
:)
{
if (symbol == Symbol ())
{
GetBars( Symbol (), time_frame);
}
}
뭔가를 말하거나 보여주고 싶다면- 보여주세요, 제발, 그것은 정상입니다 ... 여기에 어떤 종류의 기능이 있고 무엇을하는지 추측하는 것은 사냥이 아닙니다.
추가됨:
가르쳤다? 구현을 제공했습니까?
뭔가를 말하거나 보여주고 싶다면- 보여주세요, 제발, 그것은 정상입니다 ... 여기에 어떤 종류의 기능이 있고 무엇을하는지 추측하는 것은 사냥이 아닙니다.
추가됨:
가르쳤다? 구현을 제공했습니까?
괜찮아?
그들은 2분 안에 데이터가 언로드되고 동기화를 유지하기 위해
바에 전화하는 것이 좋습니다
//| Custom indicator Get bars function |
//+------------------------------------------------------------------+
int GetBars( string symbol, ENUM_TIMEFRAMES period)
{
if (! IsStopped ())
{
if ( SymbolIsSynchronized (symbol))
{
if ( bool ( SeriesInfoInteger (symbol, period, SERIES_SYNCHRONIZED )))
{
int a_bars = Bars (symbol, period);
if (a_bars > 0 )
{
return (a_bars);
}
else
{
return (GetLocalData(symbol, period));
}
}
else
{
return (GetLocalData(symbol, period));
}
}
else
{
return (LoadServerData(symbol, period));
}
}
return ( 0 );
}
여기
// Custom indicator Check timer function |
//+------------------------------------------------------------------+
bool CheckTimer( const ulong start_value, const ulong per_value)
{
ulong end_value = GetMicrosecondCount ();
if (end_value < start_value)
{
if ((start_value - end_value) >= per_value) return ( true );
}
else
{
if ((end_value - start_value) >= per_value) return ( true );
}
return ( false );
}
//+------------------------------------------------------------------+
//| Custom indicator Get local data function |
//+------------------------------------------------------------------+
int GetLocalData( const string a_symbol, ENUM_TIMEFRAMES a_period)
{
long first_date;
int fail_cnt = 0 ;
while ((fail_cnt < 3 ) && ! IsStopped ())
{
first_date = long ( SeriesInfoInteger (a_symbol, PERIOD_M1 , SERIES_TERMINAL_FIRSTDATE ));
if (first_date > 0 )
{
int f_cnt = 0 ;
datetime times[ 1 ];
long a_bars = 0 ;
while ((f_cnt < 5 ) && ! IsStopped ())
{
if ( bool ( SeriesInfoInteger (a_symbol, PERIOD_M1 , SERIES_BARS_COUNT , a_bars)))
{
if ( a_bars > 0 )
{
if ( bool ( SeriesInfoInteger (a_symbol, a_period, SERIES_BARS_COUNT , a_bars)))
if (a_bars > 0 ) return ( int (a_bars));
}
}
else
{
//--- force timeseries build
CopyTime (a_symbol, a_period, 0 , 1 , times);
ulong start_tick = GetMicrosecondCount ();
while (!CheckTimer(start_tick, 5000 ))
{
f_cnt--;
f_cnt++;
}
}
f_cnt++;
}
}
else
{
ulong start_tick = GetMicrosecondCount ();
while (!CheckTimer(start_tick, 5000 ))
{
fail_cnt--;
fail_cnt++;
}
}
//---
fail_cnt++;
}
return ( 0 );
}
//+------------------------------------------------------------------+
//| Custom indicator Get server data function |
//+------------------------------------------------------------------+
int LoadServerData( const string a_symbol, ENUM_TIMEFRAMES period)
{
int fail_cnt = 0 ;
while ((fail_cnt < 5 ) && ! IsStopped ())
{
long first_date = long ( SeriesInfoInteger (a_symbol, PERIOD_M1 , SERIES_SERVER_FIRSTDATE ));
if (first_date > 0 )
{
if ( SymbolIsSynchronized (a_symbol))
{
return (GetLocalData(a_symbol, period));
}
}
else
{
ulong start_tick = GetMicrosecondCount ();
while (!CheckTimer(start_tick, 20000 ))
{
fail_cnt--;
fail_cnt++;
}
}
fail_cnt++;
}
return ( 0 );
}
//+------------------------------------------------------------------+
//| Custom indicator Get bars function |
//+------------------------------------------------------------------+
int GetBars( string symbol, ENUM_TIMEFRAMES period)
{
if (! IsStopped ())
{
if ( SymbolIsSynchronized (symbol))
{
if ( bool ( SeriesInfoInteger (symbol, period, SERIES_SYNCHRONIZED )))
{
int a_bars = Bars (symbol, period);
if (a_bars > 0 )
{
return (a_bars);
}
else
{
return (GetLocalData(symbol, period));
}
}
else
{
return (GetLocalData(symbol, period));
}
}
else
{
return (LoadServerData(symbol, period));
}
}
return ( 0 );
}
GetBars를 호출하여 동기화를 유지하거나 데이터를 가져오려고 합니다.
괜찮아?
그들은 2분 안에 데이터가 언로드되고 동기화를 유지하기 위해
바에 전화하는 것이 좋습니다
//| Custom indicator Get bars function |
//+------------------------------------------------------------------+
int GetBars( string symbol, ENUM_TIMEFRAMES period)
{
if (! IsStopped ())
{
if ( SymbolIsSynchronized (symbol))
{
if ( bool ( SeriesInfoInteger (symbol, period, SERIES_SYNCHRONIZED )))
{
int a_bars = Bars (symbol, period);
if (a_bars > 0 )
{
return (a_bars);
}
else
{
return (GetLocalData(symbol, period));
}
}
else
{
return (GetLocalData(symbol, period));
}
}
else
{
return (LoadServerData(symbol, period));
}
}
return ( 0 );
}
이거 비슷하지 않나요?
if ( bool ( SeriesInfoInteger (symbol, period, SERIES_SYNCHRONIZED )))
예, 동기화가 없으면 Bars()가 0을 반환하는 것 같았습니다... 테스트를 해야 합니다...
매 틱마다 이 작업을 수행할 것을 제안합니까?
그리고 마켓 리뷰에서 심볼이 선택되고 심볼의 히스토리가 전문가에 의해 유지되는 한 동기화된 상태로 유지됩니다. 전문가가 보유한다는 것은 예를 들어 하나의 막대를 복사하여 2분에 한 번 이상 이 기록에 액세스하는 것을 의미합니다. 히스토리가 동기화되면 하나의 막대를 복사하는 데 시간이 소요되지 않습니다. 단 몇 번의 프로세서 주기입니다. 또는 방금 말했듯 이 막대의 수와 몇 사이클을 요청하십시오.
무엇 때문에? 한 번의 행동으로 충분합니다.
그리고 Market Watch에서 심볼을 선택하고 Expert Advisor가 심볼의 이력을 유지하는 한 동기화된 상태로 유지됩니다. 전문가가 보유한다는 것은 예를 들어 하나의 막대를 복사하여 2분에 한 번 이상 이 기록에 액세스하는 것을 의미합니다. 히스토리가 동기화되면 하나의 막대를 복사하는 데 시간이 소요되지 않습니다. 단 몇 번의 프로세서 주기입니다.
표시기에 2분 간격이 포함되어 있습니까?
네, 동기화 사실을 확인하면 동기화도 진행되나요?
표시기에 2분 간격이 포함되어 있습니까?
네, 동기화 사실을 확인하면 동기화도 진행되나요?
동기화 사실 확인에 의해 동기화가 보류되지 않습니다.