• C#
  • Java
  • VB
  • C++
  • Python
Contact us
Trigger Methods

The Trigger Method defined in the IBApi.Order class specifies how simulated stop, stop-limit, and trailling stops, and conditional orders are triggered. Valid values are:

  • 0 - The default method for instrument
  • 1 - "Double bid/ask" function, where stop orders are triggered based on two consecutive bid or ask prices.
  • 2 - "Last" function, where stop orders are triggered based on the last price
  • 3 - "Double last" function
  • 4 - Bid/ask function
  • 7 - Last or bid/ask function
  • 8 - Mid-point function

Below is a table which indicates whether a given secType is compatible with bid/ask-driven or last-driven trigger methods (method 7 only used in iBot alerts)

secTypeBid/Ask-driven (1, 4, 8)Last-driven (2, 3)Default behaviorNotes
STKyesyesLastThe double bid/ask is used for OTC stocks
CFD - Indexyesn/an/aEx IBUS500
OPTyesyesUS OPT: Double bid/ask, Other: Last
INDn/ayesn/aFor conditions only

Important notes :

  • If an incompatible triggerMethod and secType are used in your API order, the order may never trigger.
  • These trigger methods only apply to stop orders simulated by IB. If a stop-variant is handled natively, the trigger method specified is ignored. See our Stop Orders page for more information.