There is lots of discovering you need to do in simulation mode. Most impotantly msgs received when an order is paced, positions changed, etc ...
Here is some sample code you can use to debug all messages. You can use this in the acct and stock Process() call.
I tried to comment parts of it.
<i>
//--------------------------------------------------------------------------------
void CMyStock:

rocess(const Message* message, Observable* from, const Message* additionalInfo)
{
try
{
switch(message->GetType())
{
//-----------------------------------------------------------------------------
case M_NW2_INSIDE_QUOTE:
{
// Do something ...
}
break;
//-----------------------------------------------------------------------------
//
// NOT IMPLEMENTED - NOT IMPLEMENTED - NOT IMPLEMENTED - NOT IMPLEMENTED - NOT IMPLEMENTED
//
//-----------------------------------------------------------------------------
case M_AI_NEW_MM_BOOK:
case M_MARKET_IMBALANCE:
case M_FLUSH_ATTRIBUTED_BOOK_FOR_STOCK:
{
// Do not care about these ones
// Add to this case messages that you do not care about.
}
break;
default:
{
// I want to log any unexpected msgs. Good for new version of the API becasue sometimes they have ne wmsgs
MYLOGMACRO( "Not Implemented: ignored: -%s- - %s", m_Symbol.c_str(), ResolveMessageId(message->GetType(), additionalInfo).c_str() );
}
break;
};
}
//--------------------------------------------------------------------------------
#define MSGTYPEDESC( XTYPE ) case XTYPE: sDesc = ""#XTYPE""; break;
//--------------------------------------------------------------------------------
std::string CAnvilAccount::ResolveMessageId(int iMessageID, const Message* additionalInfo)
{
std::string sDesc;
switch(iMessageID)
{
// Define all message you want descriptions for. Grab more from the
// anvil message headers
MSGTYPEDESC( M_RESP_REFRESH_SYMBOL );
MSGTYPEDESC( M_RESP_REFRESH_SYMBOL_FAILED );
default:
{
char buf[1028];
sprintf_s( buf, 1028, "DEFAULT: %d", iMessageID );
sDesc = buf;
}
break;
}
// Check additional Inof
if ( additionalInfo != NULL )
sDesc += " - ADDITIONAL: " + ResolveMessageId( additionalInfo->GetType(), NULL );
return sDesc;
}
</i>