Announcement

Collapse
No announcement yet.

Why aren't events firing in Delphi? In VB I'm getting shorted on data...

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

  • Why aren't events firing in Delphi? In VB I'm getting shorted on data...

    I've got several questions. I'm just starting with this and haven't stumbled on the right combination to make the api work in Delphi. I've tried it on Delphi 4 and I was able to connect and verify that I was entitled. I could get quotes but my events didn't work.

    I tried to get it to work in Delphi 2005 and I was able to get the activex control to appear in the Samples controls (I wasn't able to do that in (Delphi 4). I thought I was home free because now I could create the events from the events tab. They never fire off though. I can step through the tlb and see that the events are occuring but the FOnevent is never assigned. Not sure what I'm doing wrong. I've never tried to register an active x control before...

    Last I tried to use the esignal examples and write a basic program in VB. My question here is when I request historical data for 200 days it returns 140+ bars. When I request historical data for 500 days it returns 300 and something. Why doesn't it return the number of days I asked for?

    Thanks much for any clues...

    Alan

  • #2
    Delphi Integration

    its is better just to import the TLB definition.
    you don't need to create this as ActiveX control.

    Go to Delphi -> Project -> Import Type Library
    then browse to the Winsig.exe file and automatically you will get the tlb file added in your project.

    the IESignal_TLB file contains all the information you need.
    as you can see from the tlb in order to recieve events you need to assigned the events to a " procedure of object" in your code.

    esignal := THooks.Create(nil);
    esignal.SetApplication(YOUR_USER);
    esignal.OnQuoteChanged := self.esignal_OnQuoteChanged;

    1. esignal is a global THooks object (from the IESignal_TLB file )
    2. procedure esignal_OnQuoteChanged(ASender: TObject; const sSymbol: WideString); - This is a procedure defined inside a class (in this case TForm) hence its a procedure of object. the params must be the same as defined in the tlb.

    please note that I found that some implementations of the events will cause memory leeks and exceptions inside the winsig.exe so there is some more into this.

    Comment


    • #3
      How is the TLB definition found / imported using Delphi 10? When I attempt to register Winsig.exe, starting from menu View - Registered Type Libraries, it does not seem to register Winsig.exe. I am assuming that once I do that, I can use Component - Import Component to create a TLB, but please let me know if I am wrong.

      Note: I am using IESignal_TLB that I created years ago with a different version of Delphi and it seems to be working ok with eSignal v. 10.6 -- but I would like to update to the current version of the TLB file.

      Comment

      Working...
      X