ANVIL API (Assent) Developer Thread

Discussion in 'Trading Software' started by ctarmor-et, Dec 10, 2007.

  1. Does anyone know how to get the Best Bid/Ask ECN in
    MsgInsideQuote - M_NW2_INSIDE_QUOTE message ?

    You can get the Bid/Ask (m_stockHandle->GetBid()) but I need to figure out what ECN is the NBBO.
     
    #31     Jan 4, 2008
  2. What is the best order routing when placing B_SendOrder() for NYSE ?
     
    #32     Jan 4, 2008
  3. one thing,can ANVIL make the buy and sell buttons bigger? lots of guys have been asking about that.
     
    #33     Jan 5, 2008
  4. I actually built an extension to place my trades with bigger buttons.

    I do not work for Assent. I am independent contractor. You want to send this question to their dev support tema in Hoboken.
     
    #34     Jan 5, 2008
  5. trom

    trom

    I have very limited programming knowledge. I'm looking to manipulate some data from a Market Sorter box.

    Basically what I want to do is this:

    Take market sorter Column X and Column Y.

    Find the difference between X and Y, and then sort the results by absolute value and display in another column.

    Isn't this something I could do in Excel? My problem is how do I call the data from Anvil into Excel?

    Any help would be much appreciated!
     
    #35     Jan 5, 2008
  6. I have not seen anything that you can link ANVIL to Excel (it does not mean there isn't)

    A developer can easily develop a link through DDE or COM into Excel using an ANVIL extension. The only issue that I may see is that ANVIL will be much faster than excel, and that can cause some bottleneck (freezing screens, perahps ANVIL disonnection). A throtleling mechanism may be need to be developed to avoid this issue.
     
    #36     Jan 6, 2008
  7. tfjield

    tfjield

    If our DLL's follow the examples provided by Assent, they're MFC extension DLL's, right? I thought we weren't supposed to call AFX_MANAGE_STATE in an extension DLL? Some Microsoft documentation says that we're not supposed to call this from an extension DLL.

    I currently don't but I'm wondering if I'm supposed to.
     
    #37     Jan 7, 2008
  8. I think you are thinking about the specific "Microsoft Extension DLLs". Happens to be that ANVIL calls the DLLs "extensions" also.

    I am not sure why but earlier I was having unpedictable issues, so I added the module state. they dissapeared
     
    #38     Jan 8, 2008
  9. tfjield

    tfjield

    Anyone know how to start Anvil during the off hours, so that when the servers come up in the morning it will automatically log in?

    I've been trying to use the A/no password login and tell that to pre-load another account, which looked promising... But when the morning rolls around, it always says the pre-load account failed to logon.

    Is there a better/more direct way to do this?
     
    #39     Jan 16, 2008
  10. tfjield

    tfjield

    pandabear, while re-reading this thread, I realized I wasn't very clear in my response to your question about creating another window. I thought that elaborating a bit might help new users of the API get started.

    If you are programming in MFC, you can create a CDialog. CDialog's don't create their own message pump, but use the message pump of their parent window, the handle to which you can get to pass to the CDialog initialization routines via a call to AfxGetMainWnd(). This follows the examples given by Assent with the API.

    Now you can set up a paradigm where you call, say, CMyDialog::CreateStock() which then posts a custom (WM_USER+) message to the CMyDialog, where by using PreTranslateMessage you can route the message to CMyDialog::OnCreateStock() which will be executed in the main Anvil thread.

    I use event handles to simulate SendMessage across threads (i.e. so that CreateStock() will not return until OnCreateStock() is finished, so that I can pass a return value, etc.)

    I didn't want to use SendMessage or SendMessageTimeout, because this will preempt the other messages already in the queue and may cause (fatal) delays in Anvil -- you might get booted from the server if you cause too much of a delay.

    You can do this with a hook, as well. I chose the CDialog approach because I'm very comfortable with MFC and it suited my style better. But either approach will give you suitable results.

    Hope this helps.
     
    #40     Jan 16, 2008