ANVIL API (Assent) Developer Thread

Quote from riskaverse305:

thanks for the reply, def helped resolve my mental block re: observers/observables

but of course, one problem solved reveals 20 more, so here goes:

first off, i'm using VC++ 8 to compile. in my stock class .cpp file i've included "Messages.h" mirroring the stock.cpp in the AnvilTrader example. When i go to compile the extension (which just consists of the api files, a dll entry .cpp, and a header and .cpp file for the stock class derived from observer) i get a ton of errors... one for every message in MessageIds.h:

\desktop\anvil api defaults\32-bit\anviltraderexample_2_6_7_4\MessageIds.h(6) : error C2236: unexpected 'enum' 'MessageIds'. Did you forget a ';'?
1>\desktop\anvil api defaults\32-bit\anviltraderexample_2_6_7_4\MessageIds.h(7) : error C2447: '{' : missing function header (old-style formal list?)
1>\desktop\anvil api defaults\32-bit\anviltraderexample_2_6_7_4\Messages.h(109) : error C2065: 'M_REQ_RESEND_PACKET' : undeclared identifier
1>\desktop\anvil api defaults\32-bit\anviltraderexample_2_6_7_4\Messages.h(118) : error C2065: 'M_RESP_RESEND_PACKET' : undeclared identifier

and so on for every message id

i'm obviously doing something silly. the a/c is broken in my office and my brain is functioning accordingly

AnvilTrader still compiles and runs, so its not anything i did to MessageIds.h

thanks again for the help
It sounds to me like this has something to do with your project settings -- it's not an API specific problem.

Off the top of my head, I couldn't tell you what is wrong. If you wanted to zip up your entire project and send it to me, I might be able to help. You can PM me if you want.
 
Quote from ctarmor-et:

Thank you .. it definetly helps...

Althought, I do get them through the day ..... I am wondering if I am using the right IP addresses from our server.

In my case it seems to be affecting market data as well as orders.

thanks for your post ...
Did you ever track this down to a root cause? I'm having issues occasionally where Anvil doesn't recognize that it's lost connectivity with the server (usually the Market Summary server.) I just stop receiving data.

If I go into the settings, Accounts tab, and change the Summary Server, I can get it to reconnect (I'll see the "connection lost" message and the "connected" message in the Anvil window...

But I'm not sure what I can do if the API doesn't realize it's lost connectivity...

I'm wondering if this problem is related.
 
Quote from tfjield:

Did you ever track this down to a root cause? I'm having issues occasionally where Anvil doesn't recognize that it's lost connectivity with the server (usually the Market Summary server.) I just stop receiving data.

If I go into the settings, Accounts tab, and change the Summary Server, I can get it to reconnect (I'll see the "connection lost" message and the "connected" message in the Anvil window...

But I'm not sure what I can do if the API doesn't realize it's lost connectivity...

I'm wondering if this problem is related.

No, the problem still persits. Tech support says that the ANVIL log shows no disconnection so they do not know why my verison is getting that disconnect message.

Your diagnose is the same that I am getting. Werind diconnection issues and the API stops receveing data suring the time the acct disconnects. I did try the summary server change, but still get the same issue.
 
Quote from riskaverse305:

thanks for the reply, def helped resolve my mental block re: observers/observables

but of course, one problem solved reveals 20 more, so here goes:

first off, i'm using VC++ 8 to compile. in my stock class .cpp file i've included "Messages.h" mirroring the stock.cpp in the AnvilTrader example. When i go to compile the extension (which just consists of the api files, a dll entry .cpp, and a header and .cpp file for the stock class derived from observer) i get a ton of errors... one for every message in MessageIds.h:

\desktop\anvil api defaults\32-bit\anviltraderexample_2_6_7_4\MessageIds.h(6) : error C2236: unexpected 'enum' 'MessageIds'. Did you forget a ';'?
1>\desktop\anvil api defaults\32-bit\anviltraderexample_2_6_7_4\MessageIds.h(7) : error C2447: '{' : missing function header (old-style formal list?)
1>\desktop\anvil api defaults\32-bit\anviltraderexample_2_6_7_4\Messages.h(109) : error C2065: 'M_REQ_RESEND_PACKET' : undeclared identifier
1>\desktop\anvil api defaults\32-bit\anviltraderexample_2_6_7_4\Messages.h(118) : error C2065: 'M_RESP_RESEND_PACKET' : undeclared identifier

and so on for every message id

i'm obviously doing something silly. the a/c is broken in my office and my brain is functioning accordingly

AnvilTrader still compiles and runs, so its not anything i did to MessageIds.h

thanks again for the help


It sounds the example code you have does not match the API version you have. This can cause unpredictable issues.
 
Quote from ctarmor-et:

It sounds the example code you have does not match the API version you have. This can cause unpredictable issues.

yeah, i was using one ver back, we'll see if that fixes it
 
Has anyone work with the API to access the historical bars stored in ANVIL ? They have multiple APIs but I am unclear how to use them.

Some of the APIs from StockBase are:
---> bool LoadHistoryChart(unsigned int from, unsigned int to, unsigned int unit)
---> const void* GetHistoryChart(unsigned int day)
---> const ChartPoint* WINAPI B_GetHistoryChartPoint(const void* chart, unsigned int minute);


It would be great to post some sample code on how to:

- Create historical chart (1min, 5min, etc)
- Retrieve current and past bars ChartPoint
- Create multiple time frames

Anyone ?
 
I do not have real numbers but it is pretty fast considering the ordesr are placed the GUI thread...it al;so depends the latency on your conenction to the asent servers. ...

I have seen orders placed in about 100s from the moment I place it ...
 
Back
Top