Events_OnBrokerConnected | Nirvana Systems Inc.

Events_OnBrokerConnected

Events_OnBrokerConnected

This will insert the correct method signature needed to hook or trap the OnBrokerConnected event from OmniTrader.  This event is triggered when a successful connection is made to any broker.  Double clicking this item will insert the following code.

Sub MyOnBrokerConnected(ByVal sBroker As String)
    ‘ statements
End Sub

You can change the method name (MyOnBrokerConnected) to anything you like however the signature must remain unchanged in order to establish the hook. To actually establish the hook so that this method is executed when the BrokerConnected event fires you need to call OmniPilot.OnBrokerConnected(AddressOf ).

Example
Sub OnStartUp
     StartOT
     OmniPilot.OnBrokerConnected(AddressOf MyOnBrokerConnected)
End Sub

Sub MyOnBrokerConnected(ByVal sBroker As String)
    LogAction(“Successfully connected to ” & sBroker)
End Sub

Also See
OmniPilot.OnBrokerConnected
Broker

>