Sterling API Developer Thread

Discussion in 'Trading Software' started by mnx, Apr 25, 2008.

  1. Read over the ActiveX API documentation from the Sterling website and download the examples. This will show you the basics of getting quotes and sending orders.
     
    #151     Apr 20, 2009
  2. akademiks

    akademiks

    I start my bot at 9h30, i get quoteSnap events for all my quotes...i store the fClosePrice property for each as a previousClosePrice.

    At 4pm, i am creating a report for all my quote with openPrice, previousClosePrice and closePrice wich is the closing price at the end of the day.

    I want to know if someone knows how to get the fClosePrice after a quoteSnap..since its not a property on structSTIQuoteUpdate....
     
    #152     May 8, 2009
  3. Best I can think of is unregister all and reregister when you want another quote snap.
     
    #153     May 8, 2009
  4. akademiks

    akademiks

    OK i tought about this ... but i did not find out how to deregister a quote? Thank you sterling doc!
     
    #154     May 8, 2009
  5. trader21

    trader21

    I built a trading system around the Sterling API examples in VB.

    For example I get my quotes in the HashTable using the structSTIOrderUpdate. Another VB Form gets the values from the HashTable and does all the trading. Sometimes I have delays in the software (about 1 sec), which means that the quotes might not get updated for that second

    I've noticed lately that the quotes lag the market sometimes by tens of seconds. (I have about 50 symbols).

    First of all, is it a good practice to get the quotes in the HashTable?
    Do you have any ideas/suggestions?

    Thanks
     
    #155     May 27, 2009
  6. bespoke

    bespoke

    From what I know, hash tables are the most efficient way to map a key (the symbol) and a value (a number) in VB. You need that value to find your symbol's place in an array (in their example it's row in a MSFlexgrid). So you aren't exactly getting the quotes in the hash table, you're just using it to find the row associated with the symbol.

    As you add more symbols you may not want to display them in the flexgrid because that can slow down your program.

    To get rid of your lag, go into your sterling settings and tick on the box "combine activex quotes". If you don't see it, it's time to update sterling!
     
    #156     May 27, 2009
  7. Very useful and helpful thread -- thanx
     
    #157     May 27, 2009
  8. bsesen12

    bsesen12

    I am looking for a programmer who can write my strategy and link it to Sterling API
     
    #158     Jun 19, 2009
  9. akademiks

    akademiks

    I can do that
     
    #159     Jun 19, 2009
  10. I updated Sterling and my programs stopped working, I can't get quoteUpdates. They were working fine prior to the software upgrade. Has anyone else experienced a similar problem?
     
    #160     Jun 24, 2009