| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

Events_OnOrderExecuted

Page history last edited by Ryan Olson 14 years, 3 months ago

This will insert the correct method signature needed to hook or trap the OnOrderExecuted event fired from OmniTrader.  This event fires anytime an order is executed at the currently selected broker.  Double clicking this item will insert the following code.

 

Sub MyOnOrderExecuted(ByVal oSymbol As SymbolObject, ByVal oOrder As OrderObject)

    ' statements

End Sub

 

You can change the method name (MyOnOrderExecuted) to anything you like however the signature must remain unchanged in order to establish the hook. To actually establish the hook you need to call OmniPilot.OnOrderExecuted(AddressOf <Method Name>)

 

Example

Sub OnStartup

    StartOT

    OmniPilot.OnOrderExecuted(AddressOf MyOnOrderExecuted)

End Sub

Sub MyOnOrderExecuted(ByVal oSymbol As SymbolObject, ByVal oOrder As OrderObject)

    LogAction("An order has executed on symbol " & oSymbol.Symbol & " - Number of Shares=" & oOrder.Shares)

End Sub

 

Also See

OmniPilot.OnOrderExecuted

Comments (0)

You don't have permission to comment on this page.