自定义策略扩展

Published
int CStDatabase::LoadKData( CStock *pstock, int period )
{
	if( !pstock || !IsOK())	return 0;

	int nSize = m_pStore->LoadKData( pstock, period );

	for( int i=0; i<m_aptrAssistant.GetSize(); i++ )
	{
		IStStore	* pStore	=	(IStStore *)m_aptrAssistant.ElementAt(i);
		CStock	stock;
		stock.SetStockInfo( &(pstock->GetStockInfo()) );
		if( pStore->LoadKData( &stock, period ) > 0 )
		{
			//从不同的数据提供接口中合并K线数据 ,这里需要性能优化 by freeman
			nSize	=	pstock->MergeKData( stock, period );
		}
	}
	return nSize;
}