Announcement

Collapse
No announcement yet.

Starting out and looking for answers

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Starting out and looking for answers

    Hi, I just started using Desktop API and would like to know...

    Q1:
    esignal_OnQuoteChanged(ByVal sSymbol As String)
    -> esignal.GetBasicQuote(sSymbol)

    I'm only able to get Bid,Ask and Last from this, is there any way to extract day high/low/change realtime?

    Q2:
    Private Sub QuoteRefresher_Timer()
    sSymbol = edtRequestSymbol.Text
    esignal.RequestSymbol sSymbol, False
    Dim quote As IESignal.BasicQuote
    quote = esignal.GetBasicQuote(sSymbol)

    edtBid.Text = Str$(quote.dBid)
    edtAsk.Text = Str$(quote.dAsk)
    edtLast.Text = Str$(quote.dLast)
    End Sub

    Running the above statement multiple times will greatly increase winsig.exe memory load. I'm I wrong to say that this actually take 1 quote from Esignal then disconnects? When I actually loops the above statement over time mem usage increased (4k at a time?) to 400kMem over 48hrs -> Crash!
    I know i should be using esignal_OnQuoteChanged. but just my 2 cents on this issue

  • #2
    Found the DayHigh/Low/Change in

    esignal.XMLGetBasicQuote(sSymbol)

    now that makes me wonder why it's isn't implemented in

    esignal.GetBasicQuote(sSymbol)

    Comment


    • #3
      XMLGetBasicQuote() is much newer than its predissesor, GetBasicQuote(), and has more data elements because it returns XML.

      Yes, if you run this multiple times without handling the responses, it will cause memory usage to increase. This is because the responses are queueing up and will eventually lead to a crash.

      Also, timers are a bad idea unless you make sure that you give the API enough time to handle all of the responses to your requests.

      Comment


      • #4
        So the disadvantages of returning high/low/change using GetBasicQuote is???

        I can tell u right off the bat that using XMLGetBasicQuote then parsing the every values out from the VB6 require more processing power + additional lib files from MSXML

        x 50 quotes and the application would be slower then directly getting the inputs from GetBasicQuote.high,low,change

        Comment


        • #5
          GetBasicQuote only has Bid, Ask and Last, along with the sizes, whereas XMLGetBasicQuote was added later and has more data.

          You can determine high, low and change through variables in your application, no?

          Comment


          • #6
            Another question :

            I got a automation error of some sort and winsig.exe Mem usage is 500,000k+ when i left the program running overnight with 49 quotes on.

            Private Sub esignal_OnQuoteChanged(ByVal sSymbol As String)

            Dim quote As IESignal.BasicQuote
            quotexml = esignal.XMLGetBasicQuote(sSymbol) <--- Debug error.

            The above statement was giving the error according to the debug program of visual basic.

            I have no idea what is wrong now. Since "OnQuoteChanged" is used instead of timers.

            Comment


            • #7
              What is your question exactly?

              It sounds like you are following some electronically traded futures symbols, so you will be receiving a very high volume of quotes. You may want to use the GetBasicQuote function and compute the high, low and change within your application rather than using XMLGetBasicQuote, since you claim that it uses more processing power.

              Comment


              • #8
                It's not about the processing power. It regarding winsig.exe which stops giving my program quotes after some time.

                Is it normal for winsig.exe's "Memory usage" to go above 100k (I got it up to 500k last night). What happens after that is my program stop getting quotes and just "hangs". I tried with both XML and normal GetBasicQuote and both gives the same results.

                Winsig.exe Memory usage
                6am : 62530K
                7am : 64234K
                8am : 68432K (i leave the office )
                .
                .
                .
                10pm : 300000K <--- Hanged. ( when i get back to work. )

                [Time based on US hours, I'm living in Singapore thus my night = US day]

                Currently my program ONLY does the following :
                1) Requests 49 symbols from Esignal
                2) esignal_OnQuoteChanged :
                XMLGetBasicQuote
                3) Display XML String in a textbox.

                Am I missing something out?


                ===[Codes]===

                Private Sub cmdRequest_Click()
                If cmdRequest.Caption = "Request Quote" Then

                'Adding symbol via textfile
                Dim file_quote As String
                Dim quotenum As Integer
                quotenum = 0

                Open filepath.Text For Input As #1

                Do Until (EOF(1))
                Line Input #1, file_quote
                esignal.RequestSymbol file_quote, True
                Loop
                Close
                cmdRequest.Caption = "Stop Quote"

                ElseIf cmdRequest.Caption = "Stop Quote" Then

                'Releaseing symbols
                quotenum = 0

                Open filepath.Text For Input As #1

                Do Until (EOF(1))
                Line Input #1, file_quote
                esignal.ReleaseSymbol file_quote
                Loop
                Close
                cmdRequest.Caption = "Request Quote"
                End If

                End Sub


                Private Sub esignal_OnQuoteChanged(ByVal sSymbol As String)

                Dim quote As IESignal.BasicQuote
                quotexml = esignal.XMLGetBasicQuote(sSymbol)
                textbox.Text = quotexml

                End Sub

                ===[Symbols]===

                XAU A0-FX,XAG A0-FX,WMT,UTX,SGDIDR A0-FX,SGD A0-FX,QLGC,PG,NZDJPY A0-FX,MWD,MSFT,MRK,MO,MMM,MER,LLY,KO,KLAC,JPY A0-FX,JNJ,IDR A0-FX,IDPH,IBM,GOOG,GM,GILD,GBPJPY A0-FX,GBP A0-FX,EURJPY A0-FX,EUR A0-FX,ERTS,EBAY,DELL,CHFJPY A0-FX,CHF A0-FX,CAT,CAD A0-FX,C,BAC,AUDJPY A0-FX,AUD A0-FX,$XAX,$SPX,$N225-IDX,$INDU,$HSIX-IDX,$DAXI,$COMPQ,$CAC

                Last edited by garytay; 12-13-2004, 11:00 PM.

                Comment


                • #9
                  Note the stress test program.
                  1) Winsig.exe Mem size is very large and continue to increase in size even after crashing.
                  2) Program crashed
                  3) 3:20am (GMT+8) = 2:20pm (New York), log stopped there.
                  4) Codes are the previous post (just below this one)





                  So... what went wrong?

                  Comment

                  Working...
                  X